@modern-js/babel-compiler 2.0.0-beta.4 → 2.0.0-beta.6

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/CHANGELOG.md CHANGED
@@ -1,5 +1,36 @@
1
1
  # @modern-js/babel-compiler
2
2
 
3
+ ## 2.0.0-beta.6
4
+
5
+ ### Major Changes
6
+
7
+ - dda38c9c3e: chore: v2
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies [7879e8f711]
12
+ - Updated dependencies [6aca875011]
13
+ - Updated dependencies [2e6031955e]
14
+ - Updated dependencies [7b7d12cf8f]
15
+ - Updated dependencies [7efeed4]
16
+ - Updated dependencies [92f0eade39]
17
+ - Updated dependencies [edd1cfb1af]
18
+ - Updated dependencies [cc971eabfc]
19
+ - Updated dependencies [5b9049f2e9]
20
+ - Updated dependencies [92004d1906]
21
+ - Updated dependencies [b8bbe036c7]
22
+ - Updated dependencies [d5a31df781]
23
+ - Updated dependencies [dda38c9c3e]
24
+ - Updated dependencies [3bbea92b2a]
25
+ - Updated dependencies [b710adb843]
26
+ - Updated dependencies [ea7cf06257]
27
+ - Updated dependencies [bbe4c4ab64]
28
+ - Updated dependencies [e4558a0bc4]
29
+ - Updated dependencies [abf3421a75]
30
+ - Updated dependencies [543be9558e]
31
+ - Updated dependencies [14b712da84]
32
+ - @modern-js/utils@2.0.0-beta.6
33
+
3
34
  ## 2.0.0-beta.4
4
35
 
5
36
  ### Major Changes
@@ -15,14 +15,6 @@ var __copyProps = (to, from, except, desc) => {
15
15
  return to;
16
16
  };
17
17
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
- var stdin_exports = {};
19
- __export(stdin_exports, {
20
- build: () => build
21
- });
22
- module.exports = __toCommonJS(stdin_exports);
23
- var import_utils = require("@modern-js/utils");
24
- var import_constants = require("./constants");
25
- var import_compiler = require("./compiler");
26
18
  var __async = (__this, __arguments, generator) => {
27
19
  return new Promise((resolve, reject) => {
28
20
  var fulfilled = (value) => {
@@ -43,6 +35,14 @@ var __async = (__this, __arguments, generator) => {
43
35
  step((generator = generator.apply(__this, __arguments)).next());
44
36
  });
45
37
  };
38
+ var build_exports = {};
39
+ __export(build_exports, {
40
+ build: () => build
41
+ });
42
+ module.exports = __toCommonJS(build_exports);
43
+ var import_utils = require("@modern-js/utils");
44
+ var import_constants = require("./constants");
45
+ var import_compiler = require("./compiler");
46
46
  const build = (_0, ..._1) => __async(void 0, [_0, ..._1], function* (option, babelConfig = {}) {
47
47
  const {
48
48
  rootDir,
@@ -107,3 +107,7 @@ const build = (_0, ..._1) => __async(void 0, [_0, ..._1], function* (option, bab
107
107
  virtualDists
108
108
  };
109
109
  });
110
+ // Annotate the CommonJS export names for ESM import in node:
111
+ 0 && (module.exports = {
112
+ build
113
+ });
@@ -1,9 +1,26 @@
1
1
  var __create = Object.create;
2
2
  var __defProp = Object.defineProperty;
3
+ var __defProps = Object.defineProperties;
3
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
6
  var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
8
  var __getProtoOf = Object.getPrototypeOf;
6
9
  var __hasOwnProp = Object.prototype.hasOwnProperty;
10
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
11
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
12
+ var __spreadValues = (a, b) => {
13
+ for (var prop in b || (b = {}))
14
+ if (__hasOwnProp.call(b, prop))
15
+ __defNormalProp(a, prop, b[prop]);
16
+ if (__getOwnPropSymbols)
17
+ for (var prop of __getOwnPropSymbols(b)) {
18
+ if (__propIsEnum.call(b, prop))
19
+ __defNormalProp(a, prop, b[prop]);
20
+ }
21
+ return a;
22
+ };
23
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
7
24
  var __export = (target, all) => {
8
25
  for (var name in all)
9
26
  __defProp(target, name, { get: all[name], enumerable: true });
@@ -21,38 +38,6 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
21
38
  mod
22
39
  ));
23
40
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
24
- var stdin_exports = {};
25
- __export(stdin_exports, {
26
- BuildWatchEmitter: () => BuildWatchEmitter,
27
- BuildWatchEvent: () => BuildWatchEvent,
28
- buildWatch: () => buildWatch,
29
- runBuildWatch: () => runBuildWatch
30
- });
31
- module.exports = __toCommonJS(stdin_exports);
32
- var path = __toESM(require("path"));
33
- var Event = __toESM(require("events"));
34
- var import_utils = require("@modern-js/utils");
35
- var import_build = require("./build");
36
- var import_compilerErrorResult = require("./compilerErrorResult");
37
- var __defProp2 = Object.defineProperty;
38
- var __defProps = Object.defineProperties;
39
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
40
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
41
- var __hasOwnProp2 = Object.prototype.hasOwnProperty;
42
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
43
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
44
- var __spreadValues = (a, b) => {
45
- for (var prop in b || (b = {}))
46
- if (__hasOwnProp2.call(b, prop))
47
- __defNormalProp(a, prop, b[prop]);
48
- if (__getOwnPropSymbols)
49
- for (var prop of __getOwnPropSymbols(b)) {
50
- if (__propIsEnum.call(b, prop))
51
- __defNormalProp(a, prop, b[prop]);
52
- }
53
- return a;
54
- };
55
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
56
41
  var __async = (__this, __arguments, generator) => {
57
42
  return new Promise((resolve, reject) => {
58
43
  var fulfilled = (value) => {
@@ -73,6 +58,19 @@ var __async = (__this, __arguments, generator) => {
73
58
  step((generator = generator.apply(__this, __arguments)).next());
74
59
  });
75
60
  };
61
+ var buildWatch_exports = {};
62
+ __export(buildWatch_exports, {
63
+ BuildWatchEmitter: () => BuildWatchEmitter,
64
+ BuildWatchEvent: () => BuildWatchEvent,
65
+ buildWatch: () => buildWatch,
66
+ runBuildWatch: () => runBuildWatch
67
+ });
68
+ module.exports = __toCommonJS(buildWatch_exports);
69
+ var path = __toESM(require("path"));
70
+ var Event = __toESM(require("events"));
71
+ var import_utils = require("@modern-js/utils");
72
+ var import_build = require("./build");
73
+ var import_compilerErrorResult = require("./compilerErrorResult");
76
74
  const BuildWatchEvent = {
77
75
  firstCompiler: "first-compiler",
78
76
  compiling: "compiling",
@@ -154,3 +152,10 @@ const buildWatch = (option, babelConfig = {}) => {
154
152
  buildWatchEmitter.setInitFn(runBuildWatch.bind(null, option, babelConfig));
155
153
  return buildWatchEmitter;
156
154
  };
155
+ // Annotate the CommonJS export names for ESM import in node:
156
+ 0 && (module.exports = {
157
+ BuildWatchEmitter,
158
+ BuildWatchEvent,
159
+ buildWatch,
160
+ runBuildWatch
161
+ });
@@ -1,9 +1,26 @@
1
1
  var __create = Object.create;
2
2
  var __defProp = Object.defineProperty;
3
+ var __defProps = Object.defineProperties;
3
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
6
  var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
8
  var __getProtoOf = Object.getPrototypeOf;
6
9
  var __hasOwnProp = Object.prototype.hasOwnProperty;
10
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
11
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
12
+ var __spreadValues = (a, b) => {
13
+ for (var prop in b || (b = {}))
14
+ if (__hasOwnProp.call(b, prop))
15
+ __defNormalProp(a, prop, b[prop]);
16
+ if (__getOwnPropSymbols)
17
+ for (var prop of __getOwnPropSymbols(b)) {
18
+ if (__propIsEnum.call(b, prop))
19
+ __defNormalProp(a, prop, b[prop]);
20
+ }
21
+ return a;
22
+ };
23
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
7
24
  var __export = (target, all) => {
8
25
  for (var name in all)
9
26
  __defProp(target, name, { get: all[name], enumerable: true });
@@ -21,38 +38,19 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
21
38
  mod
22
39
  ));
23
40
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
24
- var stdin_exports = {};
25
- __export(stdin_exports, {
41
+ var compiler_exports = {};
42
+ __export(compiler_exports, {
26
43
  compiler: () => compiler,
27
44
  getDistFilePath: () => getDistFilePath,
28
45
  isRes: () => isRes,
29
46
  resolveSourceMap: () => resolveSourceMap
30
47
  });
31
- module.exports = __toCommonJS(stdin_exports);
48
+ module.exports = __toCommonJS(compiler_exports);
32
49
  var path = __toESM(require("path"));
33
50
  var babel = __toESM(require("@babel/core"));
34
51
  var import_utils = require("@modern-js/utils");
35
52
  var utils = __toESM(require("./utils"));
36
53
  var import_constants = require("./constants");
37
- var __defProp2 = Object.defineProperty;
38
- var __defProps = Object.defineProperties;
39
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
40
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
41
- var __hasOwnProp2 = Object.prototype.hasOwnProperty;
42
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
43
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
44
- var __spreadValues = (a, b) => {
45
- for (var prop in b || (b = {}))
46
- if (__hasOwnProp2.call(b, prop))
47
- __defNormalProp(a, prop, b[prop]);
48
- if (__getOwnPropSymbols)
49
- for (var prop of __getOwnPropSymbols(b)) {
50
- if (__propIsEnum.call(b, prop))
51
- __defNormalProp(a, prop, b[prop]);
52
- }
53
- return a;
54
- };
55
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
56
54
  const defaultDistDir = "dist";
57
55
  const isRes = (r) => Boolean(r);
58
56
  const getDistFilePath = (option) => {
@@ -150,3 +148,10 @@ const compiler = (option) => {
150
148
  }
151
149
  return virtualDist;
152
150
  };
151
+ // Annotate the CommonJS export names for ESM import in node:
152
+ 0 && (module.exports = {
153
+ compiler,
154
+ getDistFilePath,
155
+ isRes,
156
+ resolveSourceMap
157
+ });
@@ -15,11 +15,11 @@ var __copyProps = (to, from, except, desc) => {
15
15
  return to;
16
16
  };
17
17
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
- var stdin_exports = {};
19
- __export(stdin_exports, {
18
+ var compilerErrorResult_exports = {};
19
+ __export(compilerErrorResult_exports, {
20
20
  CompilerErrorResult: () => CompilerErrorResult
21
21
  });
22
- module.exports = __toCommonJS(stdin_exports);
22
+ module.exports = __toCommonJS(compilerErrorResult_exports);
23
23
  class CompilerErrorResult {
24
24
  constructor(initErrorResult) {
25
25
  this.init(initErrorResult);
@@ -58,3 +58,7 @@ class CompilerErrorResult {
58
58
  return this._messageDetails.length > 0;
59
59
  }
60
60
  }
61
+ // Annotate the CommonJS export names for ESM import in node:
62
+ 0 && (module.exports = {
63
+ CompilerErrorResult
64
+ });
@@ -15,14 +15,18 @@ var __copyProps = (to, from, except, desc) => {
15
15
  return to;
16
16
  };
17
17
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
- var stdin_exports = {};
19
- __export(stdin_exports, {
18
+ var constants_exports = {};
19
+ __export(constants_exports, {
20
20
  defaultDistFileExtMap: () => defaultDistFileExtMap
21
21
  });
22
- module.exports = __toCommonJS(stdin_exports);
22
+ module.exports = __toCommonJS(constants_exports);
23
23
  const defaultDistFileExtMap = {
24
24
  ".js": ".js",
25
25
  ".jsx": ".js",
26
26
  ".ts": ".js",
27
27
  ".tsx": ".js"
28
28
  };
29
+ // Annotate the CommonJS export names for ESM import in node:
30
+ 0 && (module.exports = {
31
+ defaultDistFileExtMap
32
+ });
@@ -1,7 +1,21 @@
1
1
  var __defProp = Object.defineProperty;
2
2
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
3
  var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
4
5
  var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
+ var __spreadValues = (a, b) => {
9
+ for (var prop in b || (b = {}))
10
+ if (__hasOwnProp.call(b, prop))
11
+ __defNormalProp(a, prop, b[prop]);
12
+ if (__getOwnPropSymbols)
13
+ for (var prop of __getOwnPropSymbols(b)) {
14
+ if (__propIsEnum.call(b, prop))
15
+ __defNormalProp(a, prop, b[prop]);
16
+ }
17
+ return a;
18
+ };
5
19
  var __export = (target, all) => {
6
20
  for (var name in all)
7
21
  __defProp(target, name, { get: all[name], enumerable: true });
@@ -15,28 +29,12 @@ var __copyProps = (to, from, except, desc) => {
15
29
  return to;
16
30
  };
17
31
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
- var stdin_exports = {};
19
- __export(stdin_exports, {
32
+ var defaults_exports = {};
33
+ __export(defaults_exports, {
20
34
  mergeDefaultOption: () => mergeDefaultOption
21
35
  });
22
- module.exports = __toCommonJS(stdin_exports);
36
+ module.exports = __toCommonJS(defaults_exports);
23
37
  var import_constants = require("./constants");
24
- var __defProp2 = Object.defineProperty;
25
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
26
- var __hasOwnProp2 = Object.prototype.hasOwnProperty;
27
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
28
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
29
- var __spreadValues = (a, b) => {
30
- for (var prop in b || (b = {}))
31
- if (__hasOwnProp2.call(b, prop))
32
- __defNormalProp(a, prop, b[prop]);
33
- if (__getOwnPropSymbols)
34
- for (var prop of __getOwnPropSymbols(b)) {
35
- if (__propIsEnum.call(b, prop))
36
- __defNormalProp(a, prop, b[prop]);
37
- }
38
- return a;
39
- };
40
38
  const defaultOptions = {
41
39
  enableWatch: false,
42
40
  enableVirtualDist: false,
@@ -49,3 +47,7 @@ const defaultOptions = {
49
47
  clean: false
50
48
  };
51
49
  const mergeDefaultOption = (compilerOptions) => __spreadValues(__spreadValues({}, defaultOptions), compilerOptions);
50
+ // Annotate the CommonJS export names for ESM import in node:
51
+ 0 && (module.exports = {
52
+ mergeDefaultOption
53
+ });
@@ -1,7 +1,24 @@
1
1
  var __defProp = Object.defineProperty;
2
+ var __defProps = Object.defineProperties;
2
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
3
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
4
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
9
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
10
+ var __spreadValues = (a, b) => {
11
+ for (var prop in b || (b = {}))
12
+ if (__hasOwnProp.call(b, prop))
13
+ __defNormalProp(a, prop, b[prop]);
14
+ if (__getOwnPropSymbols)
15
+ for (var prop of __getOwnPropSymbols(b)) {
16
+ if (__propIsEnum.call(b, prop))
17
+ __defNormalProp(a, prop, b[prop]);
18
+ }
19
+ return a;
20
+ };
21
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
5
22
  var __export = (target, all) => {
6
23
  for (var name in all)
7
24
  __defProp(target, name, { get: all[name], enumerable: true });
@@ -15,36 +32,17 @@ var __copyProps = (to, from, except, desc) => {
15
32
  return to;
16
33
  };
17
34
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
- var stdin_exports = {};
19
- __export(stdin_exports, {
35
+ var getFinalOption_exports = {};
36
+ __export(getFinalOption_exports, {
20
37
  getFilesFromDir: () => getFilesFromDir,
21
38
  getFinalCompilerOption: () => getFinalCompilerOption,
22
39
  getFinalExtensions: () => getFinalExtensions,
23
40
  getGlobPattern: () => getGlobPattern
24
41
  });
25
- module.exports = __toCommonJS(stdin_exports);
42
+ module.exports = __toCommonJS(getFinalOption_exports);
26
43
  var import_utils = require("@modern-js/utils");
27
44
  var import_core = require("@babel/core");
28
45
  var import_defaults = require("./defaults");
29
- var __defProp2 = Object.defineProperty;
30
- var __defProps = Object.defineProperties;
31
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
32
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
33
- var __hasOwnProp2 = Object.prototype.hasOwnProperty;
34
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
35
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
36
- var __spreadValues = (a, b) => {
37
- for (var prop in b || (b = {}))
38
- if (__hasOwnProp2.call(b, prop))
39
- __defNormalProp(a, prop, b[prop]);
40
- if (__getOwnPropSymbols)
41
- for (var prop of __getOwnPropSymbols(b)) {
42
- if (__propIsEnum.call(b, prop))
43
- __defNormalProp(a, prop, b[prop]);
44
- }
45
- return a;
46
- };
47
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
48
46
  const getGlobPattern = (dir, extensions) => {
49
47
  if (extensions.length > 1) {
50
48
  return `${dir}/**/*{${extensions.join(",")}}`;
@@ -104,3 +102,10 @@ const getFinalCompilerOption = (option) => {
104
102
  filenames: [...optionWithDefault.filenames, ...globFindFilenames]
105
103
  });
106
104
  };
105
+ // Annotate the CommonJS export names for ESM import in node:
106
+ 0 && (module.exports = {
107
+ getFilesFromDir,
108
+ getFinalCompilerOption,
109
+ getFinalExtensions,
110
+ getGlobPattern
111
+ });
@@ -16,17 +16,6 @@ var __copyProps = (to, from, except, desc) => {
16
16
  };
17
17
  var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
- var stdin_exports = {};
20
- __export(stdin_exports, {
21
- compiler: () => compiler
22
- });
23
- module.exports = __toCommonJS(stdin_exports);
24
- var import_getFinalOption = require("./getFinalOption");
25
- var import_build = require("./build");
26
- var import_buildWatch = require("./buildWatch");
27
- var import_validate = require("./validate");
28
- __reExport(stdin_exports, require("./buildWatch"), module.exports);
29
- __reExport(stdin_exports, require("./type"), module.exports);
30
19
  var __async = (__this, __arguments, generator) => {
31
20
  return new Promise((resolve, reject) => {
32
21
  var fulfilled = (value) => {
@@ -47,6 +36,17 @@ var __async = (__this, __arguments, generator) => {
47
36
  step((generator = generator.apply(__this, __arguments)).next());
48
37
  });
49
38
  };
39
+ var src_exports = {};
40
+ __export(src_exports, {
41
+ compiler: () => compiler
42
+ });
43
+ module.exports = __toCommonJS(src_exports);
44
+ var import_getFinalOption = require("./getFinalOption");
45
+ var import_build = require("./build");
46
+ var import_buildWatch = require("./buildWatch");
47
+ var import_validate = require("./validate");
48
+ __reExport(src_exports, require("./buildWatch"), module.exports);
49
+ __reExport(src_exports, require("./type"), module.exports);
50
50
  function compiler(_0) {
51
51
  return __async(this, arguments, function* (compilerOptions, babelOptions = {}) {
52
52
  const validRet = (0, import_validate.validate)(compilerOptions);
@@ -61,3 +61,7 @@ function compiler(_0) {
61
61
  }
62
62
  });
63
63
  }
64
+ // Annotate the CommonJS export names for ESM import in node:
65
+ 0 && (module.exports = {
66
+ compiler
67
+ });
@@ -0,0 +1,15 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __copyProps = (to, from, except, desc) => {
6
+ if (from && typeof from === "object" || typeof from === "function") {
7
+ for (let key of __getOwnPropNames(from))
8
+ if (!__hasOwnProp.call(to, key) && key !== except)
9
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
10
+ }
11
+ return to;
12
+ };
13
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
14
+ var type_exports = {};
15
+ module.exports = __toCommonJS(type_exports);
@@ -21,13 +21,17 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
21
21
  mod
22
22
  ));
23
23
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
24
- var stdin_exports = {};
25
- __export(stdin_exports, {
24
+ var utils_exports = {};
25
+ __export(utils_exports, {
26
26
  addSourceMappingUrl: () => addSourceMappingUrl
27
27
  });
28
- module.exports = __toCommonJS(stdin_exports);
28
+ module.exports = __toCommonJS(utils_exports);
29
29
  var path = __toESM(require("path"));
30
30
  function addSourceMappingUrl(code, loc) {
31
31
  return `${code}
32
32
  //# sourceMappingURL=${path.normalize(path.basename(loc))}`;
33
33
  }
34
+ // Annotate the CommonJS export names for ESM import in node:
35
+ 0 && (module.exports = {
36
+ addSourceMappingUrl
37
+ });
@@ -15,15 +15,15 @@ var __copyProps = (to, from, except, desc) => {
15
15
  return to;
16
16
  };
17
17
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
- var stdin_exports = {};
19
- __export(stdin_exports, {
18
+ var validate_exports = {};
19
+ __export(validate_exports, {
20
20
  sourceDirAndFileNamesValidMessage: () => sourceDirAndFileNamesValidMessage,
21
21
  validate: () => validate,
22
22
  validateSourceDirAndFileNames: () => validateSourceDirAndFileNames,
23
23
  validateWatchDir: () => validateWatchDir,
24
24
  watchDirValidMessage: () => watchDirValidMessage
25
25
  });
26
- module.exports = __toCommonJS(stdin_exports);
26
+ module.exports = __toCommonJS(validate_exports);
27
27
  var import_utils = require("@modern-js/utils");
28
28
  const sourceDirAndFileNamesValidMessage = "At least one of the sourceDir and filenames configurations must be configured";
29
29
  const watchDirValidMessage = "should set watchDir when enableWatch is true";
@@ -57,3 +57,11 @@ const validate = (compilerOptions) => {
57
57
  }
58
58
  return validateSourceDirAndFileNames(compilerOptions);
59
59
  };
60
+ // Annotate the CommonJS export names for ESM import in node:
61
+ 0 && (module.exports = {
62
+ sourceDirAndFileNamesValidMessage,
63
+ validate,
64
+ validateSourceDirAndFileNames,
65
+ validateWatchDir,
66
+ watchDirValidMessage
67
+ });
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "modern",
12
12
  "modern.js"
13
13
  ],
14
- "version": "2.0.0-beta.4",
14
+ "version": "2.0.0-beta.6",
15
15
  "jsnext:source": "./src/index.ts",
16
16
  "types": "./dist/types/index.d.ts",
17
17
  "main": "./dist/js/node/index.js",
@@ -30,7 +30,7 @@
30
30
  "dependencies": {
31
31
  "@babel/core": "^7.18.0",
32
32
  "@babel/runtime": "^7.18.0",
33
- "@modern-js/utils": "2.0.0-beta.4"
33
+ "@modern-js/utils": "2.0.0-beta.6"
34
34
  },
35
35
  "devDependencies": {
36
36
  "@babel/plugin-transform-classes": "^7.18.0",
@@ -41,8 +41,8 @@
41
41
  "@types/node": "^14",
42
42
  "typescript": "^4",
43
43
  "jest": "^27",
44
- "@scripts/build": "2.0.0-beta.4",
45
- "@scripts/jest-config": "2.0.0-beta.4"
44
+ "@scripts/build": "2.0.0-beta.6",
45
+ "@scripts/jest-config": "2.0.0-beta.6"
46
46
  },
47
47
  "sideEffects": false,
48
48
  "modernConfig": {