Changelog

oven-sh/bun · · 17 commits

Bun gets a URL, buffer, and diff engine overhaul

Major runtime fixes and refactors landed: faster URL parsing, safer buffer writes, sliced stream correctness, and a new test diff engine.

Faster URL parsing with punycode validation fixes (Jarred-Sumner3cf3149)

Bumped Bun’s bundled WebKit to a URL parser rewrite, bringing faster new URL()/fetch-path parsing and related host handling improvements. Bun also tightened punycode validation so ICU is only re-run when the input actually contained a literal xn-- label, avoiding false rejections of parser-produced punycode.

Test runner diff output is now deterministic and work-bounded (Jarred-Sumnerd8c7b36)

Replaced the old diff-match-patch implementation behind expect() failures with a new Myers-based diff engine. This should make large assertion failures faster and more predictable instead of timing out into giant unreadable dumps.

Slice windows now stop reading exactly at EOF (robobun669bd82)

Fixed buffered readers so blob/file slices on pipes, stdin, and sockets clamp reads at the slice boundary instead of consuming and discarding extra bytes. That restores correct streaming behavior for sliced non-regular inputs and prevents later readers from seeing data disappear.

Detached Buffers now behave like Node and return 0 on write (robobun75fad5b)

Changed Buffer#write and related encoding paths so detached ArrayBufferViews are treated as empty instead of aborting in debug builds. This removes a crash and matches Node’s observable behavior of returning 0 for writes against detached buffers.

Isolated install store names no longer leak credentials (robobunaec33f5)

Adjusted isolated-store path formatting so tarball and git URLs drop userinfo and query strings from the directory name. That avoids putting credentials into store paths and keeps different credentialed URLs separated via a hash suffix.

HTTP/2 batch writes now share one byte-source conversion (robobun83d65fa)

Deduplicated the BatchSegment-to-bytes conversion in the HTTP/2 frame parser so the iovec path, copy fallback, and partial-write handling all use the same logic. This reduces the chance of the three paths drifting apart and corrupting batched DATA frames.

Other misc changes

  • Template/init updates to use TypeScript 7 (robobun1726b14)
  • DOM wrapper cache refactor removing the global HashMap (Jarred-Sumner07d38c1)
  • BufferedReader/FileReader slice-window follow-ups and tests (robobuneec9c8b, robobun669bd82)
  • URL/snippet and WebKit bump follow-ups, plus URL constructor tests (Jarred-Sumner30fa519, Jarred-Sumner8326d1b)
  • Node abort error message tweak to match Node’s punctuation (robobun8c5296a)
  • Redis client type linting and source-lint wiring (robobunf0f6b2c)
  • Dead-code removal across bindings, codegen, and build scripts (robobuna42889a)
  • CI allowlist bucketing change and related harness tweaks (619a88b)
  • Docs cleanup/corrections across multiple pages (robobun23d535a, robobun11678f5)