@modern-js/repo-generator 0.0.0-canary-20220928092932 → 0.0.0-canary-20221010130822

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.js +12 -5
  2. package/package.json +11 -11
package/dist/index.js CHANGED
@@ -130418,17 +130418,23 @@ var require_compatRequire2 = __commonJSMin((exports) => {
130418
130418
  Object.defineProperty(exports, "__esModule", { value: true });
130419
130419
  exports.cleanRequireCache = exports.requireExistModule = exports.compatRequire = void 0;
130420
130420
  var findExists_1 = require_findExists2();
130421
- var compatRequire = (filePath) => {
130421
+ var compatRequire = (filePath, interop = true) => {
130422
130422
  const mod = __require(filePath);
130423
- return (mod === null || mod === void 0 ? void 0 : mod.__esModule) ? mod.default : mod;
130423
+ const rtnESMDefault = interop && (mod === null || mod === void 0 ? void 0 : mod.__esModule);
130424
+ return rtnESMDefault ? mod.default : mod;
130424
130425
  };
130425
130426
  exports.compatRequire = compatRequire;
130426
- var requireExistModule = (filename, extensions = [".ts", ".js"]) => {
130427
- const exist = (0, findExists_1.findExists)(extensions.map((ext) => `${filename}${ext}`));
130427
+ var requireExistModule = (filename, opt) => {
130428
+ const final = {
130429
+ extensions: [".ts", ".js"],
130430
+ interop: true,
130431
+ ...opt
130432
+ };
130433
+ const exist = (0, findExists_1.findExists)(final.extensions.map((ext) => `${filename}${ext}`));
130428
130434
  if (!exist) {
130429
130435
  return null;
130430
130436
  }
130431
- return (0, exports.compatRequire)(exist);
130437
+ return (0, exports.compatRequire)(exist, final.interop);
130432
130438
  };
130433
130439
  exports.requireExistModule = requireExistModule;
130434
130440
  var cleanRequireCache = (filelist) => {
@@ -130461,6 +130467,7 @@ var require_constants6 = __commonJSMin((exports) => {
130461
130467
  "@modern-js/app-tools": { cli: "@modern-js/app-tools/cli" },
130462
130468
  "@modern-js/monorepo-tools": { cli: "@modern-js/monorepo-tools/cli" },
130463
130469
  "@modern-js/module-tools": { cli: "@modern-js/module-tools/cli" },
130470
+ "@modern-js/module-tools-v2": { cli: "@modern-js/module-tools-v2" },
130464
130471
  "@modern-js/runtime": { cli: "@modern-js/runtime/cli" },
130465
130472
  "@modern-js/plugin-less": { cli: "@modern-js/plugin-less/cli" },
130466
130473
  "@modern-js/plugin-sass": { cli: "@modern-js/plugin-sass/cli" },
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "modern",
12
12
  "modern.js"
13
13
  ],
14
- "version": "0.0.0-canary-20220928092932",
14
+ "version": "0.0.0-canary-20221010130822",
15
15
  "jsnext:source": "./src/index.ts",
16
16
  "main": "./dist/index.js",
17
17
  "files": [
@@ -23,18 +23,18 @@
23
23
  },
24
24
  "devDependencies": {
25
25
  "@babel/runtime": "^7.18.0",
26
- "@modern-js/base-generator": "0.0.0-canary-20220928092932",
26
+ "@modern-js/base-generator": "0.0.0-canary-20221010130822",
27
27
  "@modern-js/codesmith": "^1.5.0",
28
28
  "@modern-js/codesmith-api-app": "^1.5.0",
29
- "@modern-js/generator-common": "0.0.0-canary-20220928092932",
30
- "@modern-js/generator-plugin": "0.0.0-canary-20220928092932",
31
- "@modern-js/generator-utils": "0.0.0-canary-20220928092932",
32
- "@modern-js/module-generator": "0.0.0-canary-20220928092932",
33
- "@modern-js/monorepo-generator": "0.0.0-canary-20220928092932",
34
- "@modern-js/mwa-generator": "0.0.0-canary-20220928092932",
35
- "@modern-js/utils": "0.0.0-canary-20220928092932",
36
- "@scripts/build": "0.0.0-canary-20220928092932",
37
- "@scripts/jest-config": "0.0.0-canary-20220928092932",
29
+ "@modern-js/generator-common": "0.0.0-canary-20221010130822",
30
+ "@modern-js/generator-plugin": "0.0.0-canary-20221010130822",
31
+ "@modern-js/generator-utils": "0.0.0-canary-20221010130822",
32
+ "@modern-js/module-generator": "0.0.0-canary-20221010130822",
33
+ "@modern-js/monorepo-generator": "0.0.0-canary-20221010130822",
34
+ "@modern-js/mwa-generator": "0.0.0-canary-20221010130822",
35
+ "@modern-js/utils": "0.0.0-canary-20221010130822",
36
+ "@scripts/build": "0.0.0-canary-20221010130822",
37
+ "@scripts/jest-config": "0.0.0-canary-20221010130822",
38
38
  "@types/jest": "^27",
39
39
  "@types/node": "^14",
40
40
  "jest": "^27",