Bun bun-v0.0.69stable Released Feb 06, 2022
Impact Score: 5/10

bun v0.0.69

Source available โ€” automated, not human-reviewed

Component: bun ยท Channel: stable. Automated analysis, not a compatibility certification. How this works.

Analysis updated: 2026-11-01.

Compatibility not verified โ€” check source notes
๐Ÿ“„ .MD
โšก Executive Summary (TL;DR)

Bun bun-v0.0.69. Source highlight: If you run into problems, try this instead:

Who Does This Impact? (Role-Based Analysis)

๐Ÿ’ป Software Engineers & Devs

Check the source notes against the package and APIs you use before upgrading.

๐Ÿ“Š Product & Engineering Leads

Use the documented changes to assess relevance to your product; release frequency alone is not a quality measure.

โš™๏ธ DevOps & Security

Verify the target version, runtime requirements and rollback procedure in the official documentation.

โšก Performance & Enhancements (1)

  • Reliability improvements to bun's https client, which means reliability improvements to `bun install`, `fetch()`, `bun create`, `bun upgrade`, and everything else depending on it

๐Ÿ”ง Bug Fixes & Patches (5)

  • On some machines, `bun dev` would crash after 30 seconds due to bugs with the https client. Since it happened in a random interval between 0 and 30 seconds, it appeared to be in many places
  • In some cases, it was closing socket file descriptors multiple times, leading to strange bugs like files failing to extract files during `bun install` or data corruption
  • Fix JS printing edgecase with nested vars using destructuring - d47e0de1750c9d234febdebeac4415470deea008
  • Fix CommonJS <> ESM interop edgecase when `require()` bundled code - 73449bf43373ee3a23f080e3b9ce144bc93db27c
  • @alexkuz for making it a little easier compile debug builds on mac https://github.com/Jarred-Sumner/bun/commit/aad33c2611ae08d142a68213ece0eeb072621113
๐Ÿ“„ View Raw Release Notes (Original Developer Log)
To upgrade: ```bash bun upgrade # If you run into problems, try this instead: curl https://bun.sh/install | bash ``` # bun v0.0.69 Highlights: - Reliability improvements to bun's https client, which means reliability improvements to `bun install`, `fetch()`, `bun create`, `bun upgrade`, and everything else depending on it - `bunfig.toml` lets you configure bun from a config file instead of only CLI arguments - `import foo from "./file.toml"` is now supported (thanks to bun's new TOML parser) - No longer need to install the `react-refresh` npm package for React Fast Refresh to work - Native support for Node.js `path` module - `bun dev` includes a default favicon, and the favicon becomes a red โš ๏ธ on build error <img src=https://user-images.githubusercontent.com/709451/152702288-ea611c16-3e95-4241-9c98-1de904c69c0a.gif height=200 /> ### HTTPS client I rewrote the TLS part of bun's https client to match Chromium's behavior. This fixes many bugs: - On some websites using TLS 1.3, the https client would infinite loop during handshaking - On some machines, `bun dev` would crash after 30 seconds due to bugs with the https client. Since it happened in a random interval between 0 and 30 seconds, it appeared to be in many places - On Ubuntu 20.04 when running Linux kernel 5.4 (the default for ubuntu server), sending http requests simply did not work at all. This was due to using io_uring APIs which are only available on Linux Kernel 5.6. Now, bun detects the linux kernel version in use and uses a (slower) fallback if the APIs are unavailable - In some cases, it was closing socket file descriptors multiple times, leading to strange bugs like files failing to extract files during `bun install` or data corruption - In some cases, it was never closing socket file descriptors. This eventually led to errors about all sockets being busy - Previously, bun cached the results returned from `getaddrinfo`. On Linux, this sometimes caused it to crash. Now bun does not cache it. This makes it a little slower, but this way of doing DNS resolution needs to be replaced with a non-blocking implementation regardless. ### bunfig.toml bunfig.toml is bun's configuration file. Everything in it is optional. You don't need a `bunfig.toml` to use bun, this exists so you don't have to pass flags to the CLI each time. Options specific to `bun install` will be added in a future release. ```toml # Set a default framework to use # By default, bun will look for an npm package like `bun-framework-${framework}`, followed by `${framework}` framework = "next" logLevel = "debug" # publicDir = "public" # external = ["jquery"] [macros] # Remap any import like this: # import {graphql} from 'react-relay'; # To: # import {graphql} from 'macro:bun-macro-relay'; react-relay = { "graphql" = "bun-macro-relay" } [bundle] saveTo = "node_modules.bun" # Don't need this if `framework` is set, but showing it here as an example anyway entryPoints = ["./app/index.ts"] [bundle.packages] # If you're bundling packages that do not actually live in a `node_modules` folder or do not have the full package name in the file path, you can pass this "@bigapp/design-system" = true [dev] # Change the default port from 3000 to 5000 port = 5000 [define] # Replace any usage of "process.env.bagel" with the string `lox`. # The values are parsed as JSON, except single-quoted strings are supported and `'undefined'` becomes `undefined` in JS. # This will probably change in a future release to be just regular TOML instead. It is a holdover from the CLI argument parsing. "process.env.bagel" = "'lox'" [loaders] # When loading a .bagel file, run the JS parser ".bagel" = "js" ``` #### TOML imports bun now has a custom TOML 1.0 parser, which means you can import .toml files from bun. Note that parsing dates/timestamps is not implemented yet. ```js import config from 'my-config-file.toml'; console.assert(config.hi === "hello"); ``` ```toml hi = "hello" ``` A future version might support importing top-level properties instead of only `default`. I think supporting both ways would be a better DX. ## bun dev This release improves using bun for static sites. `bun dev` now automatically looks for `.html` files in the same folder as code. Previously, `.html` files needed to be in either `public` or `static` You no longer need to install the `react-refresh` npm package to use React Fast Refresh with bun. bun embeds it into bun's binary and automatically enables it if resolving `"react"` (or otherwise, the JSX import source) is successful bun sets a default favicon so you can more easily see which tab is your dev server: ![image](https://user-images.githubusercontent.com/709451/152704166-33ef8b61-a26f-412a-8a17-d8bd18b10726.png) ## Path module bun.js gets native support for Node's [`path` module](https://nodejs.org/api/path.html). This is a performance improvement, but it's also good for consistency & reliability. It means that resolving file paths in JavaScript is consistent with native code. ```js // Any of these work import * as path from "node:path"; import * as path from "path"; const path = require("path"); ``` As part of that work, a bug was fixed when generating relative file paths where, in some cases, it would cut off the first letter if the `destination` file path did not have any folders in common with the `from` file path ------ Misc: - Missing newline in errors in bun install - 1064b9dada6e9920f3f2e241bedb70570de032f5 - Fix JS printing edgecase with nested vars using destructuring - d47e0de1750c9d234febdebeac4415470deea008 - Fix CommonJS <> ESM interop edgecase when `require()` bundled code - 73449bf43373ee3a23f080e3b9ce144bc93db27c - bun.js resolve dynamic imports lazily - https://github.com/Jarred-Sumner/bun/commit/0e0bfe91d050fc7fa645c8a1169db600a2ecd0ed - Reduced memory usage for object pools. For many things, bun uses object pools to spend less time allocating and deallocating memory. Once allocated, these are never freed. Now object pools have a limit to how many are kept alive in the pool. 213960a04a22bed4d0ffb3cdc9e20439bd1dcc10 - Use a special heap for the https client Thanks to: - [@minkbazink](https://twitter.com/minkbazink/status/1445507301473849353) for the idea to call bun's config bunfig.toml and [@robpalmer2](https://twitter.com/robpalmer2) - @alexkuz for making it a little easier compile debug builds on mac https://github.com/Jarred-Sumner/bun/commit/aad33c2611ae08d142a68213ece0eeb072621113