diff options
author | Gar <gar+gh@danger.computer> | 2021-09-14 17:27:36 +0300 |
---|---|---|
committer | Gar <gar+gh@danger.computer> | 2021-09-14 20:16:22 +0300 |
commit | b4aac345b0a7cdec4d713c5be4daea37330b2b26 (patch) | |
tree | 05b55e7ba11290476477dcef4d4339e7b082d212 /tap-snapshots/test/lib | |
parent | 291d977e09f5c17fa2ef8fccda6a61a24cb6d590 (diff) |
fix(config): user-agent properly shows ci
The way we were flattening user-agent back into itself meant that any
values that were dependent on other config items would never be seen,
since we have to re-flatten the item for each one it depends on.
We also weren't re-flattening the user-agent when setting workspaces or
workspace, which were things that affected the final result.
This does change the main config value of `user-agent` but not the
flattened one. We are not using the main config value anywhere (which
is correct).
PR-URL: https://github.com/npm/cli/pull/3754
Credit: @wraithgar
Close: #3754
Reviewed-by: @nlf
Diffstat (limited to 'tap-snapshots/test/lib')
-rw-r--r-- | tap-snapshots/test/lib/config.js.test.cjs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tap-snapshots/test/lib/config.js.test.cjs b/tap-snapshots/test/lib/config.js.test.cjs index 817f3c173..b21b75cd2 100644 --- a/tap-snapshots/test/lib/config.js.test.cjs +++ b/tap-snapshots/test/lib/config.js.test.cjs @@ -146,7 +146,7 @@ exports[`test/lib/config.js TAP config list --json > output matches snapshot 1`] "unicode": false, "update-notifier": true, "usage": false, - "user-agent": "npm/{NPM-VERSION} node/{NODE-VERSION} {PLATFORM} {ARCH} workspaces/false", + "user-agent": "npm/{npm-version} node/{node-version} {platform} {arch} workspaces/{workspaces} {ci}", "version": false, "versions": false, "viewer": "{VIEWER}", @@ -296,7 +296,7 @@ umask = 0 unicode = false update-notifier = true usage = false -user-agent = "npm/{NPM-VERSION} node/{NODE-VERSION} {PLATFORM} {ARCH} workspaces/false" +user-agent = "npm/{npm-version} node/{node-version} {platform} {arch} workspaces/{workspaces} {ci}" ; userconfig = "{HOME}/.npmrc" ; overridden by cli version = false versions = false |