~cytrogen/gstack

9870a4ec49078ad3fc150c3d93605401a747af6d — Garry Tan 15 days ago 70c51d5
fix: Windows browse — stdio array format for Bun compatibility (v0.11.18.2) (#468)

* fix: use stdio array format for Bun Windows compatibility

Bun on Windows requires stdio as ['ignore','ignore','ignore'] array,
not 'ignore' string. Fixes #448, #454, #458. Closes #444.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* chore: bump version and changelog (v0.11.18.2)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
3 files changed, 9 insertions(+), 3 deletions(-)

M CHANGELOG.md
M VERSION
M browse/src/cli.ts
M CHANGELOG.md => CHANGELOG.md +6 -0
@@ 1,5 1,11 @@
# Changelog

## [0.11.18.2] - 2026-03-24

### Fixed

- **Windows browse daemon fixed.** The browse server wouldn't start on Windows because Bun requires `stdio` as an array (`['ignore', 'ignore', 'ignore']`), not a string (`'ignore'`). Fixes #448, #454, #458.

## [0.11.18.1] - 2026-03-24

### Changed

M VERSION => VERSION +1 -1
@@ 1,1 1,1 @@
0.11.18.1
0.11.18.2

M browse/src/cli.ts => browse/src/cli.ts +2 -2
@@ 234,9 234,9 @@ async function startServer(): Promise<ServerState> {
    const launcherCode =
      `const{spawn}=require('child_process');` +
      `spawn(process.execPath,[${JSON.stringify(NODE_SERVER_SCRIPT)}],` +
      `{detached:true,stdio:'ignore',env:Object.assign({},process.env,` +
      `{detached:true,stdio:['ignore','ignore','ignore'],env:Object.assign({},process.env,` +
      `{BROWSE_STATE_FILE:${JSON.stringify(config.stateFile)}})}).unref()`;
    Bun.spawnSync(['node', '-e', launcherCode], { stdio: 'ignore' });
    Bun.spawnSync(['node', '-e', launcherCode], { stdio: ['ignore', 'ignore', 'ignore'] });
  } else {
    // macOS/Linux: Bun.spawn + unref works correctly
    proc = Bun.spawn(['bun', 'run', SERVER_SCRIPT], {