---
title: Bun v1.3.3
description: "Fixes 95 issues (addressing 348 👍). CompressionStream and DecompressionStream, Control .env and bunfig.toml loading in standalone executables, `retry` and `repeats` in `bun:test`, --no-env-file, SQLite 3.51.0, Upgraded to Zig 0.15.2, Bugfixes for bundler, bun install, Windows, Node.js compatibility, Web APIs, Bun.serve, networking, Bun.YAML, Bun.Transpiler, Bun.spawn & TypeScript definitions"
date: "2025-11-21T10:11:00.000Z"
author: jarred
---

This release fixes 95 issues (addressing 348 👍 reactions)!

#### To install Bun

{% codetabs %}

```sh#curl
$ curl -fsSL https://bun.sh/install | bash
```

```sh#npm
$ npm install -g bun
```

```sh#powershell
$ powershell -c "irm bun.sh/install.ps1|iex"
```

```sh#scoop
$ scoop install bun
```

```sh#brew
$ brew tap oven-sh/bun
$ brew install bun
```

```sh#docker
$ docker pull oven/bun
$ docker run --rm --init --ulimit memlock=-1:-1 oven/bun
```

{% /codetabs %}

#### To upgrade Bun

```sh
$ bun upgrade
```

## CompressionStream and DecompressionStream

Bun now implements [`CompressionStream`](https://developer.mozilla.org/en-US/docs/Web/API/CompressionStream) and [`DecompressionStream`](https://developer.mozilla.org/en-US/docs/Web/API/DecompressionStream). These standard Web APIs allow for streaming compression and decompression of data without buffering the entire payload in memory.

In addition to the standard `"gzip"`, `"deflate"`, and `"deflate-raw"` formats, Bun also supports `"brotli"` and `"zstd"`.

```js
const response = await fetch("https://example.com");

// Compress the response body using gzip
const compressed = response.body.pipeThrough(new CompressionStream("gzip"));

// Or use zstd for faster compression
const zstd = response.body.pipeThrough(new CompressionStream("zstd"));
```

<!-- https://github.com/oven-sh/bun/commit/5702b39ef1a90969dcb6aad87d799d67973e4911 -->

Thanks to @nektro for the contribution!

## Control .env and bunfig.toml loading in standalone executables

Standalone executables created with `bun build --compile` normally look for `.env` and `bunfig.toml` files in the directory where the executable is run. You can now disable this behavior at build time using the `--no-compile-autoload-dotenv` and `--no-compile-autoload-bunfig` flags.

This is useful when you want to ensure the executable behaves deterministically, regardless of the configuration files present in the user's working directory.

```bash
# Disable .env and bunfig.toml loading
bun build --compile --no-compile-autoload-dotenv --no-compile-autoload-bunfig app.ts
```

You can also configure this via the JavaScript API:

```js
await Bun.build({
  entrypoints: ["./app.ts"],
  compile: {
    // Disable .env loading
    autoloadDotenv: false,

    // Disable bunfig.toml loading
    autoloadBunfig: false,
  },
});
```

<!-- https://github.com/oven-sh/bun/commit/7c485177ee5a4878234de3aa822a80361cc9cf8d -->

## `retry` and `repeats` in `bun:test`

You can now use the `retry` and `repeats` options in `bun:test`.
`retry` runs the callback function up to the specified number of times and if the test passes once then the test passes,
while `repeats` runs the callback function up to the specified number of times and if the test fails once then the test fails.
This is useful for handling flaky tests.

```ts
import { test } from "bun:test";

test(
  "flaky test",
  () => {
    if (Math.random() > 0.1) throw new Error("fail");
  },
  { retry: 3 },
);

test(
  "check for flakiness",
  () => {
    // run this 20 times to ensure it's stable
  },
  { repeats: 20 },
);
```

Thanks to @pfgithub for the contribution!

## --no-env-file

You can now disable Bun's automatic `.env` file loading using the `--no-env-file` flag. This is useful in production environments or CI/CD pipelines where you want to rely solely on system environment variables.

```bash
bun run --no-env-file index.ts
```

This can also be configured in `bunfig.toml`:

```toml
# Disable loading .env files
env = false
```

Explicitly provided environment files via `--env-file` will still be loaded even when default loading is disabled.

<!-- https://github.com/oven-sh/bun/commit/509a97a43516fe4f6d4ff4003d1c9aeef89e92ce -->

## SQLite 3.51.0

`bun:sqlite` has been updated to SQLite v3.51.0.

```js
import { Database } from "bun:sqlite";

const db = new Database();
console.log(db.prepare("SELECT sqlite_version()").get());
// { "sqlite_version()": "3.51.0" }
```

<!-- https://github.com/oven-sh/bun/commit/0a307ed88099a762df445d10f0b9b2d9249faea8 -->

## Internal: Upgraded to Zig 0.15.2

Bun is now built with Zig 0.15.2. This reduces the binary size by 0.8MB and improves build times for contributors.

### Bundler fixes

- Fixed: A rare panic in the dev server when processing CSS assets in the incremental graph
- Fixed: A rare panic in the dev server that could occur when a file referenced by a dynamic import is deleted during a reload

### bun install fixes

- Fixed: A rare crash during `bun install` involving optional peer dependencies
- Fixed: A regression in `bun install` when parsing git dependency URLs with a leading hash
- Fixed: A regression from Bun v1.3.2 that could cause `bun ls --all` with unresolved optional peer dependencies to crash
- Fixed: A regression from Bun v1.3.2 where `sharp` versions older than v0.33.0 failed to install correctly

### Windows fixes

- Fixed: `process.stdout` now emits `'resize'` events and `SIGWINCH` signals on Windows, which fixes terminal resizing issues in Claude Code & OpenCode on Windows
- Improved: `bun getcompletes` works on Windows
- Fixed: a crash on Windows when laptop hibernates and then wakes up and resumes execution after a Worker thread had been terminated

### Node.js compatibility improvements

- Implemented: `_handle.fd` in `node:net` and `node:tls` for better compatibility with libraries that rely on the socket file descriptor
- Fixed: N-API bug preventing `rspack` or `rsbuild` from working

### Web APIs fixes

- Fixed: fuzzer-discovered crash when using JSON.stringify on a FormData object in rare cases
- Fixed: fuzzer-discovered crash when calling `stream` on a Blob in certain edge cases
- Fixed: sanitizer-discovered memory leak in `Blob`

### Bun.serve

- Fixed: An issue where Unicode characters in `Bun.serve` static `Response` objects given a string as input were missing the `Content-Type` header

### Networking

- Fixed: sanitizer-discovered memory leak in `node:net.SocketAddress` when passing an invalid port
- Fixed: sanitizer-discovered memory leak in `Bun.listen` when errors are thrown during socket creation

### YAML

- Fixed: `Bun.YAML.stringify` would incorrectly serialize strings with leading zeros as numbers
- Fixed: A performance issue where YAML merge keys could cause parsing to hang due to exponential complexity

### Transpiler

- Fixed: fuzzer-discovered crash in `new Bun.Transpiler()` with invalid configuration

### Bun.spawn

- Fixed: A small memory leak in `Bun.spawn` when passing extra non-IPC, non-stdout, non-stderr, and non-stdin file descriptors

### TypeScript definitions

- Fixed: Added JSDoc documentation for `configVersion` in `BunLockFile` type definition
- Fixed: Added missing `"css"`, `"jsonc"`, `"yaml"`, and `"html"` to the `Loader` type definition
- Fixed: Removed unnecessary dependency on `@types/react` in `@types/bun`

### Security

- Fixed: Updated root certificates to Mozilla NSS 3.117

### bun upgrade fixes

- Improved: `bun upgrade` now displays download sizes in human-readable units (e.g. `23.2MiB`) instead of raw bytes

### Thanks to 19 contributors!

- [@alii](https://github.com/alii)
- [@braden-w](https://github.com/braden-w)
- [@cirospaciari](https://github.com/cirospaciari)
- [@connerlphillippi](https://github.com/connerlphillippi)
- [@dioro](https://github.com/dioro)
- [@dylan-conway](https://github.com/dylan-conway)
- [@halil-pan](https://github.com/halil-pan)
- [@hona](https://github.com/hona)
- [@lydiahallie](https://github.com/lydiahallie)
- [@markovejnovic](https://github.com/markovejnovic)
- [@minigod](https://github.com/minigod)
- [@nathanosoares](https://github.com/nathanosoares)
- [@nektro](https://github.com/nektro)
- [@ocodista](https://github.com/ocodista)
- [@pfgithub](https://github.com/pfgithub)
- [@riskymh](https://github.com/riskymh)
- [@robobun](https://github.com/robobun)
- [@yinheli](https://github.com/yinheli)
