diff options
author | Gar <gar+gh@danger.computer> | 2022-06-22 23:45:41 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-22 23:45:41 +0300 |
commit | 69b5a9674e8c03219c3da088b35b8ec6dea69770 (patch) | |
tree | e6799096e6a86cdd1d14bae35e4fcbf45b59fb80 /lib/utils | |
parent | f2340f816f5a137038945229bf8a0d30160e76e8 (diff) |
docs: consolidate docs and help for package spec (#5048)
Many of our commands parse their args via
[npm-package-arg](https://npm.im/npm-package-arg), which is a good
standard way of parsing a "package" argument. However the docs
surrounding these args are not very consistent. This can lead to
confusion in commands such as `npm publish` where the behavior is
slightly different than in the past due to this.
This adds a new help command `npm help package-spec` that describes what
this argument is, and can be, and also updates all the commands that
interpret their args this with to refer to them as `<package-spec>`. It
also adds a link to the new help page on their docs pages.
Diffstat (limited to 'lib/utils')
-rw-r--r-- | lib/utils/config/definitions.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/utils/config/definitions.js b/lib/utils/config/definitions.js index 4c77e375c..6b35e7d4d 100644 --- a/lib/utils/config/definitions.js +++ b/lib/utils/config/definitions.js @@ -535,7 +535,7 @@ define('dev', { define('diff', { default: [], - hint: '<pkg-name|spec|version>', + hint: '<package-spec>', type: [String, Array], description: ` Define arguments to compare in \`npm diff\`. @@ -1458,7 +1458,7 @@ define('otp', { define('package', { default: [], - hint: '<pkg>[@<version>]', + hint: '<package-spec>', type: [String, Array], description: ` The package to install for [\`npm exec\`](/commands/npm-exec) @@ -1867,7 +1867,7 @@ define('script-shell', { type: [null, String], description: ` The shell to use for scripts run with the \`npm exec\`, - \`npm run\` and \`npm init <pkg>\` commands. + \`npm run\` and \`npm init <package-spec>\` commands. `, flatten (key, obj, flatOptions) { flatOptions.scriptShell = obj[key] || undefined |