Skip to main content
Bun v1.1.39 introduced bun.lock, a JSONC-formatted lockfile. It is human-readable and git-diffable without configuration, at no cost to performance. In 1.2.0+ it is the default format for new projects. Learn more.

Use the --yarn flag to generate a Yarn-compatible yarn.lock file (in addition to bun.lock{b}).
terminal

To set this as the default behavior, add the following to your bunfig.toml file.
bunfig.toml

To print a Yarn lockfile to your console without writing it to disk, “run” your bun.lockb with bun.
terminal

See bun install.