@module-federation/utilities 3.0.2 → 3.0.4
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/LICENSE +21 -0
- package/index.cjs.d.ts +1 -0
- package/index.cjs.default.js +1 -0
- package/index.cjs.js +1426 -0
- package/index.cjs.mjs +2 -0
- package/index.esm.js +1393 -0
- package/package.json +26 -9
- package/src/index.d.ts +1 -1
- package/src/utils/importRemote.d.ts +2 -1
- package/src/utils/pure.d.ts +1 -1
- package/CHANGELOG.md +0 -941
- package/README.md +0 -131
- package/src/Logger.js +0 -15
- package/src/Logger.js.map +0 -1
- package/src/components/ErrorBoundary.js +0 -33
- package/src/components/ErrorBoundary.js.map +0 -1
- package/src/components/FederationBoundary.js +0 -71
- package/src/components/FederationBoundary.js.map +0 -1
- package/src/index.js +0 -37
- package/src/index.js.map +0 -1
- package/src/plugins/DelegateModulesPlugin.js +0 -86
- package/src/plugins/DelegateModulesPlugin.js.map +0 -1
- package/src/types/index.js +0 -5
- package/src/types/index.js.map +0 -1
- package/src/utils/common.js +0 -164
- package/src/utils/common.js.map +0 -1
- package/src/utils/correctImportPath.d.ts +0 -1
- package/src/utils/correctImportPath.js +0 -24
- package/src/utils/correctImportPath.js.map +0 -1
- package/src/utils/getRuntimeRemotes.js +0 -49
- package/src/utils/getRuntimeRemotes.js.map +0 -1
- package/src/utils/importDelegatedModule.js +0 -87
- package/src/utils/importDelegatedModule.js.map +0 -1
- package/src/utils/importRemote.js +0 -111
- package/src/utils/importRemote.js.map +0 -1
- package/src/utils/isEmpty.js +0 -11
- package/src/utils/isEmpty.js.map +0 -1
- package/src/utils/pure.js +0 -148
- package/src/utils/pure.js.map +0 -1
- package/src/utils/react.js +0 -9
- package/src/utils/react.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,21 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@module-federation/utilities",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.4",
|
|
4
4
|
"type": "commonjs",
|
|
5
|
-
"main": "./
|
|
6
|
-
"types": "
|
|
5
|
+
"main": "./index.cjs.js",
|
|
6
|
+
"types": "./dist/index.cjs.d.ts",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"publishConfig": {
|
|
9
|
-
"
|
|
9
|
+
"access": "public"
|
|
10
10
|
},
|
|
11
11
|
"repository": "https://github.com/module-federation/universe/tree/main/packages/utilities",
|
|
12
12
|
"devDependencies": {
|
|
13
|
-
"react": "18.2.0"
|
|
14
|
-
"next": "13.4.19"
|
|
13
|
+
"react": "18.2.0"
|
|
15
14
|
},
|
|
16
15
|
"peerDependencies": {
|
|
17
16
|
"webpack": "^5.40.0",
|
|
18
|
-
"next": "^12 || ^13",
|
|
19
17
|
"react-dom": "^16 || ^17 || ^18",
|
|
20
18
|
"react": "^16 || ^17 || ^18"
|
|
21
19
|
},
|
|
@@ -29,5 +27,24 @@
|
|
|
29
27
|
"next": {
|
|
30
28
|
"optional": true
|
|
31
29
|
}
|
|
32
|
-
}
|
|
33
|
-
|
|
30
|
+
},
|
|
31
|
+
"exports": {
|
|
32
|
+
".": {
|
|
33
|
+
"module": "./index.esm.js",
|
|
34
|
+
"import": "./index.cjs.mjs",
|
|
35
|
+
"default": "./index.cjs.js"
|
|
36
|
+
},
|
|
37
|
+
"./package.json": "./package.json"
|
|
38
|
+
},
|
|
39
|
+
"typesVersions": {
|
|
40
|
+
"*": {
|
|
41
|
+
".": [
|
|
42
|
+
"./dist/index.cjs.d.ts"
|
|
43
|
+
],
|
|
44
|
+
"type": [
|
|
45
|
+
"./dist/type.cjs.d.ts"
|
|
46
|
+
]
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"module": "./index.esm.js"
|
|
50
|
+
}
|
package/src/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ export type { LoggerInstance } from './Logger';
|
|
|
4
4
|
export { createDelegatedModule, createRuntimeVariables, getContainer, injectScript, getModule, } from './utils/common';
|
|
5
5
|
export { isObjectEmpty } from './utils/isEmpty';
|
|
6
6
|
export { importRemote } from './utils/importRemote';
|
|
7
|
-
export { correctImportPath } from './utils/correctImportPath';
|
|
8
7
|
export { Logger } from './Logger';
|
|
9
8
|
export { getRuntimeRemotes } from './utils/getRuntimeRemotes';
|
|
10
9
|
export { importDelegatedModule } from './utils/importDelegatedModule';
|
|
10
|
+
export { extractUrlAndGlobal, loadScript } from './utils/pure';
|
|
@@ -18,6 +18,7 @@ export interface ImportRemoteOptions {
|
|
|
18
18
|
module: string;
|
|
19
19
|
remoteEntryFileName?: string;
|
|
20
20
|
bustRemoteEntryCache?: boolean;
|
|
21
|
+
esm?: boolean;
|
|
21
22
|
}
|
|
22
23
|
/**
|
|
23
24
|
* Function to import remote
|
|
@@ -26,5 +27,5 @@ export interface ImportRemoteOptions {
|
|
|
26
27
|
* @param {ImportRemoteOptions} options - The options for importing the remote
|
|
27
28
|
* @returns {Promise<T>} A promise that resolves with the imported module
|
|
28
29
|
*/
|
|
29
|
-
export declare const importRemote: <T>({ url, scope, module, remoteEntryFileName, bustRemoteEntryCache, }: ImportRemoteOptions) => Promise<T>;
|
|
30
|
+
export declare const importRemote: <T>({ url, scope, module, remoteEntryFileName, bustRemoteEntryCache, esm, }: ImportRemoteOptions) => Promise<T>;
|
|
30
31
|
export {};
|
package/src/utils/pure.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { RemoteVars, RuntimeRemote, RuntimeRemotesMap } from '../types
|
|
1
|
+
import { RemoteVars, RuntimeRemote, RuntimeRemotesMap } from '../types';
|
|
2
2
|
export declare const remoteVars: RemoteVars;
|
|
3
3
|
export declare const extractUrlAndGlobal: (urlAndGlobal: string) => [string, string];
|
|
4
4
|
export declare const loadScript: (keyOrRuntimeRemoteItem: string | RuntimeRemote) => any;
|