Skip to content

Tags: oven-sh/bun

Tags

bun-v1.3.14

Toggle bun-v1.3.14's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Bun.serve: rename `h3`/`h1` options to `http3`/`http1` (#30583)

## What

Renames the `Bun.serve()` `ServerConfig` HTTP/3 options from the
abbreviated `h3` / `h1` to the spelled-out `http3` / `http1`.

```ts
// before
Bun.serve({ tls, h3: true, h1: false, fetch })

// after
Bun.serve({ tls, http3: true, http1: false, fetch })
```

These options have not shipped in a release yet, so this is a clean
rename with no backwards-compat aliases.

## Changes

- **`src/runtime/server/ServerConfig.zig` / `server.zig`**: rename the
`ServerConfig` struct fields and the JS option lookups (`arg.get(global,
"http3")`, etc.); update the validation error messages and the
unix-socket warning.
- **`packages/bun-types/serve.d.ts`**: rename the type declarations,
drop the incorrect "(and HTTP/2)" from the `http1` JSDoc (Bun.serve does
not support HTTP/2), and mark both options `@experimental`.
- **`docs/runtime/http/server.mdx`**: add an "HTTP/3 (QUIC)" section
documenting `http3` / `http1`, Alt-Svc, the unix-socket limitation, and
the experimental status.
- **Tests**: update `Bun.serve({ http3, http1 })` call sites, test
names, and the validation error-message assertion across the HTTP/3
suites (`serve-http3.test.ts`, `serve-protocols.test.ts`,
`body-stream.test.ts`, `fetch-http3-client.test.ts`,
`fetch-http3-adversarial.test.ts`, `direct-readable-stream.test.tsx`,
`fetch-h3.ts`, `packages/h3blast/`).

## Notes

- The internal `uws.AnyRequest` union variants (`.h1`/`.h3`) are left
as-is — those tag a transport, not a config option.
- The `fetch()` `protocol` option (`"http1.1" | "h1" | "http2" | "h2" |
"http3" | "h3"`) is unchanged; it already accepts both spellings.
- `zig:check` and the `bun-types` `tsc` test pass locally. The full
HTTP/3 test suite will run in CI.

bun-v1.3.13

Toggle bun-v1.3.13's commit message

Verified

This commit was signed with the committer’s verified signature.
dylan-conway Dylan Conway
Revert "webcore: fix ReadableStreamSource Strong cycle + Windows from…

…Pipe ref (#29472)"

This reverts commit 55b62ef.

bun-v1.3.12

Toggle bun-v1.3.12's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
wip builds (#28826)

### What does this PR do?

### How did you verify your code works?

---------

Co-authored-by: Dylan Conway <dylan.conway567@gmail.com>

bun-v1.3.11

Toggle bun-v1.3.11's commit message

Partially verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
We cannot verify signatures from co-authors, and some of the co-authors attributed to this commit require their commits to be signed.
deflake hot.test.ts: fix duplicate error handling and buffer manageme…

…nt (#28202)

The three sourcemap tests (generation, loading, loading with large
files) used a `continue outer` pattern in their error-handling loops.
When a duplicate/stale error was encountered, `continue outer` jumped
back to reading the next stderr chunk, but any remaining lines from
`str.split("\n")` that had not yet been processed were discarded because
`str` was set to `""` inside the inner loop. This lost data and could
cause the test to hang waiting for output that was already consumed and
thrown away.

Additionally, the bundler processes in the sourcemap loading tests used
`stdout: "inherit"` / `stderr: "inherit"`, which could cause pipe buffer
backpressure blocking the bundler.

Fixes both issues with a shared `driveErrorReloadCycle` helper that:
- Preserves unprocessed lines when encountering duplicate errors (uses
`lines.pop()` for trailing partial lines and re-buffers remaining lines
via `lines.slice(i + 1)`)
- Pipes bundler stdout/stderr to `ignore` to avoid pipe buffer
backpressure
- Races `bundler.exited` against the reload driver for early-exit
detection in the two bundler-based tests

---
Verification: Format and Lint JavaScript CI checks pass. Buildkite build
#39875 still compiling at time of review. Only
`test/cli/hot/hot.test.ts` changed (test-only deflake, no production
code). Jarred's CHANGES_REQUESTED about the nonce mechanism was
addressed in commit 50f3f4e (nonce removed). No TODO/FIXME/HACK in
added lines. The driveErrorReloadCycle helper correctly preserves
partial line fragments and remaining unprocessed lines, prevents double
onReload calls via the triggered flag, and uses Buffer.alloc per
test/CLAUDE.md convention.

---------

Co-authored-by: Alistair Smith <hi@alistair.sh>

bun-v1.3.10

Toggle bun-v1.3.10's commit message

Verified

This commit was signed with the committer’s verified signature.
Jarred-Sumner Jarred Sumner
Windows ARM64

bun-v1.3.9

Toggle bun-v1.3.9's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Revert "Mimalloc v3 update (#26379)" (#26783)

This reverts commit c63415c.

### What does this PR do?

### How did you verify your code works?

bun-v1.3.8

Toggle bun-v1.3.8's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Update WebKit (#26549)

### What does this PR do?

Includes
oven-sh/WebKit@9a2cc42

Fixes ##26525

### How did you verify your code works?

CI

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com>

bun-v1.3.7

Toggle bun-v1.3.7's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
fix(shell): handle ".", "", "./" in cwd() by using process.cwd() (#26461

)

## Summary
- Fix `$`...`.cwd(".")` causing ENOENT error with path ending in
"undefined"
- The same fix applies to `.cwd("")` and `.cwd("./")`
- Falls back to `process.cwd()` when `defaultCwd` is undefined

Closes #26460

## Test plan
- [x] Added regression test in `test/regression/issue/26460.test.ts`
- [x] Verified test fails with `USE_SYSTEM_BUN=1` (reproduces the bug)
- [x] Verified test passes with `bun bd test` (fix works)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Bot <claude-bot@bun.sh>
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>

bun-v1.3.6

Toggle bun-v1.3.6's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
fix(css): restore handler context after minifying nested rules (#25997)

## Summary
- Fixes handler context not being restored after minifying nested CSS
rules
- Adds regression test for the issue

## Test plan
- [x] Test fails with `USE_SYSTEM_BUN=1 bun test
test/regression/issue/25794.test.ts`
- [x] Test passes with `bun bd test test/regression/issue/25794.test.ts`

Fixes #25794

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Bot <claude-bot@bun.sh>
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>

bun-v1.3.5

Toggle bun-v1.3.5's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
fix: v8::Value::IsInt32()/IsUint32() edge cases (#25548)

### What does this PR do?

- fixes both functions returning false for double-encoded values (even
if the numeric value is a valid int32/uint32)
- fixes IsUint32() returning false for values that don't fit in int32
- fixes the test from #22462 not testing anything (the native functions
were being passed a callback to run garbage collection as the first
argument, so it was only ever testing what the type check APIs returned
for that function)
- extends the test to cover the first edge case above

### How did you verify your code works?

The new tests fail without these fixes.

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>