diff options
author | Gar <gar+gh@danger.computer> | 2021-02-25 02:54:50 +0300 |
---|---|---|
committer | Ruy Adorno <ruyadorno@hotmail.com> | 2021-03-05 00:05:08 +0300 |
commit | 4a5dd3a5a200b3f4f7b47168497d8e03dca3a2ca (patch) | |
tree | d34a1ea229b719c3cfbdce85899ceaf67b43e7ab /tap-snapshots | |
parent | b33c760cea7fe2696d35b5530abc1b455980fef1 (diff) |
fix(npm) pass npm context everywhere
Instead of files randomly requiring the npm singleton,
we pass it where it needs to go so that tests don't need
to do so much require mocking everywhere
PR-URL: https://github.com/npm/cli/pull/2772
Credit: @wraithgar
Close: #2772
Reviewed-by: @ruyadorno
Diffstat (limited to 'tap-snapshots')
-rw-r--r-- | tap-snapshots/test-lib-utils-npm-usage.js-TAP.test.js | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/tap-snapshots/test-lib-utils-npm-usage.js-TAP.test.js b/tap-snapshots/test-lib-utils-npm-usage.js-TAP.test.js index aced03ecf..8e1603eb4 100644 --- a/tap-snapshots/test-lib-utils-npm-usage.js-TAP.test.js +++ b/tap-snapshots/test-lib-utils-npm-usage.js-TAP.test.js @@ -5,7 +5,7 @@ * Make sure to inspect the output below. Do not ignore changes! */ 'use strict' -exports[`test/lib/utils/npm-usage.js TAP basic usage > must match snapshot 1`] = ` +exports[`test/lib/utils/npm-usage.js TAP usage basic usage > must match snapshot 1`] = ` Usage: npm <command> @@ -41,7 +41,7 @@ npm@{VERSION} {BASEDIR} ` -exports[`test/lib/utils/npm-usage.js TAP did you mean? > must match snapshot 1`] = ` +exports[`test/lib/utils/npm-usage.js TAP usage did you mean? > must match snapshot 1`] = ` Usage: npm <command> @@ -77,14 +77,14 @@ npm@{VERSION} {BASEDIR} ` -exports[`test/lib/utils/npm-usage.js TAP did you mean? > must match snapshot 2`] = ` +exports[`test/lib/utils/npm-usage.js TAP usage did you mean? > must match snapshot 2`] = ` Did you mean one of these? install uninstall ` -exports[`test/lib/utils/npm-usage.js TAP set process.stdout.columns columns=0 > must match snapshot 1`] = ` +exports[`test/lib/utils/npm-usage.js TAP usage set process.stdout.columns columns=0 > must match snapshot 1`] = ` Usage: npm <command> @@ -120,7 +120,7 @@ npm@{VERSION} {BASEDIR} ` -exports[`test/lib/utils/npm-usage.js TAP set process.stdout.columns columns=90 > must match snapshot 1`] = ` +exports[`test/lib/utils/npm-usage.js TAP usage set process.stdout.columns columns=90 > must match snapshot 1`] = ` Usage: npm <command> @@ -156,7 +156,7 @@ npm@{VERSION} {BASEDIR} ` -exports[`test/lib/utils/npm-usage.js TAP with browser > must match snapshot 1`] = ` +exports[`test/lib/utils/npm-usage.js TAP usage with browser > must match snapshot 1`] = ` Usage: npm <command> @@ -192,7 +192,7 @@ npm@{VERSION} {BASEDIR} ` -exports[`test/lib/utils/npm-usage.js TAP with long > must match snapshot 1`] = ` +exports[`test/lib/utils/npm-usage.js TAP usage with long > must match snapshot 1`] = ` Usage: npm <command> @@ -360,9 +360,9 @@ All commands: alias: ln - ll npm ls [[<@scope>/]<pkg> ...] + ll npm ll [[<@scope>/]<pkg> ...] - alias: list + alias: la login npm adduser [--registry=url] [--scope=@orgname] [--always-auth] @@ -377,6 +377,8 @@ All commands: org npm org set orgname username [developer | admin | owner] npm org rm orgname username npm org ls orgname [<username>] + + alias: ogr outdated npm outdated [[<@scope>/]<pkg> ...] @@ -394,9 +396,10 @@ All commands: prefix npm prefix [-g] profile npm profile enable-2fa [auth-only|auth-and-writes] - npm profile disable-2fa - npm profile get [<key>] - npm profile set <key> <value> + + + common options: npm profile disable-2fa + prune npm prune [[<@scope>/]<pkg>...] [--production] @@ -473,6 +476,7 @@ All commands: 'npm view <pkg> version' to view a package's published version 'npm ls' to inspect current package/dependency versions + alias: verison view npm view [<@scope>/]<pkg>[@<version>] [<field>[.subfield]...] |