diff --git a/Gruntfile.js b/Gruntfile.js index 61f1ccf95da32..02a4a510063c5 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -1905,15 +1905,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 a9fec421c2b03..669c7181a713a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -152,6 +152,7 @@ "source-map-loader": "5.0.0", "terser-webpack-plugin": "5.3.14", "uglify-js": "^3.19.3", + "update-browserslist-db": "1.1.4", "uuid": "13.0.0", "wait-on": "9.0.3", "webpack": "5.98.0", diff --git a/package.json b/package.json index 15df19f15f7b3..fb68149ed1456 100644 --- a/package.json +++ b/package.json @@ -69,6 +69,7 @@ "source-map-loader": "5.0.0", "terser-webpack-plugin": "5.3.14", "uglify-js": "^3.19.3", + "update-browserslist-db": "1.1.4", "uuid": "13.0.0", "wait-on": "9.0.3", "webpack": "5.98.0",