MyGit

bun-v0.0.56

oven-sh/bun

版本发布时间: 2021-12-22 06:45:50

oven-sh/bun最新发布版本:bun-v1.1.20(2024-07-13 14:04:45)

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.

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.

相关地址:原始地址 下载(tar) 下载(zip)

1、 bun-darwin-aarch64.zip 10.06MB

2、 bun-darwin-x64.zip 12.11MB

3、 bun-linux-x64.zip 23.58MB

查看:2021-12-22发行的版本