Skip to content

Commit 0400ce3

Browse files
authored
docs: add cli params to npm set, npm get (#6481)
1 parent 173bc89 commit 0400ce3

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

lib/commands/get.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ class Get extends BaseCommand {
44
static description = 'Get a value from the npm configuration'
55
static name = 'get'
66
static usage = ['[<key> ...] (See `npm config`)']
7+
static params = ['long']
78
static ignoreImplicitWorkspace = false
89

910
// TODO

lib/commands/set.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ class Set extends BaseCommand {
44
static description = 'Set a value in the npm configuration'
55
static name = 'set'
66
static usage = ['<key>=<value> [<key>=<value> ...] (See `npm config`)']
7+
static params = ['global', 'location']
78
static ignoreImplicitWorkspace = false
89

910
// TODO

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

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2638,6 +2638,9 @@ Get a value from the npm configuration
26382638
Usage:
26392639
npm get [<key> ...] (See \`npm config\`)
26402640
2641+
Options:
2642+
[-l|--long]
2643+
26412644
Run "npm help get" for more info
26422645
26432646
\`\`\`bash
@@ -2646,7 +2649,7 @@ npm get [<key> ...] (See \`npm config\`)
26462649
26472650
Note: This command is unaware of workspaces.
26482651
2649-
NO PARAMS
2652+
#### \`long\`
26502653
`
26512654

26522655
exports[`test/lib/docs.js TAP usage help > must match snapshot 1`] = `
@@ -3531,6 +3534,9 @@ Set a value in the npm configuration
35313534
Usage:
35323535
npm set <key>=<value> [<key>=<value> ...] (See \`npm config\`)
35333536
3537+
Options:
3538+
[-g|--global] [-L|--location <global|user|project>]
3539+
35343540
Run "npm help set" for more info
35353541
35363542
\`\`\`bash
@@ -3539,7 +3545,8 @@ npm set <key>=<value> [<key>=<value> ...] (See \`npm config\`)
35393545
35403546
Note: This command is unaware of workspaces.
35413547
3542-
NO PARAMS
3548+
#### \`global\`
3549+
#### \`location\`
35433550
`
35443551

35453552
exports[`test/lib/docs.js TAP usage shrinkwrap > must match snapshot 1`] = `

0 commit comments

Comments
 (0)