@modern-js/core 2.19.0 → 2.20.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,27 @@
1
1
  # @modern-js/core
2
2
 
3
+ ## 2.20.0
4
+
5
+ ### Patch Changes
6
+
7
+ - 4b03d17: feat: 添加 output.tempDir 配置,支持单项目多配置同时启动
8
+ feat: add output.tempDir configuration, supports launching project with multiple config at the same time
9
+ - 6289d31: fix: remove duplicate addRuntimeExports hook in @modern-js/core
10
+ fix: 删除 @modern-js/core 中重复的 addRuntimeExports hook
11
+ - Updated dependencies [3c4e0a5]
12
+ - Updated dependencies [6b9d90a]
13
+ - @modern-js/utils@2.20.0
14
+ - @modern-js/node-bundle-require@2.20.0
15
+ - @modern-js/plugin@2.20.0
16
+
17
+ ## 2.19.1
18
+
19
+ ### Patch Changes
20
+
21
+ - @modern-js/node-bundle-require@2.19.1
22
+ - @modern-js/plugin@2.19.1
23
+ - @modern-js/utils@2.19.1
24
+
3
25
  ## 2.19.0
4
26
 
5
27
  ### Patch Changes
package/dist/createCli.js CHANGED
@@ -67,6 +67,7 @@ const createCli = () => {
67
67
  });
68
68
  });
69
69
  });
70
+ await hooksRunner.beforeConfig();
70
71
  const extraConfigs = await hooksRunner.config();
71
72
  const extraSchemas = await hooksRunner.validateSchema();
72
73
  const normalizedConfig = await (0, config_1.createResolveConfig)(loaded, extraConfigs, extraSchemas, options === null || options === void 0 ? void 0 : options.onSchemaError);
@@ -76,7 +77,6 @@ const createCli = () => {
76
77
  // update context value
77
78
  context_1.ConfigContext.set(loaded.config);
78
79
  context_1.ResolvedConfigContext.set(resolved);
79
- await hooksRunner.addRuntimeExports();
80
80
  await hooksRunner.prepare();
81
81
  await hooksRunner.afterPrepare();
82
82
  return {
package/dist/manager.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import { BasePluginAPI } from './types';
2
2
  export declare const manager: import("@modern-js/plugin").AsyncManager<{
3
+ beforeConfig: import("@modern-js/plugin").AsyncWorkflow<void, void>;
3
4
  config: import("@modern-js/plugin").ParallelWorkflow<void, import("./types").UserConfig<{}, {}, {}, {}>>;
4
5
  resolvedConfig: import("@modern-js/plugin").AsyncWaterfall<{
5
6
  resolved: import("./types").NormalizedConfig<{}, {}, {}, {}>;
@@ -19,6 +20,7 @@ export declare const manager: import("@modern-js/plugin").AsyncManager<{
19
20
  addRuntimeExports: import("@modern-js/plugin").AsyncWaterfall<void>;
20
21
  }, BasePluginAPI<{}, {}, {}, {}>>;
21
22
  export declare const createPlugin: (setup?: import("@modern-js/plugin").AsyncSetup<{
23
+ beforeConfig: import("@modern-js/plugin").AsyncWorkflow<void, void>;
22
24
  config: import("@modern-js/plugin").ParallelWorkflow<void, import("./types").UserConfig<{}, {}, {}, {}>>;
23
25
  resolvedConfig: import("@modern-js/plugin").AsyncWaterfall<{
24
26
  resolved: import("./types").NormalizedConfig<{}, {}, {}, {}>;
@@ -37,6 +39,7 @@ export declare const createPlugin: (setup?: import("@modern-js/plugin").AsyncSet
37
39
  beforeExit: import("@modern-js/plugin").Workflow<void, void>;
38
40
  addRuntimeExports: import("@modern-js/plugin").AsyncWaterfall<void>;
39
41
  }, BasePluginAPI<{}, {}, {}, {}>> | undefined, options?: import("@modern-js/plugin").PluginOptions<{
42
+ beforeConfig: import("@modern-js/plugin").AsyncWorkflow<void, void>;
40
43
  config: import("@modern-js/plugin").ParallelWorkflow<void, import("./types").UserConfig<{}, {}, {}, {}>>;
41
44
  resolvedConfig: import("@modern-js/plugin").AsyncWaterfall<{
42
45
  resolved: import("./types").NormalizedConfig<{}, {}, {}, {}>;
@@ -55,6 +58,7 @@ export declare const createPlugin: (setup?: import("@modern-js/plugin").AsyncSet
55
58
  beforeExit: import("@modern-js/plugin").Workflow<void, void>;
56
59
  addRuntimeExports: import("@modern-js/plugin").AsyncWaterfall<void>;
57
60
  }, import("@modern-js/plugin").AsyncSetup<{
61
+ beforeConfig: import("@modern-js/plugin").AsyncWorkflow<void, void>;
58
62
  config: import("@modern-js/plugin").ParallelWorkflow<void, import("./types").UserConfig<{}, {}, {}, {}>>;
59
63
  resolvedConfig: import("@modern-js/plugin").AsyncWaterfall<{
60
64
  resolved: import("./types").NormalizedConfig<{}, {}, {}, {}>;
@@ -73,6 +77,7 @@ export declare const createPlugin: (setup?: import("@modern-js/plugin").AsyncSet
73
77
  beforeExit: import("@modern-js/plugin").Workflow<void, void>;
74
78
  addRuntimeExports: import("@modern-js/plugin").AsyncWaterfall<void>;
75
79
  }, BasePluginAPI<{}, {}, {}, {}>>, Record<string, unknown>> | undefined) => import("@modern-js/plugin").AsyncPlugin<{
80
+ beforeConfig: import("@modern-js/plugin").AsyncWorkflow<void, void>;
76
81
  config: import("@modern-js/plugin").ParallelWorkflow<void, import("./types").UserConfig<{}, {}, {}, {}>>;
77
82
  resolvedConfig: import("@modern-js/plugin").AsyncWaterfall<{
78
83
  resolved: import("./types").NormalizedConfig<{}, {}, {}, {}>;
@@ -91,6 +96,7 @@ export declare const createPlugin: (setup?: import("@modern-js/plugin").AsyncSet
91
96
  beforeExit: import("@modern-js/plugin").Workflow<void, void>;
92
97
  addRuntimeExports: import("@modern-js/plugin").AsyncWaterfall<void>;
93
98
  }, BasePluginAPI<{}, {}, {}, {}>>, registerHook: (newHooks: Partial<{
99
+ beforeConfig: import("@modern-js/plugin").AsyncWorkflow<void, void>;
94
100
  config: import("@modern-js/plugin").ParallelWorkflow<void, import("./types").UserConfig<{}, {}, {}, {}>>;
95
101
  resolvedConfig: import("@modern-js/plugin").AsyncWaterfall<{
96
102
  resolved: import("./types").NormalizedConfig<{}, {}, {}, {}>;
package/dist/manager.js CHANGED
@@ -5,6 +5,7 @@ const plugin_1 = require("@modern-js/plugin");
5
5
  const context_1 = require("./context");
6
6
  // eslint-disable-next-line @typescript-eslint/ban-types
7
7
  const baseHooks = {
8
+ beforeConfig: (0, plugin_1.createAsyncWorkflow)(),
8
9
  config: (0, plugin_1.createParallelWorkflow)(),
9
10
  resolvedConfig: (0, plugin_1.createAsyncWaterfall)(),
10
11
  validateSchema: (0, plugin_1.createParallelWorkflow)(),
@@ -6,6 +6,7 @@ export type BaseHooks<Extends extends {
6
6
  userConfig?: ExtendUserConfig;
7
7
  normalizedConfig?: ExtendNormalizedConfig;
8
8
  }, ExtendHooks extends {} = {}, ExtendUserConfig extends Record<string, any> = {}, ExtendNormalizedConfig extends Record<string, any> = {}> = {
9
+ beforeConfig: AsyncWorkflow<void, void>;
9
10
  config: ParallelWorkflow<void, UserConfig<Extends>>;
10
11
  resolvedConfig: AsyncWaterfall<{
11
12
  resolved: NormalizedConfig<Extends>;
package/package.json CHANGED
@@ -14,7 +14,7 @@
14
14
  "modern",
15
15
  "modern.js"
16
16
  ],
17
- "version": "2.19.0",
17
+ "version": "2.20.0",
18
18
  "jsnext:source": "./src/index.ts",
19
19
  "types": "./dist/index.d.ts",
20
20
  "main": "./dist/index.js",
@@ -69,9 +69,9 @@
69
69
  }
70
70
  },
71
71
  "dependencies": {
72
- "@modern-js/node-bundle-require": "2.19.0",
73
- "@modern-js/plugin": "2.19.0",
74
- "@modern-js/utils": "2.19.0"
72
+ "@modern-js/node-bundle-require": "2.20.0",
73
+ "@modern-js/plugin": "2.20.0",
74
+ "@modern-js/utils": "2.20.0"
75
75
  },
76
76
  "devDependencies": {
77
77
  "@types/babel__code-frame": "^7.0.3",
@@ -88,11 +88,11 @@
88
88
  "terser-webpack-plugin": "^5.1.4",
89
89
  "typescript": "^4",
90
90
  "webpack": "^5.82.1",
91
- "@modern-js/builder-shared": "2.19.0",
92
- "@modern-js/babel-preset-app": "2.19.0",
93
- "@modern-js/types": "2.19.0",
94
- "@scripts/build": "2.19.0",
95
- "@scripts/jest-config": "2.19.0"
91
+ "@modern-js/builder-shared": "2.20.0",
92
+ "@modern-js/babel-preset-app": "2.20.0",
93
+ "@modern-js/types": "2.20.0",
94
+ "@scripts/build": "2.20.0",
95
+ "@scripts/jest-config": "2.20.0"
96
96
  },
97
97
  "sideEffects": false,
98
98
  "publishConfig": {