Repository navigation
Conversation
Matches trunk's .nvmrc. Node.js 24.20 bundles npm 11.19.
LibSass (node-sass 4.14.1) has no Node.js 24 binary and does not compile against Node.js 24. node-sass becomes an alias of sass 1.32.8, the version WordPress 5.3 builds its own styles with. bin/packages/build-worker.js keeps calling render(). Dart Sass reads an imported .css file as plain CSS, so the react-dates stylesheet, which calls darken(), fails to compile. An importer passes that file to Sass as SCSS, as LibSass read it.
webpack 4 hashes with md4, which OpenSSL 3 disables, so webpack and the Jest tests that run webpack get --openssl-legacy-provider. `wp-scripts build` and `wp-scripts start` start webpack in a new process, which does not receive the flag, so the scripts run webpack's binary with node directly. Jest also gets --unhandled-rejections=warn, Node.js 14's behavior: packages/data/src/test/registry.js leaves a promise rejected, which otherwise ends its Jest worker on Node.js 15 and later.
npm 11 accepts the npm 6 lockfile in `npm ci`, but the Static Analysis job's `npm install` converts it to lockfileVersion 3, which fails the local changes check. `legacy-peer-deps = true` makes npm 11 resolve peer dependencies as npm 6 did. The only version change is sass 1.32.8 replacing node-sass 4.14.1, which also removes node-sass's dependencies. No runtime dependency changes.
|
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. |
`wp-scripts env test-php` builds the PHPUnit config path from npm_package_wp_env_plugin_dir, which npm 6 set from package.json's "wp-env" field. npm 7 and later no longer export arbitrary package.json fields, so on npm 11 the path is wp-content/plugins/undefined/. test-unit-php and test-unit-php-multisite set it to gutenberg, the "wp-env" "plugin-dir" value. test-php.js reads no other npm_package_wp_env_* variable.
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/5.3, as on trunk, and makes the branch install, build and run its unit tests with Node.js 24 and npm 11.Why?
The wordpress-develop 5.3 branch moves to Node.js 24 in WordPress/wordpress-develop#15694. This branch's CI takes Node.js from
.nvmrc, and with only that changenpm cifails on Node.js 24 and npm 11.How?
.nvmrcis 24.20.node-sassdevDependency (LibSass 4.14.1, which has no Node.js 24 binary and does not compile against it) becomesnpm:sass@1.32.8, thesassversion WordPress 5.3 uses.bin/packages/build-worker.jspasses Sass an importer that returnsnode_modules/react-dates/lib/css/_datepicker.cssas SCSS: Dart Sass reads an imported.cssfile as plain CSS and rejects itsdarken()call, which LibSass compiled. Removing node-sass also removes itsnode-gyp3.8.0, which needs Python 2 and whichdeasync(fromparcel-bundler) otherwise compiled with.buildanddevrun webpack asnode --openssl-legacy-provider ./node_modules/webpack/bin/webpack.jsin place ofwp-scripts buildandwp-scripts start, because webpack 4 hashes with md4, which OpenSSL 3 disables. Thewp-scriptscommands start webpack in a new process, which a flag on the outernodedoes not reach.buildsetsNODE_ENV=production, aswp-scripts builddid.test-unitruns@wordpress/scripts'test-unit-js.jswithnode --openssl-legacy-provider --unhandled-rejections=warn, which is whatwp-scripts test-unit-jsran. The webpack plugin test suites run webpack inside Jest, andpackages/data/src/test/registry.jsleaves a promise rejected, which ends its Jest worker on Node.js 15 and later. Node.js 14 only warned.test-unit-phpandtest-unit-php-multisitesetnpm_package_wp_env_plugin_dir=gutenbergwithcross-env.wp-scripts env test-phpbuilds the PHPUnit config path from that variable, which npm 6 set from package.json'swp-envfield and npm 7 and later no longer set, so PHPUnit looked inwp-content/plugins/undefined/..npmrcsetslegacy-peer-deps = true, which keeps npm 6's peer dependency handling.package-lock.jsonfrom lockfile version 1 to 3 with npm 11. The only installed version change issass1.32.8 in place ofnode-sass4.14.1, whose dependencies are removed. One nested entry that no package requires,@babel/helper-function-name7.1.0 underpostcss-jsx, is dropped.Testing Instructions
With Node.js 24 and npm 11:
npm ci && npm run build && npm run test-unit.The built JavaScript and every other non-CSS file is byte-identical to a Node.js 14 build of
wp/5.3, and the unit test results are the same. The built CSS has the same rules; Dart Sass writes them in a different notation: 10 decimals instead of 5,@charset "UTF-8"with literal characters instead of escapes incontent, unquoted attribute selector values, hex instead ofrgb(),grid-columnvalues without spaces around/, and one@mediablock per rule instead of merged blocks.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.