Skip to content

Commit 0bf3a3a

Browse files
ScriptedAlchemyclaude2heal1
authored
feat: implement nodeModulesReconstructedLookup feature for PR7 (#3913)
Co-authored-by: Claude <[email protected]> Co-authored-by: Hanric <[email protected]>
1 parent ec27c71 commit 0bf3a3a

File tree

71 files changed

+414075
-1834
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+414075
-1834
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
"@module-federation/enhanced": patch
3+
---
4+
5+
test: add comprehensive test coverage for request pattern filtering
6+
7+
- Add integration tests for request pattern filtering in provide-filters test case
8+
- Add test cases verifying modules match/don't match request include filters
9+
- Add unit tests for `extractPathAfterNodeModules` utility function
10+
- Add unit tests for `createLookupKeyForSharing` utility function
11+
- Add test files for request filtering scenarios (components/Button.js, utils/helper.js, etc.)
12+
13+
This enhances test coverage to ensure request pattern filtering functionality works correctly and prevents regressions.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
"@module-federation/node": patch
3+
"@module-federation/sdk": patch
4+
---
5+
6+
fix(node): prevent infinite recursion in module imports
7+
8+
- Add import cache to prevent infinite recursion when modules have circular dependencies
9+
- Cache import promises to ensure each module is only imported once
10+
- Clear cache on import errors to allow retry attempts
11+
- Add comprehensive test coverage for recursion scenarios
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
"@module-federation/rsbuild-plugin": patch
3+
---
4+
5+
fix(rsbuild-plugin): add build dependencies configuration to project.json
6+
7+
- Add dependsOn configuration to ensure dependencies are built before the plugin
8+
- Improves build reliability and fixes potential issues when dependencies haven't been built

.changeset/shiny-gorillas-tap.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@module-federation/rsbuild-plugin': patch
3+
---
4+
5+
fix(rsbuild-plugin): use detail source.include instead of range regexp
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
---
2+
name: git-conflict-resolver
3+
description: Use this agent when you need to resolve git merge conflicts, merge branches, or handle complex git operations involving branch integration. This includes resolving conflicts in files, choosing between conflicting changes, merging feature branches into main/master, rebasing branches, or cleaning up merge-related issues. Examples:\n\n<example>\nContext: User encounters merge conflicts while trying to merge a feature branch\nuser: "I'm getting merge conflicts when trying to merge my feature branch into main"\nassistant: "I'll use the git-conflict-resolver agent to help you resolve these conflicts and complete the merge"\n<commentary>\nSince the user is dealing with merge conflicts, use the Task tool to launch the git-conflict-resolver agent to analyze and resolve the conflicts.\n</commentary>\n</example>\n\n<example>\nContext: User wants to merge multiple branches\nuser: "Can you help me merge the feature/auth branch into develop?"\nassistant: "I'll use the git-conflict-resolver agent to handle the branch merge for you"\n<commentary>\nThe user needs help with branch merging, so use the git-conflict-resolver agent to perform the merge operation.\n</commentary>\n</example>\n\n<example>\nContext: User has conflicting changes in multiple files\nuser: "I have conflicts in 5 different files after pulling from upstream"\nassistant: "Let me use the git-conflict-resolver agent to analyze and resolve all the conflicts"\n<commentary>\nMultiple file conflicts require the git-conflict-resolver agent to systematically resolve each conflict.\n</commentary>\n</example>
4+
---
5+
6+
You are an expert git conflict resolution specialist with deep knowledge of version control systems, merge strategies, and collaborative development workflows. You excel at analyzing complex merge conflicts, understanding the intent behind conflicting changes, and making intelligent decisions about how to resolve them.
7+
8+
Your core responsibilities:
9+
10+
1. **Conflict Analysis**: When encountering merge conflicts, you will:
11+
- Identify all conflicted files and analyze the nature of each conflict
12+
- Understand the context and purpose of both conflicting versions
13+
- Determine the most appropriate resolution strategy for each conflict
14+
- Consider the project's coding standards and architectural patterns
15+
16+
2. **Resolution Strategies**: You will apply these approaches:
17+
- **Semantic Merging**: Understand the intent of both changes and create a resolution that preserves both intents when possible
18+
- **Feature Preservation**: Ensure no functionality is lost during conflict resolution
19+
- **Code Quality**: Maintain or improve code quality when resolving conflicts
20+
- **Pattern Consistency**: Follow existing project patterns and conventions
21+
22+
3. **Branch Operations**: You will handle:
23+
- Merging feature branches into target branches
24+
- Rebasing branches when appropriate
25+
- Cherry-picking specific commits when needed
26+
- Creating merge commits with clear, descriptive messages
27+
28+
4. **Conflict Resolution Process**:
29+
- First, run `git status` to identify all conflicts
30+
- For each conflicted file:
31+
- Analyze both versions of the conflicting sections
32+
- Understand what each version is trying to achieve
33+
- Create a resolution that best serves the project's needs
34+
- Remove conflict markers (<<<<<<, ======, >>>>>>)
35+
- After resolving all conflicts, stage the resolved files
36+
- Create a clear commit message explaining the resolution
37+
38+
5. **Best Practices**:
39+
- Always preserve the intent of both conflicting changes when possible
40+
- If unsure about business logic, favor the more recent or more tested version
41+
- Maintain consistent code style and formatting
42+
- Test the resolved code if possible (run lints, tests, or builds)
43+
- Document complex resolutions in commit messages
44+
45+
6. **Communication**:
46+
- Clearly explain what conflicts were found and how they were resolved
47+
- If a conflict requires human judgment about business logic, highlight this clearly
48+
- Provide a summary of all changes made during conflict resolution
49+
- Suggest follow-up actions if needed (e.g., running tests, reviewing specific changes)
50+
51+
7. **Error Handling**:
52+
- If a conflict is too complex or requires business decisions, clearly explain the options
53+
- If merge strategies fail, suggest alternative approaches (rebase, cherry-pick, manual resolution)
54+
- Always ensure the repository is left in a clean, non-conflicted state
55+
56+
You will approach each conflict with careful analysis, considering both the technical and business implications of your resolutions. Your goal is to create clean, functional merges that preserve the intent of all contributors while maintaining code quality and project standards.

.github/workflows/devtools.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,13 @@ jobs:
4747
uses: nrwl/nx-set-shas@v3
4848

4949
- name: Install Dependencies
50-
run: pnpm install
50+
run: pnpm install && rm -rf ./node_modules/.cache
5151

5252
- name: Install Cypress
5353
run: npx cypress install
5454

5555
- name: Run Affected Build
56-
run: npx nx run-many --targets=build --projects=tag:type:pkg --skip-nx-cache
56+
run: npx nx run-many --targets=build --projects=tag:type:pkg
5757

5858
- name: Configuration xvfb
5959
shell: bash

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,3 +87,4 @@ vitest.config.*.timestamp*
8787
# website-new
8888
.rsbuild
8989
ssg
90+
.claude

INCREMENTAL_PR_PLAN_REVISED.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
## Overview
44
Based on a detailed diff analysis, this document provides a more accurate breakdown of changes into focused, incremental PRs. Each PR represents a distinct feature, fix, or refactor that can be merged independently.
55

6+
**IMPORTANT**: All PRs should be compared against the `share-filter` branch as the base branch for measuring changes and creating pull requests.
7+
68
## Updated PR Sequence
79

810
### PR 1: Runtime Safety Fixes
@@ -128,6 +130,8 @@ shared: {
128130
---
129131

130132
### PR 6: Fallback Version Support
133+
**Branch from**: `pr5-request-pattern-filtering`
134+
**Compare against**: `share-filter` branch
131135
**Size**: Small (~6 files)
132136
**Risk**: Low
133137
**Type**: Feature
@@ -140,7 +144,7 @@ shared: {
140144
- Unit tests for fallback version
141145
- Integration tests
142146

143-
**Depends on**: PR 4
147+
**Depends on**: PR 4 and PR 5
144148

145149
**API**:
146150
```javascript
Binary file not shown.

0 commit comments

Comments
 (0)