From 46f3e56c09cdfe4b033ccd851a35f9d69f2ef625 Mon Sep 17 00:00:00 2001 From: CRT Date: Wed, 21 Oct 2026 22:26:30 +0800 Subject: [PATCH] Windows checkouts: .gitattributes keeps text files LF (CRLF skills broke gen-adapters); findInstalled builds macOS/Linux paths with posix join; CONTRIBUTING Windows setup and desktop build --- .gitattributes | 13 +++++++++++++ CONTRIBUTING.md | 6 ++++++ cli/lib/desktop-dist.ts | 12 ++++++------ 3 files changed, 25 insertions(+), 6 deletions(-) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..714a3aa --- /dev/null +++ b/.gitattributes @@ -0,0 +1,13 @@ +* text=auto eol=lf +*.png binary +*.jpg binary +*.ico binary +*.icns binary +*.ttf binary +*.woff2 binary +*.mp4 binary +*.bat text eol=crlf +*.cmd text eol=crlf +# kept byte-for-byte as published upstream (CRLF) +cli/data/play-data-safety-form.csv -text +**/icons/LICENSE.txt -text diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a7d0abf..a6d34c2 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -13,6 +13,12 @@ bun run ci # full gate before pushing: every check and test (ad bun run test:browser # only by hand: the suites that start Chrome / Chromium (tests/browser/*.browser.ts) ``` +**Windows.** `.gitattributes` keeps every text file LF in the working tree (with `core.autocrlf=true` the skills +came out CRLF and `bun tools/gen-adapters.ts` failed with "no frontmatter"). On a checkout made before that file +existed, run `git rm -r --cached -q . && git reset --hard` once on a clean tree. The desktop app builds with +`cd apps/desktop && bun run sidecar && bunx tauri build` (Rust via rustup; WiX and NSIS are downloaded by Tauri) into +`src-tauri/target/release/bundle/nsis/*-setup.exe` and `bundle/msi/*.msi`. + **Browser tests run only by hand.** The suites that launch a browser (console fill / flow / session / persist, web capture, glyphs and ligatures, local fonts, feature-graphic fit, site overflow) live in `tests/browser/` as `*.browser.ts`, which `bun test`, `ci`, `ci:quick` and the Forgejo workflows never pick up. Run `bun run test:browser` diff --git a/cli/lib/desktop-dist.ts b/cli/lib/desktop-dist.ts index 20f252e..552862a 100644 --- a/cli/lib/desktop-dist.ts +++ b/cli/lib/desktop-dist.ts @@ -9,7 +9,7 @@ // tests/desktop-dist.test.ts. import { existsSync, readdirSync } from 'node:fs'; import { homedir } from 'node:os'; -import { join } from 'node:path'; +import { join, posix } from 'node:path'; export const BUNDLE_ID = 'dev.storebound.desktop'; export const PAGE = 'https://storebound.dev/#download'; @@ -101,9 +101,9 @@ export function findInstalled(platform: NodeJS.Platform, env: Record /^storebound(?:[-_][A-Za-z0-9._-]*)?\.AppImage$/i.test(n)).sort().at(-1); - if (name) return { path: join(dir, name), how: 'appimage' }; + if (name) return { path: posix.join(dir, name), how: 'appimage' }; } return null; }