From 404147e417a6272efc0e085d1bc79c93dfb9a14b Mon Sep 17 00:00:00 2001 From: Adrian Moldovan <3854374+adimoldovan@users.noreply.github.com> Date: Mon, 17 Aug 2026 21:26:53 +0300 Subject: [PATCH 1/2] Build/Test Tools: Remove all `npx` commands. Backport of r63309 to the 6.6 branch. `npx` installs a package and its dependencies, and runs every install script, when the binary is not already installed. The `wp-packages:update` and `browserslist:update` tasks now run the local binaries instead. Adds `update-browserslist-db` to `devDependencies`, so `browserslist:update` does not depend on npm hoisting it out of `browserslist`. --- Gruntfile.js | 6 +++--- package-lock.json | 1 + package.json | 1 + 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index a99dcb4104aa1..4e62328a891e8 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -1705,15 +1705,15 @@ module.exports = function(grunt) { grunt.registerTask( 'wp-packages:update', 'Update WordPress packages', function() { const distTag = grunt.option('dist-tag') || 'latest'; grunt.log.writeln( `Updating WordPress packages (--dist-tag=${distTag})` ); - spawn( 'npx', [ 'wp-scripts', 'packages-update', `--dist-tag=${distTag}` ], { + spawn( 'npm', [ 'exec', '--no', '--', 'wp-scripts', 'packages-update', `--dist-tag=${distTag}` ], { cwd: __dirname, stdio: 'inherit', } ); } ); grunt.registerTask( 'browserslist:update', 'Update the local database of browser supports', function() { - grunt.log.writeln( `Updating browsers list` ); - spawn( 'npx', [ 'browserslist@latest', '--update-db' ], { + grunt.log.writeln( 'Updating browsers list' ); + spawn( 'npm', [ 'exec', '--no', '--', 'update-browserslist-db' ], { cwd: __dirname, stdio: 'inherit', } ); diff --git a/package-lock.json b/package-lock.json index 17a6b77910f22..7beeb533da7ba 100644 --- a/package-lock.json +++ b/package-lock.json @@ -150,6 +150,7 @@ "source-map-loader": "5.0.0", "terser-webpack-plugin": "5.3.10", "uglify-js": "^3.17.4", + "update-browserslist-db": "1.0.16", "uuid": "9.0.1", "wait-on": "7.2.0", "webpack": "5.90.2", diff --git a/package.json b/package.json index 97077725e03c9..cf744d5d98da7 100644 --- a/package.json +++ b/package.json @@ -72,6 +72,7 @@ "source-map-loader": "5.0.0", "terser-webpack-plugin": "5.3.10", "uglify-js": "^3.17.4", + "update-browserslist-db": "1.0.16", "uuid": "9.0.1", "wait-on": "7.2.0", "webpack": "5.90.2", From 9afb39656337b76f9706bb048e0326890ad5f3c9 Mon Sep 17 00:00:00 2001 From: Adrian Moldovan <3854374+adimoldovan@users.noreply.github.com> Date: Tue, 18 Aug 2026 12:22:51 +0300 Subject: [PATCH 2/2] Re-run CI.