Skip to content

Commit 5e08a53

Browse files
committed
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 npm/statusboard#449
1 parent dcc3765 commit 5e08a53

File tree

7 files changed

+12
-330
lines changed

7 files changed

+12
-330
lines changed

lib/commands/set-script.js

-96
This file was deleted.

lib/utils/cmd-list.js

-1
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,6 @@ const cmdList = [
122122
'run-script',
123123
'search',
124124
'set',
125-
'set-script',
126125
'shrinkwrap',
127126
'star',
128127
'stars',

tap-snapshots/test/lib/commands/completion.js.test.cjs

-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,6 @@ Array [
9595
run-script
9696
search
9797
set
98-
set-script
9998
shrinkwrap
10099
star
101100
stars

tap-snapshots/test/lib/load-all-commands.js.test.cjs

-13
Original file line numberDiff line numberDiff line change
@@ -802,19 +802,6 @@ npm set <key>=<value> [<key>=<value> ...] (See \`npm config\`)
802802
Run "npm help set" for more info
803803
`
804804

805-
exports[`test/lib/load-all-commands.js TAP load each command set-script > must match snapshot 1`] = `
806-
Set tasks in the scripts section of package.json, deprecated
807-
808-
Usage:
809-
npm set-script [<script>] [<command>]
810-
811-
Options:
812-
[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
813-
[-ws|--workspaces] [--include-workspace-root]
814-
815-
Run "npm help set-script" for more info
816-
`
817-
818805
exports[`test/lib/load-all-commands.js TAP load each command shrinkwrap > must match snapshot 1`] = `
819806
Lock down dependency versions for publication
820807

tap-snapshots/test/lib/npm.js.test.cjs

+12-23
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ All commands:
2727
hook, init, install, install-ci-test, install-test, link,
2828
ll, login, logout, ls, org, outdated, owner, pack, ping,
2929
pkg, prefix, profile, prune, publish, query, rebuild, repo,
30-
restart, root, run-script, search, set, set-script,
31-
shrinkwrap, star, stars, start, stop, team, test, token,
32-
uninstall, unpublish, unstar, update, version, view, whoami
30+
restart, root, run-script, search, set, shrinkwrap, star,
31+
stars, start, stop, team, test, token, uninstall, unpublish,
32+
unstar, update, version, view, whoami
3333
3434
Specify configs in the ini-formatted file:
3535
/some/config/file/.npmrc
@@ -63,9 +63,9 @@ All commands:
6363
hook, init, install, install-ci-test, install-test, link,
6464
ll, login, logout, ls, org, outdated, owner, pack, ping,
6565
pkg, prefix, profile, prune, publish, query, rebuild, repo,
66-
restart, root, run-script, search, set, set-script,
67-
shrinkwrap, star, stars, start, stop, team, test, token,
68-
uninstall, unpublish, unstar, update, version, view, whoami
66+
restart, root, run-script, search, set, shrinkwrap, star,
67+
stars, start, stop, team, test, token, uninstall, unpublish,
68+
unstar, update, version, view, whoami
6969
7070
Specify configs in the ini-formatted file:
7171
/some/config/file/.npmrc
@@ -99,9 +99,9 @@ All commands:
9999
hook, init, install, install-ci-test, install-test, link,
100100
ll, login, logout, ls, org, outdated, owner, pack, ping,
101101
pkg, prefix, profile, prune, publish, query, rebuild, repo,
102-
restart, root, run-script, search, set, set-script,
103-
shrinkwrap, star, stars, start, stop, team, test, token,
104-
uninstall, unpublish, unstar, update, version, view, whoami
102+
restart, root, run-script, search, set, shrinkwrap, star,
103+
stars, start, stop, team, test, token, uninstall, unpublish,
104+
unstar, update, version, view, whoami
105105
106106
Specify configs in the ini-formatted file:
107107
/some/config/file/.npmrc
@@ -135,9 +135,9 @@ All commands:
135135
hook, init, install, install-ci-test, install-test, link,
136136
ll, login, logout, ls, org, outdated, owner, pack, ping,
137137
pkg, prefix, profile, prune, publish, query, rebuild, repo,
138-
restart, root, run-script, search, set, set-script,
139-
shrinkwrap, star, stars, start, stop, team, test, token,
140-
uninstall, unpublish, unstar, update, version, view, whoami
138+
restart, root, run-script, search, set, shrinkwrap, star,
139+
stars, start, stop, team, test, token, uninstall, unpublish,
140+
unstar, update, version, view, whoami
141141
142142
Specify configs in the ini-formatted file:
143143
/some/config/file/.npmrc
@@ -839,17 +839,6 @@ All commands:
839839
840840
Run "npm help set" for more info
841841
842-
set-script Set tasks in the scripts section of package.json, deprecated
843-
844-
Usage:
845-
npm set-script [<script>] [<command>]
846-
847-
Options:
848-
[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
849-
[-ws|--workspaces] [--include-workspace-root]
850-
851-
Run "npm help set-script" for more info
852-
853842
shrinkwrap Lock down dependency versions for publication
854843
855844
Usage:

tap-snapshots/test/lib/utils/cmd-list.js.test.cjs

-8
Original file line numberDiff line numberDiff line change
@@ -261,13 +261,6 @@ Object {
261261
"searc": "search",
262262
"search": "search",
263263
"set": "set",
264-
"set-": "set-script",
265-
"set-s": "set-script",
266-
"set-sc": "set-script",
267-
"set-scr": "set-script",
268-
"set-scri": "set-script",
269-
"set-scrip": "set-script",
270-
"set-script": "set-script",
271264
"sho": "show",
272265
"show": "show",
273266
"shr": "shrinkwrap",
@@ -466,7 +459,6 @@ Object {
466459
"run-script",
467460
"search",
468461
"set",
469-
"set-script",
470462
"shrinkwrap",
471463
"star",
472464
"stars",

0 commit comments

Comments
 (0)