Skip to content

Commit 2e92800

Browse files
authored
feat: remove npm bin (#5459)
BREAKING CHANGE: this removes the `npm bin` command The output of this command is misleading and incomplete. The `.bin` resolution of npm is much more nuanced than this command implies, and the output of `npm bin` is not something end users should be dealing with. `npm` itself is responsible for running the `bin` entries of modules, with the exception of global bins, which end up in the same folder as `node` itself, presumably already in a user's path since they can run node. Closes npm/statusboard#537
1 parent 412cbab commit 2e92800

File tree

8 files changed

+6
-87
lines changed

8 files changed

+6
-87
lines changed

lib/commands/bin.js

-23
This file was deleted.

lib/utils/cmd-list.js

-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@ const cmdList = [
7474
'access',
7575
'adduser',
7676
'audit',
77-
'bin',
7877
'bugs',
7978
'cache',
8079
'ci',

smoke-tests/tap-snapshots/test/index.js.test.cjs

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ npm help npm more involved overview
2121
2222
All commands:
2323
24-
access, adduser, audit, bin, bugs, cache, ci, completion,
24+
access, adduser, audit, bugs, cache, ci, completion,
2525
config, dedupe, deprecate, diff, dist-tag, docs, doctor,
2626
edit, exec, explain, explore, find-dupes, fund, get, help,
2727
hook, init, install, install-ci-test, install-test, link,

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

-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ Array [
4747
access
4848
adduser
4949
audit
50-
bin
5150
bugs
5251
cache
5352
ci

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

-12
Original file line numberDiff line numberDiff line change
@@ -57,18 +57,6 @@ Options:
5757
Run "npm help audit" for more info
5858
`
5959

60-
exports[`test/lib/load-all-commands.js TAP load each command bin > must match snapshot 1`] = `
61-
Display npm bin folder
62-
63-
Usage:
64-
npm bin
65-
66-
Options:
67-
[-g|--global]
68-
69-
Run "npm help bin" for more info
70-
`
71-
7260
exports[`test/lib/load-all-commands.js TAP load each command birthday > must match snapshot 1`] = `
7361
Birthday, deprecated
7462

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

+4-14
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ npm help npm more involved overview
2121
2222
All commands:
2323
24-
access, adduser, audit, bin, bugs, cache, ci, completion,
24+
access, adduser, audit, bugs, cache, ci, completion,
2525
config, dedupe, deprecate, diff, dist-tag, docs, doctor,
2626
edit, exec, explain, explore, find-dupes, fund, get, help,
2727
hook, init, install, install-ci-test, install-test, link,
@@ -57,7 +57,7 @@ npm help npm more involved overview
5757
5858
All commands:
5959
60-
access, adduser, audit, bin, bugs, cache, ci, completion,
60+
access, adduser, audit, bugs, cache, ci, completion,
6161
config, dedupe, deprecate, diff, dist-tag, docs, doctor,
6262
edit, exec, explain, explore, find-dupes, fund, get, help,
6363
hook, init, install, install-ci-test, install-test, link,
@@ -93,7 +93,7 @@ npm help npm more involved overview
9393
9494
All commands:
9595
96-
access, adduser, audit, bin, bugs, cache, ci, completion,
96+
access, adduser, audit, bugs, cache, ci, completion,
9797
config, dedupe, deprecate, diff, dist-tag, docs, doctor,
9898
edit, exec, explain, explore, find-dupes, fund, get, help,
9999
hook, init, install, install-ci-test, install-test, link,
@@ -129,7 +129,7 @@ npm help npm more involved overview (in a browser)
129129
130130
All commands:
131131
132-
access, adduser, audit, bin, bugs, cache, ci, completion,
132+
access, adduser, audit, bugs, cache, ci, completion,
133133
config, dedupe, deprecate, diff, dist-tag, docs, doctor,
134134
edit, exec, explain, explore, find-dupes, fund, get, help,
135135
hook, init, install, install-ci-test, install-test, link,
@@ -211,16 +211,6 @@ All commands:
211211
212212
Run "npm help audit" for more info
213213
214-
bin Display npm bin folder
215-
216-
Usage:
217-
npm bin
218-
219-
Options:
220-
[-g|--global]
221-
222-
Run "npm help bin" for more info
223-
224214
bugs Report bugs for a package in a web browser
225215
226216
Usage:

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

+1-3
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@ Object {
3030
"auth": "author",
3131
"autho": "author",
3232
"author": "author",
33-
"bi": "bin",
34-
"bin": "bin",
33+
"b": "bugs",
3534
"bu": "bugs",
3635
"bug": "bugs",
3736
"bugs": "bugs",
@@ -418,7 +417,6 @@ Object {
418417
"access",
419418
"adduser",
420419
"audit",
421-
"bin",
422420
"bugs",
423421
"cache",
424422
"ci",

test/lib/commands/bin.js

-32
This file was deleted.

0 commit comments

Comments
 (0)