fix(bun): Preserve overrides objects, trustedDependencies, workspace bins and git integrity through prune; accept lockfileVersion 3 - #13740
Merged
Conversation
…on 3 Bun is about to start writing object values in the top-level `overrides` section (rules scoped to one parent package) and stamping such lockfiles as lockfileVersion 3. Both currently make the whole lockfile unparseable, which disables per-package hashing and `turbo prune`. - overrides values are now string-or-object; the section is still copied verbatim on prune, and only string rules plus a group's "." entry are applied during resolution - lockfileVersion 3 is accepted; newer unknown versions parse with a warning instead of an error, matching the npm and pnpm parsers - trustedDependencies is copied verbatim on prune instead of emitted empty - workspace-level bin/binDir survive prune - the optional 4th (integrity) element of git/github entries survives prune - the root workspace entry no longer requires a name - local tarball and name@root: entries are emitted in the shape bun reads instead of as registry 4-tuples - turborepo-devtools also watches bun.lock, not only bun.lockb
Contributor
|
@Jarred-Sumner is attempting to deploy a commit to the Internal Apps Team on Vercel. A member of the Team first needs to authorize it. |
anthonyshew
approved these changes
Aug 14, 2026
anthonyshew
left a comment
Contributor
There was a problem hiding this comment.
LGTM. Thanks, Jarred!
anthonyshew
pushed a commit
that referenced
this pull request
Aug 14, 2026
## Release v2.10.10 > [!CAUTION] > Versioned docs aliasing FAILED. [View logs](https://github.com/vercel/turborepo/actions/runs/31803665773) ### Changes - chore: Release Turborepo 2.10.9 (#13696) (`c21e2e2`) - docs: Update Geistdocs to 1.19.6 (#13701) (`9bbc2c8`) - feat: Support nub.lock files (#13699) (`4740bac`) - chore: Release Turborepo 2.10.10-canary.1 (#13703) (`44c6fd6`) - perf: Walk the repository once when pruning (#13705) (`c59a533`) - fix(deps): Upgrade js-yaml to 4.3.1 (GHSA-5p4m-2wfm-xmqj) (#13704) (`f12c6e9`) - chore: Move pnpm overrides to pnpm-workspace.yaml (#13706) (`1475441`) - chore: Release Turborepo 2.10.10-canary.2 (#13707) (`c72285f`) - fix: Enable Eve examples pull requests (#13708) (`4e57b15`) - feat: Add Eve operator dashboard (#13710) (`96b9647`) - fix: Remove unsupported sandbox network policy (#13712) (`688614d`) - feat: Rotate Eve example maintenance daily (#13715) (`ec56a7f`) - fix: Resolve agent lint errors (#13716) (`bb535e9`) - chore: Upgrade TypeScript to 7.0.2 (#13713) (`2afa75d`) - fix(cli): Move EXPERIMENTAL label from ls command to --output flag (#13709) (`422ba28`) - fix: Apply nested parent gitignore patterns in manual hashing (#13690) (`2b8863c`) - feat: Add pytest task discovery (#13720) (`24e07a7`) - chore: Release Turborepo 2.10.10-canary.3 (#13721) (`bb46749`) - chore: Validate updated examples with turbo (#13723) (`ad53149`) - chore: Update with-rollup example (#13718) (`42ec389`) - feat: Notify Slack when agents open PRs (#13722) (`aa070b1`) - chore: Enforce draft pull requests (#13726) (`6a46551`) - fix: Expose Slack delivery diagnostics (#13733) (`caddaa9`) - chore: Update non-monorepo example (#13727) (`0bfd752`) - chore: Update with-rsbuild example (#13730) (`e0aee94`) - feat: Add daily performance agent (#13729) (`c4ac03b`) - feat: Support cross-toolchain repository affectedness (#13737) (`31b0c4f`) - fix: Scope musl library dependency installation (#13738) (`1da105f`) - chore: Release Turbo repository packages 0.0.1-canary.24 (#13739) (`65aa565`) - fix(bun): Preserve overrides objects, trustedDependencies, workspace bins and git integrity through prune; accept lockfileVersion 3 (#13740) (`ea08fac`) --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
github-actions Bot
added a commit
that referenced
this pull request
Aug 14, 2026
## Release v2.10.11-canary.1 > [!CAUTION] > Versioned docs aliasing FAILED. [View logs](https://github.com/vercel/turborepo/actions/runs/31812668548) ### Changes - chore: Release Turborepo 2.10.10-canary.3 (#13721) (`bb46749`) - chore: Validate updated examples with turbo (#13723) (`ad53149`) - chore: Update with-rollup example (#13718) (`42ec389`) - feat: Notify Slack when agents open PRs (#13722) (`aa070b1`) - chore: Enforce draft pull requests (#13726) (`6a46551`) - fix: Expose Slack delivery diagnostics (#13733) (`caddaa9`) - chore: Update non-monorepo example (#13727) (`0bfd752`) - chore: Update with-rsbuild example (#13730) (`e0aee94`) - feat: Add daily performance agent (#13729) (`c4ac03b`) - feat: Support cross-toolchain repository affectedness (#13737) (`31b0c4f`) - fix: Scope musl library dependency installation (#13738) (`1da105f`) - chore: Release Turbo repository packages 0.0.1-canary.24 (#13739) (`65aa565`) - fix(bun): Preserve overrides objects, trustedDependencies, workspace bins and git integrity through prune; accept lockfileVersion 3 (#13740) (`ea08fac`) - chore: Release Turborepo 2.10.10 (#13741) (`f7cb04d`) - fix: Automatically approve release workflows (#13743) (`237aef5`) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Jarred-Sumner
added a commit
to oven-sh/bun
that referenced
this pull request
Aug 14, 2026
…ilter/--catalog, nested overrides, transitive update, and workspace fixes (#38333) Brings Bun's package manager to parity with pnpm for monorepo workflows, and fixes the bugs found while checking every command against pnpm's implementation, pnpm's test suites, pnpm's open issue tracker, pnpm's docs, npm's arborist fixtures, and — for `bun update` — running real pnpm and Bun side by side on the same projects. ### What does this PR do? #### New commands - **`bun dedupe [--check]`** — collapses duplicate versions in `bun.lock` onto the smallest set that still satisfies every dependent's range, using only versions already in the lockfile, then installs. Never downgrades a direct dependency unless that is the only way to drop a version; keeps patched versions (and anything needed to reach them, and says so); refuses to run on a lockfile that is behind `package.json`. `--check` exits 1 without writing. - **`bun prune [--production | --omit=…] [--dry-run] [--filter <ws>]`** — removes everything in `node_modules` that the lockfile does not put there; `--production` leaves exactly what `bun install --production` would. Hoisted and isolated layouts, Windows junctions and shims, workspace links, bundled deps; refuses when `package.json` and `bun.lock` disagree or when `node_modules` was laid out by a different linker; understands turbo-pruned checkouts. - **`bun pm licenses [--json] [--prod|--dev] [--long] [--filter <ws>]`** — installed packages grouped by license, with a `(dev)` marker and `paths`/`license`/`description` in `--json`. - **`bun audit fix [--latest] [--dry-run] [--json]`** — moves each vulnerable package to the lowest safe version its dependents accept, per installed instance; rewrites exact pins when that is the only way; `--latest` also rewrites your own declared ranges (root, workspace, catalog) so a semver-major fix can be taken, and every blocked or unfixable item is followed by the command that resolves it (`bun audit fix --latest`, `bun audit --ignore GHSA-…`); re-audits the tree it actually installed and reports/exits from that second response (npm's `_submitQuickAudit`), so an advisory that starts at the version it moved to is not missed; works across registries; security fixes bypass `minimumReleaseAge` with an annotation. `bun audit --json` honors `--audit-level`/`--ignore` for its exit code; `--omit` is honored by `audit` and `licenses`. #### `bun update` semantics (pnpm's model) - A bare `bun update` re-resolves **transitive** packages too — every edge moves to the newest version its own range (or dist-tag) allows, per dependent, so `bun.lock` no longer stays stale after an update; overrides/catalogs changed since the last install are honored. From a workspace member or `--filter`, only what the selected workspaces reach is re-resolved; from the root, everything. - `bun update <name>` reaches any depth, matches `npm:` aliases by real name, updates in place, never adds to `package.json`, and errors on a name nothing selected depends on. `-r`/`--filter` fan a named update out across workspaces. `--latest` never downgrades a locked version that is ahead of the tag, and `update <name> --latest` also refreshes that package's own dependencies. - Plain updates keep dist-tag literals and non-caret ranges (`*`, `1.x`, `^1 || ^2`) exactly as written and only move the lockfile; `--latest` rewrites them to the resolved version as before. `bun update -i` applies only what you selected. New: positional patterns (`bun update '@types/*'`), `--dev`/`--prod`/`--no-optional`, `-L`, `bun up`. - `package.json` is written after resolution and `bun.lock`'s declared ranges, overrides and catalogs are re-derived from the final `package.json`, replacing the per-command literal rewriting; a no-op update leaves the file byte-identical. #### Overrides - **Nested overrides** (#6608): npm's nested objects, yarn's `a/b` paths and pnpm's `a>b` selectors, applied to the direct parent→child edge; **version-scoped targets** (`"lodash@<4.17.21": "4.17.21"`, the shape `pnpm audit --fix` writes), matched against the dependent's declared range as pnpm does. Rules persist inside the `overrides` section and the file is stamped `lockfileVersion: 3` **only when such rules exist** — existing lockfiles are byte-identical. Flat overrides additionally fix `$ref` to workspace-member deps, catalog-valued rules going stale, and warn on pnpm's `-` / `pkg@` forms. #### Workspaces and filters - `bun add|remove|update … --filter <ws>` (also `-F`, also `bun install <pkg> --filter`) edits the selected workspaces' `package.json` files and **links only those workspaces**, like `bun install --filter`. Filters gain pnpm's relation selectors (`foo...`, `...foo`, `foo^...`, `...^foo`) and `{dir}` subtrees, for the install family **and** `bun run --filter`; `--filter` may precede the subcommand; every command warns about patterns that match nothing; `add`/`remove` no longer select the root implicitly. - `bun add <pkg> --catalog[=name]` reuses an existing catalog entry, keeps a range an explicit version fits, catalogs the range a package already declares, decides per target, and refuses workspace names and local paths; a plain `bun add` uses a default-catalog entry when one exists. A package defined in both `catalog` and `catalogs.default` is an error. `catalog:` peers of registry packages bind to the importer's copy instead of the root catalog. - `--frozen-lockfile` / `bun ci` on turbo-pruned monorepos: pruned-away workspaces are tolerated, a survivor depending on a pruned workspace is an error, catalog subsets are accepted, and an overrides/catalogs change is a frozen failure. #### One output vocabulary Every command here prints the install family's shapes: header, glyph rows (`+`/`-`/`↑`, dedupe's `↳ name old → new`), exactly one noun-first summary line with counts and a duration (`2 duplicate versions removed, 3 packages installed (checked 5 packages) [12ms]`, `N packages removed (checked C) [t]`), no-ops that say what was checked, remedies printed as copy-pasteable command lines, warnings as `warn:`, `--silent` printing nothing, and errors with their remedy together on stderr. Transitive and named updates render as the summary's `↑` rows (once per package; `--dry-run` prints the same rows plus `N packages would be updated`); dedupe reports after the install it triggers, so lifecycle-script output never splits it. A lockfile whose bytes did not change is no longer rewritten (`Saved lockfile` only prints on a real write; `--lockfile-only` no-ops print `Done! Checked N packages (no changes)`). This came out of running every command against fixtures and comparing with `install`/`add`/`remove` (95 findings, all fixed). #### Config precedence A project's `bunfig.toml` now beats any `.npmrc` (project or user-level) for the same key (npmrc files → bunfig's set fields → CLI); npmrc-only settings such as `//host/:_authToken` still attach to bunfig-declared registries, matched by host and path regardless of how either file spells the trailing slash. #### Lockfile migration - `package-lock.json`: rebuilt around a reachability walk that derives each resolution from the entry itself. Fixes `git+https://github.com/…` resolutions being written unparseably (the next install threw the lockfile away), root `bundleDependencies` migrating to an **empty** lockfile, lockfileVersion 1 (and npm's upcoming 4) making `bun install` exit 1 instead of resolving fresh, dependency-level bundles, `dependencies`+`optionalDependencies` double edges, unreferenced entries aborting the migration, duplicate packages for identical `name@version` at nested paths, lost `optionalPeers`, lost integrity when a bundled copy was seen first, and `overrides` not being carried over. All 57 of arborist's v2/v3 fixture projects are vendored and migrated under snapshot. - `pnpm-lock.yaml` v9: bare-hash `patchedDependencies`, snapshot aliases, `catalog:default`, recorded tarball URLs, git `path:`, multi-document files, `runtime:` entries, named registries, peer-suffixed keys chosen per importer, injected workspaces, manifest-only importer deps. #### Isolated linker - An existing store entry whose dependencies re-resolved (override, dedupe, update) now has its links refreshed on the next install (measured cost below). `bun prune` builds the same store the installer builds, so stale `name@version+<peerhash>` variants left by peer bumps are removed and a kept package's real entry never is (whether it was installed with full or `--production` features); on the hoisted linker, dedupe / audit fix / update delete the nested copies whose rows they collapsed instead of leaving the old copy loadable. - Blocked entries resume through per-entry intrusive waiter lists instead of a scan of every store entry after each completion (robobun's #25983/#28425 attempted this). Measured on the reporter's repro from #25799 (2,259 store entries) and a synthetic 6,425-entry monorepo, PR build vs merge-base build: main-thread CPU in the link phase drops 0.85 → 0.33 s and 5.5 → 0.85 s (the removed work grows quadratically); wall time is unchanged with spare cores and 16% / 26% faster pinned to one CPU, the CI/Docker shape in those reports. (The minute-long installs originally reported were peer resolution, fixed before this PR's base.) - Two pre-existing leaks surfaced by the new LSan-enabled tests are fixed: the header buffer of every authenticated registry request, and the per-entry lifecycle-script lists. #### Other bug fixes `bun add x@npm:pkg` writes a range; `bun add --trust a b` no longer drops `b` when `a` was already trusted; `bun add x --dev` no longer rewrote every group in `bun.lock`; `catalog:` peer hoisting; `dependency::Version::eql` treated all `catalog:` specifiers as equal; a `file:` package whose dependencies reach itself (its own name, an `npm:` alias under its own name, two link targets depending on each other — the shapes a `package-lock.json` migration produces, and #25202's `workspace:.` self-reference) hung `bun install` forever in the hoisting tree — the migration shapes now install, and #25202's literal shape now terminates with `Workspace dependency "foo" not found` rather than installing as npm does; a peer of a `file:` package that was only placed nested was also written to `optionalPeers` in a migrated bun.lock, so the next `--frozen-lockfile` failed and a plain install rewrote the lockfile; `catalog:` literals in `bun update`; alias output in the install summary; help/completions for everything above. #### Behavior changes to note in the release notes - `bun update` moves transitive packages; `bun update <name>` no longer adds an undeclared package (exit 1); `--production`/`--prod` on update means "only update `dependencies` and `optionalDependencies`" (a group filter like `--dev`, not the install flag) and `-r`+names with no match is an error; `-i` updates only the selection. - Project `bunfig.toml` overrides any `.npmrc`. - `bun install <pkg> --filter x` edits `x` (not the root); `bun add y --filter x` no longer installs a package named `x`; `add`/`remove --filter '*'` no longer includes the root. - A plain `bun add x` in a workspace whose default catalog lists `x` writes `catalog:`; `audit fix` may rewrite exact pins; `--frozen-lockfile --lockfile-only` writes nothing; overrides/catalog changes fail frozen installs. - One-time lockfile churn after upgrading for projects with `catalog:` peers or dead `pkg@range` override rows; lockfiles that use nested/scoped overrides are v3 and unreadable by older Bun (only when opted in). Turborepo, Nx and Dependabot have been checked; the needed upstream changes are open (nrwl/nx#36666 covers v2 and v3; vercel/turborepo#13740 accepts v3 and preserves the object rows through prune — turborepo main today parses v2 and rejects v3; dependabot needs nothing). Note v2 itself only exists on the 1.4 line. - `bun audit --json` keeps npm's contract: `--audit-level`/`--ignore` decide the exit code, the JSON document is the full registry report (closes #31013 as won't-change). Automatic removal of stale `node_modules` entries on plain `bun install` (#32974) is separate from this PR: `bun prune` is the manual form, and dedupe / audit fix / update now clean up the nested copies they collapse on the hoisted linker; #32974 should reuse prune's planner, and #29512 (sbom) is sequenced after this so it can build on `reachable.rs` instead of carrying its own walk. - Deliberately kept where we differ from pnpm: root `bun update` covers the whole workspace; dependents whose ranges allow follow a moved version (one copy, not two); `--latest` works on transitive names; `--no-save` touches neither file; prune deletion failures exit 1; audit requests stay per-registry. #### Performance Measured on a 1,113-package Next/Prisma/MUI app (PR build vs a PR build of the merge base, interleaved, plus canary and 1.3.14): every hoisted cell is within noise except no-op install, +0.8 ms (+2%, identical syscalls); isolated no-op is +1.9 ms (+3.9%) — the deliberate cost of re-checking existing entries' links every install rather than persisting a stamp file. Everything added is otherwise off the plain-install path (gated on the feature being used or on a diff), and id-indexed sets are bitsets. ### How did you verify your code works? ~1,100 new or ported test cases across the install suites (designed behavior, cases ported from pnpm's suites, pinning tests for pnpm bugs this implementation is immune to, arborist's fixtures, and the CI review findings), all `toStrictEqual`; the whole `test/cli/install` directory passes locally and the existing suites are unchanged except where a pre-existing expectation was deliberately changed (each listed above). `bun update` was additionally verified with a rerunnable differential harness that runs pnpm 11 and this branch on 26 scenario families against one registry and diffs the resulting resolutions edge by edge — after this PR only the deliberate differences above remain. Ecosystem: Turborepo, Nx and Dependabot were checked against the new lockfile output. Co-authored work absorbed with credit: @kjanat's #38190 (alias handling, co-author on the commit), @charpeni's #31143 and @crystalin's #34407 (both superseded), and the tests of the earlier `bun update` PRs (#31752 by @zlotnika, #33127, #36381, #36729, #38224). robobun's #34688 (folder-dependency cycles; its tests are lifted, co-author on the commit) and #37289 (migrated optionalPeers; its test is lifted, co-author on the commit) were fixed independently here and are closed by this PR. #28422's quadratic scan is fixed here as well (already closed). Related but not closed — `bun prune` gives these a manual fix while the automatic-cleanup asks stay open: #8662, #26305, #29793, #21216, #16176. Also related: #10930, #26970, #26751. Fixes #1343 Fixes #3605 Fixes #14719 Fixes #24122 Fixes #18612 Fixes #20238 Fixes #25826 Fixes #23615 Fixes #26973 Fixes #20593 Closes #31013 Fixes #28959 Fixes #28402 Fixes #27897 Fixes #26675 Fixes #10949 Fixes #18504 Fixes #13388 Fixes #24523 Fixes #6608 Fixes #19059 Fixes #16569 Fixes #8262 Fixes #11901 Fixes #13469 Fixes #25202 Closes #29664 Closes #31143 Closes #34407 Closes #34688 Closes #37289 Closes #38190 --------- Co-authored-by: Kaj Kowalski <info@kajkowalski.nl> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: robobun <117481402+robobun@users.noreply.github.com>
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.
Description
Bun's next release changes a few things about
bun.lockthatcrates/turborepo-lockfiles/src/bun/does not handle yet, and while going through the format we found a handful of existing fields thatturbo prunedrops or rewrites into a shape Bun does not read. This PR fixes all of them in one pass over the Bun parser/emitter; every item is independent and small.Background on the Bun side:
lockfileVersion: 2shipped in install: bump default lockfileVersion to 2, gate stricter parse checks behind it oven-sh/bun#31539 and turbo accepts it since feat: Accept Bun lockfile version 2 #13119 (2.10.3). install: pnpm parity — dedupe, prune, pm licenses, audit fix, add --filter/--catalog, nested overrides, transitive update, and workspace fixes oven-sh/bun#38333 (the upcoming package-manager work) does not change the text format further.The next Bun release adds nested overrides: rules scoped to the dependencies of one parent package. They are stored inside the existing
overridessection as object values, and the file is stampedlockfileVersion: 3only when at least one such rule exists (it goes back to 2 when they are removed). Objects are accepted by Bun's reader at every version. The shape is:Today either the object value (
invalid type: map, expected a string) or the version stamp makesBunLockfile::from_strfail, so the lockfile is treated as absent andturbo pruneerrors withCannot prune without parsed lockfileas soon as a repo adds one nested rule.1. Object values in
overrides,lockfileVersion: 3overridesis nowMap<String, OverrideValue>with an untagged string-or-object value. Prune keeps copying the whole section verbatim, exactly as it already does for flat overrides (subgraph.rs): Bun's--frozen-lockfilediffs the complete override set in the lockfile against the root package.json, which prune also copies verbatim, so trimming any rule (flat or nested) would fail pruned installs.apply_overridesapplies string rules and an object's"."entry; keys carrying a parent range ("webpack@^4") never match a bare name, and nested child rules need no resolution logic in turbo because Bun materializes them as nested lockfile keys (webpack/terser), which resolution already follows.LockfileVersion::V3is added. Versions above the newest known one now parse with atracing::warn!instead of an error, since every Bun revision so far has only added to the schema and the npm/pnpm parsers in this crate already behave that way; negative versions are still rejected. Adding or removing the first nested rule flips 2 <-> 3 and therefore registers as a global lockfile change once each; that seems correct and is left as is.2.
trustedDependenciescopied verbatim on prunePrune currently emits the section empty. Bun diffs the lockfile's
trustedDependenciesagainst the set declared in the (verbatim-copied) package.json files on every install, so an empty section registers every declared entry as newly added. On released Bun versions this is only bookkeeping (--frozen-lockfiledoes not compare it), but Bun's next release uses "did the manifest diff report anything" to decide how aggressively to clean the tree before the frozen comparison, which can turn that spurious diff into a visible difference; that signal is expected to be tightened on the Bun side as well, but copying the section is the consistent choice either way and matches howoverrides/catalog(s)are handled. Trade-off worth knowing: if the only declarer of a trusted name was a workspace that got pruned away (thebun-v1-issue-12744fixture declares it inapps/bot), the copied entry is now reported as removed instead of nothing being reported. Bun's frozen check compares the resolved tree, not this section, so neither variant should affectbun install --frozen-lockfileon released Bun versions, and the root package.json is the documented place for the field.3. Workspace-level
bin/binDirBun writes a workspace's
bin/binDirinto itsworkspacesentry and the installer links workspace bins from there.WorkspaceEntrydid not have the fields, so a pruned install linked no bins for workspace packages. They are now carried through (binis a string or an object).4. git/github integrity element
git/github entries are
[ident, INFO, bun-tag, integrity?]; the deserializer stopped after the bun-tag and the emitter always wrote 3 elements, silently removing the content pin from every git dependency in the pruned lockfile.PackageEntrygains anintegrityfield that is only read/written for git/github entries.5. Root workspace
nameis optionalBun omits
namefrom the""workspace entry when the root package.json has no name;WorkspaceEntry.namewas required, so such repos failed to parse entirely. It now defaults to empty and is skipped on output, which is also how Bun represents it internally.6. Local tarball and
name@root:entriesPackageIdent::Tarballonly matched the literal stringtarball(a misreading of the schema comment), so["bar@./bar-0.0.2.tgz", INFO, integrity]was classified as a registry package and re-emitted as[ident, "", INFO, integrity], which Bun rejects withExpected an object. Tarballs are now recognized the way Bun does it (by.tgz/.tar.gzsuffix) and use the existing[ident, INFO, integrity?]path. Similarlyname@root:entries were parsed intoRootInfobut the emitter never consulted it, andRootInfo.bincould not hold an object bin; they are now written as[ident, { bin, binDir }].7.
turborepo-devtoolswatcherRELEVANT_FILESlistedbun.lockbbut notbun.lock(the package watcher has both), so the devtools graph never rebuilt on text lockfile changes.Not included: a Bun-generated
lockfile-testsfixture. All existing Bun fixtures there pinpackageManagerVersion<= 1.3.x, and the v3 shape needs a Bun that is not released yet; happy to add abun-v2-*fixture now and abun-v3-nested-overridesone once that release is out, if you want them in this PR or a follow-up.Testing Instructions
cargo test -p turborepo-lockfiles(312 passed). New unit tests inbun/test.rs: v3 file with object overrides (parse,"."applied, ranged/nested rules not applied, verbatim through prune, reparse), object overrides at v1, unknown newer version accepted / negative rejected,trustedDependenciesthrough prune, workspacebin/binDir(string, object,binDir) through prune, root workspace without a name, git/github 4-element entries through prune, local tarball / remote tarball /@root:entries (with string, object and no bins) through prune.de.rs/ser.rsgain matchingtest_cases,types.rsgains tarball/root ident tests.cargo test -p turborepo-devtools watcher,cargo test -p turborepo-repository bun.cargo fmt,cargo clippy -p turborepo-lockfiles --all-targetsclean.lockfile-testse2e harness (see above; the encoded shapes asserted in the new tests are copied from what Bun's writer produces).This PR was written by Claude on behalf of the Bun team; a Bun maintainer is sponsoring it and will respond to review.