Skip to content

chore: support Windows in dev env - #68

Draft
bespoyasov wants to merge 7 commits into
mainfrom
chore/windows-support-dev
Draft

chore: support Windows in dev env#68
bespoyasov wants to merge 7 commits into
mainfrom
chore/windows-support-dev

Conversation

@bespoyasov

Copy link
Copy Markdown
Collaborator

Follows up on #67.

Fixes Windows compatibility issues in the dev pipeline so tests can pass on Windows.

  • Fixes CLAUDE.md symlink checkout and Prettier formatting
  • Uses fileURLToPath() in Vitest configs instead of URL.pathname
  • Uses os.tmpdir() on Windows for test temp directories
  • Makes e2e mock binaries platform-aware (.cmd launchers on Windows)
  • Uses path.delimiter for PATH separator in e2e sessions
  • Sets Windows-equivalent env vars (USERPROFILE, TEMP, TMP) in e2e sessions
  • Skips /usr/bin-dependent e2e test on Windows (so far)

Not included

  • TERM env var: xterm-256color is harmless on Windows, left as-is
  • Windows CI job: deferred

Remaining work

  • Fixed-length temp dir prefix across all platforms for stable e2e snapshots on Windows (__tests__/shared/project-scaffold/index.ts:22-24)
  • Portable "node not on PATH" e2e test for Windows: git install location varies (__tests__/e2e/system-check-failure.e2e.ts:22-26)

Test plan

  • pnpm qa passes (typecheck + lint + 189 tests)
  • On a Windows machine, pnpm install sets core.symlinks=true and CLAUDE.md is a real symlink
  • pnpm test:e2e passes on Windows

bespoyasov and others added 7 commits September 10, 2026 15:40
Add CLAUDE.md to .prettierignore so Prettier skips the symlink target,
and enable core.symlinks in the prepare script so Windows clones
checkout the symlink correctly after pnpm install.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
URL.pathname returns /C:/Users/... on Windows, breaking path alias
resolution. fileURLToPath() handles this correctly cross-platform.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
/tmp/ doesn't exist on Windows. Use perPlatform() to pick os.tmpdir()
on Windows while keeping /tmp/ on Unix for stable e2e snapshot column
alignment.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
On Windows, scripts need a .cmd launcher instead of a Unix shebang and
chmod. Split binary writing into writeUnixBinary/writeWindowsBinary in
a new fs.ts module and add IS_WINDOWS to the e2e env constants.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Windows uses ; not : as the PATH separator.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Windows uses USERPROFILE/TEMP/TMP instead of HOME/TMPDIR. Set the
Windows equivalents alongside the Unix vars so both are available.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The test relies on /usr/bin as a PATH with git but not node, which
has no portable Windows equivalent. Other system-check tests already
validate the failure UI.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant