Bun.Transpiler: default autoImportJSX to true for the automatic runtime - #35557
Open
robobun wants to merge 15 commits into
Open
Bun.Transpiler: default autoImportJSX to true for the automatic runtime#35557robobun wants to merge 15 commits into
robobun wants to merge 15 commits into
Claude / Claude Code Review
completed
Jul 27, 2026 in 16m 52s
Code review found 3 potential issues
Found 1 candidates, confirmed 3. See review comments for details.
Details
| Severity | Count |
|---|---|
| 🔴 Important | 0 |
| 🟡 Nit | 3 |
| 🟣 Pre-existing | 0 |
| Severity | File:Line | Issue |
|---|---|---|
| 🟡 Nit | src/js_parser/parse/parse_entry.rs:486-499 |
scanImports() misses the createElement ("react") record for key-after-spread JSX, disagreeing with scan() |
Annotations
Check warning on line 499 in src/js_parser/parse/parse_entry.rs
claude / Claude Code Review
scanImports() misses the createElement ("react") record for key-after-spread JSX, disagreeing with scan()
Dropping the second `add_import_record(.., classic_import_source)` also drops coverage for the key-after-spread `createElement` fallback: for `export default <div {...obj} key="after" />;` under the automatic runtime, `.scan().imports` → `[{path:"react"}]` (per this PR's own "key-after-spread emits createElement with an import" test) while `.scanImports()` → `[{path:"react/jsx-dev-runtime"}]` — adding that case to the new `.scanImports() agrees with .scan()` `it.each` matrix would fail. Since `c
Loading