Add native bun.lockb patching for hosted and vendored modes - #246
Merged
Merged
Conversation
Wenxin Jiang (Wenxin-Jiang)
approved these changes
Sep 22, 2026
Mikola Lysenko (mikolalysenko)
merged commit Sep 22, 2026
9489b18
into
main
250 of 252 checks passed
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.
Binary Bun projects previously required conversion to a text lockfile for hosted patches and could not be vendored. This adds native parsing and rewriting of
bun.lockbformats 1–3 for hosted patches, vendoring, transitions between those modes, repair, and scoped rollback.Direct binary patching is the default and only
bun.lockbpath. Remove the binary-to-text conversion code, legacy migration-ledger replay, migration warnings, conversion tests, and obsolete documentation. Retain textbun.locksupport and hosted ↔ vendored mode transitions; binary projects remain binary through patching and rollback.Preserve package identity, dependency topology, metadata, integrity, and Bun's lock hash. Handle historical binary format upgrades, workspace representations, production dependency filtering, and workspace-local tarballs for older readers. Invalid or drifted binary state refuses before mutation.
Validation on final commit
f3ad1c5:Historical Linux readers run on Ubuntu 22.04 because official Bun 0.5.9–0.6.8 binaries segfault during pristine installs on the Ubuntu 24.04 runner, before Socket Patch runs. All historical acceptance cases remain required, and newer releases also run on Ubuntu latest.
See
docs/testing/bun-compatibility.mdfor the matrix, historical reader limits, and reproducible commands. Bun versions before 0.5.9 cannot install tarball resolutions; their binary locks are validated with compatible newer readers.