Description
Commonality currently does not support Bun's bun.lockb
lockfile when validating the project structure, which is understandable given that the binary format is normally unreadable from Node's side. Trying to run the studio
command, for example, in a monorepo with only a bun.lockb
lockfile will log:
You must have a package-lock.json, yarn.lock, or pnpm-lock.yaml file at the root of your project.
It should be possible however to extract an Yarn compatible lockfile by either:
- Generating the
yarn.lock
file withbun --dry-run --yarn
; - Printing the existing
bun.lockb
Yarn compatible lockfile tostdout
withbun bun.lockb
(recommended);
Handling this on CLI would eliminate the need for the user to manually generate a compatible lockfile when using Bun as the package manager. Optionally, it's also possible to show some additional output on the error, telling the user to configure the project to automatically generate yarn.lock
files alongside the regular lockfile, either through a direct instruction, or through a link to Bun's docs: https://bun.sh/guides/install/yarnlock
I would be willing to submit a PR implementing either of these if requested.