Add support for bun.lock text-based lockfile#3405
Merged
graygilmore merged 4 commits intoShopify:mainfrom Jan 29, 2026
Merged
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>
graygilmore
reviewed
Jan 27, 2026
- 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
graygilmore
approved these changes
Jan 27, 2026
fredericoo
reviewed
Jan 28, 2026
.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`). |
Contributor
There was a problem hiding this comment.
Suggested change
| 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`). |
fredericoo
approved these changes
Jan 28, 2026
Contributor
fredericoo
left a comment
There was a problem hiding this comment.
my only nitpick was the changeset, but no one uses shrinkwrap anyway so dont take it as a requirement
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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