mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-11-10 01:56:15 +08:00
The three-argument form required its options argument to be an inline
object literal, so a shared `const SCRATCH = { encoding: "utf-8",
mode: 0o600 } as const` binding — the shape pi's temp-file helpers use —
fell through to SC2020 even though every option was a literal. Resolve a
`const` initializer through `constInitializerOf`, strip casts and
parentheses, and admit a literal whose every option member is a
literal-valued property, which is exactly what the inline form accepted.
Corpus 8413 pins the creation mode and that an existing file keeps its
mode.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>