From 0e63df61283a2f7ace991f72e4577c6f23ffc5df Mon Sep 17 00:00:00 2001 From: Gar Date: Mon, 29 Nov 2021 14:28:11 -0800 Subject: [PATCH] deps: @npmcli/config@2.3.2 * fix: always load localPrefix PR-URL: https://github.com/npm/cli/pull/4102 Credit: @wraithgar Close: #4102 Reviewed-by: @lukekarrys --- node_modules/@npmcli/config/lib/index.js | 8 +++++--- node_modules/@npmcli/config/package.json | 2 +- package-lock.json | 14 +++++++------- package.json | 2 +- 4 files changed, 14 insertions(+), 12 deletions(-) diff --git a/node_modules/@npmcli/config/lib/index.js b/node_modules/@npmcli/config/lib/index.js index 724ce14c38fc9..e52f7a14f7d7c 100644 --- a/node_modules/@npmcli/config/lib/index.js +++ b/node_modules/@npmcli/config/lib/index.js @@ -497,15 +497,17 @@ class Config { } async loadProjectConfig () { + // the localPrefix can be set by the CLI config, but otherwise is + // found by walking up the folder tree. either way, we load it before + // we return to make sure localPrefix is set + await this.loadLocalPrefix() + if (this[_get]('global') === true || this[_get]('location') === 'global') { this.data.get('project').source = '(global mode enabled, ignored)' this.sources.set(this.data.get('project').source, 'project') return } - // the localPrefix can be set by the CLI config, but otherwise is - // found by walking up the folder tree - await this.loadLocalPrefix() const projectFile = resolve(this.localPrefix, '.npmrc') // if we're in the ~ directory, and there happens to be a node_modules // folder (which is not TOO uncommon, it turns out), then we can end diff --git a/node_modules/@npmcli/config/package.json b/node_modules/@npmcli/config/package.json index f36d8f7b11ec5..299202ec2d0fa 100644 --- a/node_modules/@npmcli/config/package.json +++ b/node_modules/@npmcli/config/package.json @@ -1,6 +1,6 @@ { "name": "@npmcli/config", - "version": "2.3.1", + "version": "2.3.2", "files": [ "lib" ], diff --git a/package-lock.json b/package-lock.json index 7d0386f2d7ea4..7604fc1129454 100644 --- a/package-lock.json +++ b/package-lock.json @@ -88,7 +88,7 @@ "@isaacs/string-locale-compare": "^1.1.0", "@npmcli/arborist": "^4.0.5", "@npmcli/ci-detect": "^1.4.0", - "@npmcli/config": "^2.3.0", + "@npmcli/config": "^2.3.2", "@npmcli/map-workspaces": "^2.0.0", "@npmcli/package-json": "^1.0.1", "@npmcli/run-script": "^2.0.0", @@ -851,9 +851,9 @@ "inBundle": true }, "node_modules/@npmcli/config": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/@npmcli/config/-/config-2.3.1.tgz", - "integrity": "sha512-F/8R/Zqun8682TgaCILUNoaVfd1LVaYZ/jcVt9KWzfKpzcPus1zEApAl54PqVqVJbNq6f01QTDQHD6L/n56BXw==", + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/@npmcli/config/-/config-2.3.2.tgz", + "integrity": "sha512-2/9dj143BFgQR8qxJbYptd8k+4+Po2uHYq3H6498ynZcRu4LrsDlngov5HGrvo2+f0pe0fBJwDEP2rRtaW8bkw==", "inBundle": true, "dependencies": { "ini": "^2.0.0", @@ -10727,9 +10727,9 @@ "integrity": "sha512-3BGrt6FLjqM6br5AhWRKTr3u5GIVkjRYeAFrMp3HjnfICrg4xOrVRwFavKT6tsp++bq5dluL5t8ME/Nha/6c1Q==" }, "@npmcli/config": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/@npmcli/config/-/config-2.3.1.tgz", - "integrity": "sha512-F/8R/Zqun8682TgaCILUNoaVfd1LVaYZ/jcVt9KWzfKpzcPus1zEApAl54PqVqVJbNq6f01QTDQHD6L/n56BXw==", + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/@npmcli/config/-/config-2.3.2.tgz", + "integrity": "sha512-2/9dj143BFgQR8qxJbYptd8k+4+Po2uHYq3H6498ynZcRu4LrsDlngov5HGrvo2+f0pe0fBJwDEP2rRtaW8bkw==", "requires": { "ini": "^2.0.0", "mkdirp-infer-owner": "^2.0.0", diff --git a/package.json b/package.json index 43456fef9a2ac..8812c76f14891 100644 --- a/package.json +++ b/package.json @@ -57,7 +57,7 @@ "@isaacs/string-locale-compare": "^1.1.0", "@npmcli/arborist": "^4.0.5", "@npmcli/ci-detect": "^1.4.0", - "@npmcli/config": "^2.3.0", + "@npmcli/config": "^2.3.2", "@npmcli/map-workspaces": "^2.0.0", "@npmcli/package-json": "^1.0.1", "@npmcli/run-script": "^2.0.0",