@modern-js/plugin 2.0.0-beta.1 → 2.0.0-beta.2
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 +14 -0
- package/dist/types/manager/types.d.ts +2 -2
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,19 @@
|
|
1
1
|
# @modern-js/plugin
|
2
2
|
|
3
|
+
## 2.0.0-beta.2
|
4
|
+
|
5
|
+
### Major Changes
|
6
|
+
|
7
|
+
- dda38c9c3e: chore: v2
|
8
|
+
|
9
|
+
### Patch Changes
|
10
|
+
|
11
|
+
- b8bbe036c7: feat: change type logic
|
12
|
+
feat: 修改类型相关的逻辑
|
13
|
+
- f179749: fix: the sortPlugins api not work
|
14
|
+
|
15
|
+
fix: sortPlugins 没有真实生效
|
16
|
+
|
3
17
|
## 2.0.0-beta.1
|
4
18
|
|
5
19
|
### Major Changes
|
@@ -13,14 +13,14 @@ export declare type RunnerFromHook<P extends Hook> = P extends Waterfall<infer I
|
|
13
13
|
/** Extract all run methods from hooks. */
|
14
14
|
export declare type ToRunners<PS> = { [K in keyof PS]: PS[K] extends Hook ? RunnerFromHook<PS[K]> : PS[K] extends void ? void : never };
|
15
15
|
/** All options to define a plugin. */
|
16
|
-
export declare type PluginOptions<Hooks, Setup = undefined, ExtendHooks = Record<string, unknown
|
16
|
+
export declare type PluginOptions<Hooks, Setup = undefined, ExtendHooks = Record<string, unknown>, PluginHooks = any, PluginSetup = any> = {
|
17
17
|
name?: string;
|
18
18
|
pre?: string[];
|
19
19
|
post?: string[];
|
20
20
|
setup?: Setup;
|
21
21
|
rivals?: string[];
|
22
22
|
required?: string[];
|
23
|
-
usePlugins?: PluginOptions<
|
23
|
+
usePlugins?: PluginOptions<PluginHooks, PluginSetup>[];
|
24
24
|
registerHook?: Partial<Hooks & ExtendHooks>;
|
25
25
|
};
|
26
26
|
/** Common api of setup function. */
|
package/package.json
CHANGED
@@ -11,7 +11,7 @@
|
|
11
11
|
"modern",
|
12
12
|
"modern.js"
|
13
13
|
],
|
14
|
-
"version": "2.0.0-beta.
|
14
|
+
"version": "2.0.0-beta.2",
|
15
15
|
"jsnext:source": "./src/index.ts",
|
16
16
|
"types": "./dist/types/index.d.ts",
|
17
17
|
"main": "./dist/js/node/index.js",
|
@@ -36,8 +36,8 @@
|
|
36
36
|
"@types/node": "^14",
|
37
37
|
"typescript": "^4",
|
38
38
|
"jest": "^27",
|
39
|
-
"@scripts/build": "2.0.0-beta.
|
40
|
-
"@scripts/jest-config": "2.0.0-beta.
|
39
|
+
"@scripts/build": "2.0.0-beta.2",
|
40
|
+
"@scripts/jest-config": "2.0.0-beta.2"
|
41
41
|
},
|
42
42
|
"sideEffects": false,
|
43
43
|
"publishConfig": {
|
@@ -45,9 +45,9 @@
|
|
45
45
|
"access": "public"
|
46
46
|
},
|
47
47
|
"scripts": {
|
48
|
-
"new": "modern new",
|
49
|
-
"dev": "modern build --watch",
|
50
|
-
"build": "modern build",
|
48
|
+
"new": "modern-lib new",
|
49
|
+
"dev": "modern-lib build --watch",
|
50
|
+
"build": "modern-lib build",
|
51
51
|
"test": "jest --passWithNoTests"
|
52
52
|
}
|
53
53
|
}
|