@npmcli/config
Advanced tools
Comparing version 1.1.7 to 1.1.8
@@ -6,2 +6,4 @@ // replace any ${ENV} values with the appropriate environ. | ||
module.exports = (f, env) => f.replace(envExpr, (orig, esc, name) => { | ||
const val = env[name] !== undefined ? env[name] : `\$\{${name}\}` | ||
// consume the escape chars that are relevant. | ||
@@ -11,6 +13,3 @@ if (esc.length % 2) | ||
if (undefined === env[name]) | ||
throw new Error('Failed to replace env in config: ' + orig) | ||
return (esc.substr(esc.length / 2)) + env[name] | ||
return (esc.substr(esc.length / 2)) + val | ||
}) |
@@ -244,2 +244,5 @@ // TODO: set the scope config from package.json or explicit cli config | ||
// set proper globalPrefix now that everything is loaded | ||
this.globalPrefix = this.get('prefix') | ||
process.emit('time', 'config:load:setEnvs') | ||
@@ -246,0 +249,0 @@ this.setEnvs() |
{ | ||
"name": "@npmcli/config", | ||
"version": "1.1.7", | ||
"version": "1.1.8", | ||
"files": [ | ||
@@ -5,0 +5,0 @@ "lib" |
@@ -5,3 +5,3 @@ # `@npmcli/config` | ||
This module is the spiritual decendant of | ||
This module is the spiritual descendant of | ||
[`npmconf`](http://npm.im/npmconf), and the code that once lived in npm's | ||
@@ -31,3 +31,3 @@ `lib/config/` folder. | ||
The resulting heirarchy of configs: | ||
The resulting hierarchy of configs: | ||
@@ -34,0 +34,0 @@ - CLI switches. eg `--some-key=some-value` on the command line. These are |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
42040
910
1