Skip to content

Commit

Permalink
feat: remove npm set-script
Browse files Browse the repository at this point in the history
BREAKING CHANGE: this removes `npm set-script`

Folks should use `npm pkg set` to set the `scripts` field in their
`package.json`

Closes npm/statusboard#449
  • Loading branch information
wraithgar committed Sep 1, 2022
1 parent dcc3765 commit 5e08a53
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 330 deletions.
96 changes: 0 additions & 96 deletions lib/commands/set-script.js

This file was deleted.

1 change: 0 additions & 1 deletion lib/utils/cmd-list.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@ const cmdList = [
'run-script',
'search',
'set',
'set-script',
'shrinkwrap',
'star',
'stars',
Expand Down
1 change: 0 additions & 1 deletion tap-snapshots/test/lib/commands/completion.js.test.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ Array [
run-script
search
set
set-script
shrinkwrap
star
stars
Expand Down
13 changes: 0 additions & 13 deletions tap-snapshots/test/lib/load-all-commands.js.test.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -802,19 +802,6 @@ npm set <key>=<value> [<key>=<value> ...] (See \`npm config\`)
Run "npm help set" for more info
`

exports[`test/lib/load-all-commands.js TAP load each command set-script > must match snapshot 1`] = `
Set tasks in the scripts section of package.json, deprecated
Usage:
npm set-script [<script>] [<command>]
Options:
[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
[-ws|--workspaces] [--include-workspace-root]
Run "npm help set-script" for more info
`

exports[`test/lib/load-all-commands.js TAP load each command shrinkwrap > must match snapshot 1`] = `
Lock down dependency versions for publication
Expand Down
35 changes: 12 additions & 23 deletions tap-snapshots/test/lib/npm.js.test.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ All commands:
hook, init, install, install-ci-test, install-test, link,
ll, login, logout, ls, org, outdated, owner, pack, ping,
pkg, prefix, profile, prune, publish, query, rebuild, repo,
restart, root, run-script, search, set, set-script,
shrinkwrap, star, stars, start, stop, team, test, token,
uninstall, unpublish, unstar, update, version, view, whoami
restart, root, run-script, search, set, shrinkwrap, star,
stars, start, stop, team, test, token, uninstall, unpublish,
unstar, update, version, view, whoami
Specify configs in the ini-formatted file:
/some/config/file/.npmrc
Expand Down Expand Up @@ -63,9 +63,9 @@ All commands:
hook, init, install, install-ci-test, install-test, link,
ll, login, logout, ls, org, outdated, owner, pack, ping,
pkg, prefix, profile, prune, publish, query, rebuild, repo,
restart, root, run-script, search, set, set-script,
shrinkwrap, star, stars, start, stop, team, test, token,
uninstall, unpublish, unstar, update, version, view, whoami
restart, root, run-script, search, set, shrinkwrap, star,
stars, start, stop, team, test, token, uninstall, unpublish,
unstar, update, version, view, whoami
Specify configs in the ini-formatted file:
/some/config/file/.npmrc
Expand Down Expand Up @@ -99,9 +99,9 @@ All commands:
hook, init, install, install-ci-test, install-test, link,
ll, login, logout, ls, org, outdated, owner, pack, ping,
pkg, prefix, profile, prune, publish, query, rebuild, repo,
restart, root, run-script, search, set, set-script,
shrinkwrap, star, stars, start, stop, team, test, token,
uninstall, unpublish, unstar, update, version, view, whoami
restart, root, run-script, search, set, shrinkwrap, star,
stars, start, stop, team, test, token, uninstall, unpublish,
unstar, update, version, view, whoami
Specify configs in the ini-formatted file:
/some/config/file/.npmrc
Expand Down Expand Up @@ -135,9 +135,9 @@ All commands:
hook, init, install, install-ci-test, install-test, link,
ll, login, logout, ls, org, outdated, owner, pack, ping,
pkg, prefix, profile, prune, publish, query, rebuild, repo,
restart, root, run-script, search, set, set-script,
shrinkwrap, star, stars, start, stop, team, test, token,
uninstall, unpublish, unstar, update, version, view, whoami
restart, root, run-script, search, set, shrinkwrap, star,
stars, start, stop, team, test, token, uninstall, unpublish,
unstar, update, version, view, whoami
Specify configs in the ini-formatted file:
/some/config/file/.npmrc
Expand Down Expand Up @@ -839,17 +839,6 @@ All commands:
Run "npm help set" for more info
set-script Set tasks in the scripts section of package.json, deprecated
Usage:
npm set-script [<script>] [<command>]
Options:
[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
[-ws|--workspaces] [--include-workspace-root]
Run "npm help set-script" for more info
shrinkwrap Lock down dependency versions for publication
Usage:
Expand Down
8 changes: 0 additions & 8 deletions tap-snapshots/test/lib/utils/cmd-list.js.test.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -261,13 +261,6 @@ Object {
"searc": "search",
"search": "search",
"set": "set",
"set-": "set-script",
"set-s": "set-script",
"set-sc": "set-script",
"set-scr": "set-script",
"set-scri": "set-script",
"set-scrip": "set-script",
"set-script": "set-script",
"sho": "show",
"show": "show",
"shr": "shrinkwrap",
Expand Down Expand Up @@ -466,7 +459,6 @@ Object {
"run-script",
"search",
"set",
"set-script",
"shrinkwrap",
"star",
"stars",
Expand Down
Loading

0 comments on commit 5e08a53

Please sign in to comment.