@npmcli/config
Advanced tools
Comparing version 4.2.1 to 4.2.2
@@ -770,2 +770,7 @@ // TODO: set the scope config from package.json or explicit cli config | ||
const deprecatedAuthWarning = [ | ||
'`_auth`, `_authToken`, `username` and `_password` must be scoped to a registry.', | ||
'see `npm help npmrc` for more information.', | ||
].join(' ') | ||
const email = this.get(`${nerfed}:email`) || this.get('email') | ||
@@ -784,6 +789,9 @@ if (email) { | ||
const tokenReg = this.get(`${nerfed}:_authToken`) || | ||
nerfed === nerfDart(this.get('registry')) && this.get('_authToken') | ||
const defaultToken = nerfDart(this.get('registry')) && this.get('_authToken') | ||
const tokenReg = this.get(`${nerfed}:_authToken`) || defaultToken | ||
if (tokenReg) { | ||
if (tokenReg === defaultToken) { | ||
log.warn('config', deprecatedAuthWarning) | ||
} | ||
creds.token = tokenReg | ||
@@ -823,2 +831,3 @@ return creds | ||
if (userDef && passDef) { | ||
log.warn('config', deprecatedAuthWarning) | ||
creds.username = userDef | ||
@@ -838,2 +847,3 @@ creds.password = Buffer.from(passDef, 'base64').toString('utf8') | ||
log.warn('config', deprecatedAuthWarning) | ||
const authDecode = Buffer.from(auth, 'base64').toString('utf8') | ||
@@ -840,0 +850,0 @@ const authSplit = authDecode.split(':') |
{ | ||
"name": "@npmcli/config", | ||
"version": "4.2.1", | ||
"version": "4.2.2", | ||
"files": [ | ||
@@ -34,3 +34,3 @@ "bin/", | ||
"@npmcli/eslint-config": "^3.0.1", | ||
"@npmcli/template-oss": "3.5.0", | ||
"@npmcli/template-oss": "3.6.0", | ||
"tap": "^16.0.1" | ||
@@ -53,4 +53,4 @@ }, | ||
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", | ||
"version": "3.5.0" | ||
"version": "3.6.0" | ||
} | ||
} |
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
48944
1087