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 96cf444b80787..0ce70ac1296f1 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.13", "uuid": "9.0.1", "wait-on": "7.2.0", "webpack": "5.90.2", diff --git a/package.json b/package.json index 362704bc5449b..b846ead7299bb 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.13", "uuid": "9.0.1", "wait-on": "7.2.0", "webpack": "5.90.2",