-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update npm lockfile to version 3 #65923
Conversation
> 3: Only the new lockfile information introduced in npm version 7. > Smaller on disk than lockfile version 2, but not interoperable with > older npm versions. Ideal if all users are on npm version 7 and > higher. https://docs.npmjs.com/cli/v8/using-npm/config#lockfile-version
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
I created a PR for Core as well: WordPress/wordpress-develop#7526 |
Size Change: 0 B Total Size: 1.77 MB ℹ️ View Unchanged
|
Assuming CI passes, it should be fine to upgrade the lock file 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @sirreal 🚀 |
Set the npm lockfile version to 3. > 3: Only the new lockfile information introduced in npm version 7. > Smaller on disk than lockfile version 2, but not interoperable with > older npm versions. Ideal if all users are on npm version 7 and > higher. https://docs.npmjs.com/cli/v8/using-npm/config#lockfile-version Given the engines and engine-strict setting, npm should always be later than version 7. There should be no downsides to this change. --- Co-authored-by: sirreal <[email protected]> Co-authored-by: DaniGuardiola <[email protected]> Co-authored-by: gziolo <[email protected]>
What?
Update the package-lock.json file to the v3 format:
Given our engines and engine-strict setting, npm versions earlier than 7 should not be used and there should be no downsides to this change:
gutenberg/package.json
Lines 17 to 20 in 3214be4
gutenberg/.npmrc
Line 2 in 3214be4
Why?
The file should be smaller without other changes. It should be strictly better.
The package-lock.json file goes from
3475383
to1926901
bytes in this PR, a savings of ~1.5MB.How?
Testing Instructions
CI should pass on the PR. Locally the project should work without any changes:
npm ci
,npm run build
, etc.