bun - bun-v0.0.42


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.

Details

date
Nov. 1, 2021, 12:34 p.m.
name
Bun v0.0.42
type
Patch
👇
Register or login to:
  • 🔍View and search all bun releases.
  • 🛠️Create and share lists to track your tools.
  • 🚨Setup notifications for major, security, feature or patch updates.
  • 🚀Much more coming soon!
Continue with GitHub
Continue with Google
or