Skip to content

feat(cli): support bun.lock text-based lockfile from Bun 1.2#1283

Open
sorccu wants to merge 2 commits intomainfrom
simo/sim-219-support-text-based-bunlock-lockfile-in-the-bun-detector
Open

feat(cli): support bun.lock text-based lockfile from Bun 1.2#1283
sorccu wants to merge 2 commits intomainfrom
simo/sim-219-support-text-based-bunlock-lockfile-in-the-bun-detector

Conversation

@sorccu
Copy link
Copy Markdown
Member

@sorccu sorccu commented Apr 8, 2026

Summary

Bun 1.2 changed from a binary lockfile (bun.lockb) to a text-based lockfile (bun.lock). This PR updates package manager detection to support both formats.

  • Rename representativeLockfile: string | undefined to representativeLockfiles: string[] across the PackageManager interface, PackageManagerDetector abstract class, and all detector implementations
  • BunDetector now returns ['bun.lock', 'bun.lockb'], preferring the newer text-based format
  • Move detectLockfile from per-detector implementations to a shared default in PackageManagerDetector that iterates the lockfile list in order
  • Update fixture-sandbox.ts to use detectNearestLockfile scoped to the sandbox root

Test plan

  • npm run prepare --workspace packages/cli builds successfully
  • npm run test --workspace packages/cli passes (860 tests)
  • npm run lint passes
  • Manual: verify detection works with a project using bun.lock (Bun >= 1.2)
  • Manual: verify detection still works with a project using bun.lockb (Bun < 1.2)

sorccu and others added 2 commits April 9, 2026 00:40
Bun 1.2 changed from a binary lockfile (bun.lockb) to a text-based
lockfile (bun.lock). Change representativeLockfile to
representativeLockfiles (string[]) so package managers can declare
multiple lockfile names. Earlier entries in the list are preferred.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant