From 17ec992eb5acaa40d0680d9be6d72b29ec690773 Mon Sep 17 00:00:00 2001 From: Manzoor Wani Date: Wed, 30 Sep 2026 12:19:27 +0530 Subject: [PATCH 1/2] Build/Test Tools: Upgrade Node.js to 24.x in the 6.4 branch. Node.js 20.x reached end of life on April 30, 2026. This updates the minimum required Node.js and npm versions and applies the Grunt shutdown workaround needed on 24.x. The Gutenberg hash is left unchanged. Merges [63539] and [63771] to the 6.4 branch, adapted to the scripts and bundled themes present in the branch. See #65451, #66116. --- .nvmrc | 2 +- package-lock.json | 4 ++-- package.json | 20 ++++++++++---------- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.nvmrc b/.nvmrc index 209e3ef4b6247..82d5d714347ef 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -20 +24.18 diff --git a/package-lock.json b/package-lock.json index d528875fac383..06c34627f14e3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -160,8 +160,8 @@ "webpack-livereload-plugin": "3.0.2" }, "engines": { - "node": ">=20.10.0", - "npm": ">=10.2.3" + "node": ">=24.18.0", + "npm": ">=11.16.0" } }, "node_modules/@aashutoshrathi/word-wrap": { diff --git a/package.json b/package.json index 74fb6b71a98f8..daa32e55644db 100644 --- a/package.json +++ b/package.json @@ -7,8 +7,8 @@ "url": "https://develop.svn.wordpress.org/trunk" }, "engines": { - "node": ">=20.10.0", - "npm": ">=10.2.3" + "node": ">=24.18.0", + "npm": ">=11.16.0" }, "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", @@ -175,12 +175,12 @@ "wicg-inert": "3.1.2" }, "scripts": { - "build": "grunt build", - "build:dev": "grunt build --dev", - "dev": "grunt watch --dev", - "test": "grunt test", - "watch": "grunt watch", - "grunt": "grunt", + "build": "node --no-maglev --no-concurrent-sparkplug node_modules/grunt/bin/grunt build", + "build:dev": "node --no-maglev --no-concurrent-sparkplug node_modules/grunt/bin/grunt build --dev", + "dev": "node --no-maglev --no-concurrent-sparkplug node_modules/grunt/bin/grunt watch --dev", + "test": "node --no-maglev --no-concurrent-sparkplug node_modules/grunt/bin/grunt test", + "watch": "node --no-maglev --no-concurrent-sparkplug node_modules/grunt/bin/grunt watch", + "grunt": "node --no-maglev --no-concurrent-sparkplug node_modules/grunt/bin/grunt", "lint:jsdoc": "wp-scripts lint-js", "lint:jsdoc:fix": "wp-scripts lint-js --fix", "env:start": "node ./tools/local-env/scripts/start.js", @@ -196,7 +196,7 @@ "test:php": "node ./tools/local-env/scripts/docker.js run -T php composer update -W && node ./tools/local-env/scripts/docker.js run php ./vendor/bin/phpunit", "test:e2e": "wp-scripts test-playwright --config tests/e2e/playwright.config.js", "test:visual": "wp-scripts test-playwright --config tests/visual-regression/playwright.config.js", - "sync-gutenberg-packages": "grunt sync-gutenberg-packages", - "postsync-gutenberg-packages": "grunt wp-packages:sync-stable-blocks && grunt build --dev && grunt build" + "sync-gutenberg-packages": "node --no-maglev --no-concurrent-sparkplug node_modules/grunt/bin/grunt sync-gutenberg-packages", + "postsync-gutenberg-packages": "node --no-maglev --no-concurrent-sparkplug node_modules/grunt/bin/grunt wp-packages:sync-stable-blocks && node --no-maglev --no-concurrent-sparkplug node_modules/grunt/bin/grunt build --dev && node --no-maglev --no-concurrent-sparkplug node_modules/grunt/bin/grunt build" } } From 8fa00def23dd377cfc958c4fff3492325e89d6e0 Mon Sep 17 00:00:00 2001 From: Manzoor Wani Date: Wed, 30 Sep 2026 14:19:25 +0530 Subject: [PATCH 2/2] Build/Test Tools: Update the supported Node.js and npm versions in the README. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index dc7f9f706d48f..75fe6c94d2869 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ You will need Node and npm installed on your computer. Node is a JavaScript runt If you are not using a package manager, see the [Node.js download page](https://nodejs.org/en/download/) for installers and binaries. -**Note:** WordPress currently only officially supports Node.js `20.x` and npm `10.x`. +**Note:** WordPress currently only officially supports Node.js `24.x` and npm `11.x`. You will also need [Docker](https://www.docker.com/products/docker-desktop) installed and running on your computer. Docker is the virtualization software that powers the local development environment. Docker can be installed just like any other regular application.