Files
ECC/tests/scripts
montjeffrey 253c051dbf test(carriers): pin CommonJS require candidates, regex after a block, and non-import from
Review on dd14493e found four more ways the closure gate misjudges a
carrier, each reproduced against that head:

- require('./helper') resolves when only helper.cjs or helper.mjs is
  planned, but Node's CommonJS search tries only .js, .json and .node.
- In `if (ok) {} /"/.test(text); require(...)` the regex after the block
  is read as division and its quote swallows the require.
- `obj.\nif(x) / 2` is a method call, but the condition check only saw
  the character immediately before `if`, so the division read as a regex
  and swallowed a later require. Introduced by the previous fix.
- A tagged template named `from` was recorded as an import; with exact
  import resolution it now fails a carrier that never loads that path.
  Introduced by the previous fix.

Controls: an extensionless require still resolves to a .json file, and a
template literal passed to import() is still a dependency.
2026-10-09 17:46:02 -04:00
..