-
-
Notifications
You must be signed in to change notification settings - Fork 348
feat(enhanced): add include/exclude filtering support for shared modules #3904
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
ScriptedAlchemy
wants to merge
17
commits into
feat/enhanced-hoist-container-refs
Choose a base branch
from
feat/basic-share-filtering
base: feat/enhanced-hoist-container-refs
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
feat(enhanced): add include/exclude filtering support for shared modules #3904
ScriptedAlchemy
wants to merge
17
commits into
feat/enhanced-hoist-container-refs
from
feat/basic-share-filtering
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
- Add testRequestFilters and addSingletonFilterWarning utilities - Update ConsumeSharedPlugin with version and request filtering - Update ProvideSharedPlugin with version and request filtering - Update schemas to include include/exclude filter properties - Add comprehensive unit tests for filtering functionality - Add config test cases for consume and provide filtering 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
🦋 Changeset detectedLatest commit: a1e7b2c 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. |
🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Fixes TypeScript error TS2742 where inferred type could not be named without portable React types reference. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
- Fixed main entry path in project.json to correct location - Added extends to tsconfig.json to inherit base configuration - Added dependsOn configuration for proper build dependencies 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
- add include/exclude properties to share plugin schema - update share plugin to pass through include/exclude filters to underlying plugins - generate updated typescript definitions and validation schemas - support version and request filtering for both include and exclude - part of pr4: basic share filtering - include/exclude by version
…ugin and ConsumeSharedPlugin - Add include/exclude version filtering support to ProvideSharedPlugin - Add include/exclude version filtering support to ConsumeSharedPlugin - Implement proper filtering logic that prevents filtered modules from being shared - Add type definitions for IncludeExcludeOptions interface - Update provide-filters integration test with proper share scope initialization - Fix unit test mock compilation to extend actual Compilation class - All tests passing (7/7 provide-filters tests, 13/13 unit tests) This implements PR4 (Basic Share Filtering - Include/Exclude by Version) requirements by allowing filtering of shared modules based on semantic version ranges. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
…hare-filter branch This directory was accidentally created during development but doesn't exist in the original share-filter branch and was causing compilation errors. The provide-filters test is working correctly and all filtering functionality is properly implemented for PR4 (Basic Share Filtering).
60e2ad7
to
9bab6fb
Compare
- Accept utilities and webpack dependencies in app package.json files - Use tsconfig.lib.json for rsbuild-plugin project - Accept incoming pnpm-lock.yaml changes 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
- Add import caching to SDK importNodeModule to prevent circular calls - Add import caching to node runtime plugin importNodeModule - Add ESM module caching to prevent loadModule recursion - Use direct dynamic import in vm.Script fallback to avoid cycles - Add regression test for maximum call stack exceeded scenario Fixes RangeError: Maximum call stack size exceeded when NextJS apps use Module Federation with both SDK and node runtime plugin importing each other's modules through importModuleDynamically callbacks. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Now that import caching prevents infinite recursion, we can use the proper importNodeModule function instead of the workaround in vm.Script importModuleDynamically fallback. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
…dule directly Remove vm.constants?.USE_MAIN_CONTEXT_DEFAULT_LOADER fallback since caching prevents recursion. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
…OADER Prefer using vm.constants.USE_MAIN_CONTEXT_DEFAULT_LOADER when available, fallback to cached importNodeModule to prevent recursion. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Export the cache and clear it in beforeEach to ensure test isolation. The caching mechanism was causing tests to reuse cached promises from previous tests instead of running the intended mocked behavior. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Use direct export declaration instead of separate export statement to match the pattern used by all other exports in the file. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
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
Implements basic share filtering functionality for ConsumeSharedPlugin and ProvideSharedPlugin, allowing fine-grained control over which shared modules are consumed or provided based on version requirements and request patterns.
Part of incremental PR plan - Step 4: Basic Share Filtering
Features Added
Technical Implementation
ConsumeSharedPlugin
with version and request filtering logicProvideSharedPlugin
with version and request filtering logictestRequestFilters
utility for request pattern matchingaddSingletonFilterWarning
utility for singleton filter warningsTest Plan
🤖 Generated with Claude Code