Skip to content

Commit ee3b106

Browse files
frankieyanclaude
andauthored
chore!: Bump node version requirement to v22.22; integrate react-compiler-tracker (#994)
* chore: Add React Compiler tracker * build: Add React Compiler tracker to pre-commit hook Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * ci: Add React Compiler compatibility check to PR workflow Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * Bump node version to 22.22 * chore: Update engines.node to match react-compiler-tracker requirement Bump minimum Node.js version from ^22.14.0 to ^22.22.0 to align with the @doist/react-compiler-tracker dependency requirement. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * chore: Update package-lock.json with new engines requirement Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 64b40eb commit ee3b106

6 files changed

Lines changed: 248 additions & 67 deletions

File tree

.github/workflows/pull_request.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ jobs:
1010
steps:
1111
- name: Checkout repository
1212
uses: actions/checkout@v5
13+
with:
14+
fetch-depth: 0
1315

1416
- name: Prepare Node.js environment
1517
uses: actions/setup-node@v6
@@ -28,6 +30,16 @@ jobs:
2830
if: ${{ steps.node-modules-cache.outputs.cache-hit != 'true' }}
2931
run: npm ci
3032

33+
- name: Check React Compiler compatibility
34+
run: |
35+
CHANGED_FILES=$(git diff --name-only --diff-filter=ACMR origin/${{ github.base_ref }}...HEAD -- 'src/**/*.ts' 'src/**/*.tsx' 'src/**/*.js' 'src/**/*.jsx' | tr '\n' ' ')
36+
if [ -n "$CHANGED_FILES" ]; then
37+
echo "Checking React Compiler compatibility for: $CHANGED_FILES"
38+
npx @doist/react-compiler-tracker --check-files $CHANGED_FILES
39+
else
40+
echo "No source files changed, skipping React Compiler check"
41+
fi
42+
3143
- run: npm run lint
3244
- run: npm run type-check
3345
- run: npm test

.node-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
22.14
1+
22.22

.react-compiler.rec.json

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"recordVersion": 1,
3+
"react-compiler-version": "1.0.0",
4+
"files": {
5+
"src/checkbox-field/checkbox-field.tsx": {
6+
"CompileError": 1
7+
},
8+
"src/checkbox-field/use-fork-ref.ts": {
9+
"CompileError": 1
10+
},
11+
"src/components/keyboard-shortcut/keyboard-shortcut.tsx": {
12+
"CompileError": 1
13+
},
14+
"src/hooks/use-previous/use-previous.ts": {
15+
"CompileError": 1
16+
},
17+
"src/menu/menu.tsx": {
18+
"CompileError": 2
19+
},
20+
"src/tabs/tabs.tsx": {
21+
"CompileError": 4
22+
},
23+
"src/tooltip/tooltip.tsx": {
24+
"CompileError": 1
25+
},
26+
"src/utils/common-helpers.ts": {
27+
"CompileError": 2
28+
}
29+
}
30+
}

lint-staged.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
module.exports = {
22
'./**/*.{js,jsx,ts,tsx,md,mdx,json,css,scss,less}': ['prettier --write'],
33
'./**/*.{js,jsx,ts,tsx}': ['npx eslint --format codeframe --fix'],
4+
'src/**/*.{js,jsx,ts,tsx}': ['npx @doist/react-compiler-tracker --stage-record-file'],
45
}

0 commit comments

Comments
 (0)