@module-federation/node 2.0.2-beta.0 → 2.0.2-beta.3
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 +162 -119
- package/package.json +13 -8
- package/src/filesystem/stratagies.d.ts +3 -3
- package/src/filesystem/stratagies.js +22 -23
- package/src/filesystem/stratagies.js.map +1 -1
- package/src/index.d.ts +3 -0
- package/src/index.js +7 -1
- package/src/index.js.map +1 -1
- package/src/plugins/AutomaticPublicPathPlugin.d.ts +9 -0
- package/src/plugins/AutomaticPublicPathPlugin.js +38 -0
- package/src/plugins/AutomaticPublicPathPlugin.js.map +1 -0
- package/src/plugins/ChunkCorrelationPlugin.d.ts +3 -3
- package/src/plugins/ChunkCorrelationPlugin.js +23 -7
- package/src/plugins/ChunkCorrelationPlugin.js.map +1 -1
- package/src/plugins/CommonJsChunkLoadingPlugin.d.ts +4 -4
- package/src/plugins/CommonJsChunkLoadingPlugin.js +22 -19
- package/src/plugins/CommonJsChunkLoadingPlugin.js.map +1 -1
- package/src/plugins/DynamicFilesystemChunkLoadingRuntimeModule.js +16 -14
- package/src/plugins/DynamicFilesystemChunkLoadingRuntimeModule.js.map +1 -1
- package/src/plugins/NodeContainerPlugin.d.ts +57 -0
- package/src/plugins/NodeContainerPlugin.js +105 -0
- package/src/plugins/NodeContainerPlugin.js.map +1 -0
- package/src/plugins/NodeFederationPlugin.d.ts +4 -1
- package/src/plugins/NodeFederationPlugin.js +43 -18
- package/src/plugins/NodeFederationPlugin.js.map +1 -1
- package/src/plugins/RemotePublicPathRuntimeModule.d.ts +3 -3
- package/src/plugins/RemotePublicPathRuntimeModule.js +54 -30
- package/src/plugins/RemotePublicPathRuntimeModule.js.map +1 -1
- package/src/plugins/{parts.js → webpackChunkUtilities.js} +15 -6
- package/src/plugins/webpackChunkUtilities.js.map +1 -0
- package/src/utils/flush-chunks.js +1 -0
- package/src/utils/flush-chunks.js.map +1 -1
- package/src/utils/hot-reload.d.ts +7 -1
- package/src/utils/hot-reload.js +97 -91
- package/src/utils/hot-reload.js.map +1 -1
- package/src/filesystem/DynamicFilesystemRuntimeModule.d.ts +0 -6
- package/src/filesystem/DynamicFilesystemRuntimeModule.js +0 -30
- package/src/filesystem/DynamicFilesystemRuntimeModule.js.map +0 -1
- package/src/plugins/FederationModuleInfoRuntimeModule.d.ts +0 -9
- package/src/plugins/FederationModuleInfoRuntimeModule.js +0 -55
- package/src/plugins/FederationModuleInfoRuntimeModule.js.map +0 -1
- package/src/plugins/parts.js.map +0 -1
- /package/src/plugins/{parts.d.ts → webpackChunkUtilities.d.ts} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,251 +2,294 @@
|
|
|
2
2
|
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
|
4
4
|
|
|
5
|
-
## [2.0.2-beta.
|
|
5
|
+
## [2.0.2-beta.3](https://github.com/module-federation/nextjs-mf/compare/node-2.0.2-beta.2...node-2.0.2-beta.3) (2023-10-03)
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
### Bug Fixes
|
|
9
9
|
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
10
|
+
* add exported file ([19b1afb](https://github.com/module-federation/nextjs-mf/commit/19b1afbd58572897f36b16926f841e35d154c712))
|
|
11
|
+
* bad impleentation during federation port ([cc2e53f](https://github.com/module-federation/nextjs-mf/commit/cc2e53f0351fb94c9068223ad6b8d990a913ab53))
|
|
12
|
+
* chunk flushing ([c9df545](https://github.com/module-federation/nextjs-mf/commit/c9df5451c84e6458b392884492bf669bf7383d5c))
|
|
13
|
+
* dont crash offline remotes ([f0d7671](https://github.com/module-federation/nextjs-mf/commit/f0d7671569ac34f64017a303739b54880f5220e6))
|
|
14
|
+
* export parseRemotes ([12ed54c](https://github.com/module-federation/nextjs-mf/commit/12ed54c87ba539bc2a79cdee86058f0a2776653e))
|
|
15
|
+
* hot reloading system ([99f733b](https://github.com/module-federation/nextjs-mf/commit/99f733bbdbd727a99fbaaeab3f92f4b65fa568dd))
|
|
16
|
+
* remove logger in filesystem ([c370ed5](https://github.com/module-federation/nextjs-mf/commit/c370ed5fdc5fe3423703f29daa40a4227ac51cf2))
|
|
17
|
+
* remove logging on DFS ([40b8c28](https://github.com/module-federation/nextjs-mf/commit/40b8c28fac9c39fec8623415a36e487152c2ef34))
|
|
18
|
+
* search registry for both ident and unique name ([f22dc25](https://github.com/module-federation/nextjs-mf/commit/f22dc25e5a6374273b1bc51b0e101b57226c5906))
|
|
19
|
+
* simplify template ([b4e633b](https://github.com/module-federation/nextjs-mf/commit/b4e633b6624264456800bc7351c6d815430d42b5))
|
|
20
|
+
* stats plugin updates ([c1db325](https://github.com/module-federation/nextjs-mf/commit/c1db325d3311b2126964f4ad2ddbfa9d82a50674))
|
|
21
|
+
* ts in template string ([0edbbea](https://github.com/module-federation/nextjs-mf/commit/0edbbeaa42503237b88132252e29a34a79bade51))
|
|
22
|
+
* ts in template string ([9b8f652](https://github.com/module-federation/nextjs-mf/commit/9b8f652f96bf6f29d5fc238bb616e19187158a57))
|
|
13
23
|
|
|
14
24
|
|
|
15
25
|
### Features
|
|
16
26
|
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
* remove old loadScript hack ([fbe19bc](https://github.com/module-federation/nextjs-mf/commit/fbe19bc76694c14b6a95c577669c2e8656ede1ba))
|
|
30
|
-
* **utilities:** update DelegateModulesPlugin and tests (#node_auto_public_path) ([df8bb79](https://github.com/module-federation/nextjs-mf/commit/df8bb791c3fedef299cb15960546ff5ad9c665ef))
|
|
27
|
+
* create and expose AutomaticPublicPathPlugin.ts ([9d0fcdd](https://github.com/module-federation/nextjs-mf/commit/9d0fcdd2e36fae971f2eec3269980baedf276b35))
|
|
28
|
+
* improve options logic in node federation plugin ([b69b70d](https://github.com/module-federation/nextjs-mf/commit/b69b70d200c63e3557089e8a0669fc43330c988c))
|
|
29
|
+
* improved async init ([bb19b07](https://github.com/module-federation/nextjs-mf/commit/bb19b07b5be1bbc28bd6b049ea7aea6510ad17a2))
|
|
30
|
+
* improved async init ([019694e](https://github.com/module-federation/nextjs-mf/commit/019694e55fe1f6bebfdab0701bf9087bf0034b8f))
|
|
31
|
+
* Static fallback to non auto public path ([3c58780](https://github.com/module-federation/nextjs-mf/commit/3c587809f1e936fba291eab3d7c790115be5102c))
|
|
32
|
+
* support vmok conventions ([0501da8](https://github.com/module-federation/nextjs-mf/commit/0501da86eaaab6ea79a3397c2c683086cc591309))
|
|
33
|
+
* support vmok conventions ([d53b586](https://github.com/module-federation/nextjs-mf/commit/d53b5867719eb7fff32bee2edd3255023d598f44))
|
|
34
|
+
* Use enhanced Federation Plugin ([e021d66](https://github.com/module-federation/nextjs-mf/commit/e021d6667996962f154137d164bed13f53a6a135))
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
## [2.0.2-beta.2](https://github.com/module-federation/nextjs-mf/compare/node-2.0.2-beta.1...node-2.0.2-beta.2) (2023-09-15)
|
|
31
39
|
|
|
40
|
+
### Bug Fixes
|
|
41
|
+
|
|
42
|
+
- Auto Public Path, detect multiple output targets ([65f17b1](https://github.com/module-federation/nextjs-mf/commit/65f17b189f37e0ad9e72bb0bf04463e9c5455929))
|
|
43
|
+
- ensure custom FS works with target: node or async node preset ([a08fcab](https://github.com/module-federation/nextjs-mf/commit/a08fcab7dde903966d34be9dab0b34c8896948ca))
|
|
32
44
|
|
|
45
|
+
## [2.0.2-beta.1](https://github.com/module-federation/nextjs-mf/compare/node-2.0.2-beta.0...node-2.0.2-beta.1) (2023-09-14)
|
|
46
|
+
|
|
47
|
+
## [2.0.2-beta.0](https://github.com/module-federation/nextjs-mf/compare/node-2.0.1...node-2.0.2-beta.0) (2023-09-14)
|
|
48
|
+
|
|
49
|
+
### Bug Fixes
|
|
50
|
+
|
|
51
|
+
- import utils manually ([2767191](https://github.com/module-federation/nextjs-mf/commit/2767191467d9d685704b747d42b5f170da233847))
|
|
52
|
+
- **node:** use ES6 imports and override method in FederationModuleInfoRuntimeModule (#bytedance) ([d420ad9](https://github.com/module-federation/nextjs-mf/commit/d420ad94b7515123254af45c61704abcc0971511))
|
|
53
|
+
- remove ensure remote runtime module ([d06c082](https://github.com/module-federation/nextjs-mf/commit/d06c0823435063dcd277897ab551cd3a9c996d3d))
|
|
54
|
+
|
|
55
|
+
### Features
|
|
56
|
+
|
|
57
|
+
- add auto public path support for remote modules (node_auto_public_path) ([b12c984](https://github.com/module-federation/nextjs-mf/commit/b12c9841aa55027cb7b77e768ff9c0b456120d51))
|
|
58
|
+
- Dynamic Filesystem ([#1274](https://github.com/module-federation/nextjs-mf/issues/1274)) ([2bec98a](https://github.com/module-federation/nextjs-mf/commit/2bec98a2472b44898a7f14ec6868a2368cfb6d82))
|
|
59
|
+
- FederationModuleInfo Runtime Module ([50a1a0c](https://github.com/module-federation/nextjs-mf/commit/50a1a0c7a37bbe42ab6f2f5559b411567fee0fe9))
|
|
60
|
+
- FederationModuleInfo Runtime Module ([7b09ef6](https://github.com/module-federation/nextjs-mf/commit/7b09ef6c0f4ee68a1b5caa5f021632059c522b8f))
|
|
61
|
+
- implement Bytedance Infra Node Plugin ([82e6801](https://github.com/module-federation/nextjs-mf/commit/82e680157bbad68fa93800a69149c4c28652cfed))
|
|
62
|
+
- implement Bytedance Infra Node Plugin ([97f283e](https://github.com/module-federation/nextjs-mf/commit/97f283e4746bf6f048ee27584adde5249c8e577c))
|
|
63
|
+
- native self forming node federation ([#1291](https://github.com/module-federation/nextjs-mf/issues/1291)) ([1dd5ed1](https://github.com/module-federation/nextjs-mf/commit/1dd5ed17c981e036336925e807203e94b58c36d6))
|
|
64
|
+
- **node-remote:** Improve module federation runtime compatibility ([5eb2092](https://github.com/module-federation/nextjs-mf/commit/5eb209249c44d525c12eff5739bf23a93db08e4f))
|
|
65
|
+
- **node:** auto set public path and improve chunk loading strategy #node_auto_public_path ([65989da](https://github.com/module-federation/nextjs-mf/commit/65989dab95ee2acee7ec9a5ab321921a278cd078))
|
|
66
|
+
- **node:** enhance error handling and remote container registry in RemotePublicPathRuntimeModule (#bytedance) ([061285e](https://github.com/module-federation/nextjs-mf/commit/061285e0b6210baa1dd502dc94fd57fd9a8af822))
|
|
67
|
+
- **NodeFederationPlugin:** assign remoteContainerRegistry to importMetaName ([ca33d98](https://github.com/module-federation/nextjs-mf/commit/ca33d98df63fdb8dac402b1cc0ec8bf95f9f1971))
|
|
68
|
+
- **node:** remove unused import from DynamicFilesystemRuntimeModule ([f9787a9](https://github.com/module-federation/nextjs-mf/commit/f9787a9a67da936679db388e5c66e012e7452d8a))
|
|
69
|
+
- remove old loadScript hack ([fbe19bc](https://github.com/module-federation/nextjs-mf/commit/fbe19bc76694c14b6a95c577669c2e8656ede1ba))
|
|
70
|
+
- **utilities:** update DelegateModulesPlugin and tests (#node_auto_public_path) ([df8bb79](https://github.com/module-federation/nextjs-mf/commit/df8bb791c3fedef299cb15960546ff5ad9c665ef))
|
|
33
71
|
|
|
34
72
|
## [2.0.1](https://github.com/module-federation/nextjs-mf/compare/node-2.0.0...node-2.0.1) (2023-09-13)
|
|
35
73
|
|
|
36
74
|
### Dependency Updates
|
|
37
75
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
76
|
+
- `utils` updated to version `3.0.1`
|
|
77
|
+
- `utils` updated to version `3.0.1`
|
|
41
78
|
|
|
42
79
|
# [2.0.0](https://github.com/module-federation/nextjs-mf/compare/node-1.0.6...node-2.0.0) (2023-09-09)
|
|
43
80
|
|
|
44
81
|
### Dependency Updates
|
|
45
82
|
|
|
46
|
-
|
|
47
|
-
|
|
83
|
+
- `utils` updated to version `3.0.0`
|
|
84
|
+
- `utils` updated to version `3.0.0`
|
|
48
85
|
|
|
49
86
|
### Bug Fixes
|
|
50
87
|
|
|
51
|
-
|
|
52
|
-
|
|
88
|
+
- workaround to self ref module error in prod ([#1205](https://github.com/module-federation/nextjs-mf/issues/1205)) ([1d88beb](https://github.com/module-federation/nextjs-mf/commit/1d88beb0da629f036e132573fee9f05494b1f540))
|
|
53
89
|
|
|
54
90
|
### Features
|
|
55
91
|
|
|
56
|
-
|
|
57
|
-
|
|
92
|
+
- core package for module federation ([#1093](https://github.com/module-federation/nextjs-mf/issues/1093)) ([d460400](https://github.com/module-federation/nextjs-mf/commit/d46040053e9b627321b5fe8e05556c5bb727c238)), closes [#851](https://github.com/module-federation/nextjs-mf/issues/851) [#864](https://github.com/module-federation/nextjs-mf/issues/864) [#835](https://github.com/module-federation/nextjs-mf/issues/835) [#851](https://github.com/module-federation/nextjs-mf/issues/851) [#864](https://github.com/module-federation/nextjs-mf/issues/864) [#871](https://github.com/module-federation/nextjs-mf/issues/871) [#851](https://github.com/module-federation/nextjs-mf/issues/851) [#864](https://github.com/module-federation/nextjs-mf/issues/864) [#872](https://github.com/module-federation/nextjs-mf/issues/872) [#875](https://github.com/module-federation/nextjs-mf/issues/875) [#884](https://github.com/module-federation/nextjs-mf/issues/884) [#887](https://github.com/module-federation/nextjs-mf/issues/887) [#893](https://github.com/module-federation/nextjs-mf/issues/893) [#885](https://github.com/module-federation/nextjs-mf/issues/885) [#899](https://github.com/module-federation/nextjs-mf/issues/899) [#904](https://github.com/module-federation/nextjs-mf/issues/904) [#932](https://github.com/module-federation/nextjs-mf/issues/932) [#936](https://github.com/module-federation/nextjs-mf/issues/936) [#959](https://github.com/module-federation/nextjs-mf/issues/959) [#960](https://github.com/module-federation/nextjs-mf/issues/960) [#969](https://github.com/module-federation/nextjs-mf/issues/969) [#971](https://github.com/module-federation/nextjs-mf/issues/971) [#1234](https://github.com/module-federation/nextjs-mf/issues/1234) [#1235](https://github.com/module-federation/nextjs-mf/issues/1235)
|
|
58
93
|
|
|
59
94
|
### BREAKING CHANGES
|
|
60
95
|
|
|
61
|
-
|
|
96
|
+
- automaticAsyncBoundary option has been removed
|
|
62
97
|
|
|
63
|
-
|
|
98
|
+
- fix: exclude specific pages from page map automatically
|
|
64
99
|
|
|
65
|
-
|
|
100
|
+
- refactor: conslidate codebase
|
|
66
101
|
|
|
67
|
-
|
|
102
|
+
- fix: improve hot reload share recovery
|
|
68
103
|
|
|
69
|
-
|
|
104
|
+
- refactor: remove server jsonp template
|
|
70
105
|
|
|
71
|
-
|
|
106
|
+
- chore: remove dead code from runtime modules
|
|
72
107
|
|
|
73
|
-
|
|
108
|
+
- fix: clean up jsonp getCustomJsonpCode
|
|
74
109
|
|
|
75
110
|
getting chunk loading global from compiler output options
|
|
76
111
|
|
|
77
|
-
|
|
112
|
+
- feat: adding cleanInitArrays runtime helper
|
|
78
113
|
|
|
79
|
-
|
|
114
|
+
- chore: remove share scope hoist and module hoisting system
|
|
80
115
|
|
|
81
|
-
|
|
116
|
+
- chore: cleanup code
|
|
82
117
|
|
|
83
|
-
|
|
118
|
+
- chore: remove dead code from add module runtime plugin
|
|
84
119
|
|
|
85
120
|
likely can remove whole plugin in future
|
|
86
121
|
|
|
87
|
-
|
|
122
|
+
- chore: remove logs from delegate modules
|
|
88
123
|
|
|
89
|
-
|
|
124
|
+
- chore: remove old utils
|
|
90
125
|
|
|
91
|
-
|
|
126
|
+
- fix: add warning on auto page stitch
|
|
92
127
|
|
|
93
|
-
|
|
128
|
+
- fix: remove commented out code from InvertedContainerPlugin.ts
|
|
94
129
|
|
|
95
|
-
|
|
130
|
+
- chore: improve logging to see if its local load or remote load
|
|
96
131
|
|
|
97
|
-
|
|
132
|
+
- chore: clean up old custom promises factories
|
|
98
133
|
|
|
99
|
-
|
|
134
|
+
- fix: remove container proxy code
|
|
100
135
|
|
|
101
|
-
|
|
102
|
-
|
|
136
|
+
- fix: remove container proxy code
|
|
137
|
+
- automaticAsyncBoundary option has been removed
|
|
103
138
|
|
|
104
|
-
|
|
139
|
+
- fix: exclude specific pages from page map automatically
|
|
105
140
|
|
|
106
|
-
|
|
141
|
+
- refactor: conslidate codebase
|
|
107
142
|
|
|
108
|
-
|
|
143
|
+
- fix: improve hot reload share recovery
|
|
109
144
|
|
|
110
|
-
|
|
145
|
+
- refactor: remove server jsonp template
|
|
111
146
|
|
|
112
|
-
|
|
147
|
+
- chore: remove dead code from runtime modules
|
|
113
148
|
|
|
114
|
-
|
|
149
|
+
- fix: clean up jsonp getCustomJsonpCode
|
|
115
150
|
|
|
116
151
|
getting chunk loading global from compiler output options
|
|
117
152
|
|
|
118
|
-
|
|
153
|
+
- feat: adding cleanInitArrays runtime helper
|
|
119
154
|
|
|
120
|
-
|
|
155
|
+
- chore: remove share scope hoist and module hoisting system
|
|
121
156
|
|
|
122
|
-
|
|
157
|
+
- chore: cleanup code
|
|
123
158
|
|
|
124
|
-
|
|
159
|
+
- chore: remove dead code from add module runtime plugin
|
|
125
160
|
|
|
126
161
|
likely can remove whole plugin in future
|
|
127
162
|
|
|
128
|
-
|
|
163
|
+
- chore: remove logs from delegate modules
|
|
129
164
|
|
|
130
|
-
|
|
165
|
+
- chore: remove old utils
|
|
131
166
|
|
|
132
|
-
|
|
167
|
+
- fix: add warning on auto page stitch
|
|
133
168
|
|
|
134
|
-
|
|
169
|
+
- fix: remove commented out code from InvertedContainerPlugin.ts
|
|
135
170
|
|
|
136
|
-
|
|
171
|
+
- chore: improve logging to see if its local load or remote load
|
|
137
172
|
|
|
138
|
-
|
|
173
|
+
- chore: clean up old custom promises factories
|
|
139
174
|
|
|
140
|
-
|
|
175
|
+
- fix: remove container proxy code
|
|
141
176
|
|
|
142
|
-
|
|
177
|
+
- fix: remove container proxy code
|
|
143
178
|
|
|
144
|
-
|
|
179
|
+
- chore: fix project.json
|
|
145
180
|
|
|
146
|
-
|
|
181
|
+
- debugging
|
|
147
182
|
|
|
148
|
-
|
|
183
|
+
- fix: resolve backmerge issues with build
|
|
149
184
|
|
|
150
|
-
|
|
185
|
+
- Merge branch 'kill_child_compilers' into fix_backmerge_issues
|
|
151
186
|
|
|
152
187
|
# Conflicts:
|
|
153
|
-
# package-lock.json
|
|
154
|
-
# package.json
|
|
155
|
-
# packages/nextjs-mf/src/plugins/NextFederationPlugin/index.ts
|
|
156
|
-
# packages/nextjs-mf/src/plugins/container/InvertedContainerPlugin.ts
|
|
157
|
-
# packages/nextjs-mf/src/plugins/container/InvertedContainerRuntimeModule.ts
|
|
158
188
|
|
|
159
|
-
|
|
189
|
+
# package-lock.json
|
|
160
190
|
|
|
161
|
-
|
|
191
|
+
# package.json
|
|
162
192
|
|
|
163
|
-
|
|
193
|
+
# packages/nextjs-mf/src/plugins/NextFederationPlugin/index.ts
|
|
164
194
|
|
|
165
|
-
|
|
195
|
+
# packages/nextjs-mf/src/plugins/container/InvertedContainerPlugin.ts
|
|
166
196
|
|
|
167
|
-
|
|
168
|
-
* automaticAsyncBoundary option has been removed
|
|
197
|
+
# packages/nextjs-mf/src/plugins/container/InvertedContainerRuntimeModule.ts
|
|
169
198
|
|
|
170
|
-
|
|
199
|
+
- feat: enable eager sharing
|
|
171
200
|
|
|
172
|
-
|
|
201
|
+
- refactor: improve module hooks for eager loading and search
|
|
173
202
|
|
|
174
|
-
|
|
203
|
+
- refactor: cleanup custom jsonp and make es5
|
|
175
204
|
|
|
176
|
-
|
|
205
|
+
- refactor: cleanup inverted container code
|
|
177
206
|
|
|
178
|
-
|
|
207
|
+
- refactor: cleanup inverted container code
|
|
208
|
+
- automaticAsyncBoundary option has been removed
|
|
179
209
|
|
|
180
|
-
|
|
210
|
+
- fix: exclude specific pages from page map automatically
|
|
211
|
+
|
|
212
|
+
- refactor: conslidate codebase
|
|
213
|
+
|
|
214
|
+
- fix: improve hot reload share recovery
|
|
215
|
+
|
|
216
|
+
- refactor: remove server jsonp template
|
|
217
|
+
|
|
218
|
+
- chore: remove dead code from runtime modules
|
|
219
|
+
|
|
220
|
+
- fix: clean up jsonp getCustomJsonpCode
|
|
181
221
|
|
|
182
222
|
getting chunk loading global from compiler output options
|
|
183
223
|
|
|
184
|
-
|
|
224
|
+
- feat: adding cleanInitArrays runtime helper
|
|
185
225
|
|
|
186
|
-
|
|
226
|
+
- chore: remove share scope hoist and module hoisting system
|
|
187
227
|
|
|
188
|
-
|
|
228
|
+
- chore: cleanup code
|
|
189
229
|
|
|
190
|
-
|
|
230
|
+
- chore: remove dead code from add module runtime plugin
|
|
191
231
|
|
|
192
232
|
likely can remove whole plugin in future
|
|
193
233
|
|
|
194
|
-
|
|
234
|
+
- chore: remove logs from delegate modules
|
|
195
235
|
|
|
196
|
-
|
|
236
|
+
- chore: remove old utils
|
|
197
237
|
|
|
198
|
-
|
|
238
|
+
- fix: add warning on auto page stitch
|
|
199
239
|
|
|
200
|
-
|
|
240
|
+
- fix: remove commented out code from InvertedContainerPlugin.ts
|
|
201
241
|
|
|
202
|
-
|
|
242
|
+
- chore: improve logging to see if its local load or remote load
|
|
203
243
|
|
|
204
|
-
|
|
244
|
+
- chore: clean up old custom promises factories
|
|
205
245
|
|
|
206
|
-
|
|
246
|
+
- fix: remove container proxy code
|
|
207
247
|
|
|
208
|
-
|
|
248
|
+
- fix: remove container proxy code
|
|
209
249
|
|
|
210
|
-
|
|
250
|
+
- fix: resolve backmerge issues with build
|
|
211
251
|
|
|
212
|
-
|
|
252
|
+
- Merge branch 'kill_child_compilers' into fix_backmerge_issues
|
|
213
253
|
|
|
214
254
|
# Conflicts:
|
|
215
|
-
# package-lock.json
|
|
216
|
-
# package.json
|
|
217
|
-
# packages/nextjs-mf/src/plugins/NextFederationPlugin/index.ts
|
|
218
|
-
# packages/nextjs-mf/src/plugins/container/InvertedContainerPlugin.ts
|
|
219
|
-
# packages/nextjs-mf/src/plugins/container/InvertedContainerRuntimeModule.ts
|
|
220
255
|
|
|
221
|
-
|
|
256
|
+
# package-lock.json
|
|
222
257
|
|
|
223
|
-
|
|
258
|
+
# package.json
|
|
224
259
|
|
|
225
|
-
|
|
260
|
+
# packages/nextjs-mf/src/plugins/NextFederationPlugin/index.ts
|
|
226
261
|
|
|
227
|
-
|
|
262
|
+
# packages/nextjs-mf/src/plugins/container/InvertedContainerPlugin.ts
|
|
228
263
|
|
|
229
|
-
|
|
264
|
+
# packages/nextjs-mf/src/plugins/container/InvertedContainerRuntimeModule.ts
|
|
230
265
|
|
|
231
|
-
|
|
266
|
+
- feat: enable eager sharing
|
|
232
267
|
|
|
233
|
-
|
|
268
|
+
- refactor: improve module hooks for eager loading and search
|
|
234
269
|
|
|
235
|
-
|
|
270
|
+
- refactor: cleanup custom jsonp and make es5
|
|
236
271
|
|
|
237
|
-
|
|
272
|
+
- refactor: cleanup inverted container code
|
|
273
|
+
|
|
274
|
+
- refactor: cleanup inverted container code
|
|
275
|
+
|
|
276
|
+
- ci: fix install step with npm and NX
|
|
277
|
+
|
|
278
|
+
- test: remove tests for now
|
|
238
279
|
|
|
239
|
-
|
|
280
|
+
- chore(utils): release version 1.7.3-beta.0
|
|
240
281
|
|
|
241
|
-
|
|
282
|
+
- chore(utils): release version 1.7.3
|
|
242
283
|
|
|
243
|
-
|
|
284
|
+
- chore(node): release version 0.14.4-beta.0
|
|
244
285
|
|
|
245
|
-
|
|
286
|
+
- chore(node): release version 0.14.4
|
|
246
287
|
|
|
247
|
-
|
|
288
|
+
- chore(nextjs-mf): release version 6.4.1-beta.4
|
|
248
289
|
|
|
290
|
+
- fix: remove debugging runtime variable
|
|
249
291
|
|
|
292
|
+
- chore(nextjs-mf): release version 6.4.1-beta.5
|
|
250
293
|
|
|
251
294
|
## [1.0.7](https://github.com/module-federation/nextjs-mf/compare/node-1.0.6...node-1.0.7) (2023-08-14)
|
|
252
295
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"public": true,
|
|
3
3
|
"name": "@module-federation/node",
|
|
4
|
-
"version": "2.0.2-beta.
|
|
4
|
+
"version": "2.0.2-beta.3",
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"main": "./src/index.js",
|
|
7
7
|
"exports": {
|
|
@@ -14,6 +14,8 @@
|
|
|
14
14
|
"import": "./src/utils/index.js",
|
|
15
15
|
"require": "./src/utils/index.js"
|
|
16
16
|
},
|
|
17
|
+
"./src/plugins/RemotePublicPathPlugin.js": "./src/plugins/RemotePublicPathPlugin.js",
|
|
18
|
+
"./src/plugins/NodeFederationPlugin.js": "./src/plugins/NodeFederationPlugin.js",
|
|
17
19
|
"./src/": "./src/"
|
|
18
20
|
},
|
|
19
21
|
"publishConfig": {
|
|
@@ -33,24 +35,27 @@
|
|
|
33
35
|
"author": "Zack Jackson <zackary.l.jackson@gmail.com>",
|
|
34
36
|
"license": "MIT",
|
|
35
37
|
"dependencies": {
|
|
36
|
-
"
|
|
38
|
+
"@module-federation/utilities": "3.0.2-beta.0",
|
|
37
39
|
"encoding": "^0.1.13",
|
|
38
|
-
"
|
|
40
|
+
"node-fetch": "^2.6.7",
|
|
41
|
+
"tapable": "2.2.1",
|
|
42
|
+
"webpack-sources": "3.2.3",
|
|
43
|
+
"@module-federation/enhanced": "0.0.3"
|
|
39
44
|
},
|
|
40
45
|
"peerDependencies": {
|
|
41
|
-
"
|
|
46
|
+
"next": "^12||^13",
|
|
42
47
|
"react": "^16||^17||^18",
|
|
43
48
|
"react-dom": "^16||^17||^18",
|
|
44
|
-
"
|
|
49
|
+
"webpack": "^5.40.0"
|
|
45
50
|
},
|
|
46
51
|
"peerDependenciesMeta": {
|
|
47
|
-
"
|
|
52
|
+
"next": {
|
|
48
53
|
"optional": true
|
|
49
54
|
},
|
|
50
|
-
"react
|
|
55
|
+
"react": {
|
|
51
56
|
"optional": true
|
|
52
57
|
},
|
|
53
|
-
"
|
|
58
|
+
"react-dom": {
|
|
54
59
|
"optional": true
|
|
55
60
|
}
|
|
56
61
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export function fileSystemRunInContextStrategy(chunkId: any, rootOutputDir: any, remotes: any, callback: any): Promise<void>;
|
|
2
|
-
export function httpEvalStrategy(chunkName: any, remoteName: any, remotes: any, callback: any): Promise<void>;
|
|
1
|
+
export declare function fileSystemRunInContextStrategy(chunkId: any, rootOutputDir: any, remotes: any, callback: any): Promise<void>;
|
|
2
|
+
export declare function httpEvalStrategy(chunkName: any, remoteName: any, remotes: any, callback: any): Promise<void>;
|
|
3
3
|
/**
|
|
4
4
|
* HttpVmStrategy
|
|
5
5
|
* This function is used to execute a chunk of code in a VM using HTTP or HTTPS based on the protocol.
|
|
@@ -8,4 +8,4 @@ export function httpEvalStrategy(chunkName: any, remoteName: any, remotes: any,
|
|
|
8
8
|
* @param {object} remotes - An object containing the remote servers.
|
|
9
9
|
* @param {function} callback - A callback function to be executed after the chunk is executed.
|
|
10
10
|
*/
|
|
11
|
-
export function httpVmStrategy(chunkName:
|
|
11
|
+
export declare function httpVmStrategy(chunkName: any, remoteName: any, remotes: any, callback: any): Promise<void>;
|
|
@@ -1,20 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.httpVmStrategy = exports.httpEvalStrategy = exports.fileSystemRunInContextStrategy = void 0;
|
|
4
|
+
//@ts-nocheck
|
|
4
5
|
async function fileSystemRunInContextStrategy(chunkId, rootOutputDir, remotes, callback) {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
//eslint-disable-next-line
|
|
10
|
-
rootOutputDir + __webpack_require__.u(chunkId));
|
|
6
|
+
const fs = require('fs');
|
|
7
|
+
const path = require('path');
|
|
8
|
+
const vm = require('vm');
|
|
9
|
+
const filename = path.join(__dirname, rootOutputDir + __webpack_require__.u(chunkId));
|
|
11
10
|
if (fs.existsSync(filename)) {
|
|
12
11
|
fs.readFile(filename, 'utf-8', (err, content) => {
|
|
13
12
|
if (err) {
|
|
14
13
|
callback(err, null);
|
|
15
14
|
return;
|
|
16
15
|
}
|
|
17
|
-
|
|
16
|
+
const chunk = {};
|
|
18
17
|
try {
|
|
19
18
|
vm.runInThisContext('(function(exports, require, __dirname, __filename) {' +
|
|
20
19
|
content +
|
|
@@ -35,25 +34,25 @@ async function fileSystemRunInContextStrategy(chunkId, rootOutputDir, remotes, c
|
|
|
35
34
|
exports.fileSystemRunInContextStrategy = fileSystemRunInContextStrategy;
|
|
36
35
|
// HttpEvalStrategy
|
|
37
36
|
async function httpEvalStrategy(chunkName, remoteName, remotes, callback) {
|
|
38
|
-
|
|
37
|
+
let url;
|
|
39
38
|
try {
|
|
40
|
-
// eslint-disable-next-line no-undef
|
|
41
39
|
url = new URL(chunkName, __webpack_require__.p);
|
|
42
40
|
}
|
|
43
41
|
catch (e) {
|
|
44
42
|
console.error('module-federation: failed to construct absolute chunk path of', remoteName, 'for', chunkName, e);
|
|
45
43
|
url = new URL(remotes[remoteName]);
|
|
46
|
-
|
|
44
|
+
const getBasenameFromUrl = (url) => {
|
|
47
45
|
const urlParts = url.split('/');
|
|
48
46
|
return urlParts[urlParts.length - 1];
|
|
49
47
|
};
|
|
50
|
-
|
|
48
|
+
const fileToReplace = getBasenameFromUrl(url.pathname);
|
|
51
49
|
url.pathname = url.pathname.replace(fileToReplace, chunkName);
|
|
52
50
|
}
|
|
53
51
|
const data = await fetch(url).then((res) => res.text());
|
|
54
|
-
|
|
52
|
+
const chunk = {};
|
|
55
53
|
try {
|
|
56
|
-
|
|
54
|
+
const urlDirname = url.pathname.split('/').slice(0, -1).join('/');
|
|
55
|
+
eval('(function(exports, require, __dirname, __filename) {' + data + '\n})', chunkName)(chunk, require, urlDirname, chunkName);
|
|
57
56
|
callback(null, chunk);
|
|
58
57
|
}
|
|
59
58
|
catch (e) {
|
|
@@ -70,30 +69,30 @@ exports.httpEvalStrategy = httpEvalStrategy;
|
|
|
70
69
|
* @param {function} callback - A callback function to be executed after the chunk is executed.
|
|
71
70
|
*/
|
|
72
71
|
async function httpVmStrategy(chunkName, remoteName, remotes, callback) {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
72
|
+
const http = require('http');
|
|
73
|
+
const https = require('https');
|
|
74
|
+
const vm = require('vm');
|
|
75
|
+
const path = require('path');
|
|
76
|
+
let url;
|
|
77
77
|
try {
|
|
78
|
-
console.log('trying chunk load', chunkName, __webpack_require__.p);
|
|
79
78
|
url = new URL(chunkName, __webpack_require__.p);
|
|
80
79
|
}
|
|
81
80
|
catch (e) {
|
|
82
81
|
console.error('module-federation: failed to construct absolute chunk path of', remoteName, 'for', chunkName, e);
|
|
83
|
-
console.log('fallbak url constructed', remotes._config[remoteName]);
|
|
84
82
|
url = new URL(remotes._config[remoteName]);
|
|
85
|
-
|
|
83
|
+
const fileToReplace = path.basename(url.pathname);
|
|
86
84
|
url.pathname = url.pathname.replace(fileToReplace, chunkName);
|
|
87
85
|
}
|
|
88
|
-
|
|
86
|
+
const protocol = url.protocol === 'https:' ? https : http;
|
|
89
87
|
protocol.get(url, (res) => {
|
|
90
88
|
let data = '';
|
|
91
89
|
res.on('data', (chunk) => {
|
|
92
90
|
data += chunk;
|
|
93
91
|
});
|
|
94
92
|
res.on('end', () => {
|
|
95
|
-
|
|
96
|
-
|
|
93
|
+
const chunk = {};
|
|
94
|
+
const urlDirname = url.pathname.split('/').slice(0, -1).join('/');
|
|
95
|
+
vm.runInThisContext('(function(exports, require, __dirname, __filename) {' + data + '\n})', chunkName)(chunk, require, urlDirname, chunkName);
|
|
97
96
|
callback(null, chunk);
|
|
98
97
|
});
|
|
99
98
|
res.on('error', (err) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stratagies.js","sourceRoot":"","sources":["../../../../../packages/node/src/filesystem/stratagies.
|
|
1
|
+
{"version":3,"file":"stratagies.js","sourceRoot":"","sources":["../../../../../packages/node/src/filesystem/stratagies.ts"],"names":[],"mappings":";;;AAAA,aAAa;AACN,KAAK,UAAU,8BAA8B,CAClD,OAAO,EACP,aAAa,EACb,OAAO,EACP,QAAQ;IAER,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACzB,MAAM,IAAI,GAAG,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AAE,CAAC;YACjB,MAAM,UAAU,GAAG,GAAG,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;YAElE,EAAE,CAAC,gBAAgB,CACjB,sDAAsD,GAAG,IAAI,GAAG,MAAM,EACtE,SAAS,CACV,CAAC,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,SAAS,CAAC,CAAC;YACzC,QAAQ,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;QACxB,CAAC,CAAC,CAAC;QACH,GAAG,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,GAAG,EAAE,EAAE;YACtB,QAAQ,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;QACtB,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC;AAxCD,wCAwCC"}
|
package/src/index.d.ts
CHANGED
|
@@ -2,3 +2,6 @@ export { default as StreamingTargetPlugin } from './plugins/StreamingTargetPlugi
|
|
|
2
2
|
export { default as NodeFederationPlugin } from './plugins/NodeFederationPlugin';
|
|
3
3
|
export { default as UniversalFederationPlugin } from './plugins/UniversalFederationPlugin';
|
|
4
4
|
export { default as ChunkCorrelationPlugin } from './plugins/ChunkCorrelationPlugin';
|
|
5
|
+
export { default as RemotePublicPathPlugin } from './plugins/RemotePublicPathRuntimeModule';
|
|
6
|
+
export { default as NodeContainerPlugin } from './plugins/NodeContainerPlugin';
|
|
7
|
+
export { parseRemotes } from './plugins/NodeFederationPlugin';
|