Changelog

oven-sh/bun · · 27 commits

SQLite lands, HTTP and parser fixes follow

Big day: Bun ships node:sqlite, fixes several HTTP edge cases, hardens Postgres parsing, and patches runtime leaks and hangs.

node:sqlite is now fully implemented (cirospaciari8df2aa5)

Bun adds the node:sqlite module and wires it into the build, shutdown path, and compat docs. The implementation brings the Node v26.3.0 test suite along with native backup/session-related APIs and macOS runtime gating, making SQLite a first-class Node compatibility surface.

Postgres row parsing now rejects malformed message overruns (robobun6352b79)

DataRow, RowDescription, and ParameterDescription decoding now bounds every read by the enclosing message length instead of treating overruns as a recoverable short read. This closes a protocol bug that could stall queries indefinitely or misparse later wire bytes.

HTTP and S3 close-delimited responses keep their metadata intact (robobun3655b03, robobun8adb8de)

The HTTP client now treats close-delimited responses more carefully, avoiding progress callbacks that expose partial bodies before terminal metadata arrives. The S3 response path also preserves response headers across later EOF callbacks, fixing a crashy class of responses without Content-Length or Transfer-Encoding.

HTTP/1.0 no longer gets broken chunked responses (robobun9d9fe3b)

When Content-Length is removed, Bun now falls back to close-delimited responses for HTTP/1.0 clients instead of advertising chunked encoding it cannot actually frame. That fixes a real interoperability bug with proxies like nginx.

node:test gets real mock access on TestContext (cirospaciari1b2bb4e)

The test runner’s TestContext.mock now returns the shared mock tracker instead of throwing, unlocking more upstream Node test coverage. This is part of the larger push to match Node’s in-process test API.

Other misc changes

  • TLS half-close handling and TCP FIN behavior in usockets (robobun8cac538)
  • Human-readable bunfig type mismatch errors (robobun1fbfe1d)
  • sliceAnsi ellipsis fallback fix for zero-width-only ranges (robobun12fd4f8)
  • macOS ASAN dyld shim compatibility fix (robobunb5f2d0a)
  • Threading WaitGroup race fix on shutdown (robobun2acc042)
  • GC leak fix for http.ClientRequest once-wrappers (robobundd21594)
  • Test runner log grouping improvement (dylan-conway6618e7f)
  • macOS recvmsg_x/sendmsg_x version gate tightened (dylan-conwayea81736)
  • macOS DNS FilePoll slot leak fix (c9d3c6e)
  • Chunk-extension size cap enforced uniformly and related parser cleanup (robobun39c70a3)
  • Multipart form-data parsing compatibility fix (robobunbf9927f)
  • JSX tsconfig automatic-runtime selection fix (robobune835899)
  • Worker stdout/stderr hang fix when streams are never consumed (robobun3219883)
  • JSCTaskScheduler deferred-work cleanup fix (robobun73411ad)
  • usockets allocator routing under non-ASAN builds (robobun78aa080)
  • node:http compatibility fix for malformed chunked responses on HTTP/1.0 (robobun9d9fe3b)
  • Node compatibility test coverage expansion and assorted doc/review updates (cirospaciaria215285, Jarred-Sumner3eaadbe, Jarred-Sumner1d8b514)