Skip to content

Commit 0e63df6

Browse files
committed
deps: @npmcli/[email protected]
* fix: always load localPrefix PR-URL: #4102 Credit: @wraithgar Close: #4102 Reviewed-by: @lukekarrys
1 parent a8bc95f commit 0e63df6

File tree

4 files changed

+14
-12
lines changed

4 files changed

+14
-12
lines changed

node_modules/@npmcli/config/lib/index.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -497,15 +497,17 @@ class Config {
497497
}
498498

499499
async loadProjectConfig () {
500+
// the localPrefix can be set by the CLI config, but otherwise is
501+
// found by walking up the folder tree. either way, we load it before
502+
// we return to make sure localPrefix is set
503+
await this.loadLocalPrefix()
504+
500505
if (this[_get]('global') === true || this[_get]('location') === 'global') {
501506
this.data.get('project').source = '(global mode enabled, ignored)'
502507
this.sources.set(this.data.get('project').source, 'project')
503508
return
504509
}
505510

506-
// the localPrefix can be set by the CLI config, but otherwise is
507-
// found by walking up the folder tree
508-
await this.loadLocalPrefix()
509511
const projectFile = resolve(this.localPrefix, '.npmrc')
510512
// if we're in the ~ directory, and there happens to be a node_modules
511513
// folder (which is not TOO uncommon, it turns out), then we can end

node_modules/@npmcli/config/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@npmcli/config",
3-
"version": "2.3.1",
3+
"version": "2.3.2",
44
"files": [
55
"lib"
66
],

package-lock.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@
8888
"@isaacs/string-locale-compare": "^1.1.0",
8989
"@npmcli/arborist": "^4.0.5",
9090
"@npmcli/ci-detect": "^1.4.0",
91-
"@npmcli/config": "^2.3.0",
91+
"@npmcli/config": "^2.3.2",
9292
"@npmcli/map-workspaces": "^2.0.0",
9393
"@npmcli/package-json": "^1.0.1",
9494
"@npmcli/run-script": "^2.0.0",
@@ -851,9 +851,9 @@
851851
"inBundle": true
852852
},
853853
"node_modules/@npmcli/config": {
854-
"version": "2.3.1",
855-
"resolved": "https://registry.npmjs.org/@npmcli/config/-/config-2.3.1.tgz",
856-
"integrity": "sha512-F/8R/Zqun8682TgaCILUNoaVfd1LVaYZ/jcVt9KWzfKpzcPus1zEApAl54PqVqVJbNq6f01QTDQHD6L/n56BXw==",
854+
"version": "2.3.2",
855+
"resolved": "https://registry.npmjs.org/@npmcli/config/-/config-2.3.2.tgz",
856+
"integrity": "sha512-2/9dj143BFgQR8qxJbYptd8k+4+Po2uHYq3H6498ynZcRu4LrsDlngov5HGrvo2+f0pe0fBJwDEP2rRtaW8bkw==",
857857
"inBundle": true,
858858
"dependencies": {
859859
"ini": "^2.0.0",
@@ -10727,9 +10727,9 @@
1072710727
"integrity": "sha512-3BGrt6FLjqM6br5AhWRKTr3u5GIVkjRYeAFrMp3HjnfICrg4xOrVRwFavKT6tsp++bq5dluL5t8ME/Nha/6c1Q=="
1072810728
},
1072910729
"@npmcli/config": {
10730-
"version": "2.3.1",
10731-
"resolved": "https://registry.npmjs.org/@npmcli/config/-/config-2.3.1.tgz",
10732-
"integrity": "sha512-F/8R/Zqun8682TgaCILUNoaVfd1LVaYZ/jcVt9KWzfKpzcPus1zEApAl54PqVqVJbNq6f01QTDQHD6L/n56BXw==",
10730+
"version": "2.3.2",
10731+
"resolved": "https://registry.npmjs.org/@npmcli/config/-/config-2.3.2.tgz",
10732+
"integrity": "sha512-2/9dj143BFgQR8qxJbYptd8k+4+Po2uHYq3H6498ynZcRu4LrsDlngov5HGrvo2+f0pe0fBJwDEP2rRtaW8bkw==",
1073310733
"requires": {
1073410734
"ini": "^2.0.0",
1073510735
"mkdirp-infer-owner": "^2.0.0",

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
"@isaacs/string-locale-compare": "^1.1.0",
5858
"@npmcli/arborist": "^4.0.5",
5959
"@npmcli/ci-detect": "^1.4.0",
60-
"@npmcli/config": "^2.3.0",
60+
"@npmcli/config": "^2.3.2",
6161
"@npmcli/map-workspaces": "^2.0.0",
6262
"@npmcli/package-json": "^1.0.1",
6363
"@npmcli/run-script": "^2.0.0",

0 commit comments

Comments
 (0)