Skip to content

Commit 1c64e26

Browse files
feat: merge increment A - CI/CD and development infrastructure
- Update GitHub workflows with retry mechanisms and cache optimizations - Add cypress configuration for Next.js app router testing - Update project configurations for app router apps - Enhance cursor IDE rules and ignore patterns - Update root package.json with latest dependencies - Add enhanced package cursor rules 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent 44f3b1f commit 1c64e26

File tree

9 files changed

+261
-40
lines changed

9 files changed

+261
-40
lines changed

.cursor/rules/running-tests.mdc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
description:
3+
globs: packages/enhanced/*
4+
alwaysApply: false
5+
---
6+
use pnpm enhanced:jest to test this

.cursorignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
**/.cache/
33
**/.temp/
44
**/coverage/
5-
**/dist/
5+
!**/dist/
66

77
# Explicitly ignore specific packages
88
packages/typescript/

.github/workflows/build-and-test.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,11 @@ jobs:
5959
run: nproc
6060

6161
- name: Run Build for All
62-
run: npx nx run-many --targets=build --projects=tag:type:pkg --parallel=4 --skip-nx-cache
62+
uses: nick-fields/retry@v3
63+
with:
64+
max_attempts: 3
65+
timeout_minutes: 15
66+
command: npx nx run-many --targets=build --projects=tag:type:pkg --parallel=4
6367

6468
- name: Check Package Publishing Compatibility
6569
run: |

.github/workflows/release.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,18 @@ jobs:
4242
node-version: '18'
4343
cache: 'pnpm'
4444

45+
- name: Cache Browsers
46+
uses: actions/cache@v3
47+
id: browsers-cache
48+
with:
49+
path: |
50+
~/.cache/ms-playwright
51+
~/.cache/Cypress
52+
key: ${{ runner.os }}-browsers-${{ hashFiles('**/pnpm-lock.yaml') }}
53+
54+
- name: Set Nx SHA
55+
uses: nrwl/nx-set-shas@v3
56+
4557
- name: Install deps
4658
run: pnpm install
4759

apps/next-app-router/next-app-router-4000/project.json

Lines changed: 30 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,10 @@
66
"tags": [],
77
"targets": {
88
"build": {
9-
"executor": "@nx/next:build",
10-
"defaultConfiguration": "production",
9+
"executor": "nx:run-commands",
1110
"options": {
12-
"outputPath": "apps/next-app-router-4000"
13-
},
14-
"configurations": {
15-
"development": {
16-
"outputPath": "apps/next-app-router-4000"
17-
},
18-
"production": {}
11+
"command": "npm run build",
12+
"cwd": "apps/next-app-router/next-app-router-4000"
1913
},
2014
"dependsOn": [
2115
{
@@ -27,8 +21,8 @@
2721
"serve": {
2822
"executor": "nx:run-commands",
2923
"options": {
30-
"command": "pnpm dev",
31-
"cwd": "apps/next-app-router-4000"
24+
"command": "npm run dev",
25+
"cwd": "apps/next-app-router/next-app-router-4000"
3226
},
3327
"dependsOn": [
3428
{
@@ -38,9 +32,10 @@
3832
]
3933
},
4034
"export": {
41-
"executor": "@nx/next:export",
35+
"executor": "nx:run-commands",
4236
"options": {
43-
"buildTarget": "next-app-router-4000:build:production"
37+
"command": "npm run export",
38+
"cwd": "apps/next-app-router/next-app-router-4000"
4439
}
4540
},
4641
"lint": {
@@ -53,28 +48,43 @@
5348
"e2e": {
5449
"executor": "@nx/cypress:cypress",
5550
"options": {
56-
"cypressConfig": "apps/next-app-router-4000/cypress.config.ts",
51+
"cypressConfig": "apps/next-app-router/next-app-router-4000/cypress.config.ts",
5752
"testingType": "e2e",
58-
"baseUrl": "http://localhost:4000",
59-
"key": "27e40c91-5ac3-4433-8a87-651d10f51cf6"
53+
"baseUrl": "http://localhost:4000"
6054
},
6155
"configurations": {
6256
"production": {
63-
"devServerTarget": "next-app-router-4000:serve:production"
57+
"baseUrl": "http://localhost:4000"
6458
}
6559
}
6660
},
6761
"test:e2e": {
6862
"executor": "nx:run-commands",
6963
"options": {
70-
"parallel": true,
64+
"parallel": false,
7165
"commands": [
7266
{
73-
"command": "lsof -i :4000 || nx run next-app-router-4000:serve",
67+
"command": "echo 'Starting both Next.js servers in parallel...'",
68+
"forwardAllArgs": false
69+
},
70+
{
71+
"command": "pnpm app:next-router:dev &",
72+
"forwardAllArgs": false
73+
},
74+
{
75+
"command": "echo 'Waiting for servers to start...'",
76+
"forwardAllArgs": false
77+
},
78+
{
79+
"command": "sleep 25",
80+
"forwardAllArgs": false
81+
},
82+
{
83+
"command": "echo 'Running e2e tests...'",
7484
"forwardAllArgs": false
7585
},
7686
{
77-
"command": "sleep 4 && nx run next-app-router-4000:e2e",
87+
"command": "nx run next-app-router-4000:e2e",
7888
"forwardAllArgs": true
7989
}
8090
]

apps/next-app-router/next-app-router-4001/project.json

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,15 @@
11
{
22
"name": "next-app-router-4001",
33
"$schema": "../../node_modules/nx/schemas/project-schema.json",
4-
"sourceRoot": "apps/next-app-router-4001",
4+
"sourceRoot": "apps/next-app-router/next-app-router-4001",
55
"projectType": "application",
66
"tags": [],
77
"targets": {
88
"build": {
9-
"executor": "@nx/next:build",
10-
"defaultConfiguration": "production",
9+
"executor": "nx:run-commands",
1110
"options": {
12-
"outputPath": "apps/next-app-router-4001"
13-
},
14-
"configurations": {
15-
"development": {
16-
"outputPath": "apps/next-app-router-4001"
17-
},
18-
"production": {}
11+
"command": "npm run build",
12+
"cwd": "apps/next-app-router/next-app-router-4001"
1913
},
2014
"dependsOn": [
2115
{
@@ -27,8 +21,8 @@
2721
"serve": {
2822
"executor": "nx:run-commands",
2923
"options": {
30-
"command": "pnpm dev",
31-
"cwd": "apps/next-app-router-4001"
24+
"command": "npm run dev",
25+
"cwd": "apps/next-app-router/next-app-router-4001"
3226
},
3327
"dependsOn": [
3428
{
@@ -38,9 +32,10 @@
3832
]
3933
},
4034
"export": {
41-
"executor": "@nx/next:export",
35+
"executor": "nx:run-commands",
4236
"options": {
43-
"buildTarget": "next-app-router-4001:build:production"
37+
"command": "npm run export",
38+
"cwd": "apps/next-app-router/next-app-router-4001"
4439
}
4540
},
4641
"lint": {

incremental-merge-plan.md

Lines changed: 196 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,196 @@
1+
# Incremental Merge Plan: app-router-share-filter → share-filter
2+
3+
## Overview
4+
Systematically merge 67 applicable files from `app-router-share-filter` to `share-filter` branch in logical increments, with CI validation after each increment.
5+
6+
## Total Files to Merge: 67
7+
*Excluding: pnpm-lock.yaml, __mocks__, .node binaries, and cypress test files*
8+
9+
---
10+
11+
## Increment A: CI/CD and Development Infrastructure (9 files)
12+
**Priority**: High - Foundation changes that affect build/test processes
13+
14+
- [ ] `.github/workflows/build-and-test.yml`
15+
- [ ] `.github/workflows/release.yml`
16+
- [ ] `.cursor/rules/running-tests.mdc`
17+
- [ ] `.cursorignore`
18+
- [ ] `apps/next-app-router/next-app-router-4000/cypress.config.ts`
19+
- [ ] `apps/next-app-router/next-app-router-4000/project.json`
20+
- [ ] `apps/next-app-router/next-app-router-4001/project.json`
21+
- [ ] `packages/enhanced/.cursorrules`
22+
- [ ] `package.json`
23+
24+
**Post-Increment**: ✅ Run CI validation
25+
26+
---
27+
28+
## Increment B: Documentation and Changesets (10 files)
29+
**Priority**: Medium - Documentation and release notes
30+
31+
- [ ] `.changeset/ai-eager-wolf.md`
32+
- [ ] `.changeset/ai-happy-fox.md`
33+
- [ ] `.changeset/ai-hungry-bear.md`
34+
- [ ] `.changeset/ai-sleepy-fox.md`
35+
- [ ] `.changeset/ai-sleepy-tiger.md`
36+
- [ ] `.changeset/brown-badgers-fetch.md`
37+
- [ ] `.changeset/shy-snails-battle.md`
38+
- [ ] `apps/website-new/docs/en/configure/advanced-sharing.mdx`
39+
- [ ] `apps/website-new/docs/en/configure/experiments.mdx`
40+
- [ ] `apps/website-new/docs/en/guide/basic/vite.mdx`
41+
42+
**Post-Increment**: ✅ Run CI validation
43+
44+
---
45+
46+
## Increment C: Core Package Dependencies (6 files)
47+
**Priority**: High - Package.json updates that affect dependencies
48+
49+
- [ ] `packages/data-prefetch/package.json`
50+
- [ ] `packages/node/package.json`
51+
- [ ] `packages/runtime-core/package.json`
52+
- [ ] `apps/3000-home/package.json`
53+
- [ ] `apps/3001-shop/package.json`
54+
- [ ] `apps/3002-checkout/package.json`
55+
56+
**Post-Increment**: ✅ Run `pnpm install` and CI validation
57+
58+
---
59+
60+
## Increment D: Enhanced Library Core Changes (8 files)
61+
**Priority**: Critical - Core sharing plugin functionality
62+
63+
- [ ] `packages/enhanced/src/lib/container/RemoteModule.ts`
64+
- [ ] `packages/enhanced/src/lib/container/runtime/EmbedFederationRuntimePlugin.ts`
65+
- [ ] `packages/enhanced/src/lib/sharing/ConsumeSharedPlugin.ts`
66+
- [ ] `packages/enhanced/src/lib/sharing/resolveMatchedConfigs.ts`
67+
- [ ] `packages/enhanced/test/unit/container/RemoteModule.test.ts`
68+
- [ ] `packages/enhanced/test/unit/sharing/share.utils.test.ts`
69+
- [ ] `packages/nextjs-mf/src/internal.test.ts`
70+
- [ ] `packages/managers/__tests__/__snapshots__/SharedManager.spec.ts.snap`
71+
72+
**Post-Increment**: ✅ Run tests and CI validation
73+
74+
---
75+
76+
## Increment E: Bridge and Data Prefetch Updates (4 files)
77+
**Priority**: High - React 19 compatibility and bridge functionality
78+
79+
- [ ] `packages/bridge/bridge-react/__tests__/bridge.spec.tsx`
80+
- [ ] `packages/bridge/bridge-react/src/v19.ts`
81+
- [ ] `packages/data-prefetch/__tests__/react.spec.ts`
82+
- [ ] `packages/modernjs/src/runtime/AwaitDataFetch.tsx`
83+
84+
**Post-Increment**: ✅ Run tests and CI validation
85+
86+
---
87+
88+
## Increment F: Next.js App Router Applications (15 files)
89+
**Priority**: Medium - App router demo applications
90+
91+
- [ ] `apps/next-app-router/next-app-router-4000/app/context/context-click-counter.tsx`
92+
- [ ] `apps/next-app-router/next-app-router-4000/app/error-handling/[categorySlug]/[subCategorySlug]/error.tsx`
93+
- [ ] `apps/next-app-router/next-app-router-4000/app/error-handling/[categorySlug]/error.tsx`
94+
- [ ] `apps/next-app-router/next-app-router-4000/app/error-handling/error.tsx`
95+
- [ ] `apps/next-app-router/next-app-router-4000/app/hooks/page.tsx`
96+
- [ ] `apps/next-app-router/next-app-router-4000/app/layout.tsx`
97+
- [ ] `apps/next-app-router/next-app-router-4000/app/page.tsx`
98+
- [ ] `apps/next-app-router/next-app-router-4000/next.config.js`
99+
- [ ] `apps/next-app-router/next-app-router-4000/package.json`
100+
- [ ] `apps/next-app-router/next-app-router-4000/pages/router-test.tsx`
101+
- [ ] `apps/next-app-router/next-app-router-4000/ui/address-bar.tsx`
102+
- [ ] `apps/next-app-router/next-app-router-4001/app/demo/page.tsx`
103+
- [ ] `apps/next-app-router/next-app-router-4001/next.config.js`
104+
- [ ] `apps/next-app-router/next-app-router-4001/package.json`
105+
- [ ] `apps/next-app-router/next-app-router-4001/pages/router-test.tsx`
106+
107+
**Post-Increment**: ✅ Run CI validation
108+
109+
---
110+
111+
## Increment G: Next.js Demo Apps Package Updates (8 files)
112+
**Priority**: Low - Type definitions and component updates
113+
114+
- [ ] `apps/3000-home/next-env.d.ts`
115+
- [ ] `apps/3001-shop/next-env.d.ts`
116+
- [ ] `apps/3002-checkout/next-env.d.ts`
117+
- [ ] `apps/next-app-router/next-app-router-4000/next-env.d.ts`
118+
- [ ] `apps/next-app-router/next-app-router-4001/next-env.d.ts`
119+
- [ ] `apps/next-app-router/next-app-router-4001/app/hooks/_components/router-context-layout.tsx`
120+
- [ ] `apps/next-app-router/next-app-router-4001/app/isr/layout.tsx`
121+
- [ ] `apps/next-app-router/next-app-router-4001/app/layout.tsx`
122+
- [ ] `apps/next-app-router/next-app-router-4001/app/layouts/[categorySlug]/layout.tsx`
123+
- [ ] `apps/next-app-router/next-app-router-4001/app/page.tsx`
124+
- [ ] `apps/next-app-router/next-app-router-4001/ui/global-nav.tsx`
125+
126+
**Post-Increment**: ✅ Run CI validation
127+
128+
---
129+
130+
## Increment H: Runtime Core and Node Updates (5 files)
131+
**Priority**: Medium - Runtime functionality improvements
132+
133+
- [ ] `packages/runtime-core/__tests__/semver.spec.ts`
134+
- [ ] `packages/runtime-core/src/constant.ts`
135+
- [ ] `packages/runtime-core/src/core.ts`
136+
- [ ] `packages/runtime-core/src/remote/index.ts`
137+
- [ ] `packages/node/src/runtimePlugin.ts`
138+
139+
**Post-Increment**: ✅ Run tests and CI validation
140+
141+
---
142+
143+
## Increment I: Miscellaneous and New Features (4 files)
144+
**Priority**: Low - New features and cleanup
145+
146+
- [ ] `main.py` (New Python script - 196 lines)
147+
- [ ] `apps/next-app-router/next-app-router-4001/classic/button.tsx` (Deleted file)
148+
- [ ] `apps/next-app-router/next-app-router-4001/rsc/button.tsx` (Deleted file)
149+
- [ ] `apps/next-app-router/next-app-router-4001/ui/random.tsx` (Deleted file)
150+
151+
**Post-Increment**: ✅ Run CI validation
152+
153+
---
154+
155+
## Execution Strategy
156+
157+
### For Each Increment:
158+
1. **Checkout files** from `origin/app-router-share-filter`
159+
2. **Review changes** - ensure they're applicable and safe
160+
3. **Resolve conflicts** if any
161+
4. **Commit changes** with descriptive message
162+
5. **Push to remote**
163+
6. **Wait for CI** to pass before proceeding
164+
7. **Mark increment complete**
165+
166+
### Commands Template:
167+
```bash
168+
# For each file in increment
169+
git checkout origin/app-router-share-filter -- <file-path>
170+
171+
# Review and commit
172+
git add .
173+
git commit -m "feat: merge increment X - <description>
174+
175+
🤖 Generated with [Claude Code](https://claude.ai/code)
176+
177+
Co-Authored-By: Claude <[email protected]>"
178+
179+
# Push and wait for CI
180+
git push origin share-filter
181+
```
182+
183+
### Success Criteria:
184+
- ✅ All 67 files successfully merged
185+
- ✅ CI passes after each increment
186+
- ✅ No regression in existing functionality
187+
- ✅ Enhanced layer support features preserved
188+
- ✅ Branch ready for production use
189+
190+
---
191+
192+
## Notes:
193+
- **Excluded large files**: pnpm-lock.yaml (handle separately), __mocks__ (400K+ lines), cypress tests
194+
- **Critical increments**: A, C, D, E (affect core functionality)
195+
- **Optional increments**: B, F, G, I (documentation and demos)
196+
- **Stop and investigate** if any increment fails CI

0 commit comments

Comments
 (0)