Socket
Socket
Sign inDemoInstall

@npmcli/config

Package Overview
Dependencies
Maintainers
6
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 1.1.4 to 1.1.5

24

lib/index.js

@@ -599,15 +599,15 @@ // TODO: set the scope config from package.json or explicit cli config

// you can set always-auth for a single registry, or as a default
const alwaysAuthReg = this[_get](`${nerfed}:always-auth`)
const alwaysAuthReg = this.get(`${nerfed}:always-auth`)
if (alwaysAuthReg !== undefined)
creds.alwaysAuth = !!alwaysAuthReg
else
creds.alwaysAuth = this[_get]('always-auth')
creds.alwaysAuth = this.get('always-auth')
const email = this[_get](`${nerfed}:email`) || this[_get]('email')
const email = this.get(`${nerfed}:email`) || this.get('email')
if (email)
creds.email = email
const tokenReg = this[_get](`${nerfed}:_authToken`) ||
this[_get](`${nerfed}:-authtoken`) ||
nerfed === nerfDart(this[_get]('registry')) && this[_get]('_authToken')
const tokenReg = this.get(`${nerfed}:_authToken`) ||
this.get(`${nerfed}:-authtoken`) ||
nerfed === nerfDart(this.get('registry')) && this.get('_authToken')

@@ -619,4 +619,4 @@ if (tokenReg) {

const userReg = this[_get](`${nerfed}:username`)
const passReg = this[_get](`${nerfed}:_password`)
const userReg = this.get(`${nerfed}:username`)
const passReg = this.get(`${nerfed}:_password`)
if (userReg && passReg) {

@@ -632,8 +632,8 @@ creds.username = userReg

// default registry.
const defaultNerf = nerfDart(this[_get]('registry'))
const defaultNerf = nerfDart(this.get('registry'))
if (nerfed !== defaultNerf)
return creds
const userDef = this[_get]('username')
const passDef = this[_get]('_password')
const userDef = this.get('username')
const passDef = this.get('_password')
if (userDef && passDef) {

@@ -649,3 +649,3 @@ creds.username = userDef

// registry, if set.
const auth = this[_get]('_auth')
const auth = this.get('_auth')
if (!auth)

@@ -652,0 +652,0 @@ return creds

{
"name": "@npmcli/config",
"version": "1.1.4",
"version": "1.1.5",
"files": [

@@ -5,0 +5,0 @@ "lib"

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