mirror of
https://github.com/nexu-io/open-design.git
synced 2026-09-20 06:15:06 +08:00
313cf735b2
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.
4 lines
147 B
Plaintext
4 lines
147 B
Plaintext
design-systems/**/design-tokens.json text eol=lf
|
|
design-systems/**/tailwind-v4.css text eol=lf
|
|
design-systems/**/tokens.css text eol=lf
|