I'm migrating a Laravel+Sail project to use bun instead nodejs.
According the Bun docs, after run bun i, a binary lockfile named bun.lockb (similar to yarn.lock) is created to increase performance. Should I add this file into my .gitignore file?
The versioning of the
bun.lockbis useful if you need ensure the reproducible dependencies on install.Reusing the example of @Joachim Bauer, imagine to have a dependency like foo = ˆ3.0.0 (so latest minor release) and a CICD pipeline that install and build it every time. If the foo repo suddenly upgrade it will install a new version of that dependency, with a possible result on some new bugs because you referenced the old version when developing.
But maybe you don't want to avoid using the
ˆcharacter so you don't have to check for updates manually. Bun has the option--frozen-lockfileoninstallcommand so it will retrieve the exact version on thebun.lockbfile to ensure the dependencies you worked when developing it.