Files
nexu-io-open-design/scripts
Christopher Beaulieu 313cf735b2 fix(guard): make design-system manifest checks EOL-agnostic on Windows (#5175) (#5176)
On Windows with the standard core.autocrlf=true, `pnpm guard` falsely
flagged all ~150 design-system packages stale on a clean tree. The
generated design-tokens.json / tailwind-v4.css are stored LF but check
out as CRLF, while the generators emit LF, so the guard's strict byte
compare (actual !== expected) mismatched every line. CI (Linux, LF)
stayed green, so this was Windows-local only and blocked every push via
the pre-push hook.

Belt-and-suspenders fix:
- .gitattributes: pin the generated design-system files to eol=lf so
  they check out LF regardless of core.autocrlf (root cause, every
  contributor, no per-clone git config workaround needed).
- check-design-system-manifests.ts: normalize CRLF->LF on both sides of
  the two byte-exact staleness compares (validateDesignTokensJson,
  validateTailwindV4Css) so the guard is EOL-agnostic (defense in depth).
- Wire scripts/check-design-system-manifests.test.ts into the `guard`
  test list; it previously ran in no gate. Adds 4 regression tests: two
  prove CRLF-identical content is not flagged stale, two negative
  controls prove genuine content drift is still caught.
2026-07-05 14:34:30 +00:00
..
2026-07-03 06:57:37 +00:00