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.0 to 1.1.1

lib/.index.js.swp

18

lib/index.js

@@ -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"

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