Skip to content

refactor: rename container hooks for clarity and consistency #3902

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

Open
wants to merge 3 commits into
base: fix/runtime-safety-checks
Choose a base branch
from

Conversation

ScriptedAlchemy
Copy link
Member

Summary

  • Renamed addContainerEntryModule to addContainerEntryDependency for clarity
  • Renamed addFederationRuntimeModule to addFederationRuntimeDependency for consistency
  • Added new addRemoteDependency hook for tracking remote module instantiation
  • Updated all hook usages across the codebase to use the new names

Details

This is an internal refactoring that improves code clarity by using more accurate terminology:

  • "Dependency" better reflects what these hooks are actually adding (dependencies to the compilation)
  • The new naming is more consistent with webpack's internal naming conventions
  • No breaking changes to external APIs - this is purely internal refactoring

Files Changed

  • packages/enhanced/src/lib/container/runtime/FederationModulesPlugin.ts - Updated hook definitions
  • packages/enhanced/src/lib/container/ContainerPlugin.ts - Updated hook calls
  • packages/enhanced/src/lib/container/runtime/FederationRuntimePlugin.ts - Updated hook calls
  • packages/enhanced/src/lib/container/runtime/EmbedFederationRuntimePlugin.ts - Updated hook taps
  • packages/enhanced/src/lib/container/HoistContainerReferencesPlugin.ts - Updated hook taps
  • packages/enhanced/src/lib/container/ContainerReferencePlugin.ts - Added addRemoteDependency call
  • packages/nextjs-mf/src/plugins/container/InvertedContainerPlugin.ts - Updated hook tap

🤖 Generated with Claude Code

ScriptedAlchemy and others added 2 commits July 11, 2025 23:29
- Renamed addContainerEntryModule to addContainerEntryDependency
- Renamed addFederationRuntimeModule to addFederationRuntimeDependency
- Added new addRemoteDependency hook for remote module tracking
- Updated all hook usages across the codebase
- Internal refactoring with no breaking changes
Copy link

changeset-bot bot commented Jul 12, 2025

🦋 Changeset detected

Latest commit: 22eaadc

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 33 packages
Name Type
@module-federation/enhanced Patch
@module-federation/nextjs-mf Patch
@module-federation/modern-js Patch
@module-federation/node Patch
@module-federation/rsbuild-plugin Patch
@module-federation/rspress-plugin Patch
@module-federation/storybook-addon Patch
@module-federation/modernjsapp Patch
remote5 Patch
website-new Patch
@module-federation/runtime Patch
@module-federation/rspack Patch
@module-federation/webpack-bundler-runtime Patch
@module-federation/sdk Patch
@module-federation/runtime-tools Patch
@module-federation/managers Patch
@module-federation/manifest Patch
@module-federation/dts-plugin Patch
@module-federation/third-party-dts-extractor Patch
@module-federation/devtools Patch
@module-federation/bridge-react Patch
@module-federation/bridge-vue3 Patch
@module-federation/bridge-shared Patch
@module-federation/bridge-react-webpack-plugin Patch
@module-federation/retry-plugin Patch
@module-federation/data-prefetch Patch
@module-federation/error-codes Patch
@module-federation/inject-external-runtime-core-plugin Patch
@module-federation/runtime-core Patch
create-module-federation Patch
@module-federation/cli Patch
@module-federation/esbuild Patch
@module-federation/utilities Patch

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant