feat: auto-detect Windows in dev mode, run server on Node.js#6
Merged
jwangkun merged 3 commits intoJun 10, 2026
Merged
Conversation
now detects Windows and spawns the server on Node.js instead of Bun. This works around Bun's lack of Windows ConPTY support by splitting into two coordinated processes: turbo manages contracts + Vite (Bun), while the server runs on Node.js where node-pty provides full Windows PTY support. macOS/Linux behavior is unchanged — turbo runs all three packages as before. The explicit dev:win mode is preserved as an opt-in fallback. Also updates README Windows instructions from a manual two-terminal workflow to the same flow used on other platforms.
Prevents spurious CRLF-modified status on generated files (mockServiceWorker.js, routeTree.gen.ts) when working on Windows with core.autocrlf=true.
Add .astro/.jsonc/.plist/.td text eol=lf rules and .icns binary rule
jwangkun
approved these changes
Jun 10, 2026
jwangkun
left a comment
Collaborator
There was a problem hiding this comment.
PR #6 review: APPROVED. Fixes Windows ConPTY issue in dev mode. typecheck/lint/fmt passed, affected tests pass. See full review details below.
Analysis
- dev-runner.ts: Windows split-mode using Effect/ChildProcess patterns - clean
- .gitattributes: LF line endings enforced across all source types
- README: Windows dev instructions (EN + CN)
- No bun.lock changes, no production code changes
Verdict: MERGEABLE
jwangkun
pushed a commit
that referenced
this pull request
Jun 18, 2026
Auto-detect Windows platform in `bun dev` and split into two processes: turbo drives contracts + Vite (Bun), while the server runs on Node.js directly. This works around Bun's lack of Windows ConPTY support. Also: - Add .gitattributes enforcing LF line endings to prevent CRLF issues - Add dev:win explicit command as opt-in fallback - Update README and README.zh.md with Windows development instructions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What Changed
bun dev在 Windows 上自动拆分为两个进程 —— turbo 驱动 contracts + Vite,Node.js 直接运行预构建的 server。因为 Bun 在 Windows 上未实现 ConPTY,无法运行 server。同时新增bun run dev:win显式命令。ProviderHealth.ts\***:移除runCommandHealthProbe辅助函数,将Effect.timeoutOption+Effect.result` 内联到各调用处,消除不必要的抽象层。Why
在 Windows 上运行
bun dev会因为 Bun 不支持 ConPTY 而导致 server 进程异常。通过自动检测平台,在 Windows 上切换到 Node.js 运行 server,同时保持 macOS/Linux 上的原有行为不变。这让 Windows 开发者无需额外配置即可参与开发。Checklist