From 165a2a19990703b21dcbead82533e77acea1b295 Mon Sep 17 00:00:00 2001 From: Gar Date: Thu, 1 Sep 2022 07:34:18 -0700 Subject: [PATCH] fix: remove `npm set-script` BREAKING CHANGE: this removes `npm set-script` Folks should use `npm pkg set` to set the `scripts` field in their `package.json` Closes https://github.com/npm/statusboard/issues/449 --- lib/commands/set-script.js | 96 --------- lib/utils/cmd-list.js | 1 - .../test/lib/commands/completion.js.test.cjs | 1 - .../test/lib/load-all-commands.js.test.cjs | 13 -- tap-snapshots/test/lib/npm.js.test.cjs | 35 ++-- .../test/lib/utils/cmd-list.js.test.cjs | 8 - test/lib/commands/set-script.js | 188 ------------------ 7 files changed, 12 insertions(+), 330 deletions(-) delete mode 100644 lib/commands/set-script.js delete mode 100644 test/lib/commands/set-script.js diff --git a/lib/commands/set-script.js b/lib/commands/set-script.js deleted file mode 100644 index a085f72a31428..0000000000000 --- a/lib/commands/set-script.js +++ /dev/null @@ -1,96 +0,0 @@ -const { resolve } = require('path') -const rpj = require('read-package-json-fast') -const PackageJson = require('@npmcli/package-json') -const log = require('../utils/log-shim') - -const BaseCommand = require('../base-command.js') -class SetScript extends BaseCommand { - static description = 'Set tasks in the scripts section of package.json, deprecated' - static params = ['workspace', 'workspaces', 'include-workspace-root'] - static name = 'set-script' - static usage = ['[