Linux command
bun-update 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Update all packages
bun update
Update a specific package
bun update [package]
Update to latest versions
bun update --latest
说明
bun update upgrades installed packages to newer versions, refreshing `node_modules` and the lockfile. By default it respects the semver ranges declared in `package.json`; --latest lifts that restriction and writes the newest available version back to the manifest. When called without package names, every dependency is considered. Naming one or more packages limits the operation to those entries (and their transitive graph).
参数
- --latest
- Update to latest versions, ignoring version ranges in package.json (also rewrites the manifest).
- --no-save
- Update installed packages without modifying `package.json` or `bun.lockb`.
- --save-text-lockfile
- Generate the human-readable `bun.lock` text lockfile alongside the binary one.
- -d, --dev
- Limit the update to `devDependencies`.
- --production
- Limit the update to non-dev dependencies.
- --frozen-lockfile
- Fail if the lockfile would need to change (CI safety check).
- --dry-run
- Show what would change without writing to disk.
FAQ
What is the bun-update command used for?
bun update upgrades installed packages to newer versions, refreshing `node_modules` and the lockfile. By default it respects the semver ranges declared in `package.json`; --latest lifts that restriction and writes the newest available version back to the manifest. When called without package names, every dependency is considered. Naming one or more packages limits the operation to those entries (and their transitive graph).
How do I run a basic bun-update example?
Run `bun update` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does --latest do in bun-update?
Update to latest versions, ignoring version ranges in package.json (also rewrites the manifest).