{"slug": "bun-v1-3-3", "title": "Bun v1.3.3", "summary": "Bun version 1.3.3 has been released, fixing 95 issues and introducing several new features. The update adds support for `CompressionStream` and `DecompressionStream` Web APIs (including brotli and zstd formats), new `retry` and `repeats` options for `bun:test`, and flags to disable automatic `.env` and `bunfig.toml` loading in standalone executables. Additionally, the release upgrades SQLite to version 3.51.0 and rebuilds Bun with Zig 0.15.2, reducing binary size by 0.8MB.", "body_md": "This release fixes 95 issues (addressing 348 👍 reactions)!\nTo install Bun\ncurl -fsSL https://bun.sh/install | bash\nnpm install -g bun\npowershell -c \"irm bun.sh/install.ps1|iex\"\nscoop install bun\nbrew tap oven-sh/bun\nbrew install bun\ndocker pull oven/bun\ndocker run --rm --init --ulimit memlock=-1:-1 oven/bun\nTo upgrade Bun\nbun upgrade\nCompressionStream and DecompressionStream\nBun now implements CompressionStream\nand DecompressionStream\n. These standard Web APIs allow for streaming compression and decompression of data without buffering the entire payload in memory.\nIn addition to the standard \"gzip\"\n, \"deflate\"\n, and \"deflate-raw\"\nformats, Bun also supports \"brotli\"\nand \"zstd\"\n.\nconst response = await fetch(\"https://example.com\");\n// Compress the response body using gzip\nconst compressed = response.body.pipeThrough(new CompressionStream(\"gzip\"));\n// Or use zstd for faster compression\nconst zstd = response.body.pipeThrough(new CompressionStream(\"zstd\"));\nThanks to @nektro for the contribution!\nControl .env and bunfig.toml loading in standalone executables\nStandalone executables created with bun build --compile\nnormally look for .env\nand bunfig.toml\nfiles in the directory where the executable is run. You can now disable this behavior at build time using the --no-compile-autoload-dotenv\nand --no-compile-autoload-bunfig\nflags.\nThis is useful when you want to ensure the executable behaves deterministically, regardless of the configuration files present in the user's working directory.\n# Disable .env and bunfig.toml loading\nbun build --compile --no-compile-autoload-dotenv --no-compile-autoload-bunfig app.ts\nYou can also configure this via the JavaScript API:\nawait Bun.build({\nentrypoints: [\"./app.ts\"],\ncompile: {\n// Disable .env loading\nautoloadDotenv: false,\n// Disable bunfig.toml loading\nautoloadBunfig: false,\n},\n});\nretry\nand repeats\nin bun:test\nYou can now use the retry\nand repeats\noptions in bun:test\n. retry\nruns the callback function up to the specified number of times and if the test passes once then the test passes, while repeats\nruns 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.\nimport { test } from \"bun:test\";\ntest(\n\"flaky test\",\n() => {\nif (Math.random() > 0.1) throw new Error(\"fail\");\n},\n{ retry: 3 },\n);\ntest(\n\"check for flakiness\",\n() => {\n// run this 20 times to ensure it's stable\n},\n{ repeats: 20 },\n);\nThanks to @pfgithub for the contribution!\n--no-env-file\nYou can now disable Bun's automatic .env\nfile loading using the --no-env-file\nflag. This is useful in production environments or CI/CD pipelines where you want to rely solely on system environment variables.\nbun run --no-env-file index.ts\nThis can also be configured in bunfig.toml\n:\n# Disable loading .env files\nenv = false\nExplicitly provided environment files via --env-file\nwill still be loaded even when default loading is disabled.\nSQLite 3.51.0\nbun:sqlite\nhas been updated to SQLite v3.51.0.\nimport { Database } from \"bun:sqlite\";\nconst db = new Database();\nconsole.log(db.prepare(\"SELECT sqlite_version()\").get());\n// { \"sqlite_version()\": \"3.51.0\" }\nInternal: Upgraded to Zig 0.15.2\nBun is now built with Zig 0.15.2. This reduces the binary size by 0.8MB and improves build times for contributors.\nBundler fixes\n- Fixed: A rare panic in the dev server when processing CSS assets in the incremental graph\n- Fixed: A rare panic in the dev server that could occur when a file referenced by a dynamic import is deleted during a reload\nbun install fixes\n- Fixed: A rare crash during\nbun install\ninvolving optional peer dependencies - Fixed: A regression in\nbun install\nwhen parsing git dependency URLs with a leading hash - Fixed: A regression from Bun v1.3.2 that could cause\nbun ls --all\nwith unresolved optional peer dependencies to crash - Fixed: A regression from Bun v1.3.2 where\nsharp\nversions older than v0.33.0 failed to install correctly\nWindows fixes\n- Fixed:\nprocess.stdout\nnow emits'resize'\nevents andSIGWINCH\nsignals on Windows, which fixes terminal resizing issues in Claude Code & OpenCode on Windows - Improved:\nbun getcompletes\nworks on Windows - Fixed: a crash on Windows when laptop hibernates and then wakes up and resumes execution after a Worker thread had been terminated\nNode.js compatibility improvements\n- Implemented:\n_handle.fd\ninnode:net\nandnode:tls\nfor better compatibility with libraries that rely on the socket file descriptor - Fixed: N-API bug preventing\nrspack\norrsbuild\nfrom working\nWeb APIs fixes\n- Fixed: fuzzer-discovered crash when using JSON.stringify on a FormData object in rare cases\n- Fixed: fuzzer-discovered crash when calling\nstream\non a Blob in certain edge cases - Fixed: sanitizer-discovered memory leak in\nBlob\nBun.serve\n- Fixed: An issue where Unicode characters in\nBun.serve\nstaticResponse\nobjects given a string as input were missing theContent-Type\nheader\nNetworking\n- Fixed: sanitizer-discovered memory leak in\nnode:net.SocketAddress\nwhen passing an invalid port - Fixed: sanitizer-discovered memory leak in\nBun.listen\nwhen errors are thrown during socket creation\nYAML\n- Fixed:\nBun.YAML.stringify\nwould 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\nTranspiler\n- Fixed: fuzzer-discovered crash in\nnew Bun.Transpiler()\nwith invalid configuration\nBun.spawn\n- Fixed: A small memory leak in\nBun.spawn\nwhen passing extra non-IPC, non-stdout, non-stderr, and non-stdin file descriptors\nTypeScript definitions\n- Fixed: Added JSDoc documentation for\nconfigVersion\ninBunLockFile\ntype definition - Fixed: Added missing\n\"css\"\n,\"jsonc\"\n,\"yaml\"\n, and\"html\"\nto theLoader\ntype definition - Fixed: Removed unnecessary dependency on\n@types/react\nin@types/bun\nSecurity\n- Fixed: Updated root certificates to Mozilla NSS 3.117\nbun upgrade fixes\n- Improved:\nbun upgrade\nnow displays download sizes in human-readable units (e.g.23.2MiB\n) instead of raw bytes", "url": "https://wpnews.pro/news/bun-v1-3-3", "canonical_source": "https://bun.com/blog/bun-v1.3.3", "published_at": "2025-11-21 10:11:00+00:00", "updated_at": "2026-05-22 20:43:08.287443+00:00", "lang": "en", "topics": ["developer-tools", "open-source"], "entities": ["Bun", "CompressionStream", "DecompressionStream", "nektro"], "alternates": {"html": "https://wpnews.pro/news/bun-v1-3-3", "markdown": "https://wpnews.pro/news/bun-v1-3-3.md", "text": "https://wpnews.pro/news/bun-v1-3-3.txt", "jsonld": "https://wpnews.pro/news/bun-v1-3-3.jsonld"}}