From 4b23fbafa28f669d372b800dfca7c92a70083bb9 Mon Sep 17 00:00:00 2001 From: Gar Date: Thu, 1 Sep 2022 07:34:18 -0700 Subject: [PATCH] feat: 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 - .../tap-snapshots/test/index.js.test.cjs | 38 ++-- smoke-tests/test/index.js | 4 +- .../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 ------------------ 9 files changed, 33 insertions(+), 351 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 = ['[