github oven-sh/bun bun-v0.0.42
Bun v0.0.42

latest releases: bun-v1.1.8, bun-v1.1.7, bun-v1.1.6...
2 years ago

To upgrade:

bun upgrade

tab completions for bun run

bun run now has tab completions for zsh and fish that show scripts from package.json and bins from node_modules/.bin.

Install:

bun upgrade
bun completions 

Going forward, bun upgrade also updates completions, so you shouldn't have to do that again.

Bun.js

Bun now has a builtin "supports-color" polyfill, the package used by chalk to detect ANSI color support.

The TypeScript in this screenshot runs 2x faster in Bun.js than in Node.js:

image

Other stuff:

  • node-fetch & isomorphic-fetch polyfills work now. When an npm package imports node-fetch, Bun.js will automatically replace it with Bun's native implementation.
  • Bun.sleep(ms) lets you synchronously sleep. No promises
  • Fixed an edgecase with the CommonJS transform that affected export default (thank you @evanwashere for flagging)
  • Several more encoding issues specific to the JavaScriptCore integration were found & fixed, though there are a couple more I still need to fix.

JavaScript Lexer

  • Fixed a regression with \0 (and added an integration test)

Misc

  • --version now prints a newline at the end
  • -v is now shorthand for --version
  • Fixed spacing with the CLI help menu (thanks @KishanBagaria for flagging)
  • -u is now shorthand for --origin. Might rename that to --url in a future release.

Don't miss a new bun release

NewReleases is sending notifications on new releases.