Closed
Description
Is there an existing issue for this?
- I have searched the existing issues
This issue exists in the latest npm version
- I am using the latest npm
Current Behavior
At present, it doesn't seem like the npm pkg --help
output provides sufficient context for end-users to understand that they can also set array values with it, despite this feature being fully available (see the docs).
I personally ran into this trying to use npm pkg set
to define my workspaces.
Here's the current output:
❯ npm pkg --help
npm pkg
Manages your package.json
Usage:
npm pkg set <key>=<value> [<key>=<value> ...]
npm pkg get [<key> [<key> ...]]
npm pkg delete <key> [<key> ...]
Options:
[-f|--force] [--json]
[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
[-ws|--workspaces]
Run "npm help pkg" for more info
Expected Behavior
Ideally, this output would reflect the ability to set array values.
Steps To Reproduce
- run
npm pkg --help
Environment
- npm: 8.3.1
- Node.js: v17.4.0
- OS Name: WSL2/Ubuntu
- System Model Name:
- npm config:
; "user" config from /home/bnb/.npmrc
//registry.npmjs.org/:_authToken = (protected)
init-author-email = "[email protected]"
init-author-license = ""
init-author-name = "Tierney Cyren"
init-author-url = "https://bnb.im/"
init-license = "MIT"
init-version = "0.0.1"
init.version = "1.0.0"
loglevel = "notice"
; node bin location = /home/bnb/.nvm/versions/node/v17.4.0/bin/node
; cwd = /home/bnb/GitHub/cutenode/enginesync
; HOME = /home/bnb
; Run `npm config ls -l` to show all defaults.```