@modern-js/plugin 1.3.4 → 1.3.7

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.
Files changed (34) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/js/modern/farrow-pipeline/context.js +2 -2
  3. package/dist/js/modern/farrow-pipeline/pipeline.js +1 -1
  4. package/dist/js/modern/manager/async.js +5 -58
  5. package/dist/js/modern/manager/shared.js +44 -0
  6. package/dist/js/modern/manager/sync.js +4 -61
  7. package/dist/js/modern/waterfall/async.js +1 -1
  8. package/dist/js/modern/waterfall/sync.js +1 -1
  9. package/dist/js/modern/workflow/async.js +1 -1
  10. package/dist/js/modern/workflow/parallel.js +1 -1
  11. package/dist/js/modern/workflow/sync.js +2 -2
  12. package/dist/js/node/farrow-pipeline/context.js +2 -2
  13. package/dist/js/node/farrow-pipeline/pipeline.js +1 -1
  14. package/dist/js/node/manager/async.js +8 -60
  15. package/dist/js/node/manager/shared.js +64 -0
  16. package/dist/js/node/manager/sync.js +11 -72
  17. package/dist/js/node/waterfall/async.js +1 -1
  18. package/dist/js/node/waterfall/sync.js +1 -1
  19. package/dist/js/node/workflow/async.js +1 -1
  20. package/dist/js/node/workflow/parallel.js +1 -1
  21. package/dist/js/node/workflow/sync.js +2 -2
  22. package/dist/js/treeshaking/farrow-pipeline/context.js +2 -2
  23. package/dist/js/treeshaking/farrow-pipeline/pipeline.js +1 -1
  24. package/dist/js/treeshaking/manager/async.js +8 -146
  25. package/dist/js/treeshaking/manager/shared.js +79 -0
  26. package/dist/js/treeshaking/manager/sync.js +3 -151
  27. package/dist/js/treeshaking/waterfall/async.js +4 -4
  28. package/dist/js/treeshaking/waterfall/sync.js +1 -1
  29. package/dist/js/treeshaking/workflow/async.js +6 -6
  30. package/dist/js/treeshaking/workflow/parallel.js +4 -4
  31. package/dist/js/treeshaking/workflow/sync.js +8 -28
  32. package/dist/types/manager/shared.d.ts +12 -0
  33. package/dist/types/manager/sync.d.ts +0 -2
  34. package/package.json +4 -3
@@ -0,0 +1,12 @@
1
+ import type { AsyncPlugin } from './async';
2
+ import type { Plugin } from './sync';
3
+ export declare const checkPlugins: <Hooks, API>(plugins: Plugin<Hooks, API>[] | AsyncPlugin<Hooks, API>[]) => void;
4
+ export declare function sortPlugins<Hooks, API>(input: Plugin<Hooks, API>[]): Plugin<Hooks, API>[];
5
+ export declare function sortPlugins<Hooks, API>(input: AsyncPlugin<Hooks, API>[]): AsyncPlugin<Hooks, API>[];
6
+ export declare const includePlugin: <P extends {
7
+ name: string;
8
+ }, I extends {
9
+ name: string;
10
+ }>(plugins: P[], input: I) => boolean;
11
+ export declare const isObject: (obj: unknown) => obj is Record<string, any>;
12
+ export declare const hasOwnProperty: <X extends Record<string, unknown>, Y extends PropertyKey>(obj: X, prop: Y) => obj is X & Record<Y, unknown>;
@@ -76,6 +76,4 @@ export declare const createManager: <Hooks, API extends Record<string, any> = Re
76
76
  export declare const generateRunner: <Hooks extends Record<string, any>>(hooksList: (void | Partial<ToThreads<Hooks>>)[], container: Container, hooksMap?: Hooks | undefined) => ToRunners<Hooks>;
77
77
  export declare const cloneHook: (hook: Hook) => Hook;
78
78
  export declare const closeHooksMap: <Hooks>(record: Hooks) => Hooks;
79
- export declare const isObject: (obj: unknown) => obj is Record<string, any>;
80
- export declare const hasOwnProperty: <X extends Record<string, unknown>, Y extends PropertyKey>(obj: X, prop: Y) => obj is X & Record<Y, unknown>;
81
79
  export {};
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "modern",
12
12
  "modern.js"
13
13
  ],
14
- "version": "1.3.4",
14
+ "version": "1.3.7",
15
15
  "jsnext:source": "./src/index.ts",
16
16
  "types": "./dist/types/index.d.ts",
17
17
  "main": "./dist/js/node/index.js",
@@ -39,7 +39,7 @@
39
39
  }
40
40
  },
41
41
  "dependencies": {
42
- "@babel/runtime": "^7"
42
+ "@babel/runtime": "^7.18.0"
43
43
  },
44
44
  "devDependencies": {
45
45
  "@types/jest": "^27",
@@ -71,7 +71,8 @@
71
71
  "files": [
72
72
  "src/**/*",
73
73
  "tsconfig.json",
74
- "package.json"
74
+ "package.json",
75
+ "tests/**/*"
75
76
  ],
76
77
  "output": []
77
78
  }