@npmcli/config
Advanced tools
Comparing version 1.1.0 to 1.1.1
@@ -325,6 +325,3 @@ // TODO: set the scope config from package.json or explicit cli config | ||
for (const [where, {valid}] of this.data.entries()) { | ||
if (valid === null) | ||
this.validate(where) | ||
if (!valid) | ||
if (valid === false || valid === null && !this.validate(where)) | ||
return false | ||
@@ -494,3 +491,11 @@ } | ||
conf[_loadError] = null | ||
const iniData = ini.stringify(conf.data) | ||
// upgrade auth configs to more secure variants before saving | ||
if (where === 'user') { | ||
const reg = this.get('registry') | ||
const creds = this.getCredentialsByURI(reg) | ||
try { this.setCredentialsByURI(reg, creds) } catch (_) {} | ||
} | ||
const iniData = ini.stringify(conf.data).trim() + '\n' | ||
if (!iniData.trim()) { | ||
@@ -595,3 +600,4 @@ // ignore the unlink error (eg, if file doesn't exist) | ||
const tokenReg = this[_get](`${nerfed}:_authToken`) || | ||
this[_get](`${nerfed}:-authtoken`) | ||
this[_get](`${nerfed}:-authtoken`) || | ||
nerfed === nerfDart(this[_get]('registry')) && this[_get]('_authToken') | ||
@@ -598,0 +604,0 @@ if (tokenReg) { |
{ | ||
"name": "@npmcli/config", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"files": [ | ||
@@ -5,0 +5,0 @@ "lib" |
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
90650
13
896