Socket
Socket
Sign inDemoInstall

@npmcli/config

Package Overview
Dependencies
Maintainers
5
Versions
73
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@npmcli/config - npm Package Compare versions

Comparing version 4.2.1 to 4.2.2

14

lib/index.js

@@ -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(':')

6

package.json
{
"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"
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc