Read Bun v0.6.0's release notes on Bun's blog
To install:
curl https://bun.sh/install | bash
# or you can use npm
# npm install -g bun
To upgrade:
bun upgrade
What's Changed
- Add npm benchmark by @colinhacks in #2555
- Dylan/fix some failing tests by @Jarred-Sumner in #2544
- Implement
import.meta.main
by @Jarred-Sumner in #2556 - fix: modules to have null prototype by @privatenumber in #2561
- fix
deepEquals
with array holes and accessors by @dylan-conway in #2557 - In Documentation, move --watch before the script name by @Lawlzer in #2569
- fix: build warnings by @privatenumber in #2562
- fix(fetch.proxy) fix proxy authentication by @cirospaciari in #2554
- Add tests for
bun test
with preload scripts by @jakeboone02 in #2566 - Update
typecheck
by @colinhacks in #2572 - bun-types: infer strict
Subprocess
fromBun.spawn()
options by @paperdave in #1501 - docs(CONTRIBUTING): reference development guide by @privatenumber in #2576
- fix(ws): export Server by @privatenumber in #2575
- move resolve tests to another process by @dylan-conway in #2578
- bun-types: infer strict
Subprocess
fromBun.spawn()
options, part 2 by @paperdave in #2573 - Add last modify field "mtime" for FileBlob (#1431) by @zhongweiy in #2491
- Fix
toEqual
when the second array has extra array holes by @dylan-conway in #2580 - docs(cli/bunx): add notice by @xHyroM in #2574
- docs: add a section on uninstalling bun by @paperdave in #2560
- fix: export
constants
fromfs/promises
by @paperdave in #2567 - feat(tls.Server) basic support (cert, key, rejectUnauthorized, requestCert, ca) #2412 by @cirospaciari in #2552
FileBlob
->BunFile
, addBunFile.lastModified
by @colinhacks in #2581- chore(prettier): simplify glob and enable cache by @privatenumber in #2589
- Add TSConfig object type to TranspilerOptions interface by @jakeboone02 in #2545
- Bun gets a new bundler by @Jarred-Sumner in #2312
- Rewrite Developer Docs, Improve DX for new users, moving away from Devcontainer by @paperdave in #2588
- Fix callout tag on development docs by @paperdave in #2595
- Update TypeScript parsing to 5.0 by @Jarred-Sumner in #2593
- Fixes #2594 by @Jarred-Sumner in #2600
- Implement TOML & JSON support in Bun's new bundler by @Jarred-Sumner in #2609
- Fix symbol renaming bug by @dylan-conway in #2613
- fix(sockets) always safe deinit socket context by @cirospaciari in #2611
- docs: remove dev container section by @privatenumber in #2610
- Update development.md by @rmorey in #2625
- continue refining bundler tests 1 by @paperdave in #2623
- fix string escaping by @dylan-conway in #2639
- fix(fs): remove
promises.readfile
by @privatenumber in #2630 - bundler bug fixes by @dylan-conway in #2637
- more bundler tests by @paperdave in #2635
- fix(net) types and add more reliable tests by @cirospaciari in #2621
- fix bundling many entry points by @dylan-conway in #2640
- fix expectBundled precheck by @paperdave in #2641
- import file path and fix disabled browser require by @dylan-conway in #2642
- Upgrade WebKit by @Jarred-Sumner in #2643
- Fix typo in development.md by @marktani in #2647
- fix(server) fixes UAF of uWS headers by @cirospaciari in #2648
- fix node-net-test hang by @cirospaciari in #2649
- fix ambiguous import by @dylan-conway in #2654
- Docs restructuring by @colinhacks in #2638
- use a lazyily initialized stream for
node:crypto
createHash
by @paperdave in #2652 - Support
@jsx
,@jsxRuntime
,@jsxImportSource
, and@jsxFragment
pragmas by @Jarred-Sumner in #2655 - Upgrade Zig by @Jarred-Sumner in #2656
- [nit] minor typo in tcp.md by @Kruithne in #2657
- Support importing
.txt
files as strings by @Jarred-Sumner in #2660 - toBeFalsy expect counter and test scope check by @will-richards-ii in #2661
- more work on bundler tests by @paperdave in #2667
- fix(cli): replace unknown unzip link with bun docs by @xHyroM in #2669
- more bundler tests by @paperdave in #2670
- Get axios working by @Jarred-Sumner in #2673
- docs: fix code block by @simon04 in #2662
- fix typescript decorators with index and number keys by @dylan-conway in #2677
- fix parsing
with
keyword by @dylan-conway in #2680 - fix package json exports visit by @dylan-conway in #2687
- clarify file io docs by @paperdave in #2689
- implement
node:events
in javascript by @paperdave in #2604 - fix
make setup
by @alexlamsl in #2693 - Fix typo in benchmarking docs by @flakey5 in #2702
- Symbol minification by @dylan-conway in #2695
- template string folding bug fix by @dylan-conway in #2705
- chore(docs): add xcode runtime install to docs by @MaanuVazquez in #2706
- Add
tsconfig.json
tobun-types
by @colinhacks in #2587 - Update
typescript.md
by @colinhacks in #2590 - Make
Bun.build
more reliable by @Jarred-Sumner in #2718 - Reduce friction for building with npm by @Plecra in #2723
- Support plugins in
Bun.build
by @Jarred-Sumner in #2720 - Continue bundler tests by @paperdave in #2691
- [install] fix
bun add
on non-aliased dependency by @alexlamsl in #2728 - fix
make setup
by @alexlamsl in #2731 - Implement
onResolve
plugins inBun.build()
, support multiple onLoad and onResolve plugins by @Jarred-Sumner in #2739 - bundler tests, testing plugins by @paperdave in #2740
- Implement
file
loader inBun.build
by @Jarred-Sumner in #2745 - Basic types for Bun.build by @colinhacks in #2713
- Add bundler documentation by @colinhacks in #2753
- docs hotfix by @paperdave in #2755
- second hotfix to build docs by @paperdave in #2756
- Fixes #2746 by @Jarred-Sumner in #2748
- ensure
super()
is not merged with adjacent statements by @dylan-conway in #2757 - Use Ninja to build mimalloc and gitignore test/bun.lockb by @silversquirl in #2750
- bundler tests! by @paperdave in #2741
- very slightly faster open() and writeFileSync() by @Jarred-Sumner in #2759
- Remove extra word in docs/index.md by @beeburrt in #2758
- fix: make node:crypto Hash.copy work correctly by @silversquirl in #2761
- address unicode issue by @Jarred-Sumner in #2763
- Bundler docs updates + support for
naming
string by @colinhacks in #2767 - Improves Body.Value life cycle and Signal life cycle on server.zig by @cirospaciari in #2752
- bundler tests: rest of default.test.ts and starting jsx tests by @paperdave in #2765
- [install] handle repeated install of GitHub dependency correctly by @alexlamsl in #2780
- [install] handle
devDependencies
of local folders by @alexlamsl in #2781 - test default condition by @paperdave in #2776
- Implement source maps by @dylan-conway in #2770
- Bun Test matchers even/odd. Also, .toContains fix and truthy by @will-richards-ii in #2754
- Add missing type for sqlite by @Jarred-Sumner in #2764
- Add StricJS to ecosystem by @aquapi in #2747
- Fix checking for dynamic exports by @dylan-conway in #2792
- parse and visit catch body scope by @dylan-conway in #2796
- Add initial ecosystem tests by @Electroid in #2801
- fix source map line offsets by @dylan-conway in #2791
- Start esbuild migration guide. More docs. by @colinhacks in #2787
- Add missing JSON API to Web APIs page by @Kruithne in #2799
- Add tracy by @Jarred-Sumner in #2817
- added some improvements on server by @cirospaciari in #2803
- Fix rebuilds in
Bun.build()
by @Jarred-Sumner in #2824 - implement build api
define
andloaders
by @paperdave in #2805 - throw returned errors on
wrapWithHasContainer
by @paperdave in #2832 - Fix tsconfig paths star only in the key by @dylan-conway in #2825
- add
WebAssemblyInstance
andWebAssemblyGCObject
js types by @dylan-conway in #2835 - print space before label by @dylan-conway in #2837
- resolve rope strings when folding by @dylan-conway in #2838
- [install] operator on root package of workspaces by @alexlamsl in #2834
- fix catch scope var declarations by @dylan-conway in #2839
bun add
from root folder when call within workspaces by @alexlamsl in #2841- use member from parent scope when hoisting by @dylan-conway in #2840
- fix(ws) fix closing WS with code and reason by @cirospaciari in #2843
- fix(fetch) fix fetch inheritance by @cirospaciari in #2842
- make sure vars can be hoisted in catch scope by @dylan-conway in #2847
- feat(fetch) add redirect: 'error' support by @cirospaciari in #2845
- Implement
describe.skip
by @blackmann in #2836 - feat(dns) add support for { all: true } option on dns.lookup by @cirospaciari in #2846
- add tests for ws.close by @cirospaciari in #2844
- fix(fs) mkdtemp and mkdtempSync errors by @cirospaciari in #2851
- fix redirect: 'manual' and setTimeout on node:http request by @cirospaciari in #2848
- fix child process tests by @dylan-conway in #2584
- bundler tests and improve
Bun.build
return type by @paperdave in #2833 - Allow reading config from within plugins, and partially implement esbuild
initialOptions
by @paperdave in #2861 - oops by @paperdave in #2863
- fix large stdout output by @cirospaciari in #2850
- fix(fetch:proxy) return correct status when permission is dennied by @cirospaciari in #2860
root
bundle option by @dylan-conway in #2859- disable sloppy mode block level functions when not bundling by @dylan-conway in #2864
- proper stub for http socket by @cirospaciari in #2868
- windows path compatibility by @paperdave in #2869
- Single-file standalone Bun executables by @Jarred-Sumner in #2879
- feat(Timer.refresh) add refresh support on Timer by @cirospaciari in #2874
- fix(spawn) add Uint8Array support for stdout by @cirospaciari in #2866
- Fix bug with
req.url
set incorrectly by @Jarred-Sumner in #2881 - Add plugins for yaml & RSC by @colinhacks in #2888
- change the generated
debugId
suffix by @paperdave in #2890 - bundler testing by @paperdave in #2886
- handle printing missing expressions and add tests by @dylan-conway in #2872
- feat(WebSocketServer) WebSocketServer wrapper + socket.io initial support by @cirospaciari in #2880
- Fix running commonjs modules as entry point by @paperdave in #2885
New Contributors
- @privatenumber made their first contribution in #2561
- @Lawlzer made their first contribution in #2569
- @zhongweiy made their first contribution in #2491
- @marktani made their first contribution in #2647
- @Kruithne made their first contribution in #2657
- @will-richards-ii made their first contribution in #2661
- @simon04 made their first contribution in #2662
- @flakey5 made their first contribution in #2702
- @MaanuVazquez made their first contribution in #2706
- @Plecra made their first contribution in #2723
- @silversquirl made their first contribution in #2750
- @aquapi made their first contribution in #2747
- @blackmann made their first contribution in #2836
Full Changelog: bun-v0.5.9...bun-v0.6.0