diff --git a/node_modules/@npmcli/config/lib/index.js b/node_modules/@npmcli/config/lib/index.js index e52f7a14f7d7c..293fad2ec56c3 100644 --- a/node_modules/@npmcli/config/lib/index.js +++ b/node_modules/@npmcli/config/lib/index.js @@ -401,6 +401,20 @@ class Config { } } + // Returns true if the value is coming directly from the source defined + // in default definitions, if the current value for the key config is + // coming from any other different source, returns false + isDefault (key) { + const [defaultType, ...types] = [...confTypes] + const defaultData = this.data.get(defaultType).data + + return hasOwnProperty(defaultData, key) + && types.every(type => { + const typeData = this.data.get(type).data + return !hasOwnProperty(typeData, key) + }) + } + invalidHandler (k, val, type, source, where) { this.log.warn( 'invalid config', diff --git a/node_modules/@npmcli/config/package.json b/node_modules/@npmcli/config/package.json index 299202ec2d0fa..83d8a349d224d 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.2", + "version": "2.4.0", "files": [ "lib" ], diff --git a/package-lock.json b/package-lock.json index 4a6f0480d35ae..56a8d84a5d630 100644 --- a/package-lock.json +++ b/package-lock.json @@ -89,7 +89,7 @@ "@isaacs/string-locale-compare": "^1.1.0", "@npmcli/arborist": "^4.2.0", "@npmcli/ci-detect": "^1.4.0", - "@npmcli/config": "^2.3.2", + "@npmcli/config": "^2.4.0", "@npmcli/map-workspaces": "^2.0.0", "@npmcli/package-json": "^1.0.1", "@npmcli/run-script": "^2.0.0", @@ -812,9 +812,9 @@ "inBundle": true }, "node_modules/@npmcli/config": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/@npmcli/config/-/config-2.3.2.tgz", - "integrity": "sha512-2/9dj143BFgQR8qxJbYptd8k+4+Po2uHYq3H6498ynZcRu4LrsDlngov5HGrvo2+f0pe0fBJwDEP2rRtaW8bkw==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@npmcli/config/-/config-2.4.0.tgz", + "integrity": "sha512-fwxu/zaZnvBJohXM3igzqa3P1IVYWi5N343XcKvKkJbAx+rTqegS5tAul4NLiMPQh6WoS5a4er6oo/ieUx1f4g==", "inBundle": true, "dependencies": { "ini": "^2.0.0", @@ -11411,9 +11411,9 @@ "integrity": "sha512-3BGrt6FLjqM6br5AhWRKTr3u5GIVkjRYeAFrMp3HjnfICrg4xOrVRwFavKT6tsp++bq5dluL5t8ME/Nha/6c1Q==" }, "@npmcli/config": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/@npmcli/config/-/config-2.3.2.tgz", - "integrity": "sha512-2/9dj143BFgQR8qxJbYptd8k+4+Po2uHYq3H6498ynZcRu4LrsDlngov5HGrvo2+f0pe0fBJwDEP2rRtaW8bkw==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@npmcli/config/-/config-2.4.0.tgz", + "integrity": "sha512-fwxu/zaZnvBJohXM3igzqa3P1IVYWi5N343XcKvKkJbAx+rTqegS5tAul4NLiMPQh6WoS5a4er6oo/ieUx1f4g==", "requires": { "ini": "^2.0.0", "mkdirp-infer-owner": "^2.0.0", diff --git a/package.json b/package.json index b5791556419d3..b49b31b9986e6 100644 --- a/package.json +++ b/package.json @@ -57,7 +57,7 @@ "@isaacs/string-locale-compare": "^1.1.0", "@npmcli/arborist": "^4.2.0", "@npmcli/ci-detect": "^1.4.0", - "@npmcli/config": "^2.3.2", + "@npmcli/config": "^2.4.0", "@npmcli/map-workspaces": "^2.0.0", "@npmcli/package-json": "^1.0.1", "@npmcli/run-script": "^2.0.0",