From 3f4e35473b7805308cac12cedc313f58a8c11c29 Mon Sep 17 00:00:00 2001 From: Manzoor Wani Date: Wed, 30 Sep 2026 12:19:33 +0530 Subject: [PATCH 1/2] Build/Test Tools: Upgrade Node.js to 24.x in the 7.0 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 7.0 branch, adapted to the bundled themes present in the branch. See #65451, #66116. --- .nvmrc | 2 +- package-lock.json | 4 ++-- package.json | 20 +++++++++---------- .../themes/twentytwentyfive/package-lock.json | 4 ++-- .../themes/twentytwentyfive/package.json | 4 ++-- .../themes/twentytwentyone/package-lock.json | 4 ++-- .../themes/twentytwentyone/package.json | 4 ++-- .../themes/twentytwentytwo/package-lock.json | 4 ++-- .../themes/twentytwentytwo/package.json | 4 ++-- tools/gutenberg/utils.js | 2 +- 10 files changed, 26 insertions(+), 26 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 5750f9f580121..6bab72804e3e2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -96,8 +96,8 @@ "webpack": "5.105.4" }, "engines": { - "node": ">=20.10.0", - "npm": ">=10.2.3" + "node": ">=24.18.0", + "npm": ">=11.16.0" } }, "node_modules/@ampproject/remapping": { diff --git a/package.json b/package.json index 4c83675926528..6528a7c2165e0 100644 --- a/package.json +++ b/package.json @@ -11,8 +11,8 @@ "ghcrRepo": "WordPress/gutenberg/gutenberg-wp-develop-build" }, "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", @@ -115,13 +115,13 @@ "wicg-inert": "3.1.3" }, "scripts": { - "build": "grunt build", - "build:dev": "grunt build --dev", - "build:gutenberg": "grunt build:gutenberg", - "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", + "build:gutenberg": "node --no-maglev --no-concurrent-sparkplug node_modules/grunt/bin/grunt build:gutenberg", + "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", "typecheck:js": "tsc --build", @@ -143,6 +143,6 @@ "typecheck:php": "node ./tools/local-env/scripts/docker.js run --rm php composer phpstan", "gutenberg:copy": "node tools/gutenberg/copy.js", "gutenberg:verify": "node tools/gutenberg/utils.js", - "gutenberg:download": "node tools/gutenberg/download.js && grunt build:gutenberg" + "gutenberg:download": "node tools/gutenberg/download.js && npm run build:gutenberg" } } diff --git a/src/wp-content/themes/twentytwentyfive/package-lock.json b/src/wp-content/themes/twentytwentyfive/package-lock.json index 3e364a3c43d01..66dee02047a94 100644 --- a/src/wp-content/themes/twentytwentyfive/package-lock.json +++ b/src/wp-content/themes/twentytwentyfive/package-lock.json @@ -15,8 +15,8 @@ "postcss-cli": "^11.0.1" }, "engines": { - "node": ">=20.10.0", - "npm": ">=10.2.3" + "node": ">=24.18.0", + "npm": ">=11.16.0" } }, "node_modules/@wordpress/browserslist-config": { diff --git a/src/wp-content/themes/twentytwentyfive/package.json b/src/wp-content/themes/twentytwentyfive/package.json index 9da89b58c35e0..68baa03615613 100644 --- a/src/wp-content/themes/twentytwentyfive/package.json +++ b/src/wp-content/themes/twentytwentyfive/package.json @@ -13,8 +13,8 @@ }, "homepage": "https://wordpress.org/themes/twentytwentyfive/", "engines": { - "node": ">=20.10.0", - "npm": ">=10.2.3" + "node": ">=24.18.0", + "npm": ">=11.16.0" }, "devDependencies": { "@wordpress/browserslist-config": "^6.34.0", diff --git a/src/wp-content/themes/twentytwentyone/package-lock.json b/src/wp-content/themes/twentytwentyone/package-lock.json index 3f412536967cc..8cffe5ab90766 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": "^16.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/src/wp-content/themes/twentytwentyone/package.json b/src/wp-content/themes/twentytwentyone/package.json index 2e84df4ffb3b4..886c3724b8834 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.34.0", diff --git a/src/wp-content/themes/twentytwentytwo/package-lock.json b/src/wp-content/themes/twentytwentytwo/package-lock.json index 0f3596c3fcf7f..5c97a773b8f82 100644 --- a/src/wp-content/themes/twentytwentytwo/package-lock.json +++ b/src/wp-content/themes/twentytwentytwo/package-lock.json @@ -15,8 +15,8 @@ "postcss-cli": "^11.0.1" }, "engines": { - "node": ">=20.10.0", - "npm": ">=10.2.3" + "node": ">=24.18.0", + "npm": ">=11.16.0" } }, "node_modules/@wordpress/browserslist-config": { diff --git a/src/wp-content/themes/twentytwentytwo/package.json b/src/wp-content/themes/twentytwentytwo/package.json index 102fdc01b32ac..2db19d375186e 100644 --- a/src/wp-content/themes/twentytwentytwo/package.json +++ b/src/wp-content/themes/twentytwentytwo/package.json @@ -13,8 +13,8 @@ }, "homepage": "https://wordpress.org/themes/twentytwentytwo/", "engines": { - "node": ">=20.10.0", - "npm": ">=10.2.3" + "node": ">=24.18.0", + "npm": ">=11.16.0" }, "devDependencies": { "@wordpress/browserslist-config": "^6.34.0", diff --git a/tools/gutenberg/utils.js b/tools/gutenberg/utils.js index b43e760735efe..d0084744024c8 100644 --- a/tools/gutenberg/utils.js +++ b/tools/gutenberg/utils.js @@ -231,7 +231,7 @@ function downloadGutenberg() { process.exit( downloadResult.status ?? 1 ); } - const buildResult = spawnSync( 'grunt', [ 'build:gutenberg' ], { stdio: 'inherit', shell: true } ); + const buildResult = spawnSync( 'npm', [ 'run', 'build:gutenberg' ], { stdio: 'inherit', shell: true } ); if ( buildResult.status !== 0 ) { process.exit( buildResult.status ?? 1 ); } From 938e6e6f4e68b70f735f9d5407396ff7e43052da Mon Sep 17 00:00:00 2001 From: Manzoor Wani Date: Wed, 30 Sep 2026 14:19:53 +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 4c27999495f55..90b8f57518825 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,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 a container environment such as [Docker Desktop](https://www.docker.com/products/docker-desktop) installed and running on your computer. The container environment is the virtualization software that powers the local development environment and can be installed just like any other regular application.