Skip to content

Don't change ESM evaluation order when the Node compile cache is enabled - #37179

Open
robobun wants to merge 4 commits into
mainfrom
farm/b1ae39e5/compile-cache-eval-order
Open

Don't change ESM evaluation order when the Node compile cache is enabled#37179
robobun wants to merge 4 commits into
mainfrom
farm/b1ae39e5/compile-cache-eval-order

module: route the Node compile cache through the concurrent transpiler

042f257
Select commit
Loading
Failed to load commit list.
Claude / Claude Code Review completed Aug 8, 2026 in 19m 16s

Code review found 1 potential issue

Found 1 candidates, confirmed 1. See review comments for details.

Details

Severity Count
🔴 Important 0
🟡 Nit 1
🟣 Pre-existing 0
Severity File:Line Issue
🟡 Nit src/jsc/RuntimeTranspilerStore.rs:897-905 note_parse_failure on concurrent path uses package.json module_type instead of extension

Annotations

Check warning on line 905 in src/jsc/RuntimeTranspilerStore.rs

See this annotation in the file changed.

@claude claude / Claude Code Review

note_parse_failure on concurrent path uses package.json module_type instead of extension

The `is_cjs` argument to `note_parse_failure` here is derived from `module_type`, which on the concurrent path comes solely from the enclosing package.json's `"type"` field (via `this_tag`), whereas the sync path's `note_compile_cache_parse_failure` (jsc_hooks.rs:2613/2669) receives an extension-sniffed `module_type` (jsc_hooks.rs:4347-4362: `.cjs`/`.cts`→Cjs, `.mjs`/`.mts`→Esm regardless of package.json). So a syntactically-invalid `foo.mjs` inside a `"type":"commonjs"` package records `is_cjs=