diff options
author | Yucel Okcu <yucel.n.okcu@gmail.com> | 2021-11-18 18:48:17 +0300 |
---|---|---|
committer | Gar <gar+gh@danger.computer> | 2021-11-22 17:58:40 +0300 |
commit | c5c6d1603b06df4c10b503047aeed34d6e0c36c2 (patch) | |
tree | f7fad2ba4c3e2ecb20c1c6c5b5274b28d83b1e3f /lib/utils | |
parent | 5f4040aa0e30a3b74caab64958770c682e4d0031 (diff) |
fix: add missing scope on flat options
PR-URL: https://github.com/npm/cli/pull/4060
Credit: @yuqu
Close: #4060
Reviewed-by: @wraithgar
Diffstat (limited to 'lib/utils')
-rw-r--r-- | lib/utils/config/definitions.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/utils/config/definitions.js b/lib/utils/config/definitions.js index b47a46de8..5bd13ac81 100644 --- a/lib/utils/config/definitions.js +++ b/lib/utils/config/definitions.js @@ -1782,7 +1782,10 @@ define('scope', { `, flatten (key, obj, flatOptions) { const value = obj[key] - flatOptions.projectScope = value && !/^@/.test(value) ? `@${value}` : value + const scope = value && !/^@/.test(value) ? `@${value}` : value + flatOptions.scope = scope + // projectScope is kept for compatibility with npm-registry-fetch + flatOptions.projectScope = scope }, }) |