Repository navigation
Build/Test Tools: Opt in to the npm supply chain defaults - #14058
manzoorwanijk wants to merge 4 commits into
Conversation
|
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 Core Committers: Use this line as a base for the props when committing in SVN: To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Test using WordPress PlaygroundThe changes in this pull request can previewed and tested using a WordPress Playground instance. WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser. Some things to be aware of
For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation. |
| @@ -12,7 +12,7 @@ | |||
| }, | |||
| "engines": { | |||
| "node": ">=24.18.0", | |||
There was a problem hiding this comment.
Node.js 24.18 ships npm 11.16, and Node.js 24.19 ships npm 11.17. Both are below the new >=11.18.0 npm minimum. On those Node.js versions, npm install fails the devEngines npm check.
Can we raise the Node.js minimum to >=24.20.0 in engines and devEngines? Node.js 24.20 ships npm 11.19. The change applies to all four package.json files and their lockfiles.
| "node": ">=24.18.0", | |
| "node": ">=24.20.0", |
1c0086e to
77d88a3
Compare
npm 11.16 and 11.17 reject registry dependencies with EALLOWREMOTE when allow-remote is set to none. Node.js 24.20 bundles npm 11.19, so .nvmrc moves to it. Applies to Core, Twenty Twenty-One, Twenty Twenty-Two and Twenty Twenty-Five, matching Gutenberg.
Denies every dependency install script via allowScripts and fails the install on unreviewed ones with strict-allow-scripts. Refuses git, remote URL and local tarball dependencies, matching the npm v12 defaults plus allow-file.
Applies the Core install script and dependency source policy to Twenty Twenty-One, Twenty Twenty-Two and Twenty Twenty-Five.
Node.js 24.18 and 24.19 bundle npm 11.16 and 11.17, which fail the new npm 11.18 minimum in devEngines. Node.js 24.20 bundles npm 11.19.
77d88a3 to
756acc2
Compare
lancewillett
left a comment
There was a problem hiding this comment.
The npm policy and version requirements look correct. Clean installs and builds passed for Core and all three affected themes under Node 24.20/npm 11.19 in Docker. The native watcher and resolver dependencies also loaded successfully with their install scripts denied. CI is green.
AI review · gpt-6
Opts in to the npm v12 supply chain defaults on npm 11 for Core and the bundled themes with a build process, mirroring WordPress/gutenberg#82689. This replaces the npm v12 upgrade in #13536, which is on hold.
.npmrcrefuses git, remote URL and local tarball dependencies, andstrict-allow-scriptsfails the install on unreviewed install scripts.allowScriptsdenies every dependency install script. Twenty Twenty-One, Twenty Twenty-Two and Twenty Twenty-Five get the same policy.>=11.18.0because npm 11.16 and 11.17 reject registry dependencies withEALLOWREMOTEunderallow-remote = none..nvmrcmoves to Node.js 24.20, which bundles npm 11.19, matching Chore: Use v24.20 in.nvmrcconfig file. gutenberg#84138.Trac ticket: https://core.trac.wordpress.org/ticket/64543
Use of AI Tools
AI assistance: Yes
Tool(s): Claude Code
Model(s): Claude Opus 5.5
Used for: Implementation and this description, reviewed by me.
This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.