Turn any website into a lightweight desktop app with one command, on macOS, Windows and Linux.
Rust chatgptclaudeclidesktopdesktop-appelectron-alternativegeminilinuxmacosnativefierno-electronrusttauriweb-to-desktopwebsite-to-appwebviewwindowsyoutube
test: read macOS source tests with LF line endings on Windows
Tw936a7812c46934
diff --git a/.claude/rules/cli.md b/.claude/rules/cli.mdindex 3ecd543d..78db5d1d 100644--- a/.claude/rules/cli.md+++ b/.claude/rules/cli.md@@ -16,6 +16,7 @@ paths:- Build preparation uses private workspaces before acquiring the shared compilation cache lock. Cancellation while waiting must clean only that workspace and leave the active owner's lock intact.- Native build gates use a fresh output directory, require exit code zero and the CLI JSON's exact output path, and verify macOS executable architectures from `CFBundleExecutable`. Compare existing artifact paths with `realpath`, since macOS `/var` and `/private/var` can identify the same file; retain a negative test for genuinely different files. Old bundles, empty directories, or timeout artifacts never prove a successful build.- Platform test mocks must preserve unrelated exports with a partial mock. `defaults.ts` calls `getDefaultLinuxTargets` on Linux during import, so a mock containing only platform booleans can pass on macOS but prevent the suite from loading on Linux. See `tests/unit/linux-multi-target.test.ts`.+- A test that reads a source file runs on `windows-latest` too, where the checkout has CRLF line endings: normalize what it read (`.replace(/\r\n/g, '\n')`) before any pattern or `indexOf` that spans a line break. Two macOS-only source tests written on a Mac kept the Windows Quality jobs red for five commits (2026-11-17), so after pushing a new test read that commit's Quality run on all three systems, not only the local pass.- Shared Cargo caches are locked until artifact copying finishes; Cargo's own compilation lock alone does not protect that interval. Never reclaim a stale PID lock with read-then-delete, which can delete a new owner's lock. An abandoned lock fails with a recovery hint rather than risking concurrent artifacts. Cancellation and failed subprocesses must stop the compiler tree before releasing the lock; preserve the workspace and lock if termination cannot be confirmed. Ordinary success and failure discard the workspace, with cleanup warnings included before the JSON result. Verify with `node tests/integration/build-workspace.mjs` on macOS or Linux and the cross-platform workspace unit tests.- Build workspaces preserve an existing root `rust-toolchain.toml` or legacy `rust-toolchain`; otherwise rustup may select a different default without the installed cross-compilation targets. Keep full stderr in real-build tests so compilation success cannot conceal a later target or bundling failure. GNU build flags must respect Cargo precedence: append required arguments to `CARGO_ENCODED_RUSTFLAGS` when present (including empty), otherwise to `RUSTFLAGS`; preserve user arguments and keep the override local to the build subprocess.- New user-visible CLI surface (a new flag, alias, subcommand, or extra help variant) needs a stated justification before implementation: name the user problem and why an existing flag, config key, or default cannot cover it, then get maintainer sign-off. Prefer quieter defaults over new options; never split help output into parallel variants.diff --git a/tests/unit/macos-navigation-buttons.test.ts b/tests/unit/macos-navigation-buttons.test.tsindex a5d4ecf6..014bc01b 100644--- a/tests/unit/macos-navigation-buttons.test.ts+++ b/tests/unit/macos-navigation-buttons.test.ts@@ -4,7 +4,8 @@ import { describe, expect, it } from 'vitest';const rustRoot = path.join(process.cwd(), 'src-tauri', 'src');const read = (relative: string) =>- fs.readFileSync(path.join(rustRoot, relative), 'utf8');+ // A Windows checkout has CRLF line endings; the patterns below are written for LF.+ fs.readFileSync(path.join(rustRoot, relative), 'utf8').replace(/\r\n/g, '\n');describe('macOS title bar navigation buttons', () => {it('is a macOS-only module, installed from the one window builder when asked', () => {diff --git a/tests/unit/macos-script-dialogs.test.ts b/tests/unit/macos-script-dialogs.test.tsindex 7547a8a3..8b4abfd5 100644--- a/tests/unit/macos-script-dialogs.test.ts+++ b/tests/unit/macos-script-dialogs.test.ts@@ -4,7 +4,8 @@ import { describe, expect, it } from 'vitest';const rustRoot = path.join(process.cwd(), 'src-tauri', 'src');const read = (relative: string) =>- fs.readFileSync(path.join(rustRoot, relative), 'utf8');+ // A Windows checkout has CRLF line endings; the patterns below are written for LF.+ fs.readFileSync(path.join(rustRoot, relative), 'utf8').replace(/\r\n/g, '\n');describe('macOS alert(), confirm() and prompt()', () => {it('is installed on every webview the one window builder makes', () => {