Skip to content

fix: Preserve nested Bun dependency versions#12965

Merged
anthonyshew merged 3 commits into
mainfrom
shew/fix-12962-v2
May 27, 2026
Merged

fix: Preserve nested Bun dependency versions#12965
anthonyshew merged 3 commits into
mainfrom
shew/fix-12962-v2

Conversation

@anthonyshew

Copy link
Copy Markdown
Contributor

Why

Bun lockfile pruning could drop a hoisted transitive dependency when a target workspace also used a newer nested version of the same package. That left the pruned lockfile accepted by Bun but resolving a dependency outside its declared semver range.

What

Fix Bun package key parsing for deeply nested package keys so pruning preserves the correct parent-child relationship for each nested dependency. Add a regression test and a check-lockfiles fixture based on issue #12962.

How

Verified with:

  • cargo test -p turborepo-lockfiles
  • cargo fmt --check
  • cargo build -p turbo
  • pnpm check-lockfiles --fixture bun-nested-major-mismatch --turbo-path ../target/debug/turbo

Pre-push hooks also passed on push.

@anthonyshew anthonyshew requested a review from a team as a code owner May 27, 2026 18:31
@vercel

vercel Bot commented May 27, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
examples-basic-web Ready Ready Preview, Comment, Open in v0 May 27, 2026 6:32pm
examples-designsystem-docs Ready Ready Preview, Comment, Open in v0 May 27, 2026 6:32pm
examples-gatsby-web Ready Ready Preview, Comment, Open in v0 May 27, 2026 6:32pm
examples-kitchensink-blog Ready Ready Preview, Comment, Open in v0 May 27, 2026 6:32pm
examples-nonmonorepo Ready Ready Preview, Comment, Open in v0 May 27, 2026 6:32pm
examples-svelte-web Ready Ready Preview, Comment, Open in v0 May 27, 2026 6:32pm
examples-tailwind-web Ready Ready Preview, Comment, Open in v0 May 27, 2026 6:32pm
examples-vite-web Ready Ready Preview, Comment, Open in v0 May 27, 2026 6:32pm
turbo-site Ready Ready Preview, Comment, Open in v0 May 27, 2026 6:32pm

@anthonyshew anthonyshew requested review from tknickman and removed request for a team May 27, 2026 18:31
@anthonyshew anthonyshew enabled auto-merge (squash) May 27, 2026 18:31
@anthonyshew anthonyshew merged commit 7952b46 into main May 27, 2026
41 checks passed
@anthonyshew anthonyshew deleted the shew/fix-12962-v2 branch May 27, 2026 18:41
anthonyshew pushed a commit that referenced this pull request May 28, 2026
## Release v2.9.16

> [!CAUTION]
> Versioned docs aliasing FAILED. [View
logs](https://github.com/vercel/turborepo/actions/runs/26579906777)

### Changes

- release(turborepo): 2.9.15 (#12955) (`c85d410`)
- fix: Avoid hanging PTY shutdown (#12958) (`52e81bd`)
- fix: Retry npm tlog publish failures (#12959) (`5317f65`)
- release(turborepo): 2.9.16-canary.1 (#12960) (`2284fa9`)
- fix: Preserve nested Bun dependency versions (#12963) (`8d4eaf8`)
- Revert "fix: Preserve nested Bun dependency versions" (#12964)
(`3b1b6e9`)
- release(turborepo): 2.9.16-canary.2 (#12961) (`5e5b248`)
- fix: Preserve nested Bun dependency versions (#12965) (`7952b46`)
- fix: Don't delete existing `.git` when using `--no-git` flag (#12968)
(`b4aa626`)

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
anthonyshew pushed a commit that referenced this pull request May 28, 2026
## Release v2.9.17-canary.1

> [!CAUTION]
> Versioned docs aliasing FAILED. [View
logs](https://github.com/vercel/turborepo/actions/runs/26586129373)

### Changes

- fix: Preserve nested Bun dependency versions (#12963) (`8d4eaf8`)
- Revert "fix: Preserve nested Bun dependency versions" (#12964)
(`3b1b6e9`)
- release(turborepo): 2.9.16-canary.2 (#12961) (`5e5b248`)
- fix: Preserve nested Bun dependency versions (#12965) (`7952b46`)
- fix: Don't delete existing `.git` when using `--no-git` flag (#12968)
(`b4aa626`)
- fix: Keep non-PTY stdin alive for persistent tasks (#12972)
(`26ae68b`)
- release(turborepo): 2.9.16 (#12970) (`fac2b75`)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.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