@module-federation/data-prefetch 0.8.2 → 0.8.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/CHANGELOG.md +17 -0
- package/dist/prefetch.cjs.js +1 -1
- package/dist/prefetch.esm.mjs +1 -1
- package/package.json +8 -3
- package/src/prefetch.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @module-federation/data-prefetch
|
|
2
2
|
|
|
3
|
+
## 0.8.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- @module-federation/runtime@0.8.4
|
|
8
|
+
- @module-federation/sdk@0.8.4
|
|
9
|
+
|
|
10
|
+
## 0.8.3
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- 5b637c3: fix(data-prefetch): the prefetch exports type is promise or function
|
|
15
|
+
- Updated dependencies [f817674]
|
|
16
|
+
- Updated dependencies [8e172c8]
|
|
17
|
+
- @module-federation/runtime@0.8.3
|
|
18
|
+
- @module-federation/sdk@0.8.3
|
|
19
|
+
|
|
3
20
|
## 0.8.2
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
package/dist/prefetch.cjs.js
CHANGED
|
@@ -47,7 +47,7 @@ class MFDataPrefetch {
|
|
|
47
47
|
}
|
|
48
48
|
const { name } = this._options;
|
|
49
49
|
const exportsPromiseFn = (_globalThis___FEDERATION_____PREFETCH_____PREFETCH_EXPORTS__ = globalThis.__FEDERATION__.__PREFETCH__.__PREFETCH_EXPORTS__) == null ? void 0 : _globalThis___FEDERATION_____PREFETCH_____PREFETCH_EXPORTS__[name];
|
|
50
|
-
const exportsPromise = typeof exportsPromiseFn === 'function' ? exportsPromiseFn() :
|
|
50
|
+
const exportsPromise = typeof exportsPromiseFn === 'function' ? exportsPromiseFn() : exportsPromiseFn;
|
|
51
51
|
const resolve = exportsPromise.then((exports = {})=>{
|
|
52
52
|
// Match prefetch based on the function name suffix so that other capabilities can be expanded later.
|
|
53
53
|
// Not all functions should be directly identified as prefetch functions
|
package/dist/prefetch.esm.mjs
CHANGED
|
@@ -45,7 +45,7 @@ class MFDataPrefetch {
|
|
|
45
45
|
}
|
|
46
46
|
const { name } = this._options;
|
|
47
47
|
const exportsPromiseFn = (_globalThis___FEDERATION_____PREFETCH_____PREFETCH_EXPORTS__ = globalThis.__FEDERATION__.__PREFETCH__.__PREFETCH_EXPORTS__) == null ? void 0 : _globalThis___FEDERATION_____PREFETCH_____PREFETCH_EXPORTS__[name];
|
|
48
|
-
const exportsPromise = typeof exportsPromiseFn === 'function' ? exportsPromiseFn() :
|
|
48
|
+
const exportsPromise = typeof exportsPromiseFn === 'function' ? exportsPromiseFn() : exportsPromiseFn;
|
|
49
49
|
const resolve = exportsPromise.then((exports = {})=>{
|
|
50
50
|
// Match prefetch based on the function name suffix so that other capabilities can be expanded later.
|
|
51
51
|
// Not all functions should be directly identified as prefetch functions
|
package/package.json
CHANGED
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@module-federation/data-prefetch",
|
|
3
3
|
"description": "Module Federation Data Prefetch",
|
|
4
|
-
"version": "0.8.
|
|
4
|
+
"version": "0.8.4",
|
|
5
5
|
"author": "nieyan <nyqykk@foxmail.com>",
|
|
6
6
|
"homepage": "https://github.com/module-federation/core",
|
|
7
7
|
"license": "MIT",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "https://github.com/module-federation/core/",
|
|
11
|
+
"directory": "packages/data-prefetch"
|
|
12
|
+
},
|
|
8
13
|
"publishConfig": {
|
|
9
14
|
"access": "public"
|
|
10
15
|
},
|
|
@@ -78,8 +83,8 @@
|
|
|
78
83
|
},
|
|
79
84
|
"dependencies": {
|
|
80
85
|
"fs-extra": "9.1.0",
|
|
81
|
-
"@module-federation/runtime": "0.8.
|
|
82
|
-
"@module-federation/sdk": "0.8.
|
|
86
|
+
"@module-federation/runtime": "0.8.4",
|
|
87
|
+
"@module-federation/sdk": "0.8.4"
|
|
83
88
|
},
|
|
84
89
|
"scripts": {
|
|
85
90
|
"test": "jest"
|
package/src/prefetch.ts
CHANGED
|
@@ -99,7 +99,7 @@ export class MFDataPrefetch {
|
|
|
99
99
|
const exportsPromise =
|
|
100
100
|
typeof exportsPromiseFn === 'function'
|
|
101
101
|
? exportsPromiseFn()
|
|
102
|
-
:
|
|
102
|
+
: exportsPromiseFn;
|
|
103
103
|
const resolve = exportsPromise.then(
|
|
104
104
|
(exports: Record<string, Record<string, any>> = {}) => {
|
|
105
105
|
// Match prefetch based on the function name suffix so that other capabilities can be expanded later.
|