Skip to content

Commit

Permalink
docs: update usage example for npm pkg (#4424)
Browse files Browse the repository at this point in the history
Add example for setting array values
Fixes #4320
  • Loading branch information
manekinekko authored Feb 16, 2022
1 parent fb13bda commit 9275856
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/commands/pkg.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ class Pkg extends BaseCommand {
'set <key>=<value> [<key>=<value> ...]',
'get [<key> [<key> ...]]',
'delete <key> [<key> ...]',
'set [<array>[<index>].<key>=<value> ...]',
'set [<array>[].<key>=<value> ...]',
]

static params = [
Expand Down
2 changes: 2 additions & 0 deletions tap-snapshots/test/lib/load-all-commands.js.test.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -690,6 +690,8 @@ Usage:
npm pkg set <key>=<value> [<key>=<value> ...]
npm pkg get [<key> [<key> ...]]
npm pkg delete <key> [<key> ...]
npm pkg set [<array>[<index>].<key>=<value> ...]
npm pkg set [<array>[].<key>=<value> ...]
Options:
[-f|--force] [--json]
Expand Down
2 changes: 2 additions & 0 deletions tap-snapshots/test/lib/utils/npm-usage.js.test.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -773,6 +773,8 @@ All commands:
npm pkg set <key>=<value> [<key>=<value> ...]
npm pkg get [<key> [<key> ...]]
npm pkg delete <key> [<key> ...]
npm pkg set [<array>[<index>].<key>=<value> ...]
npm pkg set [<array>[].<key>=<value> ...]
Options:
[-f|--force] [--json]
Expand Down

0 comments on commit 9275856

Please sign in to comment.