Pairs with .gitattributes: eol=lf pins what git produces at checkout;
.editorconfig pins what editors write to disk - the one CRLF vector
git's filters cannot reach (git never rewrites the working tree, so an
editor-written CRLF file would persist with a clean status while the
doc gates misbehave on it). insert_final_newline declares the existing
one-trailing-newline policy (AGENTS.md, gated by git diff --check) at
the editor layer too.
(cherry picked from commit 7a09602fd76efff81a0875fb177289004c3dfc9b)
execFileSync('node_modules/.bin/tsc') spawns an extensionless shim
that is not executable on Windows (the CVE-2024-27980 class the
sibling scripts hit); the catch treated the spawn failure as a compile
failure with empty diagnostics. The .cmd shim would need shell:true,
which concatenates args unescaped - a hazard for the temp project
path - so invoke typescript/bin/tsc through the current node instead;
identical behavior on every platform.
Note this gate had never actually run on this Windows checkout: with
the pre-eol=lf CRLF working copy the fence regex matched no ts blocks
('.' does not match \\r), so it reported 'no ts code blocks to check'
and exited green. The LF working tree surfaced the spawn bug; with
this fix the gate compiles all 21 blocks on Windows.
(cherry picked from commit b49993c28e068c2beb411eae1f0c8ac4985aa3ae)
The repo's committed content is already 100% LF (verified: 802/802
text files); until now the working-tree form depended on each
contributor's core.autocrlf, and autocrlf=true checkouts produced CRLF
working copies that byte-level gates had to tolerate (fence parsing,
consistency-record parsing, blob hashing, README splice comparison).
eol=lf removes the smudge boundary entirely: attributes override any
local autocrlf, so every checkout on every host sees the repo's
canonical form. git add --renormalize confirmed a zero-change no-op -
no committed blob (including vendor/) is rewritten. The script-side
CRLF tolerances remain as defense in depth for editor-introduced CRLF
in not-yet-committed files. If a file class ever needs CRLF in the
working tree (.bat/.cmd), a per-pattern eol=crlf override keeps the
in-repo form LF while smudging those checkouts only.
(cherry picked from commit 5d21ebee20391c3d5c1d3812bd3aaa92bc652973)
spawnSync on a .cmd shim returns EINVAL/null status on recent Node (CVE-2024-27980) unless shell:true, which made postinstall fail and blocked every 'pnpm run' on Windows.
(cherry picked from commit 65a08f889ff9738ddaceeeb724e6e24f3be4b2ea)