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
path: root/lib/utils
diff options
context:
space:
mode:
authorYucel Okcu <yucel.n.okcu@gmail.com>2021-11-18 18:48:17 +0300
committerGar <gar+gh@danger.computer>2021-11-22 17:58:40 +0300
commitc5c6d1603b06df4c10b503047aeed34d6e0c36c2 (patch)
treef7fad2ba4c3e2ecb20c1c6c5b5274b28d83b1e3f /lib/utils
parent5f4040aa0e30a3b74caab64958770c682e4d0031 (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.js5
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
},
})