Skip to content

Commit 2855583

Browse files
ScriptedAlchemy2heal1squadronai[bot]
authored
feat(enhanced): eager federation runtime module (#2856)
Co-authored-by: Hanric <[email protected]> Co-authored-by: squadronai[bot] <170149692+squadronai[bot]@users.noreply.github.com>
1 parent 34de5bb commit 2855583

File tree

105 files changed

+3200
-1565
lines changed

Some content is hidden

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

105 files changed

+3200
-1565
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'@module-federation/nextjs-mf': minor
3+
'@module-federation/enhanced': patch
4+
---
5+
6+
add hoisted runtime flag: experiments.federationRuntime === 'hoisted' | false

.changeset/kind-nails-roll.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+
experiment: Async Entry Startup when runtime is hoisted

.changeset/shy-pianos-rule.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
'@module-federation/webpack-bundler-runtime': patch
3+
'@module-federation/runtime': patch
4+
'@module-federation/sdk': patch
5+
---
6+
7+
externalize swc helpers and add them as a dependency

.changeset/silly-olives-help.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@module-federation/node': patch
3+
---
4+
5+
remove old experiment flag from node plugin

.changeset/wicked-tools-think.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'@module-federation/nextjs-mf': minor
3+
---
4+
5+
Remove module-federation/utilities package exports
6+
Should use module-federation/runtime instead

.changeset/yellow-bugs-poke.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
'@module-federation/sdk': patch
44
---
55

6-
Remove duplicated util functions and referecne central ones
6+
Remove duplicated util functions and reference central ones in sdk

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

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Build Affected Packages
22

33
on:
44
pull_request:
5-
branches: [main]
5+
branches: [main, '**']
66
push:
77
branches: [main]
88

@@ -42,6 +42,9 @@ jobs:
4242
- name: Run Affected Test
4343
run: npx nx affected -t test --parallel=2 --exclude='*,!tag:type:pkg' --skip-nx-cache
4444

45+
- name: Warm Nx Cache
46+
run: npx nx run-many --targets=build --projects=tag:type:pkg
47+
4548
e2e-modern:
4649
needs: checkout-install
4750
uses: ./.github/workflows/e2e-modern.yml
@@ -62,9 +65,14 @@ jobs:
6265
uses: ./.github/workflows/e2e-node.yml
6366
secrets: inherit
6467

65-
e2e-next:
68+
e2e-next-dev:
69+
needs: checkout-install
70+
uses: ./.github/workflows/e2e-next-dev.yml
71+
secrets: inherit
72+
73+
e2e-next-prod:
6674
needs: checkout-install
67-
uses: ./.github/workflows/e2e-next.yml
75+
uses: ./.github/workflows/e2e-next-prod.yml
6876
secrets: inherit
6977

7078
e2e-modern-ssr:

.github/workflows/e2e-manifest.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,4 @@ jobs:
4343

4444
- name: E2E Test for Manifest Demo
4545
if: steps.check-ci.outcome == 'success'
46-
run: pnpm run app:manifest:dev & echo "done" && npx wait-on tcp:3009 && npx wait-on tcp:3012 && npx nx run-many --target=e2e --projects=manifest-webpack-host --parallel=1 && lsof -ti tcp:3013,3009,3010,3011,3012 | xargs kill
46+
run: pnpm run app:manifest:dev & echo "done" && npx wait-on tcp:3009 && npx wait-on tcp:3012 && npx nx run-many --target=e2e --projects=manifest-webpack-host --parallel=1 && npx kill-port 3013 3009 3010 3011 3012

.github/workflows/e2e-modern.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,4 @@ jobs:
4343

4444
- name: E2E Test for ModernJS
4545
if: steps.check-ci.outcome == 'success'
46-
run: npx kill-port --port 4001 && npx nx run-many --target=test:e2e --projects=modernjs --parallel=1 && lsof -ti tcp:4001 | xargs kill
46+
run: npx kill-port --port 4001 && npx nx run-many --target=test:e2e --projects=modernjs --parallel=1 && npx kill-port --port 4001

.github/workflows/e2e-next-dev.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: E2E Test for Next.js Dev
2+
3+
on:
4+
workflow_call:
5+
6+
jobs:
7+
e2e-next-dev:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout Repository
11+
uses: actions/checkout@v3
12+
with:
13+
fetch-depth: 0
14+
15+
- name: Install Pnpm
16+
run: corepack enable
17+
18+
- name: Setup Node.js 18
19+
uses: actions/setup-node@v3
20+
with:
21+
node-version: '18'
22+
cache: 'pnpm'
23+
24+
- name: Set Nx SHA
25+
uses: nrwl/nx-set-shas@v3
26+
27+
- name: Set SKIP_DEVTOOLS_POSTINSTALL environment variable
28+
run: echo "SKIP_DEVTOOLS_POSTINSTALL=true" >> $GITHUB_ENV
29+
30+
- name: Install Dependencies
31+
run: pnpm install
32+
33+
- name: Install Cypress
34+
run: npx cypress install
35+
36+
- name: Run Build for All
37+
run: npx nx run-many --targets=build --projects=tag:type:pkg
38+
39+
- name: Run condition check script
40+
id: check-ci
41+
run: node tools/scripts/ci-is-affected.mjs --appName=3000-home
42+
43+
- name: E2E Test for Next.js Dev
44+
if: steps.check-ci.outcome == 'success'
45+
run: |
46+
pnpm run app:next:dev > /dev/null 2>&1 &
47+
sleep 1 &&
48+
npx wait-on tcp:3001 &&
49+
npx wait-on tcp:3002 &&
50+
npx wait-on tcp:3000 &&
51+
npx nx run-many --target=test:e2e --projects=3000-home,3001-shop,3002-checkout --parallel=1 &&
52+
lsof -ti tcp:3000,3001,3002 | xargs kill

0 commit comments

Comments
 (0)