locter 0.6.0 → 0.6.2

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 (2) hide show
  1. package/dist/index.cjs.js +42 -1
  2. package/package.json +13 -13
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 import(filePath);
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.0",
3
+ "version": "0.6.2",
4
4
  "description": "A library to locate a file by criteria and load it",
5
5
  "author": {
6
6
  "name": "Peter Placzek",
@@ -37,15 +37,14 @@
37
37
  ],
38
38
  "license": "MIT",
39
39
  "devDependencies": {
40
- "@babel/core": "^7.20.2",
40
+ "@babel/core": "^7.20.12",
41
41
  "@babel/preset-env": "^7.20.2",
42
42
  "@babel/preset-typescript": "^7.18.6",
43
43
  "@commitlint/cli": "^17.3.0",
44
- "@commitlint/config-angular": "^17.3.0",
45
- "@commitlint/config-conventional": "^17.3.0",
46
- "@commitlint/cz-commitlint": "^17.3.0",
44
+ "@commitlint/config-angular": "^17.4.0",
45
+ "@commitlint/config-conventional": "^17.4.0",
46
+ "@commitlint/cz-commitlint": "^17.4.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",
@@ -53,23 +52,24 @@
53
52
  "@semantic-release/github": "^8.0.7",
54
53
  "@semantic-release/npm": "^9.0.1",
55
54
  "@semantic-release/release-notes-generator": "^10.0.3",
56
- "@tada5hi/eslint-config-typescript": "^1.0.10",
55
+ "@tada5hi/eslint-config-typescript": "^1.1.0",
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.10",
61
- "@types/yargs": "^17.0.15",
59
+ "@types/node": "^18.11.18",
60
+ "@types/yargs": "^17.0.19",
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.28.0",
65
- "husky": "^8.0.2",
64
+ "eslint": "^8.31.0",
65
+ "husky": "^8.0.3",
66
66
  "jest": "^27.5.1",
67
67
  "rimraf": "^3.0.2",
68
- "rollup": "^3.5.1",
68
+ "rollup": "^3.9.1",
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.3"
72
+ "typescript": "^4.9.4"
73
73
  },
74
74
  "dependencies": {
75
75
  "ebec": "^0.1.0",