Skip to content

Commit 2d5e3b6

Browse files
Merge branch 'pr8-unified-api' into pr9-implementation
2 parents a06515d + 8795f8b commit 2d5e3b6

File tree

290 files changed

+9902
-5940
lines changed

Some content is hidden

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

290 files changed

+9902
-5940
lines changed

.changeset/runtime-safety-checks.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44

55
fix(enhanced): add runtime safety checks to prevent errors
66

7-
- Add typeof check for oldStartup function in EmbedFederationRuntimeModule to prevent calling undefined function
7+
- Add typeof check for prevStartup function in EmbedFederationRuntimeModule to prevent calling undefined function
88
- Add typeof check for __webpack_require__.x in StartupHelpers to prevent calling undefined function
99
- Add warning logs when these functions are missing to help developers debug issues

.changeset/tidy-foxes-fix.md

Lines changed: 0 additions & 8 deletions
This file was deleted.

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,11 @@ jobs:
5555
- name: Print Number of CPU Cores
5656
run: nproc
5757

58-
- name: Warm Nx Cache
59-
run: npx nx run-many --targets=build --projects=tag:type:pkg --parallel=4
58+
- name: Build SDK with skip cache to ensure workspace deps available
59+
run: npx nx build sdk --skip-nx-cache
6060

6161
- name: Run Build for All
62-
run: npx nx run-many --targets=build --projects=tag:type:pkg --parallel=4 --skip-nx-cache
62+
run: npx nx run-many --targets=build --projects=tag:type:pkg --parallel=4
6363

6464
- name: Check Package Publishing Compatibility
6565
run: |
@@ -69,6 +69,7 @@ jobs:
6969
[ "$pkg" != "packages/chrome-devtools" ] && \
7070
[ "$pkg" != "packages/core" ] && \
7171
[ "$pkg" != "packages/esbuild" ] && \
72+
[ "$pkg" != "packages/modernjs" ] && \
7273
[ "$pkg" != "packages/utilities" ]; then
7374
echo "Checking $pkg..."
7475
npx publint "$pkg"

.github/workflows/devtools.yml

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,32 @@ jobs:
3131
node-version: '18'
3232
cache: 'pnpm'
3333

34+
- name: Cache Browsers
35+
uses: actions/cache@v3
36+
id: browsers-cache
37+
with:
38+
path: |
39+
~/.cache/ms-playwright
40+
~/.cache/Cypress
41+
key: ${{ runner.os }}-browsers-${{ hashFiles('**/pnpm-lock.yaml') }}
42+
43+
- name: Set Playwright cache status
44+
run: echo "PLAYWRIGHT_CACHE_HIT=${{ steps.browsers-cache.outputs.cache-hit }}" >> $GITHUB_ENV
45+
3446
- name: Set Nx SHA
3547
uses: nrwl/nx-set-shas@v3
3648

3749
- name: Install Dependencies
3850
run: pnpm install
3951

52+
- name: Install Cypress
53+
run: npx cypress install
54+
55+
- name: Warm Nx Cache
56+
run: npx nx run-many --targets=build --projects=tag:type:pkg --parallel=1
57+
4058
- name: Run Affected Build
41-
run: npx nx run-many --targets=build --projects=tag:type:pkg
59+
run: npx nx run-many --targets=build --projects=tag:type:pkg --parallel=1 --skip-nx-cache
4260

4361
- name: Configuration xvfb
4462
shell: bash

INCREMENTAL_PR_PLAN_REVISED.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
f# Revised Incremental PR Plan for packages/enhanced Changes
1+
# Revised Incremental PR Plan for packages/enhanced Changes
22

33
## Overview
44
Based on a detailed diff analysis, this document provides a more accurate breakdown of changes into focused, incremental PRs. Each PR represents a distinct feature, fix, or refactor that can be merged independently.
@@ -14,7 +14,7 @@ Based on a detailed diff analysis, this document provides a more accurate breakd
1414
**Feature**: Add defensive checks to prevent runtime errors
1515

1616
**Files to include**:
17-
- `src/lib/container/runtime/EmbedFederationRuntimeModule.ts` (add `typeof oldStartup === 'function'` check)
17+
- `src/lib/container/runtime/EmbedFederationRuntimeModule.ts` (add `typeof prevStartup === 'function'` check)
1818
- `src/lib/startup/StartupHelpers.ts` (add `typeof __webpack_require__.x === "function"` check)
1919

2020
**Why first**: These are independent safety fixes that improve stability without any dependencies.
@@ -49,7 +49,6 @@ compiler.hooks.addRemoteDependency = new SyncHook([...]);
4949
```
5050

5151
**Note**: This is NOT a breaking change because all hook usages within the codebase are updated in the same PR.
52-
5352
---
5453

5554
### PR 3: Enhanced HoistContainerReferencesPlugin
@@ -291,4 +290,8 @@ All Feature PRs ─────────────────────
291290
2. **Reduced Risk**: Smaller, focused changes are easier to review and test
292291
3. **Flexibility**: Some PRs can be developed in parallel
293292
4. **Progressive Enhancement**: Each filtering feature builds on the previous
293+
<<<<<<< HEAD
294+
5. **Early Wins**: Runtime fixes and hook renaming can be merged quickly
295+
=======
294296
5. **Early Wins**: Runtime fixes and hook renaming can be merged quickly
297+
>>>>>>> origin/refactor/hook-renaming-cleanup-v2

apps/3000-home/package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,14 @@
77
"antd": "5.19.1",
88
"lodash": "4.17.21",
99
"next": "14.2.16",
10-
"react": "18.3.1"
10+
"react": "18.3.1",
11+
"react-dom": "18.3.1"
1112
},
1213
"devDependencies": {
1314
"@module-federation/nextjs-mf": "workspace:*",
14-
"@module-federation/runtime": "workspace:*"
15+
"@module-federation/runtime": "workspace:*",
16+
"@module-federation/utilities": "workspace:*",
17+
"webpack": "5.98.0"
1518
},
1619
"scripts": {
1720
"start": "next start",

apps/3001-shop/package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,15 @@
77
"antd": "5.19.1",
88
"lodash": "4.17.21",
99
"next": "14.2.16",
10-
"react": "18.3.1"
10+
"react": "18.3.1",
11+
"react-dom": "18.3.1"
1112
},
1213
"devDependencies": {
1314
"@module-federation/nextjs-mf": "workspace:*",
1415
"@module-federation/runtime": "workspace:*",
15-
"@module-federation/sdk": "workspace:*"
16+
"@module-federation/sdk": "workspace:*",
17+
"@module-federation/utilities": "workspace:*",
18+
"webpack": "5.98.0"
1619
},
1720
"scripts": {
1821
"start": "next start",

apps/3002-checkout/package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,15 @@
77
"antd": "5.19.1",
88
"lodash": "4.17.21",
99
"next": "14.2.16",
10-
"react": "18.3.1"
10+
"react": "18.3.1",
11+
"react-dom": "18.3.1"
1112
},
1213
"devDependencies": {
1314
"@module-federation/nextjs-mf": "workspace:*",
1415
"@module-federation/runtime": "workspace:*",
15-
"@module-federation/sdk": "workspace:*"
16+
"@module-federation/sdk": "workspace:*",
17+
"@module-federation/utilities": "workspace:*",
18+
"webpack": "5.98.0"
1619
},
1720
"scripts": {
1821
"start": "next start",

apps/manifest-demo/webpack-host/runtimePlugin.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import { FederationRuntimePlugin } from '@module-federation/runtime/types';
1+
import { ModuleFederationRuntimePlugin } from '@module-federation/runtime/types';
22

3-
export default function (): FederationRuntimePlugin {
3+
export default function (): ModuleFederationRuntimePlugin {
44
return {
55
name: 'custom-plugin-build',
66
beforeInit(args) {

apps/manifest-demo/webpack-host/src/runtimePlugin.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { FederationRuntimePlugin } from '@module-federation/runtime/types';
2-
export default function (): FederationRuntimePlugin {
1+
import { ModuleFederationRuntimePlugin } from '@module-federation/runtime/types';
2+
export default function (): ModuleFederationRuntimePlugin {
33
return {
44
name: 'custom-plugin',
55
beforeInit(args) {

0 commit comments

Comments
 (0)