Skip to content

feat(enhanced): add request pattern filtering support (PR5) #3908

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: feat/basic-share-filtering
Choose a base branch
from

Conversation

ScriptedAlchemy
Copy link
Member

Summary

This PR implements PR 5: Request Pattern Filtering from the incremental PR plan, adding support for include/exclude.request filtering in shared modules.

Changes Made

  • ConsumeSharedPlugin: Added request filtering for direct matches and resolved consumes
  • ProvideSharedPlugin: Added request filtering for direct matches
  • Integration Tests: Extended provide-filters test with request pattern filtering scenarios
  • Unit Tests: Enhanced utils-filtering.test.ts with comprehensive coverage of filtering utilities

API Support Added

shared: {
  "./request-filter/": {
    include: { request: /components/ }
  }
}

Implementation Details

  • Built on existing filtering infrastructure from PR4
  • Used existing testRequestFilters() utility to apply request filtering
  • Added filtering to the missing code paths where direct matches weren't being filtered
  • Comprehensive test coverage for both string and RegExp request patterns

Test Results

  • ✅ All unit tests pass (359 tests)
  • ✅ All integration tests pass
  • ✅ Build successful with no TypeScript errors

Dependencies

  • Depends on: PR4 filtering infrastructure (already present in base branch)
  • Enables: Request pattern-based filtering for shared modules
  • Scope: Small, focused changes (~6 files) with low risk

This completes the PR5 scope from the incremental plan and prepares for PR6 (Fallback Version Support).

Test plan

  • Run unit tests: npx nx test enhanced
  • Run integration tests for provide-filters
  • Verify build passes: npx nx build enhanced
  • Test request filtering with RegExp patterns
  • Test request filtering with string patterns
  • Test include/exclude filter combinations

🤖 Generated with Claude Code

- Add request filtering for direct matches in ConsumeSharedPlugin
- Add request filtering for resolved consumes in ConsumeSharedPlugin
- Add request filtering for direct matches in ProvideSharedPlugin
- Extend provide-filters integration tests with request pattern filtering
- Add comprehensive unit tests for filtering utilities

This implements PR5 from the incremental PR plan: Request Pattern Filtering
- Enables include/exclude.request filtering for shared modules
- Builds on existing filtering infrastructure from PR4
- Supports both string and RegExp request patterns

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Copy link

changeset-bot bot commented Jul 15, 2025

⚠️ No Changeset found

Latest commit: 9db1443

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

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

Successfully merging this pull request may close these issues.

1 participant