diff options
author | Luke Karrys <luke@lukekarrys.com> | 2021-12-09 03:10:46 +0300 |
---|---|---|
committer | nlf <quitlahok@gmail.com> | 2021-12-09 21:09:40 +0300 |
commit | 71777be17e57179d203cb9162664ecd0c36ca633 (patch) | |
tree | 22ad0c5c3cfc5e8f8e41c3d776f67233ee5d0e26 /tap-snapshots | |
parent | 6b80faa694d9a42c588921fa5a0664671172c2dc (diff) |
feat: display `publishConfig` during `config list`
Closes: npm/statusboard#417
If the file at `$NPM_CONFIG_PREFIX/package.json` contains a
`publishConfig`, the key/value pairs will be printed along with the rest
of the output from `npm config ls`.
PR-URL: https://github.com/npm/cli/pull/4146
Credit: @lukekarrys
Close: #4146
Reviewed-by: @nlf
Diffstat (limited to 'tap-snapshots')
-rw-r--r-- | tap-snapshots/test/lib/commands/config.js.test.cjs | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/tap-snapshots/test/lib/commands/config.js.test.cjs b/tap-snapshots/test/lib/commands/config.js.test.cjs index da7a89bae..8e9791523 100644 --- a/tap-snapshots/test/lib/commands/config.js.test.cjs +++ b/tap-snapshots/test/lib/commands/config.js.test.cjs @@ -342,3 +342,44 @@ userconfig = "{HOME}/.npmrc" ; HOME = {HOME} ; Run \`npm config ls -l\` to show all defaults. ` + +exports[`test/lib/commands/config.js TAP config list with publishConfig > output matches snapshot 1`] = ` +; "cli" config from command line options + +cache = "{NPMDIR}/test/lib/commands/tap-testdir-config-config-list-with-publishConfig-sandbox/cache" +prefix = "{LOCALPREFIX}" +userconfig = "{HOME}/.npmrc" + +; node bin location = {EXECPATH} +; cwd = {NPMDIR} +; HOME = {HOME} +; Run \`npm config ls -l\` to show all defaults. + +; "publishConfig" from {LOCALPREFIX}/package.json +; This set of config values will be used at publish-time. + +_authToken = (protected) +registry = "https://some.registry" +; "env" config from environment + +; cache = "{NPMDIR}/test/lib/commands/tap-testdir-config-config-list-with-publishConfig-sandbox/cache" ; overridden by cli +global-prefix = "{LOCALPREFIX}" +globalconfig = "{GLOBALPREFIX}/npmrc" +init-module = "{HOME}/.npm-init.js" +local-prefix = "{LOCALPREFIX}" +; prefix = "{LOCALPREFIX}" ; overridden by cli +user-agent = "npm/{NPM-VERSION} node/{NODE-VERSION} {PLATFORM} {ARCH} workspaces/false" +; userconfig = "{HOME}/.npmrc" ; overridden by cli + +; "cli" config from command line options + +cache = "{NPMDIR}/test/lib/commands/tap-testdir-config-config-list-with-publishConfig-sandbox/cache" +global = true +prefix = "{LOCALPREFIX}" +userconfig = "{HOME}/.npmrc" + +; node bin location = {EXECPATH} +; cwd = {NPMDIR} +; HOME = {HOME} +; Run \`npm config ls -l\` to show all defaults. +` |