@modern-js/plugin 1.21.2-beta.2 → 1.21.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 CHANGED
@@ -1,5 +1,12 @@
1
1
  # @modern-js/plugin
2
2
 
3
+ ## 1.21.2
4
+
5
+ ### Patch Changes
6
+
7
+ - 9d4c0ba: chore: add types for exports field
8
+ chore: 为 exports 补充 types 字段
9
+
3
10
  ## 1.21.1
4
11
 
5
12
  ## 1.21.0
@@ -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, ExtendHooks = Record<string, unknown>> = {
22
+ export declare type PluginOptions<Hooks, Setup = undefined> = {
23
23
  name?: string;
24
24
  pre?: string[];
25
25
  post?: string[];
@@ -27,7 +27,7 @@ export declare type PluginOptions<Hooks, Setup = undefined, ExtendHooks = Record
27
27
  rivals?: string[];
28
28
  required?: string[];
29
29
  usePlugins?: PluginOptions<Hooks, Setup>[];
30
- registerHook?: Partial<Hooks & ExtendHooks>;
30
+ registerHook?: Partial<Hooks>;
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": "1.21.2-beta.2",
14
+ "version": "1.21.2",
15
15
  "jsnext:source": "./src/index.ts",
16
16
  "types": "./dist/types/index.d.ts",
17
17
  "main": "./dist/js/node/index.js",
@@ -24,7 +24,7 @@
24
24
  "import": "./dist/js/modern/index.js",
25
25
  "require": "./dist/js/node/index.js"
26
26
  },
27
- "types": "./dist/types//index.d.js",
27
+ "types": "./dist/types/index.d.ts",
28
28
  "default": "./dist/js/treeshaking/index.js"
29
29
  }
30
30
  },
@@ -35,9 +35,9 @@
35
35
  "@types/jest": "^27",
36
36
  "@types/node": "^14",
37
37
  "typescript": "^4",
38
- "@scripts/build": "1.21.1",
38
+ "@scripts/build": "1.21.2",
39
39
  "jest": "^27",
40
- "@scripts/jest-config": "1.21.1"
40
+ "@scripts/jest-config": "1.21.2"
41
41
  },
42
42
  "sideEffects": false,
43
43
  "publishConfig": {