@modern-js/core 2.32.2-alpha.1 → 2.33.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,13 +1,18 @@
1
1
  # @modern-js/core
2
2
 
3
- ## 2.32.2-alpha.0
3
+ ## 2.33.0
4
4
 
5
5
  ### Patch Changes
6
6
 
7
- - Updated dependencies [bc1f8daf0ff]
8
- - @modern-js/utils@2.32.2-alpha.0
9
- - @modern-js/node-bundle-require@2.32.2-alpha.0
10
- - @modern-js/plugin@2.32.2-alpha.0
7
+ - ecb9276: fix(core): make the plugins type looser to avoid type mismatch
8
+
9
+ fix(core): 使用更松散的 plugins 类型来避免 type 不匹配的问题
10
+
11
+ - Updated dependencies [fd82137]
12
+ - Updated dependencies [bc1f8da]
13
+ - @modern-js/utils@2.33.0
14
+ - @modern-js/node-bundle-require@2.33.0
15
+ - @modern-js/plugin@2.33.0
11
16
 
12
17
  ## 2.32.1
13
18
 
@@ -6,7 +6,7 @@ export type UserConfig<Extends extends {
6
6
  } = {}, ExtendHooks extends Record<string, any> = {}, ExtendUserConfig extends {
7
7
  [property: string]: any;
8
8
  } = {}, ExtendNormalizedConfig extends Record<string, any> = {}> = {
9
- plugins?: PluginConfig<any>;
9
+ plugins?: PluginConfig;
10
10
  /**
11
11
  * auto load plugin that exist in the package.json
12
12
  *
@@ -21,7 +21,7 @@ export type NormalizedConfig<Extends extends {
21
21
  } = {}, ExtendHooks extends Record<string, any> = {}, ExtendUserConfig extends Record<string, any> = {}, ExtendNormalizedConfig extends {
22
22
  [property: string]: any;
23
23
  } = {}> = {
24
- plugins: PluginConfig<any>;
24
+ plugins: PluginConfig;
25
25
  /**
26
26
  * Auto load plugin that exist in the package.json
27
27
  *
@@ -14,13 +14,9 @@ export type PluginItem = string | [string, any];
14
14
  * Using NewPluginConfig instead.
15
15
  */
16
16
  export type OldPluginConfig = Array<PluginItem>;
17
- export type NewPluginConfig<PluginTypes extends {
18
- hooks?: Record<string, any>;
19
- userConfig?: Record<string, any>;
20
- normalizedConfig?: Record<string, any>;
21
- }> = CliPlugin<PluginTypes>[];
22
- export type PluginConfig<PluginTypes extends {
23
- hooks?: Record<string, any>;
24
- userConfig?: Record<string, any>;
25
- normalizedConfig?: Record<string, any>;
26
- } = {}> = OldPluginConfig | NewPluginConfig<PluginTypes>;
17
+ /**
18
+ * The type of PluginOptions is looser than the actual type,
19
+ * this avoids potential type mismatch issues when using different version plugins.
20
+ */
21
+ export type NewPluginConfig = PluginOptions<any, (...args: any[]) => void>[];
22
+ export type PluginConfig = OldPluginConfig | NewPluginConfig;
package/package.json CHANGED
@@ -14,7 +14,7 @@
14
14
  "modern",
15
15
  "modern.js"
16
16
  ],
17
- "version": "2.32.2-alpha.1",
17
+ "version": "2.33.0",
18
18
  "jsnext:source": "./src/index.ts",
19
19
  "types": "./dist/index.d.ts",
20
20
  "main": "./dist/index.js",
@@ -71,9 +71,9 @@
71
71
  },
72
72
  "dependencies": {
73
73
  "@swc/helpers": "0.5.1",
74
- "@modern-js/node-bundle-require": "2.32.2-alpha.1",
75
- "@modern-js/plugin": "2.32.2-alpha.1",
76
- "@modern-js/utils": "2.32.2-alpha.1"
74
+ "@modern-js/node-bundle-require": "2.33.0",
75
+ "@modern-js/plugin": "2.33.0",
76
+ "@modern-js/utils": "2.33.0"
77
77
  },
78
78
  "devDependencies": {
79
79
  "@types/jest": "^29",
@@ -81,10 +81,10 @@
81
81
  "tsm": "2.3.0",
82
82
  "jest": "^29",
83
83
  "typescript": "^5",
84
- "@modern-js/builder-shared": "2.32.2-alpha.1",
85
- "@modern-js/types": "2.32.2-alpha.1",
86
- "@scripts/jest-config": "2.32.1",
87
- "@scripts/build": "2.32.1"
84
+ "@modern-js/builder-shared": "2.33.0",
85
+ "@modern-js/types": "2.33.0",
86
+ "@scripts/build": "2.33.0",
87
+ "@scripts/jest-config": "2.33.0"
88
88
  },
89
89
  "sideEffects": false,
90
90
  "publishConfig": {