@module-federation/data-prefetch 0.0.0-next-20240918080432 → 0.0.0-next-20240920040817

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 CHANGED
@@ -1,9 +1,16 @@
1
- @module-federation/data-prefetch
1
+ # @module-federation/data-prefetch
2
2
 
3
- ## 0.0.0-next-20240918080432
3
+ ## 0.0.0-next-20240920040817
4
4
 
5
5
  ### Patch Changes
6
6
 
7
- - 3ddab21: feat(@module-federation/data-prefetch): support data prefetch in Module Federation
8
- - @module-federation/runtime@0.0.0-next-20240918080432
9
- - @module-federation/sdk@0.0.0-next-20240918080432
7
+ - Updated dependencies [3082116]
8
+ - @module-federation/runtime@0.0.0-next-20240920040817
9
+ - @module-federation/sdk@0.0.0-next-20240920040817
10
+
11
+ ## 0.6.6
12
+
13
+ ### Patch Changes
14
+
15
+ - @module-federation/runtime@0.6.6
16
+ - @module-federation/sdk@0.6.6
package/README.md CHANGED
@@ -1 +1,3 @@
1
- Module Federation Data Prefetch(https://module-federation.io/zh/guide/performance/prefetch.html)
1
+ # @module-federation/data-prefetch
2
+
3
+ See [documentation](https://module-federation.io/zh/guide/performance/prefetch.html) for more details .
@@ -1,3 +1,4 @@
1
+ import { FederationHost, init } from '@module-federation/runtime';
1
2
  import { renderHook, act } from '@testing-library/react-hooks';
2
3
  import * as ModuleFederationSDK from '@module-federation/sdk';
3
4
  import { usePrefetch } from '../src/react';
@@ -45,6 +46,14 @@ describe('usePrefetch', () => {
45
46
  Promise.resolve(params ? params : testData),
46
47
  );
47
48
 
49
+ new FederationHost({
50
+ name: options.name,
51
+ remotes: [],
52
+ });
53
+ init({
54
+ name: options.name,
55
+ remotes: [],
56
+ });
48
57
  beforeEach(() => {
49
58
  globalThis.__FEDERATION__.__PREFETCH__ = {
50
59
  entryLoading: {},
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@module-federation/data-prefetch",
3
3
  "description": "Module Federation Data Prefetch",
4
- "version": "0.0.0-next-20240918080432",
4
+ "version": "0.0.0-next-20240920040817",
5
5
  "author": "nieyan <nyqykk@foxmail.com>",
6
6
  "homepage": "https://github.com/module-federation/core",
7
7
  "license": "MIT",
@@ -85,8 +85,8 @@
85
85
  },
86
86
  "dependencies": {
87
87
  "fs-extra": "9.1.0",
88
- "@module-federation/sdk": "0.0.0-next-20240918080432",
89
- "@module-federation/runtime": "0.0.0-next-20240918080432"
88
+ "@module-federation/sdk": "0.0.0-next-20240920040817",
89
+ "@module-federation/runtime": "0.0.0-next-20240920040817"
90
90
  },
91
91
  "scripts": {
92
92
  "dev": "cross-env WATCH=true tsup",