Skip to content

Commit

Permalink
Remove recently-added npm-shrinkwrap.json entirely because it produce…
Browse files Browse the repository at this point in the history
…s cross-platform install problems that are difficult to detect and avoid (refs #186).
  • Loading branch information
DavidAnson committed Aug 26, 2023
1 parent c999acd commit 9d6d266
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 5,628 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
with:
node-version: ${{ matrix.node-version }}
- name: Install Dependencies
run: npm clean-install
run: npm install --no-package-lock
- name: Run All Validations
run: npm run ci

Expand All @@ -38,7 +38,7 @@ jobs:
- name: Package markdownlint-cli2
run: npm pack
- name: Install markdownlint-cli2 globally
run: sudo npm install --global --production markdownlint-cli2-*.tgz
run: sudo npm install --global --no-package-lock --production markdownlint-cli2-*.tgz
- name: Lint without formatters
run: markdownlint-cli2 CONTRIBUTING.md README.md
- name: Package formatter-default
Expand All @@ -56,13 +56,13 @@ jobs:
- name: Package formatter-summarize
run: cd formatter-summarize && npm pack
- name: Install formatters globally
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
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
- name: Lint with formatters
run: cp test/outputFormatters-npm/.markdownlint-cli2.jsonc . && markdownlint-cli2 CONTRIBUTING.md README.md
- name: Uninstall markdownlint-cli2 globally
run: sudo npm uninstall --global markdownlint-cli2
run: sudo npm uninstall --global --no-package-lock markdownlint-cli2
- name: Install markdownlint-cli2 dependencies locally
run: sudo npm install --production
run: sudo npm install --no-package-lock --production
- name: Lint with formatters
run: node ./markdownlint-cli2 CONTRIBUTING.md README.md

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sarif.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
security-events: write
steps:
- uses: actions/checkout@v3
- run: npm install
- run: npm install --no-package-lock
- run: node markdownlint-cli2.js --config .github/sarif.markdownlint-cli2.jsonc '**/README.md' '#node_modules'
continue-on-error: true
- uses: github/codeql-action/upload-sarif@v2
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/smoke-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,9 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- run: npm clean-install
- run: npm install
- run: npm pack
- run: npm exec --yes -- cpy-cli "markdownlint-cli2-*.tgz" . --rename=markdownlint-cli2.tgz
- run: npm exec --yes -- del-cli node_modules .npmrc package.json package-lock.json npm-shrinkwrap.json
- run: npm exec --yes -- rimraf node_modules .npmrc npm-shrinkwrap.json package.json package-lock.json
- run: npm install markdownlint-cli2.tgz
- run: node_modules/.bin/markdownlint-cli2 README.md
- run: npm clean-install
- run: node_modules/.bin/markdownlint-cli2 README.md
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
ignore-scripts=true
package-lock=false
2 changes: 1 addition & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ RUN cd formatter-summarize && npm pack --pack-destination=..

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

USER node
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile-rules
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ FROM davidanson/markdownlint-cli2:${VERSION}

USER root

RUN npm install --global --production \
RUN npm install --global --no-package-lock --production \
@github/markdownlint-github \
markdownlint-rule-enhanced-proper-names \
markdownlint-rule-github-admonition \
Expand Down
Loading

0 comments on commit 9d6d266

Please sign in to comment.