chore: report React Compiler migration errors#8068
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
There was a problem hiding this comment.
Pull request overview
Adds React Compiler diagnostic context to the migration status report so the GitHub Actions job summary shows why each “not migrated” file is failing/skipped, making the report more actionable for ongoing migration work.
Changes:
- Runs per-file Babel transforms with
babel-plugin-react-compilerconfigured withpanicThreshold: 'all_errors'. - Captures React Compiler
logger.logEventoutput (plusCompilerError.detailswhen thrown) and renders a new “Compiler errors” column for not-migrated files. - Refactors output to a small
write()helper and adds formatting/escaping for Markdown table cells.
Show a summary per file
| File | Description |
|---|---|
| script/react-compiler-migration-status.mts | Adds React Compiler diagnostics and includes per-file error/skip reasons in the generated migration status report. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 0
- Review effort level: Low
Updates a column to our react compiler migration helper that reports on the error. You can see the result here in the job summary: https://github.com/primer/react/actions/runs/28247127773
Changelog
New
Changed
panicThreshold: 'all_errors'and collectlogger.logEventoutput per file.Removed
Rollout strategy
Testing & Reviewing
node script/react-compiler-migration-status.mtsnpx eslint --fix script/react-compiler-migration-status.mtsnpm run type-checkMerge checklist