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 3.0.1 to 4.0.0

2

lib/env-replace.js
// replace any ${ENV} values with the appropriate environ.
const envExpr = /(\\*)\$\{([^}]+)\}/g
const envExpr = /(?<!\\)(\\*)\$\{([^${}]+)\}/g

@@ -5,0 +5,0 @@ module.exports = (f, env) => f.replace(envExpr, (orig, esc, name) => {

@@ -8,2 +8,3 @@ // TODO: set the scope config from package.json or explicit cli config

const rpj = require('read-package-json-fast')
const log = require('proc-log')

@@ -92,3 +93,2 @@ /* istanbul ignore next */

argv = process.argv,
log = require('proc-log'),
platform = process.platform,

@@ -119,3 +119,2 @@ execPath = process.execPath,

this.npmPath = npmPath
this.log = log
this.argv = argv

@@ -442,3 +441,3 @@ this.env = env

invalidHandler (k, val, type, source, where) {
this.log.warn(
log.warn(
'invalid config',

@@ -476,3 +475,3 @@ k + '=' + JSON.stringify(val),

.join(', ')
this.log.warn('invalid config', msg, desc)
log.warn('invalid config', msg, desc)
}

@@ -499,3 +498,3 @@

if (er.code !== 'ENOENT') {
this.log.verbose('config', `error loading ${where} config`, er)
log.verbose('config', `error loading ${where} config`, er)
}

@@ -519,3 +518,3 @@ } else {

if (this.deprecated[key]) {
this.log.verbose('config', key, this.deprecated[key])
log.verbose('config', key, this.deprecated[key])
}

@@ -617,3 +616,3 @@ }

if (hasNpmrc) {
this.log.warn(`ignoring workspace config at ${this.localPrefix}/.npmrc`)
log.warn(`ignoring workspace config at ${this.localPrefix}/.npmrc`)
}

@@ -625,3 +624,3 @@

this.localPrefix = p
this.log.info(`found workspace root at ${this.localPrefix}`)
log.info(`found workspace root at ${this.localPrefix}`)
// we found a root, so we return now

@@ -628,0 +627,0 @@ return

{
"name": "@npmcli/config",
"version": "3.0.1",
"version": "4.0.0",
"files": [

@@ -5,0 +5,0 @@ "bin",

@@ -81,7 +81,10 @@ # `@npmcli/config`

cwd: process.cwd(),
// optional, defaults to emitting 'log' events on process object
// only silly, verbose, warn, and error are logged by this module
log: require('proc-log')
})
// emits log events on the process object
// see `proc-log` for more info
process.on('log', (level, ...args) => {
console.log(level, ...args)
})
// returns a promise that fails if config loading fails, and

@@ -128,4 +131,2 @@ // resolves when the config object is ready for action

`globalPrefix`.
- `log` Optional, the object used to log debug messages, warnings, and
errors. Defaults to emitting on the `process` object.
- `env` Optional, defaults to `process.env`. Source of the environment

@@ -166,3 +167,2 @@ variables for configuration.

- `platform` The `platform` param
- `log` The `log` param
- `defaults` The `defaults` param

@@ -169,0 +169,0 @@ - `shorthands` The `shorthands` param

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