Files
reverse-engineering-anything/tests
pedrocormannandClaude Opus 5.5 7d7180515d fix(javascript): resolve Electron paths held in definite constants
A preload, utilityProcess.fork module path, serviceName or loadFile path
written inline as path.join(__dirname, "preload.js") resolves, but the same
expression stored in a const first stays dynamic, because staticPathFact
returned undefined for every identifier. The ESM idiom
const __dirname = path.dirname(fileURLToPath(import.meta.url)) left
path.join(__dirname, ...) unresolved for the same reason.

The path intrinsic query now also returns the initializer of a single,
unreassigned, unprojected const whose initializer the shared lexical index
proves has run at the read (the proof constant BrowserWindow options use).
staticPathFact and the filesystem-context check recurse into that
initializer, so a source-directory base survives, and the source-directory
and source-file identity proofs follow const aliases. Each constant is
substituted at most once per evaluated expression, which keeps work and
spelling bounded by the source text.

let and var bindings, reassigned, destructured or shadowed constants, reads
that may run before initialization and URL objects stay unknown.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 22:44:13 -03:00
..