-
-
Notifications
You must be signed in to change notification settings - Fork 357
fix(enhanced): add runtime safety checks to prevent errors #3900
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
🦋 Changeset detectedLatest commit: f184f46 The changes in this PR will be included in the next version bump. This PR includes changesets to release 33 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
✅ Deploy Preview for module-federation-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
- Add typeof check for oldStartup function in EmbedFederationRuntimeModule - Log warning when oldStartup is not a function - Add typeof check for __webpack_require__.x in StartupHelpers - Log warning when __webpack_require__.x is not a function These defensive checks prevent runtime errors when expected functions don't exist in certain build configurations. The warnings help developers debug issues. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
d8773d7
to
9d5ace9
Compare
ScriptedAlchemy
added a commit
that referenced
this pull request
Jul 12, 2025
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 <[email protected]>
🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
- Renamed variable from oldStartup to prevStartup in EmbedFederationRuntimeModule - Updated all references including typeof checks and console warnings - Updated documentation files to reflect the improved naming
…fix/runtime-safety-checks
2heal1
approved these changes
Jul 15, 2025
…d webpack in app package.jsons
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Changes
typeof oldStartup === 'function'
check before calling oldStartup()typeof __webpack_require__.x === "function"
check before calling webpack_require.x()Why
These defensive checks prevent runtime errors when expected functions don't exist in certain build configurations. This improves stability and prevents edge case failures.
Test Plan
Related
🤖 Generated with Claude Code