bun - bun-v0.0.56


To upgrade:

bun upgrade

bun install

Today is an exciting day. Introducing bun install – an incredibly fast npm client.

Before I get into perf numbers, consider this especially early.
- workspaces not implemented yet
- link: not implemented yet
- github: not implemented yet
- git: not implemented yet
- Config file where you can set registry and auth tokens is not implemented yet. That means private packages won't really work yet (though it does read $npm_config_registry)
- The lockfile format may change a little in the coming weeks (which would invalidate existing lockfiles)
- postinstall will not be supported (probably won't be opt-in either). esbuild and turbo get special treatment I'm calling "native bin linking". I plan to write a more generalizable proposal for this that other npm clients can adopt to make shipping binary executables on npm faster & simpler
- node-gyp isn't supported yet either, but that will be fixed.

Linux

100x faster npm install for incremental installs. In this case, only react is missing (the cleanup resets node_modules), each package manager has an up-to-date lockfile, and packages have previously downloaded before (disk cache)

20x faster than npm install when node_modules is empty. In this case, each package manager has an up-to-date lockfile and packages have also been downloaded before.

image

When there are no changes, bun install is 100x faster than npm install

image

macOS

Note: currently macOS installs are single-threaded & parallelism may help when there are > 100 packages, so these numbers may improve later

80x faster npm install for incremental installs.

image

4x faster npm install when there is no node_modules folder

image

When there are no changes, 80x faster than npm install

image

Autocomplete

Thanks to @evanwashere, bun add has autocomplete for the top 10,000 npm packages. It also searches your shell's history to complete from.

Screen_Recording_2021-12-19_at_11 32 08_PM

Fish completions:

image

Why is it faster?

I will do a longer write up on why it's faster. Zig is part of that, but a lot of work went into data layout, the lockfile format, the https client, the manifest cache format, and a lot of other stuff.


Details

date
Dec. 21, 2021, 10:45 p.m.
name
Bun v0.0.56
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