Repository navigation
Conversation
npm 11 rejects the `npm <7` bound. With engine-strict, it also rejects eslint-plugin-jsdoc 39.6.9 and @es-joy/jsdoccomment 0.36.1, whose engines end at Node.js 19.
npm 11 rewrites the lockfile version 1 file on install, which fails the check for local changes. legacy-peer-deps keeps npm 6's peer dependency handling, so no peer dependency is added. Versions are unchanged apart from qs under appium's request, which npm 11 installs from appium's npm-shrinkwrap.json: 6.5.3 to 6.5.2.
Lockfile version 3 has no top-level dependencies object, so the script threw. Trunk made the same change in #53426.
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
npm 9 removed `npm bin`, so `$( npm bin )/wp-scripts` fails before any test runs. Trunk made the same change in #53426.
This branch has not been deployed
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.
What?
Sets
.nvmrcto Node.js 24.20 onwp/6.2, as on trunk, and makes the branch install, build, lint and run its unit tests with Node.js 24 and npm 11.Why?
The wordpress-develop 6.2 branch moves to Node.js 24 in WordPress/wordpress-develop#15705. This branch's CI takes Node.js from
.nvmrc. npm 11 rejects the branch'sengines, andnpm installrewrites its version 1 lockfile, which fails the Static Analysis check.How?
.nvmrcis 24.20.engines.npmdrops its<7bound, which rejects npm 11, and.npmrcdropsengine-strict = true: with it, npm 11 refuseseslint-plugin-jsdoc39.6.9 and@es-joy/jsdoccomment0.36.1, whoseenginesend at Node.js 19. npm now only warns about those two..npmrcsetslegacy-peer-deps = true, which keeps npm 6's peer dependency handling. Without it npm 11 adds missing peer dependencies to the lockfile.bin/validate-package-lock.jsreads the lockfile'spackagessection instead ofdependencies, which lockfile version 3 does not have, as minimal node and npm upgrade #53426 did on trunk..github/workflows/end2end-test.ymlrunsnpx wp-scripts test-e2einstead of$( npm bin )/wp-scripts test-e2e: npm 9 removednpm bin, so the Puppeteer end-to-end jobs failed before running a test. Trunk made the same change in minimal node and npm upgrade #53426.package-lock.jsonwith npm 11 (npm install --package-lock-only, thennpm ciandnpm install, until the file no longer changes), which converts it from lockfile version 1 to 3. The only installed version change is insideappium, which runs the native end-to-end tests: npm 11 installs the versions in appium's ownnpm-shrinkwrap.json, which npm 6 did not apply here, soqsmoves from 6.5.3 to 6.5.2 under appium'srequest. 8 entries that no package requires are dropped, such as tworeact-refresh0.4.3 copies andterser-webpack-plugin's nestedsource-map-support0.5.19.Testing Instructions
With Node.js 24 and npm 11:
npm ci && npm run build && npm run lint && npm run test:unit.The build output is byte-identical to a Node.js 14 build of
wp/6.2, and the unit test results are the same.Use of AI Tools
AI assistance: Yes
Tools: Claude Code
Model: Claude Opus 5.5
Used for: Applying the changes, regenerating the lockfile, building and testing on Node.js 14 and 24 and comparing the output, and drafting this description.