@modern-js/app-tools 2.25.2 → 2.26.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,47 @@
1
1
  # @modern-js/app-tools
2
2
 
3
+ ## 2.26.0
4
+
5
+ ### Patch Changes
6
+
7
+ - 05480f1: fix: @modern-js/server-core should be a dependencies of @modern-js/app-tools
8
+ fix: @modern-js/server-core 应该是 @modern-js/app-tools 的 dependencies
9
+ - fbcac63: perf(cli): improve upgrade command load performance
10
+
11
+ perf(cli): 优化 upgrade 命令加载性能
12
+
13
+ - Updated dependencies [150ddb1]
14
+ - Updated dependencies [786c195]
15
+ - Updated dependencies [e26b05e]
16
+ - Updated dependencies [b36ece4]
17
+ - Updated dependencies [e26b05e]
18
+ - Updated dependencies [15ad760]
19
+ - Updated dependencies [fac4ee0]
20
+ - Updated dependencies [786c195]
21
+ - Updated dependencies [ad7139b]
22
+ - Updated dependencies [cdf5b6b]
23
+ - Updated dependencies [786c195]
24
+ - Updated dependencies [fbcac63]
25
+ - @modern-js/builder-webpack-provider@2.26.0
26
+ - @modern-js/builder-rspack-provider@2.26.0
27
+ - @modern-js/builder-shared@2.26.0
28
+ - @modern-js/builder@2.26.0
29
+ - @modern-js/upgrade@2.26.0
30
+ - @modern-js/builder-plugin-esbuild@2.26.0
31
+ - @modern-js/builder-plugin-node-polyfill@2.26.0
32
+ - @modern-js/core@2.26.0
33
+ - @modern-js/server@2.26.0
34
+ - @modern-js/new-action@2.26.0
35
+ - @modern-js/plugin-data-loader@2.26.0
36
+ - @modern-js/plugin-i18n@2.26.0
37
+ - @modern-js/plugin-lint@2.26.0
38
+ - @modern-js/server-core@2.26.0
39
+ - @modern-js/prod-server@2.26.0
40
+ - @modern-js/node-bundle-require@2.26.0
41
+ - @modern-js/plugin@2.26.0
42
+ - @modern-js/types@2.26.0
43
+ - @modern-js/utils@2.26.0
44
+
3
45
  ## 2.25.2
4
46
 
5
47
  ### Patch Changes
package/dist/cjs/index.js CHANGED
@@ -43,7 +43,6 @@ const _generateWatchFiles = require("./utils/generateWatchFiles");
43
43
  const _core = require("@modern-js/core");
44
44
  _export_star._(require("./defineConfig"), exports);
45
45
  _export_star._(require("./types"), exports);
46
- const upgradeModel = _utils.Import.lazy("@modern-js/upgrade", require);
47
46
  const devCommand = async (program, api) => {
48
47
  const runner = api.useHookRunners();
49
48
  const devToolMetas = await runner.registerDev();
@@ -162,7 +161,8 @@ const appTools = (options = {
162
161
  const { inspect } = await Promise.resolve().then(() => /* @__PURE__ */ _interop_require_wildcard._(require("./commands/inspect")));
163
162
  inspect(api, options2);
164
163
  });
165
- upgradeModel.defineCommand(program.command("upgrade").option("-c --config <config>", _locale.i18n.t(_locale.localeKeys.command.shared.config)));
164
+ const { defineCommand } = await Promise.resolve().then(() => /* @__PURE__ */ _interop_require_wildcard._(require("@modern-js/upgrade")));
165
+ defineCommand(program.command("upgrade").option("-c --config <config>", _locale.i18n.t(_locale.localeKeys.command.shared.config)));
166
166
  },
167
167
  async prepare() {
168
168
  const command = (0, _utils.getCommand)();
package/dist/esm/index.js CHANGED
@@ -4,7 +4,7 @@ import { _ as _object_spread_props } from "@swc/helpers/_/_object_spread_props";
4
4
  import { _ as _ts_generator } from "@swc/helpers/_/_ts_generator";
5
5
  import path from "path";
6
6
  import { lintPlugin } from "@modern-js/plugin-lint";
7
- import { cleanRequireCache, emptyDir, Import, getCommand, getArgv } from "@modern-js/utils";
7
+ import { cleanRequireCache, emptyDir, getCommand, getArgv } from "@modern-js/utils";
8
8
  import { castArray } from "@modern-js/utils/lodash";
9
9
  import { getLocaleLanguage } from "@modern-js/plugin-i18n/language-detector";
10
10
  import analyzePlugin from "./analyze";
@@ -16,7 +16,6 @@ import { generateWatchFiles } from "./utils/generateWatchFiles";
16
16
  export { mergeConfig } from "@modern-js/core";
17
17
  export * from "./defineConfig";
18
18
  export * from "./types";
19
- var upgradeModel = Import.lazy("@modern-js/upgrade", require);
20
19
  export var devCommand = function() {
21
20
  var _ref = _async_to_generator(function(program, api) {
22
21
  var runner, devToolMetas, devProgram, _iteratorNormalCompletion, _didIteratorError, _iteratorError, _iterator, _step, meta, _iteratorNormalCompletion1, _didIteratorError1, _iteratorError1, _iterator1, _step1, subCmd;
@@ -325,6 +324,7 @@ export var appTools = function() {
325
324
  commands: function commands(param) {
326
325
  var program = param.program;
327
326
  return _async_to_generator(function() {
327
+ var defineCommand;
328
328
  return _ts_generator(this, function(_state) {
329
329
  switch (_state.label) {
330
330
  case 0:
@@ -464,7 +464,13 @@ export var appTools = function() {
464
464
  return _ref.apply(this, arguments);
465
465
  };
466
466
  }());
467
- upgradeModel.defineCommand(program.command("upgrade").option("-c --config <config>", i18n.t(localeKeys.command.shared.config)));
467
+ return [
468
+ 4,
469
+ import("@modern-js/upgrade")
470
+ ];
471
+ case 3:
472
+ defineCommand = _state.sent().defineCommand;
473
+ defineCommand(program.command("upgrade").option("-c --config <config>", i18n.t(localeKeys.command.shared.config)));
468
474
  return [
469
475
  2
470
476
  ];
@@ -1,6 +1,6 @@
1
1
  import path from "path";
2
2
  import { lintPlugin } from "@modern-js/plugin-lint";
3
- import { cleanRequireCache, emptyDir, Import, getCommand, getArgv } from "@modern-js/utils";
3
+ import { cleanRequireCache, emptyDir, getCommand, getArgv } from "@modern-js/utils";
4
4
  import { castArray } from "@modern-js/utils/lodash";
5
5
  import { getLocaleLanguage } from "@modern-js/plugin-i18n/language-detector";
6
6
  import analyzePlugin from "./analyze";
@@ -12,7 +12,6 @@ import { generateWatchFiles } from "./utils/generateWatchFiles";
12
12
  export { mergeConfig } from "@modern-js/core";
13
13
  export * from "./defineConfig";
14
14
  export * from "./types";
15
- const upgradeModel = Import.lazy("@modern-js/upgrade", require);
16
15
  export const devCommand = async (program, api) => {
17
16
  const runner = api.useHookRunners();
18
17
  const devToolMetas = await runner.registerDev();
@@ -131,7 +130,8 @@ export const appTools = (options = {
131
130
  const { inspect } = await import("./commands/inspect");
132
131
  inspect(api, options2);
133
132
  });
134
- upgradeModel.defineCommand(program.command("upgrade").option("-c --config <config>", i18n.t(localeKeys.command.shared.config)));
133
+ const { defineCommand } = await import("@modern-js/upgrade");
134
+ defineCommand(program.command("upgrade").option("-c --config <config>", i18n.t(localeKeys.command.shared.config)));
135
135
  },
136
136
  async prepare() {
137
137
  const command = getCommand();
package/package.json CHANGED
@@ -15,7 +15,7 @@
15
15
  "modern",
16
16
  "modern.js"
17
17
  ],
18
- "version": "2.25.2",
18
+ "version": "2.26.0",
19
19
  "jsnext:source": "./src/index.ts",
20
20
  "types": "./dist/types/index.d.ts",
21
21
  "main": "./dist/cjs/index.js",
@@ -73,23 +73,24 @@
73
73
  "esbuild": "0.17.19",
74
74
  "rspack-plugin-virtual-module": "0.1.0",
75
75
  "@swc/helpers": "0.5.1",
76
- "@modern-js/builder": "2.25.2",
77
- "@modern-js/builder-plugin-esbuild": "2.25.2",
78
- "@modern-js/builder-plugin-node-polyfill": "2.25.2",
79
- "@modern-js/builder-shared": "2.25.2",
80
- "@modern-js/builder-webpack-provider": "2.25.2",
81
- "@modern-js/core": "2.25.2",
82
- "@modern-js/new-action": "2.25.2",
83
- "@modern-js/node-bundle-require": "2.25.2",
84
- "@modern-js/plugin": "2.25.2",
85
- "@modern-js/plugin-data-loader": "2.25.2",
86
- "@modern-js/plugin-i18n": "2.25.2",
87
- "@modern-js/plugin-lint": "2.25.2",
88
- "@modern-js/prod-server": "2.25.2",
89
- "@modern-js/server": "2.25.2",
90
- "@modern-js/types": "2.25.2",
91
- "@modern-js/upgrade": "2.25.2",
92
- "@modern-js/utils": "2.25.2"
76
+ "@modern-js/builder": "2.26.0",
77
+ "@modern-js/builder-plugin-esbuild": "2.26.0",
78
+ "@modern-js/builder-plugin-node-polyfill": "2.26.0",
79
+ "@modern-js/builder-shared": "2.26.0",
80
+ "@modern-js/builder-webpack-provider": "2.26.0",
81
+ "@modern-js/core": "2.26.0",
82
+ "@modern-js/new-action": "2.26.0",
83
+ "@modern-js/node-bundle-require": "2.26.0",
84
+ "@modern-js/plugin": "2.26.0",
85
+ "@modern-js/plugin-data-loader": "2.26.0",
86
+ "@modern-js/plugin-i18n": "2.26.0",
87
+ "@modern-js/plugin-lint": "2.26.0",
88
+ "@modern-js/prod-server": "2.26.0",
89
+ "@modern-js/server": "2.26.0",
90
+ "@modern-js/types": "2.26.0",
91
+ "@modern-js/upgrade": "2.26.0",
92
+ "@modern-js/utils": "2.26.0",
93
+ "@modern-js/server-core": "2.26.0"
93
94
  },
94
95
  "devDependencies": {
95
96
  "@types/babel__traverse": "^7.14.2",
@@ -98,14 +99,13 @@
98
99
  "jest": "^29",
99
100
  "typescript": "^5",
100
101
  "webpack": "^5.88.1",
101
- "@modern-js/builder-plugin-swc": "2.25.2",
102
- "@modern-js/builder-rspack-provider": "2.25.2",
103
- "@modern-js/server-core": "2.25.2",
104
- "@scripts/jest-config": "2.25.2",
105
- "@scripts/build": "2.25.2"
102
+ "@modern-js/builder-plugin-swc": "2.26.0",
103
+ "@modern-js/builder-rspack-provider": "2.26.0",
104
+ "@scripts/jest-config": "2.26.0",
105
+ "@scripts/build": "2.26.0"
106
106
  },
107
107
  "peerDependencies": {
108
- "@modern-js/builder-rspack-provider": "^2.25.2"
108
+ "@modern-js/builder-rspack-provider": "^2.26.0"
109
109
  },
110
110
  "peerDependenciesMeta": {
111
111
  "@modern-js/builder-rspack-provider": {