locter 0.6.0 → 0.6.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/dist/index.cjs.js +42 -1
- package/package.json +7 -7
package/dist/index.cjs.js
CHANGED
|
@@ -382,6 +382,45 @@ function _defineProperty(obj, key, value) {
|
|
|
382
382
|
}
|
|
383
383
|
return obj;
|
|
384
384
|
}
|
|
385
|
+
function _getRequireWildcardCache(nodeInterop) {
|
|
386
|
+
if (typeof WeakMap !== "function") return null;
|
|
387
|
+
var cacheBabelInterop = new WeakMap();
|
|
388
|
+
var cacheNodeInterop = new WeakMap();
|
|
389
|
+
return (_getRequireWildcardCache = function (nodeInterop) {
|
|
390
|
+
return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
|
|
391
|
+
})(nodeInterop);
|
|
392
|
+
}
|
|
393
|
+
function _interopRequireWildcard(obj, nodeInterop) {
|
|
394
|
+
if (!nodeInterop && obj && obj.__esModule) {
|
|
395
|
+
return obj;
|
|
396
|
+
}
|
|
397
|
+
if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
|
|
398
|
+
return {
|
|
399
|
+
default: obj
|
|
400
|
+
};
|
|
401
|
+
}
|
|
402
|
+
var cache = _getRequireWildcardCache(nodeInterop);
|
|
403
|
+
if (cache && cache.has(obj)) {
|
|
404
|
+
return cache.get(obj);
|
|
405
|
+
}
|
|
406
|
+
var newObj = {};
|
|
407
|
+
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
408
|
+
for (var key in obj) {
|
|
409
|
+
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
410
|
+
var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
|
|
411
|
+
if (desc && (desc.get || desc.set)) {
|
|
412
|
+
Object.defineProperty(newObj, key, desc);
|
|
413
|
+
} else {
|
|
414
|
+
newObj[key] = obj[key];
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
newObj.default = obj;
|
|
419
|
+
if (cache) {
|
|
420
|
+
cache.set(obj, newObj);
|
|
421
|
+
}
|
|
422
|
+
return newObj;
|
|
423
|
+
}
|
|
385
424
|
function _toPrimitive(input, hint) {
|
|
386
425
|
if (typeof input !== "object" || input === null) return input;
|
|
387
426
|
var prim = input[Symbol.toPrimitive];
|
|
@@ -723,7 +762,9 @@ function _loadScriptFile() {
|
|
|
723
762
|
}
|
|
724
763
|
_context.prev = 4;
|
|
725
764
|
_context.next = 7;
|
|
726
|
-
return
|
|
765
|
+
return Promise.resolve("".concat(filePath)).then(function (s) {
|
|
766
|
+
return _interopRequireWildcard(require(s));
|
|
767
|
+
});
|
|
727
768
|
case 7:
|
|
728
769
|
return _context.abrupt("return", _context.sent);
|
|
729
770
|
case 10:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "locter",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.1",
|
|
4
4
|
"description": "A library to locate a file by criteria and load it",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Peter Placzek",
|
|
@@ -45,7 +45,6 @@
|
|
|
45
45
|
"@commitlint/config-conventional": "^17.3.0",
|
|
46
46
|
"@commitlint/cz-commitlint": "^17.3.0",
|
|
47
47
|
"@rollup/plugin-babel": "^6.0.3",
|
|
48
|
-
"@rollup/plugin-commonjs": "^23.0.2",
|
|
49
48
|
"@rollup/plugin-node-resolve": "^15.0.0",
|
|
50
49
|
"@semantic-release/changelog": "^6.0.2",
|
|
51
50
|
"@semantic-release/commit-analyzer": "^9.0.2",
|
|
@@ -57,19 +56,20 @@
|
|
|
57
56
|
"@types/glob": "^8.0.0",
|
|
58
57
|
"@types/is-file-esm": "^1.0.0",
|
|
59
58
|
"@types/jest": "^27.5.0",
|
|
60
|
-
"@types/node": "^18.11.
|
|
61
|
-
"@types/yargs": "^17.0.
|
|
59
|
+
"@types/node": "^18.11.17",
|
|
60
|
+
"@types/yargs": "^17.0.17",
|
|
61
|
+
"babel-plugin-dynamic-import-node": "^2.3.3",
|
|
62
62
|
"coveralls": "^3.1.0",
|
|
63
63
|
"cross-env": "^7.0.3",
|
|
64
|
-
"eslint": "^8.
|
|
64
|
+
"eslint": "^8.30.0",
|
|
65
65
|
"husky": "^8.0.2",
|
|
66
66
|
"jest": "^27.5.1",
|
|
67
67
|
"rimraf": "^3.0.2",
|
|
68
|
-
"rollup": "^3.5
|
|
68
|
+
"rollup": "^3.7.5",
|
|
69
69
|
"semantic-release": "^19.0.5",
|
|
70
70
|
"ts-jest": "^27.1.4",
|
|
71
71
|
"ts-node": "^10.9.1",
|
|
72
|
-
"typescript": "^4.9.
|
|
72
|
+
"typescript": "^4.9.4"
|
|
73
73
|
},
|
|
74
74
|
"dependencies": {
|
|
75
75
|
"ebec": "^0.1.0",
|