Comparing version 0.4.26 to 0.4.27
@@ -0,1 +1,6 @@ | ||
0.4.27 / 2013-06-18 | ||
=================== | ||
* Fixed a bug preventing double underscores in config environment variables | ||
0.4.26 / 2013-06-10 | ||
@@ -9,3 +14,2 @@ =================== | ||
0.4.25 / 2013-05-24 | ||
@@ -12,0 +16,0 @@ =================== |
@@ -677,3 +677,3 @@ /*jsl:declare global */ | ||
for (var i = 0, l = parts.length; i < l; i++) { | ||
var partName = parts[i].replace('`','_'); | ||
var partName = parts[i].replace(/`/g,'_'); | ||
if (i == l - 1) { | ||
@@ -680,0 +680,0 @@ // Final (element) part |
{ | ||
"name": "config", | ||
"version": "0.4.26", | ||
"version": "0.4.27", | ||
"main": "./lib/config.js", | ||
@@ -5,0 +5,0 @@ "description": "Configuration control for production node deployments", |
@@ -82,2 +82,2 @@ node-config | ||
[config]: http://lorenwest.github.com/node-config/latest | ||
[monitor]: http://lorenwest.github.com/monitor/ | ||
[monitor]: https://github.com/lorenwest/node-monitor |
@@ -17,3 +17,3 @@ /** | ||
// Test for environment variable overrides | ||
process.env.CONFIG_EnvOverride_parm__1 = 'overridden from test'; | ||
process.env.CONFIG_EnvOverride_parm__number__1 = 'overridden from test'; | ||
process.env.CONFIG_EnvOverride_parm2 = 13; | ||
@@ -20,0 +20,0 @@ |
@@ -8,3 +8,3 @@ // Hardcode $NODE_ENV=test for testing | ||
// Test for environment variable overrides | ||
process.env.CONFIG_EnvOverride_parm__1 = 'overridden from test'; | ||
process.env.CONFIG_EnvOverride_parm__number__1 = 'overridden from test'; | ||
process.env.CONFIG_EnvOverride_parm2 = 13; | ||
@@ -101,3 +101,5 @@ | ||
'Double__underscores escape to single_underscores': function() { | ||
assert.equal(CONFIG.EnvOverride.parm_1, 'overridden from test'); | ||
JSON.stringify(CONFIG, null, 2); | ||
assert.equal(CONFIG.EnvOverride.parm_number_1, 'overridden from test'); | ||
} | ||
@@ -104,0 +106,0 @@ }, |
@@ -11,5 +11,5 @@ // Common configuration parameters | ||
EnvOverride: { | ||
parm_1: "from_default_js", | ||
parm_number_1: "from_default_js", | ||
parm2: 22 | ||
} | ||
}; |
{ | ||
"TestModule": { | ||
"parm3": 1234 | ||
}, | ||
"Customers": { | ||
"dbName": "override_from_runtime_json" | ||
}, | ||
"EnvOverride": { | ||
"parm_1": "overridden from test", | ||
"parm2": 13 | ||
}, | ||
"watchThisValue": 93480 | ||
"watchThisValue": 27465 | ||
} |
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
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
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
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
748377
2192