8000 Support `bun.lockb` lockfile on project structure validation · Issue #368 · commonalityco/commonality · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Support bun.lockb lockfile on project structure validation #368
Open
@ernestoresende

Description

@ernestoresende

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 with bun --dry-run --yarn;
  • Printing the existing bun.lockb Yarn compatible lockfile to stdout with bun 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0