-
Notifications
You must be signed in to change notification settings - Fork 380
Add support for bun.lock text-based lockfile #3405
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Bun 1.2 introduced bun.lock as a text-based alternative to the binary bun.lockb. This change adds an alternativeLockfiles property to the PackageManager interface to support detecting either lockfile format. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Revert variable name to foundPackageManagers to reduce diff - Add npm-shrinkwrap.json as alternative lockfile for npm - Improve tests to verify actual lockfile names in output
.changeset/bun-lock-support.md
Outdated
| '@shopify/cli-hydrogen': patch | ||
| --- | ||
|
|
||
| Add support for Bun's text-based lockfile (`bun.lock`) introduced in Bun 1.2, in addition to the existing binary lockfile (`bun.lockb`). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| Add support for Bun's text-based lockfile (`bun.lock`) introduced in Bun 1.2, in addition to the existing binary lockfile (`bun.lockb`). | |
| Add support for Bun's text-based lockfile (`bun.lock`) introduced in Bun 1.2, and npm's shrinkwrap lockfile (`npm-shrinkwrap.json`), as alternatives to their respective primary lockfiles (`bun.lockb` and `package-lock.json`). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done ✅
fredericoo
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
my only nitpick was the changeset, but no one uses shrinkwrap anyway so dont take it as a requirement
Summary
Bun 1.2 introduced
bun.lockas a text-based alternative to the binarybun.lockblockfile. This PR adds support for detecting either lockfile format in the Hydrogen CLI.Changes
alternativeLockfilesproperty to thePackageManagerinterface to support multiple lockfile formats per package managercheck-lockfile.tsto check both primary and alternative lockfilesdeploy.tsto recognize changes to alternative lockfilesbun.lockandbun.lockbdetectionRelated
Test plan
bun.lockdetectionbun.lockbdetection🤖 Generated with Claude Code