@module-federation/runtime-core 0.0.0-feat-node-manifest-20260122114009 → 0.0.0-feat-modern-3-0-20260129115806
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/dist/index.cjs.cjs +344 -144
- package/dist/index.cjs.cjs.map +1 -1
- package/dist/index.esm.js +344 -144
- package/dist/index.esm.js.map +1 -1
- package/dist/src/core.d.ts +5 -1
- package/dist/src/module/index.d.ts +2 -1
- package/dist/src/shared/index.d.ts +12 -3
- package/dist/src/type/config.d.ts +14 -1
- package/dist/src/utils/share.d.ts +27 -9
- package/package.json +3 -3
|
@@ -1,27 +1,45 @@
|
|
|
1
1
|
import { Federation } from '../global';
|
|
2
|
-
import { GlobalShareScopeMap, Shared,
|
|
2
|
+
import { GlobalShareScopeMap, Shared, ShareInfos, ShareScopeMap, LoadShareExtraOptions, UserOptions, Options, TreeShakingArgs } from '../type';
|
|
3
3
|
import { SyncWaterfallHook } from './hooks';
|
|
4
|
-
export declare function
|
|
5
|
-
|
|
6
|
-
shared: {
|
|
4
|
+
export declare function formatShareConfigs(prevOptions: Options, newOptions: UserOptions): {
|
|
5
|
+
allShareInfos: {
|
|
7
6
|
[pkgName: string]: Shared[];
|
|
8
7
|
};
|
|
9
|
-
|
|
8
|
+
newShareInfos: ShareInfos;
|
|
10
9
|
};
|
|
10
|
+
export declare function shouldUseTreeShaking(treeShaking?: TreeShakingArgs, usedExports?: string[]): boolean;
|
|
11
|
+
/**
|
|
12
|
+
* compare version a and b, return true if a is less than b
|
|
13
|
+
*/
|
|
11
14
|
export declare function versionLt(a: string, b: string): boolean;
|
|
12
15
|
export declare const findVersion: (shareVersionMap: ShareScopeMap[string][string], cb?: (prev: string, cur: string) => boolean) => string;
|
|
13
|
-
export declare const isLoaded: (shared:
|
|
16
|
+
export declare const isLoaded: (shared: {
|
|
17
|
+
loading?: null | Promise<any>;
|
|
18
|
+
loaded?: boolean;
|
|
19
|
+
lib?: () => unknown;
|
|
20
|
+
}) => boolean;
|
|
14
21
|
export declare function getRegisteredShare(localShareScopeMap: ShareScopeMap, pkgName: string, shareInfo: Shared, resolveShare: SyncWaterfallHook<{
|
|
15
22
|
shareScopeMap: ShareScopeMap;
|
|
16
23
|
scope: string;
|
|
17
24
|
pkgName: string;
|
|
18
25
|
version: string;
|
|
26
|
+
shareInfo: Shared;
|
|
19
27
|
GlobalFederation: Federation;
|
|
20
|
-
resolver: () =>
|
|
21
|
-
|
|
28
|
+
resolver: () => {
|
|
29
|
+
shared: Shared;
|
|
30
|
+
useTreesShaking: boolean;
|
|
31
|
+
} | undefined;
|
|
32
|
+
}>): {
|
|
33
|
+
shared: Shared;
|
|
34
|
+
useTreesShaking: boolean;
|
|
35
|
+
} | void;
|
|
22
36
|
export declare function getGlobalShareScope(): GlobalShareScopeMap;
|
|
23
37
|
export declare function getTargetSharedOptions(options: {
|
|
24
38
|
pkgName: string;
|
|
25
39
|
extraOptions?: LoadShareExtraOptions;
|
|
26
40
|
shareInfos: ShareInfos;
|
|
27
|
-
}): Shared
|
|
41
|
+
}): Shared;
|
|
42
|
+
export declare const addUseIn: (shared: {
|
|
43
|
+
useIn?: Array<string>;
|
|
44
|
+
}, from: string) => void;
|
|
45
|
+
export declare function directShare(shared: Shared, useTreesShaking?: boolean): Shared | TreeShakingArgs;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@module-federation/runtime-core",
|
|
3
|
-
"version": "0.0.0-feat-
|
|
3
|
+
"version": "0.0.0-feat-modern-3-0-20260129115806",
|
|
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/
|
|
56
|
-
"@module-federation/
|
|
55
|
+
"@module-federation/error-codes": "0.0.0-feat-modern-3-0-20260129115806",
|
|
56
|
+
"@module-federation/sdk": "0.0.0-feat-modern-3-0-20260129115806"
|
|
57
57
|
}
|
|
58
58
|
}
|