@npmcli/config 4.0.0 → 4.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.js +3 -2
- package/package.json +4 -4
package/lib/index.js
CHANGED
|
@@ -566,6 +566,7 @@ class Config {
|
|
|
566
566
|
}
|
|
567
567
|
|
|
568
568
|
const cliWorkspaces = this[_get]('workspaces', 'cli')
|
|
569
|
+
const isGlobal = this[_get]('global') || this[_get]('location') === 'global'
|
|
569
570
|
|
|
570
571
|
for (const p of walkUp(this.cwd)) {
|
|
571
572
|
const hasNodeModules = await stat(resolve(p, 'node_modules'))
|
|
@@ -579,8 +580,8 @@ class Config {
|
|
|
579
580
|
if (!this.localPrefix && (hasNodeModules || hasPackageJson)) {
|
|
580
581
|
this.localPrefix = p
|
|
581
582
|
|
|
582
|
-
// if workspaces are disabled, return now
|
|
583
|
-
if (cliWorkspaces === false) {
|
|
583
|
+
// if workspaces are disabled, or we're in global mode, return now
|
|
584
|
+
if (cliWorkspaces === false || isGlobal) {
|
|
584
585
|
return
|
|
585
586
|
}
|
|
586
587
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@npmcli/config",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.1",
|
|
4
4
|
"files": [
|
|
5
5
|
"bin",
|
|
6
6
|
"lib"
|
|
@@ -30,11 +30,11 @@
|
|
|
30
30
|
"coverage-map": "map.js"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"@npmcli/template-oss": "^2.
|
|
33
|
+
"@npmcli/template-oss": "^2.8.1",
|
|
34
34
|
"tap": "^15.1.6"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@npmcli/map-workspaces": "^2.0.
|
|
37
|
+
"@npmcli/map-workspaces": "^2.0.1",
|
|
38
38
|
"ini": "^2.0.0",
|
|
39
39
|
"mkdirp-infer-owner": "^2.0.0",
|
|
40
40
|
"nopt": "^5.0.0",
|
|
@@ -47,6 +47,6 @@
|
|
|
47
47
|
"node": "^12.13.0 || ^14.15.0 || >=16"
|
|
48
48
|
},
|
|
49
49
|
"templateOSS": {
|
|
50
|
-
"version": "2.
|
|
50
|
+
"version": "2.8.1"
|
|
51
51
|
}
|
|
52
52
|
}
|