Changelog

oven-sh/bun · · 18 commits

Windows PTYs, faster installs, and Bun SQL fixes

Bun added Windows Terminal support, sped up isolated installs, and fixed several correctness bugs in transpiling, SQL, TLS, and bunx.

Windows Bun.Terminal now works via ConPTY (dylan-conwayf32e595)

Bun now implements Bun.Terminal and Bun.spawn({ terminal }) on Windows using ConPTY, bringing PTY-style child process support to the platform. This is a major cross-platform feature, with new docs and tests covering Windows-specific behavior and limitations.

Isolated installs get a global virtual store for much faster warm installs (Jarred-Sumner7c73f05)

The isolated linker now uses a shared global store by default, so warm installs symlink packages instead of cloning or copying them per project. The change is positioned as a big speedup for repeat installs and multi-checkout workflows, with docs and tests showing the new model and its opt-out.

bunx no longer grabs unrelated system binaries for scoped packages (robobun912405a)

bunx now treats guessed bin names from scoped package names as unsafe to search in the full system $PATH, avoiding collisions like running /usr/bin/install for bunx @scope/install. That closes a real resolution bug and makes package bin lookup more predictable.

using / await using are no longer lowered when targeting Bun (robobunc77b7d6)

Bun now leaves explicit resource management syntax intact when the target is Bun, since JavaScriptCore already supports it natively. This reduces unnecessary transforms across the runtime transpiler, bundler, and REPL while preserving disposal semantics in the places that still need lowering.

MySQL prepared queries now wait for all result sets (cirospaciari1164dd6)

The SQL MySQL path now accumulates multi-result responses until the server indicates the query is truly finished, instead of resolving early on the first result set. That fixes a stored-procedure bug where trailing packets could surface as uncaught errors outside the caller’s catch.

TLS getCACertificates('system') now always returns the OS store (cirospaciari460a065)

System CA lookup is now lazy-loaded on demand and no longer depends on --use-system-ca for the 'system' API. This aligns Bun with Node’s behavior and fixes empty results for callers expecting the OS trust store.

mock.module() now validates its callback before resolver side effects (robobunc8e6aa1)

Bun now checks that mock.module(specifier, fn) actually received a callable before attempting module resolution. That prevents a crash-prone path where resolution could reenter the event loop or auto-install machinery before the type error was thrown.

Standalone binaries drop embedded source pages after startup (cirospaciaric14e37e)

Compiled standalone apps now madvise(MADV_DONTNEED) their embedded source section after the entrypoint has loaded and microtasks drain. This should reduce memory pressure for compiled apps while keeping lazy fault-in behavior for stack traces and deferred loads.

Shell leak sweep fixed fd/memory retention across many code paths (Jarred-Sumner1b93e94)

A broad shell audit tightened file-descriptor and memory handling across interpreter, IO, builtin commands, and subprocess state machines. The main impact is fewer leaked fds and more reliable cleanup around async shell execution.

Other misc changes

  • Deflake install and cron tests; move bun-types check to GitHub Actions (Jarred-Sumner28bace1)
  • Improve docs and CLAUDE guidance for test placement (robobun4311f5b, robobun48901bb)
  • Deduplicate bun-types FFI enum aliases for tsgo compatibility (robobunb424e70)
  • Run tsgo in bun-types tests (alii33356e8)
  • Remove redundant codegen output constraints (Jarred-Sumnerfe8f190)
  • Avoid forcing BuiltinFunctions::visit<> instantiation in every TU (Jarred-Sumner2510d48)
  • Out-of-line BunBuiltinNames ctor and drop unused builtin names (Jarred-Sumner49bd48c)
  • Add GC skill docs (Jarred-Sumnerdafe6ff)