fix(javascript): keep CommonJS wrapper redeclarations from inventing application owners (#12084)

fix(javascript): keep wrapper redeclarations from inventing application owners

A top-level lexical declaration that reuses a CommonJS wrapper parameter
cannot evaluate, and its recovered syntax is complete. Counting that
diagnostic as dropped syntax marked the entrypoint as an unexamined loader
and erased another package's proven loadFile root.

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: morluto <morluto@users.noreply.github.com>
This commit is contained in:
authored and GitHub committed 2026-11-18 12:59:16 -05:00
1 parent 31aaec6b4f
commit ffae857c20
7 files changed
+188 -5

No files matched your search

@@ -230,7 +230,10 @@ unknown findings and typed uncertainty, including returned-reference widening
and unavailable type-only compiler options. `conditional-loader` records a
BOM/hashbang source recovered with an uncertain package mode or loader
invocation. Its overall `parse_status` stays partial without inventing a syntax
error. Dependency and worker Evidence retains the loader limitation.
error. `commonjs-wrapper-redeclaration` records a top-level lexical declaration
that redeclares a CommonJS wrapper parameter. Node cannot evaluate that module,
and the recovered syntax stays complete because the diagnostic does not drop
statements. Dependency and worker Evidence retains the loader limitation.
`examination` reports static semantic
resource limits and Electron wrapper expansion limits independently. A completed
pass does not establish complete runtime semantics. Route examination and result