Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornlf <quitlahok@gmail.com>2022-08-25 21:33:21 +0300
committerLuke Karrys <luke@lukekarrys.com>2022-08-25 22:07:06 +0300
commit25618229b7698aa8abbfcd2ef32024809f05a1a1 (patch)
tree8d40a530f10fea105de328945c36d997ac78e941
parent53037b30d9657a378fb750f8c51bdb65f224fad0 (diff)
deps: @npmcli/config@4.2.2
-rw-r--r--node_modules/@npmcli/config/lib/index.js14
-rw-r--r--node_modules/@npmcli/config/package.json6
-rw-r--r--package-lock.json6
3 files changed, 18 insertions, 8 deletions
diff --git a/node_modules/@npmcli/config/lib/index.js b/node_modules/@npmcli/config/lib/index.js
index 93fbcad72..fe5cfd2aa 100644
--- a/node_modules/@npmcli/config/lib/index.js
+++ b/node_modules/@npmcli/config/lib/index.js
@@ -767,6 +767,11 @@ class Config {
const nerfed = nerfDart(uri)
const creds = {}
+ 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')
if (email) {
creds.email = email
@@ -780,10 +785,13 @@ class Config {
// cert/key may be used in conjunction with other credentials, thus no `return`
}
- 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
return creds
}
@@ -818,6 +826,7 @@ class Config {
const userDef = this.get('username')
const passDef = this.get('_password')
if (userDef && passDef) {
+ log.warn('config', deprecatedAuthWarning)
creds.username = userDef
creds.password = Buffer.from(passDef, 'base64').toString('utf8')
const auth = `${creds.username}:${creds.password}`
@@ -832,6 +841,7 @@ class Config {
return creds
}
+ log.warn('config', deprecatedAuthWarning)
const authDecode = Buffer.from(auth, 'base64').toString('utf8')
const authSplit = authDecode.split(':')
creds.username = authSplit.shift()
diff --git a/node_modules/@npmcli/config/package.json b/node_modules/@npmcli/config/package.json
index 275044e4a..81c36228c 100644
--- a/node_modules/@npmcli/config/package.json
+++ b/node_modules/@npmcli/config/package.json
@@ -1,6 +1,6 @@
{
"name": "@npmcli/config",
- "version": "4.2.1",
+ "version": "4.2.2",
"files": [
"bin/",
"lib/"
@@ -31,7 +31,7 @@
},
"devDependencies": {
"@npmcli/eslint-config": "^3.0.1",
- "@npmcli/template-oss": "3.5.0",
+ "@npmcli/template-oss": "3.6.0",
"tap": "^16.0.1"
},
"dependencies": {
@@ -49,6 +49,6 @@
},
"templateOSS": {
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
- "version": "3.5.0"
+ "version": "3.6.0"
}
}
diff --git a/package-lock.json b/package-lock.json
index ce443bce5..f34578380 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -878,9 +878,9 @@
}
},
"node_modules/@npmcli/config": {
- "version": "4.2.1",
- "resolved": "https://registry.npmjs.org/@npmcli/config/-/config-4.2.1.tgz",
- "integrity": "sha512-iJEnXNAGGr7sGUcoKmeJNrc943vFiWrDWq6DNK/t+SuqoObmozMb3tN3G5T9yo3uBf5Cw4h+SWgoqSaiwczl0Q==",
+ "version": "4.2.2",
+ "resolved": "https://registry.npmjs.org/@npmcli/config/-/config-4.2.2.tgz",
+ "integrity": "sha512-5GNcLd+0c4bYBnFop53+26CO5GQP0R9YcxlernohpHDWdIgzUg9I0+GEMk3sNHnLntATVU39d283A4OO+W402w==",
"inBundle": true,
"dependencies": {
"@npmcli/map-workspaces": "^2.0.2",