Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
2b484ed
feat: add `isAddedDiffFile` and `isRemovedDiffFile` git util functions
chrispader Nov 27, 2025
13e2d8d
feat: check for added files and manual memoization
chrispader Nov 27, 2025
7319f32
only print failures from healthcheck
chrispader Nov 27, 2025
fcc3e77
fix: improve output and group together compiler errors with auto memo…
chrispader Nov 28, 2025
0380a13
refactor: move around functions
chrispader Nov 28, 2025
e503e0e
only print failures if there are any
chrispader Nov 28, 2025
47d2d5a
refactor: no condition assignment
chrispader Nov 28, 2025
3bb4e04
store manual memo matches
chrispader Nov 28, 2025
6f46273
Merge branch 'main' into @chrispader/react-compiler-check-phase-2
chrispader Nov 28, 2025
a98620e
fix: `isAddedFile` util not working correctly
chrispader Nov 28, 2025
738e50b
Create RCAutoMemoComponent.tsx
chrispader Nov 28, 2025
8795d76
fix: print manual memo usages individually
chrispader Nov 28, 2025
52714ec
fix: no memo message
chrispader Nov 28, 2025
3604b75
fix: update manual memo message and log specific manual memo keyword
chrispader Nov 28, 2025
1842f67
feat: enable auto-memo enforcement in workflow
chrispader Nov 28, 2025
644d4d9
Update RCAutoMemoComponent.tsx
chrispader Nov 28, 2025
f49d6f6
fix: invalid check flag
chrispader Nov 28, 2025
6e5496b
Update RCAutoMemoComponent.tsx
chrispader Nov 28, 2025
01d84d6
fix: TS errors
chrispader Nov 28, 2025
951b21b
add logs
chrispader Nov 28, 2025
5ad1b13
add log
chrispader Nov 28, 2025
83313ac
fix: NPM script params need to be properly forwarded
chrispader Nov 28, 2025
891fd33
chore: change workflow so that it can fail
chrispader Nov 28, 2025
c8cbd30
remove logs
chrispader Nov 28, 2025
3443b12
remove log
chrispader Nov 28, 2025
a7157e5
docs: add JSDoc comments
chrispader Nov 28, 2025
3f60d64
fix: fail test if new files are not RC compatible
chrispader Nov 28, 2025
999b482
fix: pass test if no enforced added components
chrispader Dec 2, 2025
778bebe
fix: update final error message
chrispader Dec 2, 2025
292eeef
fix: missing continue
chrispader Dec 2, 2025
40de5ff
fix: find multiple regex matches
chrispader Dec 2, 2025
b1f2952
fix: logic error
chrispader Dec 2, 2025
3af2da6
fix: also check for Git diff hunk `oldCount`
chrispader Dec 2, 2025
b7b1179
test: add unit tests for `Git.isAddedFile`
chrispader Dec 2, 2025
3f16496
Update RCAutoMemoComponent.tsx
chrispader Dec 2, 2025
e7a97ef
chore: run `npm run gh-actions-build`
chrispader Dec 2, 2025
95f4cdd
fix: sort manual memoization matches
chrispader Dec 2, 2025
e734c16
fix: update error message to include backquotes
chrispader Dec 2, 2025
4ba3f14
fix: optimize regex matching for manual memoization patterns
chrispader Dec 3, 2025
d8388f1
Merge branch 'main' into @chrispader/react-compiler-check-phase-2
chrispader Dec 3, 2025
673a594
Merge branch 'main' into pr/76239
chrispader Dec 9, 2025
1519dee
Update scripts/react-compiler-compliance-check.ts
chrispader Dec 9, 2025
25c720e
fix: extract `getLineAndColumnFromIndex` to FileUtils and refactor
chrispader Dec 9, 2025
f60a205
feat: add error handling to `getLineAndColumnFromIndex`
chrispader Dec 9, 2025
16c5e0f
Create ScriptFileUtilsTest.ts
chrispader Dec 9, 2025
3170ca5
refactor: FileUtils imports/exports
chrispader Dec 9, 2025
6b284c5
Delete RCAutoMemoComponent.tsx
chrispader Dec 9, 2025
4bd4f64
refactor: re-structure `FileUtils` as class-like export
chrispader Dec 9, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12746,6 +12746,24 @@ class Git {
hasChanges: files.length > 0,
};
}
/**
* Check if a file from a Git diff is added.
*
* @param file - The file to check
* @returns true if the file is added, false otherwise
*/
static isAddedDiffFile(file) {
const hasAddedLines = file.addedLines.size > 0;
const hasModifiedLines = file.modifiedLines.size > 0;
const hasRemovedLines = file.removedLines.size > 0;
if (!hasAddedLines || hasModifiedLines || hasRemovedLines) {
return false;
}
if (file.hunks.length === 1 && file.hunks.at(0)?.oldStart === 0 && file.hunks.at(0)?.oldCount === 0) {
return true;
}
return false;
}
/**
* Calculate the line number for a diff line based on the hunk and line type.
*/
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/react-compiler-compliance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
# In phase 0 of the React Compiler compliance check rollout,
# we want to report failures but don't fail the check.
# See https://github.com/Expensify/App/issues/68765#issuecomment-3487317881
run: npm run react-compiler-compliance-check check-changed -- --filterByDiff || true
run: npm run react-compiler-compliance-check check-changed -- --filterByDiff --enforceNewComponents
env:
CI: true
GITHUB_TOKEN: ${{ github.token }}
Loading
Loading