mirror of
https://github.com/stablyai/orca.git
synced 2026-09-22 08:02:28 +00:00
core.autocrlf=true ships in the Git-for-Windows system config, so a fresh Windows checkout materializes config/scripts/*.mjs with CRLF. Vite's SSR transform finds the shebang with /^#!.*\n/, and \r is a JS regex line terminator, so the pattern misses on CRLF: the hoisted import/export preamble lands at offset 0 ahead of the shebang, which then defeats the code[0] === '#' guard that blanks it. A literal #! survives into the middle of the module and every suite importing the script dies at load with SyntaxError: Invalid or unexpected token. Eight suites were unrunnable on Windows. .gitattributes already pinned eight of these scripts individually; replace those with one glob over the directory so the pin does not have to be remembered per file, and add a ratchet that fails when a shebanged script is left on the platform default. Co-authored-by: Orca Worker <orca-worker@localhost> Co-authored-by: Neil <4138956+nwparker@users.noreply.github.com>
21 lines
1.2 KiB
Plaintext
21 lines
1.2 KiB
Plaintext
# A shebang plus CRLF makes vite's SSR transform emit a literal `#!` mid-module,
|
|
# so any suite importing the script dies at load with a SyntaxError. Pin the whole
|
|
# directory rather than the scripts that happen to have a test today.
|
|
/config/scripts/**/*.mjs text eol=lf
|
|
/skill-guides/*.md text eol=lf
|
|
/skill-stubs/*.md text eol=lf
|
|
/skills/*/SKILL.md text eol=lf
|
|
/src/cli/bundled-skill-guides.ts text eol=lf
|
|
# Bundled plugin trees are byte-hashed; CRLF checkout would break the pinned hash.
|
|
/resources/plugins/** text eol=lf
|
|
# pnpm hashes every patch byte-for-byte, so a CRLF checkout breaks the install.
|
|
/config/patches/*.patch -text
|
|
# The xterm bundle hunks also make a diff nobody can read; review the hand-written
|
|
# source patch under xterm-src/ instead. The sibling patches stay diffable.
|
|
/config/patches/@xterm__xterm@*.patch -diff
|
|
/config/patches/xterm-src/*.patch text eol=lf
|
|
# Generated wrapper fixtures: collapse them in the PR diff so they stop drowning
|
|
# the reviewable change, and pin LF because they are compared byte-for-byte.
|
|
# Not -diff: the shell diff is the review surface when a wrapper does change.
|
|
/src/main/__fixtures__/shell-wrapper-snapshots/*.txt linguist-generated=true text eol=lf
|