Skip to content

Framework: Update Node.js to v24 LTS and npm to v11 - #80395

Merged
manzoorwanijk merged 6 commits into
trunkfrom
update/node-24-lts
Sep 2, 2026
Merged

Framework: Update Node.js to v24 LTS and npm to v11#80395
manzoorwanijk merged 6 commits into
trunkfrom
update/node-24-lts

Conversation

@manzoorwanijk

@manzoorwanijk manzoorwanijk commented Jul 17, 2026

Copy link
Copy Markdown
Member

What?

Related to #72973.

Moves the project to Node.js v24 LTS and npm v11, with matching CI matrices and docs.

See Core-65451 and the Core PR WordPress/wordpress-develop#11776.

Why?

Node.js v20 reached end-of-life in April 2026. The Systems Team has provisioned 24.18.0 on the WordPress.org build server, the last blocker.

How?

.nvmrc pins 24.18, the build server's version, so local, CI, and build environments agree.

Both npm floors move to 11.16.0, which 24.18.0 bundles. Same range, different readers:

npm 10 is therefore blocked locally, while npm 12 stays allowed.

Testing Instructions

  1. nvm install && nvm use. Confirm Node.js 24.18.0 and npm 11.16.0.
  2. npm install. Confirm no EBADDEVENGINES output.
  3. npm install --global npm@10 && npm install. Confirm an EBADDEVENGINES error.
  4. nvm use 20 && npm install. Confirm an EBADDEVENGINES error for devEngines.runtime.
  5. Confirm CI is green, including the Node.js 26 jobs.

Testing Instructions for Keyboard

N/A

Screenshots or screencast

N/A

Use of AI Tools

Authored with the assistance of Claude Code, reviewed and tested locally.

Summary by CodeRabbit

  • Chores

    • Updated the supported Node.js version to 24.18.0 or later and npm to 11.16.0 or later.
    • Updated automated checks to validate Node.js 24 and 26, with pull requests focused on Node.js 24.
  • Documentation

    • Updated contributor setup guidance to require Node.js 24 and npm 11.

@manzoorwanijk manzoorwanijk self-assigned this Jul 17, 2026
@manzoorwanijk manzoorwanijk added [Type] Build Tooling Issues or PRs related to build tooling Framework Issues related to broader framework topics, especially as it relates to javascript labels Jul 17, 2026
@manzoorwanijk
manzoorwanijk force-pushed the update/node-24-lts branch 2 times, most recently from 5f5be68 to e799289 Compare July 17, 2026 07:11
@github-actions

github-actions Bot commented Jul 17, 2026

Copy link
Copy Markdown

Size Change: 0 B

Total Size: 7.92 MB

compressed-size-action

@github-actions

github-actions Bot commented Jul 17, 2026

Copy link
Copy Markdown

Flaky tests detected in 877e45c.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/32840553913
📝 Reported tests:

last-inserted block should be given and keep the selection (large viewport) in /test/e2e/specs/editor/various/inserting-blocks.spec.js, passed after 1 failed attempt.
Error: apiRequestContext.fetch: socket hang up
Call log:
  - → GET http://localhost:8889/wp-json/wp/v2/blocks?per_page=100&status=publish%2Cfuture%2Cdraft%2Cpending%2Cprivate%2Ctrash
    - user-agent: Playwright/1.62.1 (x64; ubuntu 24.04) node/24.18 CI/1
    - accept: */*
    - accept-encoding: gzip,deflate,br
    - X-WP-Nonce: e8b01b456c
    - cookie: wordpress_test_cookie=WP%20Cookie%20check; wordpress_logged_in_23778236db82f19306f247e20a353a99=admin%7C1787829121%7C5oazsDlsETgLFxbmqssog9LR9MWgIX1CWQOpYClCXqv%7Ce0dc6af64e64197736394f8c538d58c2854be4bf932367d29bbec0a3fef3b4f2; wp-settings-time-1=1787656321

    at RequestUtils.rest (/home/runner/work/gutenberg/gutenberg/packages/e2e-test-utils-playwright/src/request-utils/rest.ts:112:39)
    at RequestUtils.deleteAllBlocks (/home/runner/work/gutenberg/gutenberg/packages/e2e-test-utils-playwright/src/request-utils/blocks.ts:23:28)
    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/editor/various/inserting-blocks.spec.js:11:22

@SirLouen

SirLouen commented Jul 17, 2026

Copy link
Copy Markdown
Member

Node.js v20 reaches end-of-life in April 2026

reaches reached

I thought by now npm v24 was already live in the project 😢

Has the core already been updated to v24?

@manzoorwanijk

Copy link
Copy Markdown
Member Author

Has the core already been updated to v24?

The work is being tracked in Node.js 24.x Upgrade

@manzoorwanijk
manzoorwanijk force-pushed the update/node-24-lts branch 3 times, most recently from a6d37d3 to 5712b24 Compare July 24, 2026 03:58
@manzoorwanijk
manzoorwanijk force-pushed the update/node-24-lts branch 2 times, most recently from eb520f7 to ffea766 Compare August 5, 2026 06:26
@manzoorwanijk
manzoorwanijk requested a review from ciampo August 5, 2026 06:36
@manzoorwanijk
manzoorwanijk marked this pull request as ready for review August 5, 2026 06:36
@manzoorwanijk

Copy link
Copy Markdown
Member Author

I suppose to that point your "PR up to date" check could be a nice thing to have, but I'm also quite eager to see this land and not sure if we should consider that a blocker 😅 What do you think?

I am looking into it right now and I think it's better to do it before merging this to avoid people wondering why the checks are not running.

@manzoorwanijk

Copy link
Copy Markdown
Member Author

Here is the PR to enforce PR update after an infra or a repo wide change - #82272

@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown

🤖 PR meta 🤖

📦 Bundle size

Size Change: 0 B

Total Size: 8.01 MB

98ffca4 Run

⚡ Performance

Show the results

Client side metrics exclude the server response time.

front-end-block-theme

Metric 810e8bb trunk % Change
timeToFirstByte 63 ms +12.94% -6.98% 67.85 ms +5.75% -10.24% -7.15%
largestContentfulPaint 100 ms +4% -6% 102 ms +3.92% -5.88% -1.96%
lcpMinusTtfb 34 ms +8.97% -8.97% 32.2 ms +11.02% -8.85% 5.59%
wpBeforeTemplate 29.82 ms +20.25% -6.04% 34.71 ms +7% -13.43% -14.09%
wpTemplate 27.35 ms +6.22% -3.29% 27.91 ms +3.73% -4.12% -2.01%
wpTotal 59.39 ms +7.93% -7.76% 63.17 ms +5.16% -9.45% -5.98%
wpMemoryUsage 7.54 MB +0% -0% 7.50 MB +0% -0% 0.46%
wpDbQueries 17 +0% -0% 17 +0% -0% 0%

front-end-classic-theme

Metric 810e8bb trunk % Change
timeToFirstByte 49.75 ms +16.18% -3.42% 51.75 ms +13.33% -2.8% -3.86%
largestContentfulPaint 100 ms +6% -8% 100 ms +6% -4% 0%
lcpMinusTtfb 45.6 ms +6.69% -3.4% 45.85 ms +8.4% -1.96% -0.55%
wpBeforeTemplate 26.27 ms +24.59% -2.44% 27.24 ms +17.29% -2.06% -3.56%
wpTemplate 20.44 ms +5.23% -5.43% 21.09 ms +6.21% -2.47% -3.08%
wpTotal 46.75 ms +15.66% -3.25% 48.61 ms +13.7% -2.8% -3.83%
wpMemoryUsage 6.16 MB +0% -0% 6.12 MB +0% -0% 0.58%
wpDbQueries 14 +0% -0% 14 +0% -0% 0%

media-processing

Metric 810e8bb trunk % Change
mediaProcessingJpeg 397.25 ms +1.98% -0.26% 401.12 ms +3.04% -0.77% -0.96%
mediaProcessingAvif 6038.04 ms +0.43% -0.14% 6041.81 ms +0.1% -0.12% -0.06%
mediaProcessingJpegToAvif 4164.22 ms +0.28% -0.3% 4161.74 ms +0.12% -0.1% 0.06%

media-upload

Metric 810e8bb trunk % Change
jpegUploadProcessing 1685.45 ms +15.51% -16.01% 1431.37 ms +0.64% -0.81% 17.75%
pngUploadProcessing 205.53 ms +4.57% -3.61% 215.86 ms +4.35% -4.47% -4.79%
largeJpegUploadProcessing 1412.29 ms +0.37% -0.29% 1412.41 ms +0.98% -0.61% -0.01%
multipleImageUploadProcessing 1582.29 ms +0.33% -3.21% 1563.42 ms +9.27% -1.42% 1.21%

post-editor

Metric 810e8bb trunk % Change
serverResponse 426.78 ms +8.93% -2.34% 449.53 ms +2.35% -7.47% -5.06%
firstPaint 246.87 ms +16.21% -24.62% 189.74 ms +17.6% -15.6% 30.11%
domContentLoaded 1189.59 ms +1.68% -1.49% 1176.29 ms +1.27% -1.25% 1.13%
loaded 1190.85 ms +1.68% -1.5% 1177.38 ms +1.28% -1.24% 1.14%
firstContentfulPaint 402.47 ms +1.05% -3.86% 388.56 ms +4.06% -6.86% 3.58%
firstBlock 3100.93 ms +0.59% -2.62% 3072.27 ms +0.72% -0.88% 0.93%
type 18.19 ms +11.71% -13.85% 18.04 ms +10.53% -9.37% 0.83%
typeWithoutInspector 17.34 ms +14.59% -12.75% 17.48 ms +7.21% -17.22% -0.8%
typeWithTopToolbar 22.33 ms +4.03% -14.96% 21.88 ms +4.43% -15.63% 2.06%
typeContainer 9.38 ms +10.34% -8.64% 9.07 ms +6.39% -10.69% 3.42%
focus 78.41 ms +3.15% -9.34% 72.13 ms +9.32% -5.8% 8.71%
firstFocus 162.19 ms +0% -0% 158.68 ms +0% -0% 2.21%
selectAll 457.07 ms +0.66% -1.16% 428.99 ms +2.13% -0.34% 6.55%
listViewOpen 62.12 ms +6.28% -15.61% 62.15 ms +8.93% -3.17% -0.05%
inserterOpen 21.95 ms +10.71% -4.01% 23.24 ms +4.35% -12.82% -5.55%
inserterHover 3.38 ms +16.86% -14.2% 3.54 ms +10.73% -17.8% -4.52%
inserterSearch 7.99 ms +18.02% -6.38% 7.96 ms +12.19% -3.52% 0.38%
loadPatterns 615.14 ms +1.93% -3.6% 606.58 ms +3.01% -3.52% 1.41%
wpTotal 416.76 ms +9.12% -2.31% 438.83 ms +2.46% -7.49% -5.03%
wpMemoryUsage 13.13 MB +0% -0% 13.10 MB +0% -0% 0.22%
wpDbQueries 54 +0% -0% 54 +0% -0% 0%

site-editor

Metric 810e8bb trunk % Change
serverResponse 370.88 ms +1.93% -4.35% 385.71 ms +0.6% -4.14% -3.84%
firstPaint 207.47 ms +59.85% -16.12% 178.07 ms +3.68% -15.94% 16.51%
domContentLoaded 1068.83 ms +1.7% -0.9% 1085.34 ms +1.71% -1.21% -1.52%
loaded 1069.77 ms +1.68% -0.9% 1086.24 ms +1.71% -1.22% -1.52%
firstContentfulPaint 338.18 ms +4.65% -1.48% 338.35 ms +1.55% -5.04% -0.05%
firstBlock 3313.6 ms +0.72% -2.07% 3304.1 ms +1.21% -0.65% 0.29%
type 16.2 ms +14.38% -14.14% 16.42 ms +16.14% -18.15% -1.34%
navigate 79.57 ms +18.84% -4.78% 62.85 ms +24.22% -4.73% 26.6%
loadPatterns 1081.89 ms +13.92% -7.81% 1114.69 ms +11.53% -8.47% -2.94%
loadPages 1096.87 ms +2.89% -6.25% 1060.03 ms +2.97% -3.7% 3.48%
wpTotal 362.62 ms +1.97% -4.37% 377.33 ms +0.63% -4.21% -3.9%
wpMemoryUsage 12.02 MB +0% -0% 11.99 MB +0% -0% 0.3%
wpDbQueries 43.5 +1.15% -1.15% 44 +0% -2.27% -1.14%

98ffca4 Run

Comment thread package.json
manzoorwanijk and others added 6 commits September 2, 2026 21:01
Node.js v20 reaches end-of-life in April 2026, and the project had drifted
from its stated goal of tracking the Active LTS release.

Pin .nvmrc to 24.18, the version provisioned on the wordpress.org build
server, so local, CI, and build environments agree.

engines is metadata the w.org build server reads, so npm is floored there at
11.16.0, the version bundled with Node.js 24.18.0. npm ignores engines for
the local project whenever devEngines is present, so the two serve different
readers.

devEngines drives local and CI installs. Its npm target of 11.18.0 is not
bundled with any Node.js release, so it warns rather than errors:
actions/setup-node invokes npm to set up caching before any pin step can
upgrade it, and erroring there fails the job before it starts.

See #72973.
devEngines.runtime now requires Node.js >=24.18.0 and errors by default, so
npm install fails outright on Node.js 20 and 22. Those versions can no
longer be tested.

Replace them with 24 (Active LTS, matching .nvmrc) and 26 (Current, LTS in
October). Pull requests continue to run a single version, now 24, with the
full matrix reserved for trunk.

See #72973.
Co-authored-by: Jonathan Desrosiers <359867+desrosj@users.noreply.github.com>
Co-authored-by: Manzoor Wani <manzoorwani.jk@gmail.com>
Co-authored-by: Jonathan Desrosiers <359867+desrosj@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Sep 2, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Team

Run ID: bea916c3-0067-48ca-93d9-d3ce8d77b404

📥 Commits

Reviewing files that changed from the base of the PR and between 4cf5ac1 and 98ffca4.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (6)
  • .github/workflows/create-block.yml
  • .github/workflows/static-checks.yml
  • .github/workflows/unit-test.yml
  • .nvmrc
  • docs/contributors/code/getting-started-with-code-contribution.md
  • package.json

Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review.


📝 Walkthrough

Walkthrough

The project now requires Node.js 24.18 and npm 11.16. CI tests Node.js 24 and 26, while pull requests use Node.js 24 on Ubuntu. Local configuration and contributor documentation match these requirements.

Changes

Node.js runtime upgrade

Layer / File(s) Summary
Runtime requirements and local setup
.nvmrc, package.json, docs/contributors/code/getting-started-with-code-contribution.md
The project requires Node.js >=24.18.0 and npm >=11.16.0. Local setup and contributor prerequisites specify Node.js 24 and npm 11.
CI matrix and pull-request coverage
.github/workflows/create-block.yml, .github/workflows/static-checks.yml, .github/workflows/unit-test.yml
CI matrices now test Node.js 24 and 26. Pull requests exclude Node.js 26 and retain Node.js 24 coverage.
CI baseline and routing validation
.github/workflows/static-checks.yml
Static-check labels and JavaScript test-routing validation now use Node.js 24 on Ubuntu as the baseline.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to 98ffc

This PR updates the supported Node.js and npm versions across development, CI, and documentation; no actionable merge-blocking risk remains beyond normal checks and review.

Suggested reviewers: ciampo

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the primary changes: updating Node.js to v24 LTS and npm to v11.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (6 skipped: 6 unsupported.)

✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch update/node-24-lts

Warning

Some tools did not complete. Review the errors below.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

package.json

ESLint skipped: missing config or dependency (missing-dependency). The ESLint configuration references a package that is not available in the sandbox.


Comment @coderabbitai help to get the list of available commands.

@manzoorwanijk

manzoorwanijk commented Sep 2, 2026

Copy link
Copy Markdown
Member Author

Alright, we are ready to roll this out after making the new checks required, including the new Required changes from trunk check.

@aduth

aduth commented Sep 2, 2026

Copy link
Copy Markdown
Member

Synchronous coordination is happening in Slack: https://wordpress.slack.com/archives/C02QB2JS7/p1788371572173079

@manzoorwanijk

Copy link
Copy Markdown
Member Author

Thank you, everyone! Hold your breath! 🚢 🚀

@manzoorwanijk
manzoorwanijk merged commit 0835350 into trunk Sep 2, 2026
65 of 67 checks passed
@manzoorwanijk
manzoorwanijk deleted the update/node-24-lts branch September 2, 2026 18:21
@github-actions github-actions Bot added this to the Gutenberg 24.0 milestone Sep 2, 2026
aduth added a commit that referenced this pull request Sep 2, 2026
@aduth

aduth commented Sep 2, 2026

Copy link
Copy Markdown
Member

This had an unexpected and not-immediately-resolvable impact on wordpress-develop resulting in build failures (example). After discussion in Slack we opted to temporarily revert this in #82355. I expect that we should be able to re-merge this soon, pending a couple additional revisions to get WordPress/wordpress-develop#11776 into a committable state, so that we can quickly commit those changes once the Gutenberg revisions land.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Framework Issues related to broader framework topics, especially as it relates to javascript Require PR update Forces open PRs to update from trunk [Type] Build Tooling Issues or PRs related to build tooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

Sponsor
SponsoredKunjungi sekarang
Promo