Skip to content

Commit 9d6d266

Browse files
committed
Remove recently-added npm-shrinkwrap.json entirely because it produces cross-platform install problems that are difficult to detect and avoid (refs #186).
1 parent c999acd commit 9d6d266

File tree

8 files changed

+11
-5628
lines changed

8 files changed

+11
-5628
lines changed

.github/workflows/ci.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
with:
2727
node-version: ${{ matrix.node-version }}
2828
- name: Install Dependencies
29-
run: npm clean-install
29+
run: npm install --no-package-lock
3030
- name: Run All Validations
3131
run: npm run ci
3232

@@ -38,7 +38,7 @@ jobs:
3838
- name: Package markdownlint-cli2
3939
run: npm pack
4040
- name: Install markdownlint-cli2 globally
41-
run: sudo npm install --global --production markdownlint-cli2-*.tgz
41+
run: sudo npm install --global --no-package-lock --production markdownlint-cli2-*.tgz
4242
- name: Lint without formatters
4343
run: markdownlint-cli2 CONTRIBUTING.md README.md
4444
- name: Package formatter-default
@@ -56,13 +56,13 @@ jobs:
5656
- name: Package formatter-summarize
5757
run: cd formatter-summarize && npm pack
5858
- name: Install formatters globally
59-
run: sudo npm install --global --production ./formatter-default/*.tgz ./formatter-codequality/*.tgz ./formatter-json/*.tgz ./formatter-junit/*.tgz ./formatter-pretty/*.tgz ./formatter-sarif/*.tgz ./formatter-summarize/*.tgz
59+
run: sudo npm install --global --no-package-lock --production ./formatter-default/*.tgz ./formatter-codequality/*.tgz ./formatter-json/*.tgz ./formatter-junit/*.tgz ./formatter-pretty/*.tgz ./formatter-sarif/*.tgz ./formatter-summarize/*.tgz
6060
- name: Lint with formatters
6161
run: cp test/outputFormatters-npm/.markdownlint-cli2.jsonc . && markdownlint-cli2 CONTRIBUTING.md README.md
6262
- name: Uninstall markdownlint-cli2 globally
63-
run: sudo npm uninstall --global markdownlint-cli2
63+
run: sudo npm uninstall --global --no-package-lock markdownlint-cli2
6464
- name: Install markdownlint-cli2 dependencies locally
65-
run: sudo npm install --production
65+
run: sudo npm install --no-package-lock --production
6666
- name: Lint with formatters
6767
run: node ./markdownlint-cli2 CONTRIBUTING.md README.md
6868

.github/workflows/sarif.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
security-events: write
1818
steps:
1919
- uses: actions/checkout@v3
20-
- run: npm install
20+
- run: npm install --no-package-lock
2121
- run: node markdownlint-cli2.js --config .github/sarif.markdownlint-cli2.jsonc '**/README.md' '#node_modules'
2222
continue-on-error: true
2323
- uses: github/codeql-action/upload-sarif@v2

.github/workflows/smoke-test.yml

+2-4
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,9 @@ jobs:
2424
- uses: actions/setup-node@v3
2525
with:
2626
node-version: ${{ matrix.node-version }}
27-
- run: npm clean-install
27+
- run: npm install
2828
- run: npm pack
2929
- run: npm exec --yes -- cpy-cli "markdownlint-cli2-*.tgz" . --rename=markdownlint-cli2.tgz
30-
- run: npm exec --yes -- del-cli node_modules .npmrc package.json package-lock.json npm-shrinkwrap.json
30+
- run: npm exec --yes -- rimraf node_modules .npmrc npm-shrinkwrap.json package.json package-lock.json
3131
- run: npm install markdownlint-cli2.tgz
3232
- run: node_modules/.bin/markdownlint-cli2 README.md
33-
- run: npm clean-install
34-
- run: node_modules/.bin/markdownlint-cli2 README.md

.npmrc

+1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
ignore-scripts=true
2+
package-lock=false

docker/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ RUN cd formatter-summarize && npm pack --pack-destination=..
1414

1515
FROM node:lts-alpine
1616
COPY --from=build /pack/markdownlint-cli2-*.tgz /
17-
RUN npm install --global --production /markdownlint-cli2-*.tgz
17+
RUN npm install --global --no-package-lock --production /markdownlint-cli2-*.tgz
1818
RUN rm /markdownlint-cli2-*.tgz
1919

2020
USER node

docker/Dockerfile-rules

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ FROM davidanson/markdownlint-cli2:${VERSION}
55

66
USER root
77

8-
RUN npm install --global --production \
8+
RUN npm install --global --no-package-lock --production \
99
@github/markdownlint-github \
1010
markdownlint-rule-enhanced-proper-names \
1111
markdownlint-rule-github-admonition \

0 commit comments

Comments
 (0)