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.1 builds its own styles with. bin/packages/build.js keeps calling renderSync(). 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.
deasync builds its binding with the node-gyp in node_modules/.bin. Lerna's npm-lifecycle installs node-gyp 3.8.0 there, which needs Python 2. node-gyp 12.4.0 is the version npm 11.19 bundles, and builds deasync on Node.js 24 with Python 3.
npm 11 prepares git dependencies that have a build script by installing their devDependencies and running the build. webpack-rtl-plugin's build fails there, because its `babel` devDependency is the Babel 6 no-op package. The tarball of the same commit, fc5a2f2, installs the committed lib/ without preparing it, as npm 6 did.
webpack 4 hashes with md4, which OpenSSL 3 disables, so webpack and the Jest tests that run webpack get --openssl-legacy-provider. Jest also gets --unhandled-rejections=warn, Node.js 14's behavior: a test that leaves an api-fetch request rejected (window.fetch is not defined in the test environment) otherwise ends the run on Node.js 15 and later.
npm 11 converts the npm 6 lockfile to lockfileVersion 3, which the Static Analysis job's `npm install` would otherwise do on every run. `legacy-peer-deps = true` makes npm 11 resolve peer dependencies as npm 6 did; without it, `npm ci` rejects the lockfile because ajv-keywords asks for a peer ajv 6 while the hoisted ajv is 5.5.2. Versions change only where the previous commits require it: sass 1.32.8 replaces node-sass 4.14.1 and its dependencies, and node-gyp 12.4.0 replaces 3.8.0, which moves the hoisted graceful-fs from 4.1.11 to 4.2.11 and nopt, abbrev and tar to node-gyp 12's versions. No runtime dependency changes.
….1)" This reverts commit 08a73ec.
(cherry picked from commit efedf93)
…k-rtl-plugin (wp/5.1) Removes webpack-rtl-plugin and the 114 dependency paths only it used. No other path, version, resolved URL or integrity 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. |
On Node.js 24 a promise rejected after a spec closes its page ("Protocol error (Runtime.callFunctionOn): Target closed." from a pending Puppeteer wait) ends the in-band Jest run, so the remaining specs never report. Node.js 14 only warned. The E2E workflow and the test-e2e script run wp-scripts' test-e2e.js with the flag, since wp-scripts would start it in a new process that does not receive it.
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.1, 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.1 branch moves to Node.js 24 in WordPress/wordpress-develop#15699. 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.1 uses.bin/packages/build.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.overridesentry setsnode-gypto 12.4.0, the version npm 11 bundles.deasync, whichbin/packages/build.jsuses, has no Node.js 24 prebuild and compiles with thenode-gypinnode_modules/.bin; the locked 3.8.0 needs Python 2. 12.4.0 is outside the^3.8.0range that lerna'snpm-lifecycledeclares.webpack-rtl-pluginfrompackage.jsonandwebpack.config.js. npm 11 cannot install the plugin from its git source: it runs the package'sprepublishbuild, and itsbabel6 devDependency is a placeholder package with no compiler.bin/packages/build.jsalready writes each-rtl.cssfile, which webpack copies, so the build writes the same files as before.buildanddevrun webpack asnode --openssl-legacy-provider ./node_modules/webpack/bin/webpack.js, because webpack 4 hashes with md4, which OpenSSL 3 disables.test-unitruns@wordpress/scripts'test-unit-js.jswithnode --openssl-legacy-provider --unhandled-rejections=warn, which is whatwp-scripts test-unit-jsran. Two test suites run webpack inside Jest, and the gallery block test leaves anapi-fetchpromise rejected, which ends the Jest process on Node.js 15 and later. Node.js 14 only warned.test-e2eand the E2E workflow run@wordpress/scripts'test-e2e.jswithnode --unhandled-rejections=warn, which is whatwp-scripts test-e2eran. A Puppeteer wait still pending when a spec closes its page rejects ("Protocol error (Runtime.callFunctionOn): Target closed."), which ends the in-band Jest run on Node.js 24 before the remaining specs report..npmrcsetslegacy-peer-deps = true, npm 6's peer dependency handling. Without it npm 11 rejects the lockfile:ajv-keywordsasks for peerajv^6.0.0, and the hoistedajvis 5.5.2.package-lock.jsonfrom lockfile version 1 to 3 with npm 11. Installed versions change only through the changes above:node-sass4.14.1 is replaced bysass1.32.8 and node-sass's dependencies are removed;node-gypmoves from 3.8.0 to 12.4.0, which movesgraceful-fsfrom 4.1.11 to 4.2.11,noptfrom 3.0.6 to 9.0.0,abbrevfrom 1.1.1 to 4.0.0,tarfrom 2.2.1 to 7.5.23 and node-gyp'ssemverfrom 5.3.0 to 7.8.6, removesblock-streamandfstream, and adds 15 entries that node-gyp 12 and tar 7 need;webpack-rtl-pluginand the packages only it used are removed. Three nested entries underlistrthat no package requires are 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.1, 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(), 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, backporting the PR, regenerating the lockfile, building and testing on Node.js 14 and 24 and comparing the output, and drafting this description.