From 386e4537f5a0fc9c84b8b59733be97faecd3e45b Mon Sep 17 00:00:00 2001 From: Manzoor Wani Date: Wed, 30 Sep 2026 12:19:31 +0530 Subject: [PATCH 1/2] Build/Test Tools: Upgrade Node.js to 24.x in the 6.8 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.8 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 0420d6af8ae8b..55dd29ef18204 100644 --- a/package-lock.json +++ b/package-lock.json @@ -156,8 +156,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 aa91075660d2f..531f4a935ac2f 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", @@ -171,12 +171,12 @@ "wicg-inert": "3.1.3" }, "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 && node ./tools/local-env/scripts/docker.js run -T --rm php composer update -W", @@ -193,7 +193,7 @@ "test:coverage": "npm run test:php -- --coverage-html ./coverage/html/ --coverage-php ./coverage/php/report.php --coverage-text=./coverage/text/report.txt", "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 6d41b878828b5..94157c3c9a4d7 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.1.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 daac772880ca9..1e6aa03f710e4 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.14.0", From 80773cd4e163efe0fbaa48e3f7e4ee215c2498cb Mon Sep 17 00:00:00 2001 From: Manzoor Wani Date: Wed, 30 Sep 2026 14:19:43 +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 fc8c00f6821af..323d12493c1fa 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.