Post

In the next version of Bun `bun.lock` is the new lockfile in `bun install`

7 reposts77 likes

Unlike bun.lockb, this lockfile is human readable, which is important when working in teams The lockfile format is jsonc, like tsconfig.json. Trailing commas and comments are allowed.

Merge conflicts are inevitable, and that's why we put each package and it's dependencies on a single line. Fewer lines means easier merge conflicts.

Bun will continue to support the binary `bun.lockb` for awhile. `bun.lock` will be the default for `bun install` after Bun v1.2. To try the new text-based lockfile before then, use the `--save-text-lockfile` flag and upgrade to --canary.

Very cool. I thought the reason for Bun using binary lock file initially was for performance reasons. Did the team make a break though in dealing with text file vs binary?