Skip to content

Commit df3ef24

Browse files
nyqykkScriptedAlchemyzhoushaw2heal1
authored
chore(enhanced): adjust add federation init process (#2035)
Co-authored-by: ScriptedAlchemy <[email protected]> Co-authored-by: ScriptedAlchemy <[email protected]> Co-authored-by: Zhou xiao <[email protected]> Co-authored-by: 2heal1 <[email protected]>
1 parent d3d8003 commit df3ef24

File tree

79 files changed

+1221
-502
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+1221
-502
lines changed

.changeset/early-kids-suffer.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@module-federation/enhanced': patch
3+
---
4+
5+
Support multiple runtime chunks, single runtime chunks in reference hoisting

.changeset/fifty-swans-call.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@module-federation/node': minor
3+
---
4+
5+
entry tracking and improved hot reloading for node

.changeset/happy-crabs-know.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
'@module-federation/enhanced': patch
3+
'@module-federation/runtime': patch
4+
'@module-federation/sdk': patch
5+
---
6+
7+
chore: adjust add federation init process

.changeset/moody-brooms-burn.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@module-federation/sdk': patch
3+
---
4+
5+
Remove log of container exports in sdk

.changeset/smooth-turkeys-raise.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'@module-federation/runtime': patch
3+
'@module-federation/sdk': patch
4+
---
5+
6+
chore: redefine prefetch types

.changeset/stupid-mangos-switch.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
'@module-federation/nextjs-mf': minor
3+
'@module-federation/enhanced': minor
4+
'@module-federation/sdk': patch
5+
---
6+
7+
use chunk integration to initalize federation runtime and plugins in runtime bootstrap

.github/workflows/build-and-test.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,14 @@ jobs:
4747
- name: Run Affected Test
4848
run: npx nx affected -t test --parallel=3 --exclude='*,!tag:package'
4949

50-
- name: E2E Test for 3000-home
51-
run: pnpm run app:next:dev & echo "done" && sleep 20 && npx nx run-many --target=test:e2e --projects=3000-home && lsof -ti tcp:3000,3001,3002 | xargs kill
50+
- name: E2E Test for Next.js
51+
run: pnpm run app:next:dev & echo "done" && sleep 50 && npx nx run-many --target=test:e2e --projects=3000-home,3001-shop,3002-checkout --parallel=2 && lsof -ti tcp:3000,3001,3002 | xargs kill
5252

53-
- name: E2E Test for 3001-shop
54-
run: pnpm run app:next:dev & echo "done" && sleep 20 && npx nx run-many --target=test:e2e --projects=3001-shop && lsof -ti tcp:3000,3001,3002 | xargs kill
53+
# - name: E2E Test for 3001-shop
54+
# run: pnpm run app:next:dev & echo "done" && sleep 20 && npx nx run-many --target=test:e2e --projects=3001-shop && lsof -ti tcp:3000,3001,3002 | xargs kill
55+
56+
- name: E2E Test for ModernJS
57+
run: npx nx run-many --target=test:e2e --projects=modernjs --parallel=1 && lsof -ti tcp:8080 | xargs kill
5558

5659
# - name: E2E Test for 3002-checkout
5760
# run: pnpm run app:next:dev & echo "done" && sleep 15 && npx nx run-many --target=test:e2e --projects=3002-checkout && lsof -ti tcp:3000,3001,3002 | xargs kill

apps/3000-home/cypress.config.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,8 @@ export default defineConfig({
55
projectId: 'sa6wfn',
66
e2e: nxE2EPreset(__filename, { cypressDir: 'cypress' }),
77
defaultCommandTimeout: 20000,
8+
retries: {
9+
runMode: 2,
10+
openMode: 1,
11+
},
812
});

apps/3000-home/cypress/e2e/app.cy.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ describe('3000-home/', () => {
3131
});
3232

3333
describe('Routing checks', () => {
34-
xit('check that clicking back and forwards in client side routeing still renders the content correctly', () => {
34+
it('check that clicking back and forwards in client side routeing still renders the content correctly', () => {
3535
cy.visit('/');
3636
cy.visit('/shop');
3737
cy.visit('/');
@@ -51,7 +51,11 @@ describe('3000-home/', () => {
5151
});
5252

5353
describe('3000-home/checkout', () => {
54-
beforeEach(() => cy.visit('/checkout'));
54+
beforeEach(() => {
55+
cy.visit('/checkout');
56+
cy.visit('/');
57+
cy.visit('/checkout');
58+
});
5559

5660
describe('Welcome message', () => {
5761
it('should display welcome message', () => {
@@ -102,7 +106,8 @@ describe('3000-home/', () => {
102106
cy.request(src).its('status').should('eq', 200);
103107
});
104108
});
105-
xit('should check that shop-webpack-png images are not 404 between route clicks', () => {
109+
it('should check that shop-webpack-png images are not 404 between route clicks', () => {
110+
cy.visit('/');
106111
cy.visit('/shop');
107112
cy.url().should('include', '/shop');
108113
getH1().contains('Shop Page');

apps/3000-home/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
"tapable": "2.2.1",
2626
"terser-webpack-plugin": "5.3.10",
2727
"typescript": "5.3.3",
28+
"upath": "2.0.1",
2829
"url": "0.11.3",
2930
"util": "0.12.5",
3031
"webpack-sources": "3.2.3"

0 commit comments

Comments
 (0)