fix: publish shrinkwrap with npm 11#2960
Open
rinatkhaziev wants to merge 1 commit into
Open
Conversation
Contributor
Dependency ReviewThe following issues were found:
License Issues.github/workflows/npm-publish.yml
OpenSSF Scorecard
Scanned Files
|
|
rebeccahum
reviewed
Jul 10, 2026
| id-token: write | ||
| pull-requests: write | ||
| steps: | ||
| - uses: Automattic/vip-actions/npm-publish@c8022b66e78461df4f802b935dc0dbb8399f96bc # v0.7.4 |
Contributor
There was a problem hiding this comment.
I'm going to cut a release so the automated updates pull
Contributor
There was a problem hiding this comment.
k let's use 438cd00aac2463a2dbfb4a747ad7b1ac67a2575a
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



This pull request introduces a new workflow to keep
npm-shrinkwrap.jsonandpackage-lock.jsonin sync, ensuring compatibility with both npm 11 and 12. It adds a helper script, corresponding tests, and documentation updates. The CI pipeline now checks for drift between the lockfiles, and the npm publish workflows are updated to use npm 11 for publishing, since npm 12 omitsnpm-shrinkwrap.jsonfrom package tarballs.Shrinkwrap synchronization and enforcement:
helpers/sync-shrinkwrap.jsto copypackage-lock.jsontonpm-shrinkwrap.jsonand verify they are identical in check mode.__tests__/helpers/sync-shrinkwrap.jsto verify the correct behavior of the sync/check script.check:shrinkwrapandsync:shrinkwrapnpm scripts inpackage.json, and ensured theversionscript keeps the lockfiles in sync..github/workflows/ci.yml) to run the shrinkwrap check as part of validation.Publishing and documentation updates:
npm-versionparameter, ensuringnpm-shrinkwrap.jsonis included in published packages. [1] [2]docs/RELEASING.mdto explain the dual lockfile approach, the need to use npm 11 for publishing, and how to keep lockfiles synchronized. [1] [2] [3]