To install:
curl https://bun.sh/install | bash
# or you can use npm
# npm install -g bun
To upgrade:
bun upgrade
Read Bun v0.8.0's release notes on Bun's blog
What's Changed
- [install] handle
bun add
of existingpeerDependencies
correctly by @alexlamsl in #4028 - Running missing scripts exits with non-0 by @YashoSharma in #4026
- Bind require.resolve() by @Jarred-Sumner in #4030
- Fixes #4010 by @Jarred-Sumner in #4031
- Fixes #4029 and fixes #4022 by @Jarred-Sumner in #4032
- Fixes #4001 by @Jarred-Sumner in #4034
- Fix
path.normalize
edge case. by @Hanaasagi in #4042 - WASM test analyzer by @Jarred-Sumner in #4043
- fix iterating headers with
set-cookie
by @dylan-conway in #4048 - implement
bun update
by @alexlamsl in #4046 - implement fetching data urls by @dylan-conway in #4000
- Fix
Bun.hash
functions by @jhmaster2000 in #4054 - Add
env
option fornode:worker_threads
by @paperdave in #4052 - make dynamically importing bun work by @Jarred-Sumner in #4055
- Fix
path.format
compatibility issue. by @Hanaasagi in #4064 - Fix require("console") #3820 by @paperdave in #4073
- Set exports to {} in user-constructed CommonJSModuleRecords by @paperdave in #4076
- feat(bun/test): Implement "toSatisfy" & "toIncludeRepeated" (fwup) by @TiranexDev in #3651
- worker tests by @paperdave in #4058
- feat(bun:test) add support for test.each() and describe.each() by @jecquas in #4047
- Fix one of the astro segfaults, also fix bun init version by @paperdave in #4079
- update simdutf by @Jarred-Sumner in #4078
- Fix
XLSX.read
coredump by @Hanaasagi in #4086 - Add support for bun --revision by @YashoSharma in #4027
- remove non-node node-fallbacks by @paperdave in #4082
- Sync bun-polyfills branch by @jhmaster2000 in #4081
- add util.formatWithOptions by @paperdave in #4090
- bun test: format description of test.each by @jecquas in #4092
- Fixes #4062 by @Jarred-Sumner in #4106
- fs.zig: create temp files with 0o700, not 0o007 by @adtac in #4107
- Handle thundering herd of setInterval by @Jarred-Sumner in #4109
- Fix memory leak in Buffer.toString('base64url') by @Jarred-Sumner in #4111
- run files without extensions by @dylan-conway in #4113
- make
astro build
slightly faster by making fs.realpath actually async, and fix a potential crash in fs.readFile by @Jarred-Sumner in #4117 - Support TypeScript's
export type * as Foo from 'bar'
by @Jarred-Sumner in #4125 bun-wasm
fixes & improvements by @jhmaster2000 in #4126- Deprecate loading
node_modules.bun
by @Jarred-Sumner in #4131 - Fix custom config path not working. by @Hanaasagi in #4129
- Fix worker event loop ref/unref + leak by @paperdave in #4114
- Update Stric guides by @aquapi in #4137
- Fix
make setup
by @paperdave in #4148 - Make builtins' source origin use a valid url by @paperdave in #4152
- fix importing too long of strings by @paperdave in #4155
- chore: fix method name typo by @Hanaasagi in #4162
- Fix event loop issue with
Bun.connect
by @paperdave in #4157 - Update docs our current status of node compatibility by @paperdave in #4172
- Create domjit.test.ts by @dylan-conway in #4173
- Fix prisma linux generation by @cirospaciari in #4150
bun --inspect
by @Jarred-Sumner in #4158- Add SvelteKit guide by @colinhacks in #4180
- Add SolidStart guide by @colinhacks in #4182
- Fix leaking .ptr by @Jarred-Sumner in #4181
- correct guide's bunfig example option by @xxxhussein in #4192
- Add Astro guide by @colinhacks in #4110
- refactor: move HTMLRewriter to c++ bindings by @bru02 in #4193
- Fix(node:fs): add
buffer
parameter infs.read
callback. by @Hanaasagi in #4191 - Allow IncomingRequest.req to be overwritten. by @paperdave in #4154
- Support Nitro by @paperdave in #4098
- Add
util.inspect.custom
support toutil.inspect/Bun.inspect/console.log
by @paperdave in #4194 - Remove most C API usages, add debugger pretty printers for
Headers
,URLSearchParams
,FormData
,Worker
,EventTarget
by @Jarred-Sumner in #4187 - Implement BigIntStats by @paperdave in #4208
- feat: add self-closing & can-have-content by @bru02 in #4206
- tty
ReadStream
,WriteStream
, and readline rawmode by @dylan-conway in #4179 - Add inline sourcemaps when
--inspect
is enabled by @Jarred-Sumner in #4213 - Fixes #172 by @Jarred-Sumner in #4220
- Fix crash impacting sharp & resvg by @Jarred-Sumner in #4221
- Add unsupported (yet) comment to distroless image by @o-az in #4210
- Fix(bundler): use different alias mappings based on the target. by @Hanaasagi in #4163
- Fix test failures from 3a9a6c6 by @Jarred-Sumner in #4231
- Implement
--inspect-brk
by @Jarred-Sumner in #4222 - Fixes #1675 by @Jarred-Sumner in #4230
- Update README.md by @xxxhussein in #4232
- Fix memory leak in
buffer.toString("hex")
by @Jarred-Sumner in #4235 - Buffer.toString('hex') gets 40x faster by @Jarred-Sumner in #4237
- Fixes #4089 by @Jarred-Sumner in #4105
- feat: Implement Bun.inspect.custom by @paperdave in #4243
- Implement
napi_ref_threadsafe_function
by @paperdave in #4156 - Fix crypto.EC constructor by @paperdave in #4242
- Fix(bundler): allow generating exe file in nested path. by @Hanaasagi in #4226
- Fix
emitKeyPresses
with backspace + quote by @paperdave in #4245 - fetch(stream) add stream support for compressed and uncompressed data by @cirospaciari in #4127
- import errors have
code
set toERR_MODULE_NOT_FOUND
andrequire
errors havecode
set toMODULE_NOT_FOUND
by @Jarred-Sumner in #4244 - Docs and types for v0.8.0 by @colinhacks in #4199
- fix stdin stream unref and resuming by @dylan-conway in #4250
- fix fsevents and stub for qwikcity by @paperdave in #4247
- fix(parser): yield before
]
shouldn't be a syntax error by @paperdave in #4264 - Ask for
bun --revision
insteadbun -v
by @xHyroM in #4256 - Fix more types. by @xxxhussein in #4273
- docs: remove broken DNS docs link by @LapsTimeOFF in #4268
- Bunch of streams fixes by @Jarred-Sumner in #4251
- Fix ffi type by @codehz in #4265
- Update globals.d.ts by @VietnamecDevelopment in #4276
New Contributors
- @YashoSharma made their first contribution in #4026
- @jhmaster2000 made their first contribution in #4054
- @jecquas made their first contribution in #4047
- @adtac made their first contribution in #4107
- @o-az made their first contribution in #4210
- @LapsTimeOFF made their first contribution in #4268
- @codehz made their first contribution in #4265
- @VietnamecDevelopment made their first contribution in #4276
Full Changelog: bun-v0.7.3...bun-v0.8.0