config 3.3.8 → 3.3.9

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.
Files changed (3) hide show
  1. package/History.md +6 -0
  2. package/package.json +2 -2
  3. package/parser.js +7 -1
package/History.md CHANGED
@@ -1,3 +1,9 @@
1
+ Beyond 3.3.7
2
+ ============
3
+ We've moved this content to [Github Releases](https://github.com/node-config/node-config/releases).
4
+
5
+ Future release notes are managed there.
6
+
1
7
  3.3.7 / 2022-01-11
2
8
  ==================
3
9
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "config",
3
- "version": "3.3.8",
3
+ "version": "3.3.9",
4
4
  "main": "./lib/config.js",
5
5
  "description": "Configuration control for production node deployments",
6
6
  "author": "Loren West <open_source@lorenwest.com>",
@@ -22,7 +22,7 @@
22
22
  },
23
23
  "license": "MIT",
24
24
  "dependencies": {
25
- "json5": "^2.2.1"
25
+ "json5": "^2.2.3"
26
26
  },
27
27
  "devDependencies": {
28
28
  "@types/node": "^7.0.8",
package/parser.js CHANGED
@@ -1,4 +1,5 @@
1
1
  // External libraries are lazy-loaded only if these file types exist.
2
+ const util = require("util");
2
3
  var Yaml = null,
3
4
  VisionmediaYaml = null,
4
5
  Coffee = null,
@@ -48,7 +49,12 @@ Parser.xmlParser = function(filename, content) {
48
49
  };
49
50
 
50
51
  Parser.jsParser = function(filename, content) {
51
- return require(filename);
52
+ var configObject = require(filename);
53
+
54
+ if (configObject.__esModule && util.isObject(configObject.default)) {
55
+ return configObject.default
56
+ }
57
+ return configObject;
52
58
  };
53
59
 
54
60
  Parser.tsParser = function(filename, content) {