Skip to content

Commit f8b554c

Browse files
docs: add incremental PR plan for breaking up enhanced package changes
Created a detailed plan to split the massive changes in packages/enhanced into 12 focused, incremental PRs: - Runtime safety fixes (COMPLETED - PR #3900) - Hook renaming refactor - Container hoisting improvements - Share filtering features (broken into 4 sub-features) - Layer support enhancements - API exports and test coverage Each PR is self-contained with clear dependencies documented. Also added worktrees/ to .gitignore 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent e06b36c commit f8b554c

File tree

2 files changed

+23
-4
lines changed

2 files changed

+23
-4
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,3 +90,4 @@ ssg
9090

9191
# Native binary files
9292
*.node
93+
worktrees/

INCREMENTAL_PR_PLAN_REVISED.md

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,33 @@ Based on a detailed diff analysis, this document provides a more accurate breakd
55

66
## Updated PR Sequence
77

8-
### PR 1: Runtime Safety Fixes
8+
### PR 1: Runtime Safety Fixes ✅ COMPLETED
9+
**Status**: Merged/In Review - [PR #3900](https://github.com/module-federation/core/pull/3900)
910
**Size**: Tiny (~2 files)
1011
**Risk**: Low
1112
**Type**: Fix
1213
**Feature**: Add defensive checks to prevent runtime errors
1314

14-
**Files to include**:
15-
- `src/lib/container/runtime/EmbedFederationRuntimeModule.ts` (add `typeof oldStartup === 'function'` check)
16-
- `src/lib/startup/StartupHelpers.ts` (add `typeof __webpack_require__.x === "function"` check)
15+
**Files included**:
16+
- `src/lib/container/runtime/EmbedFederationRuntimeModule.ts` (added `typeof oldStartup === 'function'` check with warning log)
17+
- `src/lib/startup/StartupHelpers.ts` (added `typeof __webpack_require__.x === "function"` check with warning log)
18+
19+
**Implementation**:
20+
```javascript
21+
// EmbedFederationRuntimeModule.ts
22+
if (typeof oldStartup === 'function') {
23+
return oldStartup();
24+
} else {
25+
console.warn('[Module Federation] oldStartup is not a function, skipping startup execution');
26+
}
27+
28+
// StartupHelpers.ts
29+
if (typeof __webpack_require__.x === "function") {
30+
__webpack_require__.x();
31+
} else {
32+
console.warn("[Module Federation] __webpack_require__.x is not a function, skipping startup extension");
33+
}
34+
```
1735

1836
**Why first**: These are independent safety fixes that improve stability without any dependencies.
1937

0 commit comments

Comments
 (0)