← 返回命令列表

Linux command

bun-upgrade 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Upgrade Bun

bun upgrade

Upgrade to a specific version

bun upgrade --version [1.0.0]

Upgrade to the canary channel

bun upgrade --canary

说明

bun upgrade updates the Bun JavaScript runtime binary in place to a newer version. By default, it fetches the latest stable release from the official GitHub release feed and replaces the running binary. --canary switches to the rolling canary channel that tracks the development branch, useful for trying unreleased features or reproducing bug reports. --version pins the upgrade (or downgrade) to a specific published release. The command does not touch project-level packages installed under node_modules - those are managed by bun install. After upgrading, bun --version should report the new version. To update Bun managed by a package manager (Homebrew, npm, Scoop, ...), use that manager instead so its records stay in sync.

参数

--version _version_
Upgrade to a specific version.
--canary
Upgrade to the latest canary (development) build.

FAQ

What is the bun-upgrade command used for?

bun upgrade updates the Bun JavaScript runtime binary in place to a newer version. By default, it fetches the latest stable release from the official GitHub release feed and replaces the running binary. --canary switches to the rolling canary channel that tracks the development branch, useful for trying unreleased features or reproducing bug reports. --version pins the upgrade (or downgrade) to a specific published release. The command does not touch project-level packages installed under node_modules - those are managed by bun install. After upgrading, bun --version should report the new version. To update Bun managed by a package manager (Homebrew, npm, Scoop, ...), use that manager instead so its records stay in sync.

How do I run a basic bun-upgrade example?

Run `bun upgrade` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does --version _version_ do in bun-upgrade?

Upgrade to a specific version.