@modern-js/plugin 1.21.2 → 2.0.0-beta.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 +11 -0
- package/dist/types/manager/types.d.ts +2 -2
- package/package.json +5 -28
package/CHANGELOG.md
CHANGED
@@ -19,7 +19,7 @@ export declare type RunnerFromHook<P extends Hook> = P extends Waterfall<infer I
|
|
19
19
|
export declare type ToRunners<PS> = { [K in keyof PS]: PS[K] extends Hook ? RunnerFromHook<PS[K]> : PS[K] extends void ? void : never };
|
20
20
|
/** All options to define a plugin. */
|
21
21
|
|
22
|
-
export declare type PluginOptions<Hooks, Setup = undefined
|
22
|
+
export declare type PluginOptions<Hooks, Setup = undefined, ExtendHooks = Record<string, unknown>> = {
|
23
23
|
name?: string;
|
24
24
|
pre?: string[];
|
25
25
|
post?: string[];
|
@@ -27,7 +27,7 @@ export declare type PluginOptions<Hooks, Setup = undefined> = {
|
|
27
27
|
rivals?: string[];
|
28
28
|
required?: string[];
|
29
29
|
usePlugins?: PluginOptions<Hooks, Setup>[];
|
30
|
-
registerHook?: Partial<Hooks>;
|
30
|
+
registerHook?: Partial<Hooks & ExtendHooks>;
|
31
31
|
};
|
32
32
|
/** Common api of setup function. */
|
33
33
|
|
package/package.json
CHANGED
@@ -11,7 +11,7 @@
|
|
11
11
|
"modern",
|
12
12
|
"modern.js"
|
13
13
|
],
|
14
|
-
"version": "
|
14
|
+
"version": "2.0.0-beta.0",
|
15
15
|
"jsnext:source": "./src/index.ts",
|
16
16
|
"types": "./dist/types/index.d.ts",
|
17
17
|
"main": "./dist/js/node/index.js",
|
@@ -35,42 +35,19 @@
|
|
35
35
|
"@types/jest": "^27",
|
36
36
|
"@types/node": "^14",
|
37
37
|
"typescript": "^4",
|
38
|
-
"@scripts/build": "
|
38
|
+
"@scripts/build": "2.0.0-beta.0",
|
39
39
|
"jest": "^27",
|
40
|
-
"@scripts/jest-config": "
|
40
|
+
"@scripts/jest-config": "2.0.0-beta.0"
|
41
41
|
},
|
42
42
|
"sideEffects": false,
|
43
43
|
"publishConfig": {
|
44
44
|
"registry": "https://registry.npmjs.org/",
|
45
45
|
"access": "public"
|
46
46
|
},
|
47
|
-
"wireit": {
|
48
|
-
"build": {
|
49
|
-
"command": "modern build",
|
50
|
-
"files": [
|
51
|
-
"src/**/*",
|
52
|
-
"tsconfig.json",
|
53
|
-
"package.json"
|
54
|
-
],
|
55
|
-
"output": [
|
56
|
-
"dist/**/*"
|
57
|
-
]
|
58
|
-
},
|
59
|
-
"test": {
|
60
|
-
"command": "jest --passWithNoTests",
|
61
|
-
"files": [
|
62
|
-
"src/**/*",
|
63
|
-
"tsconfig.json",
|
64
|
-
"package.json",
|
65
|
-
"tests/**/*"
|
66
|
-
],
|
67
|
-
"output": []
|
68
|
-
}
|
69
|
-
},
|
70
47
|
"scripts": {
|
71
48
|
"new": "modern new",
|
72
49
|
"dev": "modern build --watch",
|
73
|
-
"build": "
|
74
|
-
"test": "
|
50
|
+
"build": "modern build",
|
51
|
+
"test": "jest --passWithNoTests"
|
75
52
|
}
|
76
53
|
}
|