Skip to content

Commit

Permalink
docs: add cli params to npm set, npm get (#6481)
Browse files Browse the repository at this point in the history
  • Loading branch information
m4rch3n1ng authored May 22, 2023
1 parent 173bc89 commit 0400ce3
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
1 change: 1 addition & 0 deletions lib/commands/get.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ class Get extends BaseCommand {
static description = 'Get a value from the npm configuration'
static name = 'get'
static usage = ['[<key> ...] (See `npm config`)']
static params = ['long']
static ignoreImplicitWorkspace = false

// TODO
Expand Down
1 change: 1 addition & 0 deletions lib/commands/set.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ class Set extends BaseCommand {
static description = 'Set a value in the npm configuration'
static name = 'set'
static usage = ['<key>=<value> [<key>=<value> ...] (See `npm config`)']
static params = ['global', 'location']
static ignoreImplicitWorkspace = false

// TODO
Expand Down
11 changes: 9 additions & 2 deletions tap-snapshots/test/lib/docs.js.test.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -2638,6 +2638,9 @@ Get a value from the npm configuration
Usage:
npm get [<key> ...] (See \`npm config\`)
Options:
[-l|--long]
Run "npm help get" for more info
\`\`\`bash
Expand All @@ -2646,7 +2649,7 @@ npm get [<key> ...] (See \`npm config\`)
Note: This command is unaware of workspaces.
NO PARAMS
#### \`long\`
`

exports[`test/lib/docs.js TAP usage help > must match snapshot 1`] = `
Expand Down Expand Up @@ -3531,6 +3534,9 @@ Set a value in the npm configuration
Usage:
npm set <key>=<value> [<key>=<value> ...] (See \`npm config\`)
Options:
[-g|--global] [-L|--location <global|user|project>]
Run "npm help set" for more info
\`\`\`bash
Expand All @@ -3539,7 +3545,8 @@ npm set <key>=<value> [<key>=<value> ...] (See \`npm config\`)
Note: This command is unaware of workspaces.
NO PARAMS
#### \`global\`
#### \`location\`
`

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

0 comments on commit 0400ce3

Please sign in to comment.