mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-11-07 08:33:50 +08:00
`fs.readFileSync(file, { encoding })` and `fs.promises.readFile` read
the encoding field straight off the lowered options literal. When the
encoding value is checked-dynamic (dotenv's `t = e.encoding`), the
literal lowers to a dynamic object, and the record field read failed IR
validation with SC9001 "recordGet receiver: expected record, got dyn".
Check such a literal into the `{ encoding: string }` record the checker
describes before reading the field.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>