bun v0.0.69 #116
Jarred-Sumner
announced in
Announcements
bun v0.0.69
#116
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
To upgrade:
bun v0.0.69
Highlights:
bun install
,fetch()
,bun create
,bun upgrade
, and everything else depending on itbunfig.toml
lets you configure bun from a config file instead of only CLI argumentsimport foo from "./file.toml"
is now supported (thanks to bun's new TOML parser)react-refresh
npm package for React Fast Refresh to workpath
modulebun dev
includes a default favicon, and the favicon becomes a redHTTPS client
I rewrote the TLS part of bun's https client to match Chromium's behavior.
This fixes many bugs:
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 placesbun install
or data corruptiongetaddrinfo
. 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 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.
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 eitherpublic
orstatic
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 successfulbun sets a default favicon so you can more easily see which tab is your dev server:
Path module
bun.js gets native support for Node's
path
module. 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.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 thefrom
file pathMisc:
require()
bundled code - 73449bfThanks to:
This discussion was created from the release bun v0.0.69.
Beta Was this translation helpful? Give feedback.
All reactions