@pnpm/npm-conf
Advanced tools
Comparing version 2.2.2 to 2.3.0
@@ -20,4 +20,8 @@ 'use strict'; | ||
try { | ||
for (const x of Object.keys(data)) { | ||
data[x] = this._parseField(data[x], x); | ||
for (const [key, value] of Object.entries(data)) { | ||
const substKey = util.parseKey(key); | ||
if (substKey !== key) { | ||
delete data[key]; | ||
} | ||
data[substKey] = this._parseField(value, substKey); | ||
} | ||
@@ -47,3 +51,3 @@ } catch (error) { | ||
this.add({}, marker); | ||
} else { | ||
} else if (error.code !== 'EISDIR') { | ||
return `Issue while reading "${file}". ${error.message}` | ||
@@ -50,0 +54,0 @@ } |
@@ -6,2 +6,10 @@ 'use strict'; | ||
const parseKey = (key) => { | ||
if (typeof key !== 'string') { | ||
return key; | ||
} | ||
return envReplace(key, process.env); | ||
} | ||
// https://github.com/npm/cli/blob/latest/lib/config/core.js#L359-L404 | ||
@@ -131,1 +139,2 @@ const parseField = (types, field, key) => { | ||
exports.parseField = parseField; | ||
exports.parseKey = parseKey; |
{ | ||
"name": "@pnpm/npm-conf", | ||
"version": "2.2.2", | ||
"version": "2.3.0", | ||
"description": "Get the npm config", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
28625
888
26