Bun: bun-v0.0.42 Release

Release date:
November 1, 2021
Previous version:
bun-v0.0.41 (released October 30, 2021)
Magnitude:
491 Diff Delta
Contributors:
1 total committer
Data confidence:
Commits:

Top Contributors in bun-v0.0.42

Jarred-Sumner

Directory Browser for bun-v0.0.42

We haven't yet finished calculating and confirming the files and directories changed in this release. Please check back soon.

Release Notes Published

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 

<img src="https://user-images.githubusercontent.com/709451/139670634-1197777a-d1da-44ab-9cc5-37723beb75e7.gif" height=400 />

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.