@modern-js/core 2.25.2 → 2.27.0

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 (66) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/dist/bin.d.ts +1 -1
  3. package/dist/bin.js +5 -3
  4. package/dist/config/createDefaultConfig.d.ts +1 -1
  5. package/dist/config/createDefaultConfig.js +12 -6
  6. package/dist/config/createLoadedConfig.d.ts +1 -1
  7. package/dist/config/createLoadedConfig.js +80 -73
  8. package/dist/config/createResolvedConfig.d.ts +1 -1
  9. package/dist/config/createResolvedConfig.js +59 -72
  10. package/dist/config/index.d.ts +1 -1
  11. package/dist/config/index.js +7 -18
  12. package/dist/config/loadConfig.d.ts +5 -5
  13. package/dist/config/loadConfig.js +115 -112
  14. package/dist/context.d.ts +21 -14
  15. package/dist/context.js +74 -60
  16. package/dist/createCli.d.ts +13 -13
  17. package/dist/createCli.js +134 -113
  18. package/dist/index.d.ts +16 -16
  19. package/dist/index.js +59 -35
  20. package/dist/loadEnv.d.ts +1 -1
  21. package/dist/loadEnv.js +23 -17
  22. package/dist/loadPlugins.d.ts +4 -4
  23. package/dist/loadPlugins.js +54 -54
  24. package/dist/manager.d.ts +62 -62
  25. package/dist/manager.js +40 -23
  26. package/dist/nodeApi.d.ts +1 -1
  27. package/dist/nodeApi.js +25 -9
  28. package/dist/runBin.d.ts +2 -2
  29. package/dist/runBin.js +56 -53
  30. package/dist/schema/patchSchema.d.ts +15 -15
  31. package/dist/schema/patchSchema.js +56 -53
  32. package/dist/schema/testing.d.ts +11 -11
  33. package/dist/schema/testing.js +26 -8
  34. package/dist/schema/traverseSchema.d.ts +1 -1
  35. package/dist/schema/traverseSchema.js +25 -17
  36. package/dist/types/config/index.d.ts +37 -37
  37. package/dist/types/config/index.js +3 -1
  38. package/dist/types/config/testing.d.ts +11 -11
  39. package/dist/types/config/testing.js +3 -1
  40. package/dist/types/context.d.ts +27 -27
  41. package/dist/types/context.js +3 -1
  42. package/dist/types/coreOptions.d.ts +22 -22
  43. package/dist/types/coreOptions.js +3 -1
  44. package/dist/types/hooks.d.ts +41 -41
  45. package/dist/types/hooks.js +3 -1
  46. package/dist/types/index.d.ts +3 -3
  47. package/dist/types/index.js +10 -21
  48. package/dist/types/plugin.d.ts +10 -10
  49. package/dist/types/plugin.js +3 -1
  50. package/dist/types/pluginAPI.d.ts +10 -10
  51. package/dist/types/pluginAPI.js +3 -1
  52. package/dist/utils/checkIsDuplicationPlugin.d.ts +1 -1
  53. package/dist/utils/checkIsDuplicationPlugin.js +24 -21
  54. package/dist/utils/commander.d.ts +1 -1
  55. package/dist/utils/commander.js +31 -17
  56. package/dist/utils/createFileWatcher.d.ts +1 -1
  57. package/dist/utils/createFileWatcher.js +85 -106
  58. package/dist/utils/index.d.ts +1 -1
  59. package/dist/utils/index.js +10 -21
  60. package/dist/utils/initAppDir.d.ts +1 -1
  61. package/dist/utils/initAppDir.js +22 -17
  62. package/dist/utils/mergeConfig.d.ts +1 -1
  63. package/dist/utils/mergeConfig.js +37 -27
  64. package/dist/utils/repeatKeyWarning.d.ts +1 -1
  65. package/dist/utils/repeatKeyWarning.js +29 -16
  66. package/package.json +11 -10
@@ -1,20 +1,34 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.program = exports.initCommandsMap = void 0;
4
- const utils_1 = require("@modern-js/utils");
5
- Object.defineProperty(exports, "program", { enumerable: true, get: function () { return utils_1.program; } });
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ function _export(target, all) {
6
+ for (var name in all)
7
+ Object.defineProperty(target, name, {
8
+ enumerable: true,
9
+ get: all[name]
10
+ });
11
+ }
12
+ _export(exports, {
13
+ initCommandsMap: function() {
14
+ return initCommandsMap;
15
+ },
16
+ program: function() {
17
+ return _utils.program;
18
+ }
19
+ });
20
+ const _utils = require("@modern-js/utils");
6
21
  function initCommandsMap() {
7
- if (!utils_1.program.hasOwnProperty('commandsMap')) {
8
- Object.defineProperty(utils_1.program, 'commandsMap', {
9
- get() {
10
- const map = new Map();
11
- for (const command of utils_1.program.commands) {
12
- map.set(command._name, command);
13
- }
14
- return map;
15
- },
16
- configurable: false,
17
- });
18
- }
22
+ if (!_utils.program.hasOwnProperty("commandsMap")) {
23
+ Object.defineProperty(_utils.program, "commandsMap", {
24
+ get() {
25
+ const map = /* @__PURE__ */ new Map();
26
+ for (const command of _utils.program.commands) {
27
+ map.set(command._name, command);
28
+ }
29
+ return map;
30
+ },
31
+ configurable: false
32
+ });
33
+ }
19
34
  }
20
- exports.initCommandsMap = initCommandsMap;
@@ -1,2 +1,2 @@
1
1
  import type { CliHooksRunner, IAppContext } from '../types';
2
- export declare const createFileWatcher: (appContext: IAppContext, hooksRunner: CliHooksRunner) => Promise<import("@modern-js/utils").FSWatcher | undefined>;
2
+ export declare const createFileWatcher: (appContext: IAppContext, hooksRunner: CliHooksRunner) => Promise<import("@modern-js/utils").FSWatcher | undefined>;
@@ -1,111 +1,90 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
17
4
  });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
- var __importDefault = (this && this.__importDefault) || function (mod) {
26
- return (mod && mod.__esModule) ? mod : { "default": mod };
27
- };
28
- Object.defineProperty(exports, "__esModule", { value: true });
29
- exports.createFileWatcher = void 0;
30
- const crypto_1 = __importDefault(require("crypto"));
31
- const path = __importStar(require("path"));
32
- const fs = __importStar(require("fs"));
33
- const utils_1 = require("@modern-js/utils");
34
- const debug = (0, utils_1.createDebugger)('watch-files');
35
- const hashMap = new Map();
36
- const md5 = (data) => crypto_1.default.createHash('md5').update(data).digest('hex');
5
+ Object.defineProperty(exports, "createFileWatcher", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return createFileWatcher;
9
+ }
10
+ });
11
+ const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
12
+ const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
13
+ const _crypto = /* @__PURE__ */ _interop_require_default._(require("crypto"));
14
+ const _path = /* @__PURE__ */ _interop_require_wildcard._(require("path"));
15
+ const _fs = /* @__PURE__ */ _interop_require_wildcard._(require("fs"));
16
+ const _utils = require("@modern-js/utils");
17
+ const debug = (0, _utils.createDebugger)("watch-files");
18
+ const hashMap = /* @__PURE__ */ new Map();
19
+ const md5 = (data) => _crypto.default.createHash("md5").update(data).digest("hex");
37
20
  const createFileWatcher = async (appContext, hooksRunner) => {
38
- // only add fs watcher on dev mode.
39
- if ((0, utils_1.isDevCommand)()) {
40
- const { appDirectory } = appContext;
41
- const extraFiles = await hooksRunner.watchFiles();
42
- const watched = extraFiles
43
- .filter((extra) => {
44
- return Array.isArray(extra);
45
- })
46
- .flat();
47
- const privateWatched = extraFiles
48
- .filter((extra) => {
49
- return !Array.isArray(extra) && extra.isPrivate;
50
- })
51
- .map(extra => {
52
- return extra.files;
53
- })
54
- .flat();
55
- const isPrivate = (filename) => privateWatched.some(ff => {
56
- return path.resolve(appDirectory, filename).startsWith(ff);
57
- });
58
- debug(`watched: %o`, watched);
59
- const watcher = utils_1.chokidar.watch([...watched, ...privateWatched], {
60
- cwd: appDirectory,
61
- ignoreInitial: true,
62
- ignorePermissionErrors: true,
63
- ignored: [
64
- /node_modules/,
65
- '**/__test__/**',
66
- '**/*.test.(js|jsx|ts|tsx)',
67
- '**/*.spec.(js|jsx|ts|tsx)',
68
- '**/*.stories.(js|jsx|ts|tsx)',
69
- ],
70
- });
71
- watcher.on('change', changed => {
72
- const lastHash = hashMap.get(changed);
73
- const currentHash = md5(fs.readFileSync(path.join(appDirectory, changed), 'utf8'));
74
- if (currentHash !== lastHash) {
75
- debug(`file change: %s`, changed);
76
- hashMap.set(changed, currentHash);
77
- hooksRunner.fileChange({
78
- filename: changed,
79
- eventType: 'change',
80
- isPrivate: isPrivate(changed),
81
- });
82
- }
83
- });
84
- watcher.on('add', changed => {
85
- debug(`add file: %s`, changed);
86
- const currentHash = md5(fs.readFileSync(path.join(appDirectory, changed), 'utf8'));
87
- hashMap.set(changed, currentHash);
88
- hooksRunner.fileChange({
89
- filename: changed,
90
- eventType: 'add',
91
- isPrivate: isPrivate(changed),
92
- });
93
- });
94
- watcher.on('unlink', changed => {
95
- debug(`remove file: %s`, changed);
96
- if (hashMap.has(changed)) {
97
- hashMap.delete(changed);
98
- }
99
- hooksRunner.fileChange({
100
- filename: changed,
101
- eventType: 'unlink',
102
- isPrivate: isPrivate(changed),
103
- });
104
- });
105
- watcher.on('error', err => {
106
- throw err;
21
+ if ((0, _utils.isDevCommand)()) {
22
+ const { appDirectory } = appContext;
23
+ const extraFiles = await hooksRunner.watchFiles();
24
+ const watched = extraFiles.filter((extra) => {
25
+ return Array.isArray(extra);
26
+ }).flat();
27
+ const privateWatched = extraFiles.filter((extra) => {
28
+ return !Array.isArray(extra) && extra.isPrivate;
29
+ }).map((extra) => {
30
+ return extra.files;
31
+ }).flat();
32
+ const isPrivate = (filename) => privateWatched.some((ff) => {
33
+ return _path.resolve(appDirectory, filename).startsWith(ff);
34
+ });
35
+ debug(`watched: %o`, watched);
36
+ const watcher = _utils.chokidar.watch([
37
+ ...watched,
38
+ ...privateWatched
39
+ ], {
40
+ cwd: appDirectory,
41
+ ignoreInitial: true,
42
+ ignorePermissionErrors: true,
43
+ ignored: [
44
+ /node_modules/,
45
+ "**/__test__/**",
46
+ "**/*.test.(js|jsx|ts|tsx)",
47
+ "**/*.spec.(js|jsx|ts|tsx)",
48
+ "**/*.stories.(js|jsx|ts|tsx)"
49
+ ]
50
+ });
51
+ watcher.on("change", (changed) => {
52
+ const lastHash = hashMap.get(changed);
53
+ const currentHash = md5(_fs.readFileSync(_path.join(appDirectory, changed), "utf8"));
54
+ if (currentHash !== lastHash) {
55
+ debug(`file change: %s`, changed);
56
+ hashMap.set(changed, currentHash);
57
+ hooksRunner.fileChange({
58
+ filename: changed,
59
+ eventType: "change",
60
+ isPrivate: isPrivate(changed)
107
61
  });
108
- return watcher;
109
- }
62
+ }
63
+ });
64
+ watcher.on("add", (changed) => {
65
+ debug(`add file: %s`, changed);
66
+ const currentHash = md5(_fs.readFileSync(_path.join(appDirectory, changed), "utf8"));
67
+ hashMap.set(changed, currentHash);
68
+ hooksRunner.fileChange({
69
+ filename: changed,
70
+ eventType: "add",
71
+ isPrivate: isPrivate(changed)
72
+ });
73
+ });
74
+ watcher.on("unlink", (changed) => {
75
+ debug(`remove file: %s`, changed);
76
+ if (hashMap.has(changed)) {
77
+ hashMap.delete(changed);
78
+ }
79
+ hooksRunner.fileChange({
80
+ filename: changed,
81
+ eventType: "unlink",
82
+ isPrivate: isPrivate(changed)
83
+ });
84
+ });
85
+ watcher.on("error", (err) => {
86
+ throw err;
87
+ });
88
+ return watcher;
89
+ }
110
90
  };
111
- exports.createFileWatcher = createFileWatcher;
@@ -3,4 +3,4 @@ export * from './createFileWatcher';
3
3
  export * from './initAppDir';
4
4
  export * from './mergeConfig';
5
5
  export * from './repeatKeyWarning';
6
- export * from './checkIsDuplicationPlugin';
6
+ export * from './checkIsDuplicationPlugin';
@@ -1,22 +1,11 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./commander"), exports);
18
- __exportStar(require("./createFileWatcher"), exports);
19
- __exportStar(require("./initAppDir"), exports);
20
- __exportStar(require("./mergeConfig"), exports);
21
- __exportStar(require("./repeatKeyWarning"), exports);
22
- __exportStar(require("./checkIsDuplicationPlugin"), exports);
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ const _export_star = require("@swc/helpers/_/_export_star");
6
+ _export_star._(require("./commander"), exports);
7
+ _export_star._(require("./createFileWatcher"), exports);
8
+ _export_star._(require("./initAppDir"), exports);
9
+ _export_star._(require("./mergeConfig"), exports);
10
+ _export_star._(require("./repeatKeyWarning"), exports);
11
+ _export_star._(require("./checkIsDuplicationPlugin"), exports);
@@ -1 +1 @@
1
- export declare const initAppDir: (cwd?: string) => Promise<string>;
1
+ export declare const initAppDir: (cwd?: string) => Promise<string>;
@@ -1,20 +1,25 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.initAppDir = void 0;
7
- const path_1 = __importDefault(require("path"));
8
- const utils_1 = require("@modern-js/utils");
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "initAppDir", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return initAppDir;
9
+ }
10
+ });
11
+ const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
12
+ const _path = /* @__PURE__ */ _interop_require_default._(require("path"));
13
+ const _utils = require("@modern-js/utils");
9
14
  const initAppDir = async (cwd) => {
10
- if (!cwd) {
11
- // eslint-disable-next-line no-param-reassign
12
- cwd = process.cwd();
13
- }
14
- const pkg = await (0, utils_1.pkgUp)({ cwd });
15
- if (!pkg) {
16
- throw new Error(`no package.json found in current work dir: ${cwd}`);
17
- }
18
- return path_1.default.dirname(pkg);
15
+ if (!cwd) {
16
+ cwd = process.cwd();
17
+ }
18
+ const pkg = await (0, _utils.pkgUp)({
19
+ cwd
20
+ });
21
+ if (!pkg) {
22
+ throw new Error(`no package.json found in current work dir: ${cwd}`);
23
+ }
24
+ return _path.default.dirname(pkg);
19
25
  };
20
- exports.initAppDir = initAppDir;
@@ -1,2 +1,2 @@
1
1
  import { UserConfig, NormalizedConfig } from '../types';
2
- export declare const mergeConfig: <ExtendConfig extends Record<string, any>>(configs: (UserConfig<ExtendConfig> | NormalizedConfig<ExtendConfig>)[]) => NormalizedConfig<ExtendConfig>;
2
+ export declare const mergeConfig: <ExtendConfig extends Record<string, any>>(configs: (UserConfig<ExtendConfig> | NormalizedConfig<ExtendConfig>)[]) => NormalizedConfig<ExtendConfig>;
@@ -1,32 +1,42 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.mergeConfig = void 0;
4
- const utils_1 = require("@modern-js/utils");
5
- const lodash_1 = require("@modern-js/utils/lodash");
6
- const mergeConfig = (configs) => (0, lodash_1.mergeWith)({}, ...configs, (target, source, key) => {
7
- // Do not use the following merge logic for source.designSystem and tools.tailwind(css)
8
- if (key === 'designSystem' ||
9
- (key === 'tailwindcss' && typeof source === 'object')) {
10
- return (0, lodash_1.mergeWith)({}, target !== null && target !== void 0 ? target : {}, source !== null && source !== void 0 ? source : {});
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "mergeConfig", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return mergeConfig;
9
+ }
10
+ });
11
+ const _utils = require("@modern-js/utils");
12
+ const _lodash = require("@modern-js/utils/lodash");
13
+ const mergeConfig = (configs) => (0, _lodash.mergeWith)({}, ...configs, (target, source, key) => {
14
+ if (key === "designSystem" || key === "tailwindcss" && typeof source === "object") {
15
+ return (0, _lodash.mergeWith)({}, target !== null && target !== void 0 ? target : {}, source !== null && source !== void 0 ? source : {});
16
+ }
17
+ if (Array.isArray(target) || Array.isArray(source)) {
18
+ if (target === void 0) {
19
+ return source;
20
+ }
21
+ if (source === void 0) {
22
+ return target;
11
23
  }
12
- if (Array.isArray(target) || Array.isArray(source)) {
13
- if (target === undefined) {
14
- return source;
15
- }
16
- if (source === undefined) {
17
- return target;
18
- }
19
- return [...(0, utils_1.ensureArray)(target), ...(0, utils_1.ensureArray)(source)];
24
+ return [
25
+ ...(0, _utils.ensureArray)(target),
26
+ ...(0, _utils.ensureArray)(source)
27
+ ];
28
+ }
29
+ if ((0, _lodash.isFunction)(target) || (0, _lodash.isFunction)(source)) {
30
+ if (source === void 0) {
31
+ return target;
20
32
  }
21
- if ((0, lodash_1.isFunction)(target) || (0, lodash_1.isFunction)(source)) {
22
- if (source === undefined) {
23
- return target;
24
- }
25
- if (target === undefined) {
26
- return source;
27
- }
28
- return [target, source];
33
+ if (target === void 0) {
34
+ return source;
29
35
  }
30
- return undefined;
36
+ return [
37
+ target,
38
+ source
39
+ ];
40
+ }
41
+ return void 0;
31
42
  });
32
- exports.mergeConfig = mergeConfig;
@@ -1,3 +1,3 @@
1
1
  import { UserConfig } from '../types';
2
2
  export declare const deepGet: (obj: any, key: string) => any;
3
- export declare const repeatKeyWarning: <E extends Record<string, any>>(schema: any, jsConfig: UserConfig<E>, pkgConfig: UserConfig<E>) => void;
3
+ export declare const repeatKeyWarning: <E extends Record<string, any>>(schema: any, jsConfig: UserConfig<E>, pkgConfig: UserConfig<E>) => void;
@@ -1,22 +1,35 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.repeatKeyWarning = exports.deepGet = void 0;
4
- const traverseSchema_1 = require("../schema/traverseSchema");
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ function _export(target, all) {
6
+ for (var name in all)
7
+ Object.defineProperty(target, name, {
8
+ enumerable: true,
9
+ get: all[name]
10
+ });
11
+ }
12
+ _export(exports, {
13
+ deepGet: function() {
14
+ return deepGet;
15
+ },
16
+ repeatKeyWarning: function() {
17
+ return repeatKeyWarning;
18
+ }
19
+ });
20
+ const _traverseSchema = require("../schema/traverseSchema");
5
21
  const deepGet = (obj, key) => {
6
- for (const p of key.split('.')) {
7
- // eslint-disable-next-line no-param-reassign
8
- obj = obj ? obj[p] : undefined;
9
- }
10
- return obj;
22
+ for (const p of key.split(".")) {
23
+ obj = obj ? obj[p] : void 0;
24
+ }
25
+ return obj;
11
26
  };
12
- exports.deepGet = deepGet;
13
27
  const repeatKeyWarning = (schema, jsConfig, pkgConfig) => {
14
- const keys = (0, traverseSchema_1.traverseSchema)(schema);
15
- for (const key of keys) {
16
- if ((0, exports.deepGet)(jsConfig, key) !== undefined &&
17
- (0, exports.deepGet)(pkgConfig, key) !== undefined) {
18
- throw new Error(`The same configuration ${key} exists in modern.config.js and package.json.\n Please remove it from package.json.`);
19
- }
28
+ const keys = (0, _traverseSchema.traverseSchema)(schema);
29
+ for (const key of keys) {
30
+ if (deepGet(jsConfig, key) !== void 0 && deepGet(pkgConfig, key) !== void 0) {
31
+ throw new Error(`The same configuration ${key} exists in modern.config.js and package.json.
32
+ Please remove it from package.json.`);
20
33
  }
34
+ }
21
35
  };
22
- exports.repeatKeyWarning = repeatKeyWarning;
package/package.json CHANGED
@@ -14,7 +14,7 @@
14
14
  "modern",
15
15
  "modern.js"
16
16
  ],
17
- "version": "2.25.2",
17
+ "version": "2.27.0",
18
18
  "jsnext:source": "./src/index.ts",
19
19
  "types": "./dist/index.d.ts",
20
20
  "main": "./dist/index.js",
@@ -69,9 +69,10 @@
69
69
  }
70
70
  },
71
71
  "dependencies": {
72
- "@modern-js/node-bundle-require": "2.25.2",
73
- "@modern-js/plugin": "2.25.2",
74
- "@modern-js/utils": "2.25.2"
72
+ "@swc/helpers": "0.5.1",
73
+ "@modern-js/node-bundle-require": "2.27.0",
74
+ "@modern-js/plugin": "2.27.0",
75
+ "@modern-js/utils": "2.27.0"
75
76
  },
76
77
  "devDependencies": {
77
78
  "@types/jest": "^29",
@@ -79,10 +80,10 @@
79
80
  "tsm": "2.3.0",
80
81
  "jest": "^29",
81
82
  "typescript": "^5",
82
- "@modern-js/builder-shared": "2.25.2",
83
- "@modern-js/types": "2.25.2",
84
- "@scripts/jest-config": "2.25.2",
85
- "@scripts/build": "2.25.2"
83
+ "@modern-js/builder-shared": "2.27.0",
84
+ "@modern-js/types": "2.27.0",
85
+ "@scripts/build": "2.27.0",
86
+ "@scripts/jest-config": "2.27.0"
86
87
  },
87
88
  "sideEffects": false,
88
89
  "publishConfig": {
@@ -92,8 +93,8 @@
92
93
  },
93
94
  "scripts": {
94
95
  "new": "modern-lib new",
95
- "build": "tsc",
96
- "dev": "tsc --watch",
96
+ "build": "modern-lib build",
97
+ "dev": "modern-lib build --watch",
97
98
  "test": "jest"
98
99
  }
99
100
  }