Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGar <gar+gh@danger.computer>2021-07-02 00:55:46 +0300
committerGar <gar+gh@danger.computer>2021-07-12 19:05:44 +0300
commit89483e888acc56386b9ebc4d70a4676e4a5a5cb1 (patch)
treeaa28aad88eb5b63236af8714e172b19dbb9fb985 /tap-snapshots/test/lib/load-all-commands.js.test.cjs
parentc3bd10e461976a073e6a898c46f8bde28b17668f (diff)
fix(usage): better audit/boolean flag usage output
This adds the `audit` config item to the usage output of `npm ci`, and also tweaks how usage flags are shown for boolean options that do not default to false. Their usage is shown as the `--no-x` form of the flag to better communicate that the flag is needed to turn that normally true option OFF. The description of `audit` was also updated to reflect that it runs on many different npm commands, not just install. Because this flag is included in the usage of those commands it's best to let the assocation happen there instead of trying to be comprehensive in the description itself. A small fix to make `install-ci-test` not try to redefine its own usage, but to inherit from `ci` was also included. PR-URL: https://github.com/npm/cli/pull/3497 Credit: @wraithgar Close: #3497 Reviewed-by: @nlf
Diffstat (limited to 'tap-snapshots/test/lib/load-all-commands.js.test.cjs')
-rw-r--r--tap-snapshots/test/lib/load-all-commands.js.test.cjs42
1 files changed, 21 insertions, 21 deletions
diff --git a/tap-snapshots/test/lib/load-all-commands.js.test.cjs b/tap-snapshots/test/lib/load-all-commands.js.test.cjs
index 3b0754c52..2c5e80db2 100644
--- a/tap-snapshots/test/lib/load-all-commands.js.test.cjs
+++ b/tap-snapshots/test/lib/load-all-commands.js.test.cjs
@@ -84,7 +84,7 @@ Usage:
npm bugs [<pkgname>]
Options:
-[--browser|--browser <browser>] [--registry <registry>]
+[--no-browser|--browser <browser>] [--registry <registry>]
alias: issues
@@ -120,7 +120,7 @@ Usage:
npm ci
Options:
-[--ignore-scripts] [--script-shell <script-shell>]
+[--no-audit] [--ignore-scripts] [--script-shell <script-shell>]
aliases: clean-install, ic, install-clean, isntall-clean
@@ -167,9 +167,9 @@ Usage:
npm dedupe
Options:
-[--global-style] [--legacy-bundling] [--strict-peer-deps] [--package-lock]
+[--global-style] [--legacy-bundling] [--strict-peer-deps] [--no-package-lock]
[--omit <dev|optional|peer> [--omit <dev|optional|peer> ...]] [--ignore-scripts]
-[--audit] [--bin-links] [--fund] [--dry-run]
+[--no-audit] [--no-bin-links] [--no-fund] [--dry-run]
[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
[-ws|--workspaces]
@@ -239,7 +239,7 @@ Usage:
npm docs [<pkgname> [<pkgname> ...]]
Options:
-[--browser|--browser <browser>] [--registry <registry>]
+[--no-browser|--browser <browser>] [--registry <registry>]
[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
[-ws|--workspaces]
@@ -337,9 +337,9 @@ Usage:
npm find-dupes
Options:
-[--global-style] [--legacy-bundling] [--strict-peer-deps] [--package-lock]
+[--global-style] [--legacy-bundling] [--strict-peer-deps] [--no-package-lock]
[--omit <dev|optional|peer> [--omit <dev|optional|peer> ...]] [--ignore-scripts]
-[--audit] [--bin-links] [--fund]
+[--no-audit] [--no-bin-links] [--no-fund]
[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
[-ws|--workspaces]
@@ -355,7 +355,7 @@ Usage:
npm fund [[<@scope>/]<pkg>]
Options:
-[--json] [--browser|--browser <browser>] [--unicode]
+[--json] [--no-browser|--browser <browser>] [--unicode]
[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
[--which <fundingSourceNumber>]
@@ -446,9 +446,9 @@ npm install <github username>/<github project>
Options:
[-S|--save|--no-save|--save-prod|--save-dev|--save-optional|--save-peer]
[-E|--save-exact] [-g|--global] [--global-style] [--legacy-bundling]
-[--strict-peer-deps] [--package-lock]
+[--strict-peer-deps] [--no-package-lock]
[--omit <dev|optional|peer> [--omit <dev|optional|peer> ...]] [--ignore-scripts]
-[--audit] [--bin-links] [--fund] [--dry-run]
+[--no-audit] [--no-bin-links] [--no-fund] [--dry-run]
[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
[-ws|--workspaces]
@@ -466,7 +466,7 @@ Usage:
npm install-ci-test
Options:
-[--ignore-scripts] [--script-shell <script-shell>]
+[--no-audit] [--ignore-scripts] [--script-shell <script-shell>]
alias: cit
@@ -493,9 +493,9 @@ npm install-test <github username>/<github project>
Options:
[-S|--save|--no-save|--save-prod|--save-dev|--save-optional|--save-peer]
[-E|--save-exact] [-g|--global] [--global-style] [--legacy-bundling]
-[--strict-peer-deps] [--package-lock]
+[--strict-peer-deps] [--no-package-lock]
[--omit <dev|optional|peer> [--omit <dev|optional|peer> ...]] [--ignore-scripts]
-[--audit] [--bin-links] [--fund] [--dry-run]
+[--no-audit] [--no-bin-links] [--no-fund] [--dry-run]
[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
[-ws|--workspaces]
@@ -516,9 +516,9 @@ npm link [<@scope>/]<pkg>[@<version>]
Options:
[-S|--save|--no-save|--save-prod|--save-dev|--save-optional|--save-peer]
[-E|--save-exact] [-g|--global] [--global-style] [--legacy-bundling]
-[--strict-peer-deps] [--package-lock]
+[--strict-peer-deps] [--no-package-lock]
[--omit <dev|optional|peer> [--omit <dev|optional|peer> ...]] [--ignore-scripts]
-[--audit] [--bin-links] [--fund] [--dry-run]
+[--no-audit] [--no-bin-links] [--no-fund] [--dry-run]
[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
[-ws|--workspaces]
@@ -768,7 +768,7 @@ Usage:
npm rebuild [[<@scope>/]<name>[@<version>] ...]
Options:
-[-g|--global] [--bin-links] [--ignore-scripts]
+[-g|--global] [--no-bin-links] [--ignore-scripts]
[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
[-ws|--workspaces]
@@ -786,7 +786,7 @@ Usage:
npm repo [<pkgname> [<pkgname> ...]]
Options:
-[--browser|--browser <browser>]
+[--no-browser|--browser <browser>]
[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
[-ws|--workspaces]
@@ -848,7 +848,7 @@ Usage:
npm search [search terms ...]
Options:
-[-l|--long] [--json] [--color|--color <always>] [-p|--parseable]
+[-l|--long] [--json] [--color|--no-color|--color always] [-p|--parseable]
[--no-description] [--searchopts <searchopts>] [--searchexclude <searchexclude>]
[--registry <registry>] [--prefer-online] [--prefer-offline] [--offline]
@@ -1059,8 +1059,8 @@ npm update [<pkg>...]
Options:
[-g|--global] [--global-style] [--legacy-bundling] [--strict-peer-deps]
-[--package-lock] [--omit <dev|optional|peer> [--omit <dev|optional|peer> ...]]
-[--ignore-scripts] [--audit] [--bin-links] [--fund] [--dry-run]
+[--no-package-lock] [--omit <dev|optional|peer> [--omit <dev|optional|peer> ...]]
+[--ignore-scripts] [--no-audit] [--no-bin-links] [--no-fund] [--dry-run]
[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
[-ws|--workspaces]
@@ -1078,7 +1078,7 @@ Usage:
npm version [<newversion> | major | minor | patch | premajor | preminor | prepatch | prerelease | from-git]
Options:
-[--allow-same-version] [--commit-hooks] [--git-tag-version] [--json]
+[--allow-same-version] [--no-commit-hooks] [--no-git-tag-version] [--json]
[--preid prerelease-id] [--sign-git-tag]
[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
[-ws|--workspaces]