From 8395b1b6e197076ef9a6e50e72ebba65cb2e4c47 Mon Sep 17 00:00:00 2001 From: Manzoor Wani Date: Wed, 30 Sep 2026 12:19:29 +0530 Subject: [PATCH 1/2] Build/Test Tools: Upgrade Node.js to 24.x in the 6.6 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.6 branch, adapted to the scripts and bundled themes present in the branch. See #65451, #66116. --- .nvmrc | 2 +- package-lock.json | 4 ++-- package.json | 20 +++++++++---------- .../themes/twentytwentyone/package-lock.json | 4 ++-- .../themes/twentytwentyone/package.json | 4 ++-- 5 files changed, 17 insertions(+), 17 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 bcda62d7aca58..6e75b68021ac6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -157,8 +157,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 5059327214bf8..524c5eb5bfc75 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", @@ -172,12 +172,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", @@ -193,7 +193,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" } } diff --git a/src/wp-content/themes/twentytwentyone/package-lock.json b/src/wp-content/themes/twentytwentyone/package-lock.json index d2e4fa47de14d..9b431e8728569 100644 --- a/src/wp-content/themes/twentytwentyone/package-lock.json +++ b/src/wp-content/themes/twentytwentyone/package-lock.json @@ -33,8 +33,8 @@ "stylelint-config-recommended-scss": "^14.0.0" }, "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/src/wp-content/themes/twentytwentyone/package.json b/src/wp-content/themes/twentytwentyone/package.json index 8746bc5831f4e..6fef53feca85c 100644 --- a/src/wp-content/themes/twentytwentyone/package.json +++ b/src/wp-content/themes/twentytwentyone/package.json @@ -13,8 +13,8 @@ }, "homepage": "https://wordpress.org/themes/twentytwentyone/", "engines": { - "node": ">=20.10.0", - "npm": ">=10.2.3" + "node": ">=24.18.0", + "npm": ">=11.16.0" }, "devDependencies": { "@wordpress/browserslist-config": "^6.1.0", From 0994f5fe0d7a58e5e3724d6993b01960b8281d9d Mon Sep 17 00:00:00 2001 From: Manzoor Wani Date: Wed, 30 Sep 2026 14:19:34 +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 f1a12dda6952a..d57e18fe4eb6d 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.