@module-federation/runtime-core 0.0.0-feat-shared-treeshake-poc-20251211144042 → 0.0.0-feat-rspack-async-startup-20251217123938

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.
@@ -1,45 +1,27 @@
1
1
  import { Federation } from '../global';
2
- import { GlobalShareScopeMap, Shared, ShareInfos, ShareScopeMap, LoadShareExtraOptions, UserOptions, Options, TreeShakeArgs } from '../type';
2
+ import { GlobalShareScopeMap, Shared, ShareArgs, ShareInfos, ShareScopeMap, LoadShareExtraOptions, UserOptions, Options, ShareStrategy } from '../type';
3
3
  import { SyncWaterfallHook } from './hooks';
4
- export declare function formatShareConfigs(prevOptions: Options, newOptions: UserOptions): {
5
- allShareInfos: {
4
+ export declare function formatShare(shareArgs: ShareArgs, from: string, name: string, shareStrategy?: ShareStrategy): Shared;
5
+ export declare function formatShareConfigs(globalOptions: Options, userOptions: UserOptions): {
6
+ shared: {
6
7
  [pkgName: string]: Shared[];
7
8
  };
8
- newShareInfos: ShareInfos;
9
+ shareInfos: ShareInfos;
9
10
  };
10
- export declare function shouldUseTreeshake(treeshake?: TreeShakeArgs, usedExports?: string[]): boolean;
11
- /**
12
- * compare version a and b, return true if a is less than b
13
- */
14
11
  export declare function versionLt(a: string, b: string): boolean;
15
12
  export declare const findVersion: (shareVersionMap: ShareScopeMap[string][string], cb?: (prev: string, cur: string) => boolean) => string;
16
- export declare const isLoaded: (shared: {
17
- loading?: null | Promise<any>;
18
- loaded?: boolean;
19
- lib?: () => unknown;
20
- }) => boolean;
13
+ export declare const isLoaded: (shared: Shared) => boolean;
21
14
  export declare function getRegisteredShare(localShareScopeMap: ShareScopeMap, pkgName: string, shareInfo: Shared, resolveShare: SyncWaterfallHook<{
22
15
  shareScopeMap: ShareScopeMap;
23
16
  scope: string;
24
17
  pkgName: string;
25
18
  version: string;
26
- shareInfo: Shared;
27
19
  GlobalFederation: Federation;
28
- resolver: () => {
29
- shared: Shared;
30
- useTreeshake: boolean;
31
- } | undefined;
32
- }>): {
33
- shared: Shared;
34
- useTreeshake: boolean;
35
- } | void;
20
+ resolver: () => Shared | undefined;
21
+ }>): Shared | void;
36
22
  export declare function getGlobalShareScope(): GlobalShareScopeMap;
37
23
  export declare function getTargetSharedOptions(options: {
38
24
  pkgName: string;
39
25
  extraOptions?: LoadShareExtraOptions;
40
26
  shareInfos: ShareInfos;
41
- }): Shared;
42
- export declare const addUseIn: (shared: {
43
- useIn?: Array<string>;
44
- }, from: string) => void;
45
- export declare function directShare(shared: Shared, useTreeshake?: boolean): Shared | TreeShakeArgs;
27
+ }): Shared & Partial<Shared>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@module-federation/runtime-core",
3
- "version": "0.0.0-feat-shared-treeshake-poc-20251211144042",
3
+ "version": "0.0.0-feat-rspack-async-startup-20251217123938",
4
4
  "type": "module",
5
5
  "author": "zhouxiao <codingzx@gmail.com>",
6
6
  "main": "./dist/index.cjs.cjs",
@@ -52,7 +52,7 @@
52
52
  }
53
53
  },
54
54
  "dependencies": {
55
- "@module-federation/sdk": "0.0.0-feat-shared-treeshake-poc-20251211144042",
56
- "@module-federation/error-codes": "0.0.0-feat-shared-treeshake-poc-20251211144042"
55
+ "@module-federation/sdk": "0.0.0-feat-rspack-async-startup-20251217123938",
56
+ "@module-federation/error-codes": "0.0.0-feat-rspack-async-startup-20251217123938"
57
57
  }
58
58
  }