config 4.0.1 → 4.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/config.js +0 -8
- package/lib/util.js +0 -17
- package/package.json +4 -9
package/lib/config.js
CHANGED
|
@@ -505,13 +505,9 @@ util.loadFileConfigs = function(configDir, options) {
|
|
|
505
505
|
let opts = {...FIRST_LOAD.options, configDir, ...options};
|
|
506
506
|
newLoad = new Load(opts);
|
|
507
507
|
newLoad.scan();
|
|
508
|
-
|
|
509
|
-
FIRST_LOAD.sourcesBug(newLoad.getSources());
|
|
510
508
|
} else {
|
|
511
509
|
newLoad = new Load({...FIRST_LOAD.options, ...options});
|
|
512
510
|
_init(newLoad);
|
|
513
|
-
|
|
514
|
-
FIRST_LOAD.sourcesBug(newLoad.getSources());
|
|
515
511
|
}
|
|
516
512
|
|
|
517
513
|
return newLoad.config;
|
|
@@ -619,10 +615,6 @@ util.parseFile = function(fullFilename, options = {}) {
|
|
|
619
615
|
|
|
620
616
|
loadInfo.loadFile(fullFilename);
|
|
621
617
|
|
|
622
|
-
if (!options.skipConfigSources) {
|
|
623
|
-
FIRST_LOAD.sourcesBug(loadInfo.getSources());
|
|
624
|
-
}
|
|
625
|
-
|
|
626
618
|
return loadInfo.config;
|
|
627
619
|
}
|
|
628
620
|
|
package/lib/util.js
CHANGED
|
@@ -977,23 +977,6 @@ class Load {
|
|
|
977
977
|
return (this.sources ?? []).slice();
|
|
978
978
|
}
|
|
979
979
|
|
|
980
|
-
/**
|
|
981
|
-
* Bug-preserving function
|
|
982
|
-
*
|
|
983
|
-
* This function conserves a bug in loadFileConfigs that makes additional loadFileConfigs
|
|
984
|
-
* calls show up as configSources on the singleton, which is incorrect and reduces the
|
|
985
|
-
* diagnostic value of inspecting the configSources after a program initialization.
|
|
986
|
-
*
|
|
987
|
-
* This needs to go but at present there is no other way to surface these values. So this
|
|
988
|
-
* function exists until a side-effect-free loadFileConfigs() can be created at the end
|
|
989
|
-
* of this rearchitecting work.
|
|
990
|
-
*
|
|
991
|
-
* @param sources
|
|
992
|
-
*/
|
|
993
|
-
sourcesBug(sources) {
|
|
994
|
-
this.sources && this.sources.push(...sources);
|
|
995
|
-
}
|
|
996
|
-
|
|
997
980
|
/**
|
|
998
981
|
* <p>
|
|
999
982
|
* Set default configurations for a node.js module.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "config",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.1.1",
|
|
4
4
|
"main": "./lib/config.js",
|
|
5
5
|
"description": "Configuration control for production node deployments",
|
|
6
6
|
"author": "Loren West <open_source@lorenwest.com>",
|
|
@@ -26,11 +26,11 @@
|
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@types/node": "^7.0.8",
|
|
29
|
+
"c8": "^10.1.3",
|
|
29
30
|
"coffeescript": "2.2.4",
|
|
30
31
|
"cson": "^3.0.1",
|
|
31
32
|
"hjson": "^1.2.0",
|
|
32
33
|
"js-yaml": "^3.2.2",
|
|
33
|
-
"nyc": "^15.1.0",
|
|
34
34
|
"properties": "~1.2.1",
|
|
35
35
|
"request": "^2.88.2",
|
|
36
36
|
"semver": "5.3.0",
|
|
@@ -38,7 +38,6 @@
|
|
|
38
38
|
"ts-node": "^3.3.0",
|
|
39
39
|
"typescript": "^2.4.2",
|
|
40
40
|
"underscore": "^1.8.3",
|
|
41
|
-
"vows": ">=0.8.1",
|
|
42
41
|
"x2js": "^2.0.1"
|
|
43
42
|
},
|
|
44
43
|
"repository": {
|
|
@@ -48,19 +47,15 @@
|
|
|
48
47
|
"engines": {
|
|
49
48
|
"node": ">= 20.0.0"
|
|
50
49
|
},
|
|
51
|
-
"
|
|
50
|
+
"c8": {
|
|
52
51
|
"include": [
|
|
53
52
|
"*.js",
|
|
54
53
|
"lib/**/*.js"
|
|
55
54
|
],
|
|
56
|
-
"extension": [
|
|
57
|
-
".js"
|
|
58
|
-
],
|
|
59
55
|
"report-dir": "./coverage",
|
|
60
56
|
"reporter": "lcov"
|
|
61
57
|
},
|
|
62
58
|
"scripts": {
|
|
63
|
-
"test": "
|
|
64
|
-
"vows": "nyc vows"
|
|
59
|
+
"test": "NODE_OPTIONS='--no-experimental-strip-types' c8 node --test"
|
|
65
60
|
}
|
|
66
61
|
}
|