diff --git a/Gruntfile.js b/Gruntfile.js index 83a31a9cd309c..3473a45edfbdb 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -1825,15 +1825,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 09d2ab9035bfd..2fed42a08c1bf 100644 --- a/package-lock.json +++ b/package-lock.json @@ -149,6 +149,7 @@ "source-map-loader": "5.0.0", "terser-webpack-plugin": "5.3.12", "uglify-js": "^3.19.3", + "update-browserslist-db": "1.1.1", "uuid": "11.1.0", "wait-on": "8.0.2", "webpack": "5.98.0", diff --git a/package.json b/package.json index 3560fb010f278..1ce106de256a3 100644 --- a/package.json +++ b/package.json @@ -70,6 +70,7 @@ "source-map-loader": "5.0.0", "terser-webpack-plugin": "5.3.12", "uglify-js": "^3.19.3", + "update-browserslist-db": "1.1.1", "uuid": "11.1.0", "wait-on": "8.0.2", "webpack": "5.98.0",