-
Notifications
You must be signed in to change notification settings - Fork 2.1k
feat(turborepo-lockfiles): update bun.lock support to match Bun's current implementation #10729
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
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Someone is attempting to deploy a commit to the Vercel Team on Vercel. A member of the Team first needs to authorize it. |
…rent implementation Updates Turborepo's bun.lock parser to support features from Bun's latest lockfile format, addressing compatibility gaps and adding missing functionality. ## What? - Add LockfileVersion enum for v0/v1 format handling - Fix global_change() to detect version changes (was only checking package manager) - Add support for new lockfile fields: trustedDependencies, overrides, catalog/catalogs - Implement platform-specific constraints (os/cpu fields) - Add v1 workspace optimizations (reduces redundant package entries) - Add bun_global_change() standalone function for API consistency ## Why? The existing implementation had several gaps: - Cache invalidation could fail when lockfile versions changed - New Bun lockfile fields were silently ignored - V1 optimizations were not implemented - Platform constraints were not parsed ## How? - Catalog resolution via resolve_catalog_version() method - Override support via apply_overrides() method - Negatable enum for platform constraints - Version-aware workspace resolution - Comprehensive subgraph filtering ## Testing Ran tests with: ```bash cargo test -p turborepo-lockfiles ``` - Added 43 new tests (72 total Bun tests, up from 29) - All 238 package manager tests pass - Test coverage includes: version detection, catalogs, overrides, v1 workspaces, platform constraints, integration scenarios ## Notes - Based on Bun's src/install/lockfile/bun.lock.zig - Follows existing patterns from npm/pnpm/yarn implementations - Some features (trusted deps, platform filtering) are parsed but not actively used 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
|
@Jarred-Sumner Any updates or timelines on this? Seems like turborepo with bun catalogs just triggers fan-out tasks whenever there is a change to the lock file (e.g. adding any package, local workspace or external). |
| let workspace_key = format!("{workspace_name}/{name}"); | ||
| if let Some((_key, entry)) = self.package_entry(&workspace_key) { | ||
| // Check if the entry matches the override version (if different from resolved) |
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.
When an override is specified but the overridden package doesn't exist in the lockfile, the code silently ignores the override and returns the original package instead of failing or returning None.
View Details
📝 Patch Details
diff --git a/crates/turborepo-lockfiles/src/bun/mod.rs b/crates/turborepo-lockfiles/src/bun/mod.rs
index d78140d22..96a69e7b8 100644
--- a/crates/turborepo-lockfiles/src/bun/mod.rs
+++ b/crates/turborepo-lockfiles/src/bun/mod.rs
@@ -416,6 +416,10 @@ impl Lockfile for BunLockfile {
key: override_entry.ident.to_string(),
version: pkg_version,
}));
+ } else {
+ // Override specified but target package not found in lockfile
+ // Return None to be consistent with catalog resolution behavior
+ return Ok(None);
}
}
Analysis
Inconsistent error handling for unsatisfiable overrides in BunLockfile.resolve_package()
What fails: In crates/turborepo-lockfiles/src/bun/mod.rs, the resolve_package() method silently ignores overrides when the overridden package version doesn't exist in the lockfile, returning the original package instead of None.
How to reproduce:
,
"packages": {"foo": ["foo@1.0.0", {}, "sha512"]},
"overrides": {"foo": "2.0.0"} // 2.0.0 doesn't exist!
}));
let result = lockfile.resolve_package("", "foo", "^1.0.0").unwrap();
// Before fix: returns Some(Package{key: "foo@1.0.0", ...})
// After fix: returns NoneResult: The method returns Some(Package{key: "foo@1.0.0"}) instead of None, silently ignoring the override.
Expected: Should return Ok(None) to be consistent with catalog resolution behavior (lines 367-373), which returns Ok(None) when a catalog reference can't be resolved.
Fix: Added else clause after line 419 to return Ok(None) when override package not found, matching the behavior of catalog resolution and preventing silent fallback to the original package.
anthonyshew
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.
I think we're far enough along on this to merge. We can put it in people's hands and see how it does on a canary.
Tremendous thanks to @Jarred-Sumner for kindling the flame to get us to do this, finally. Let's roll.
|
Not sure why the check for a site build is hanging. The site is done building successfully. I'll merge past it. |
|
@anthonyshew Thanks so much for this! Really appreciate your work! |
|
@Firgrep Appreciate the kind word. Please try it out and let us know how it goes, per this comment. |
This PR contains the following updates: | Package | Change | Age | Confidence | |---|---|---|---| | [turbo](https://turborepo.com) ([source](https://github.com/vercel/turborepo)) | [`2.5.6` -> `2.6.1`](https://renovatebot.com/diffs/npm/turbo/2.5.6/2.6.1) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>vercel/turborepo (turbo)</summary> ### [`v2.6.1`](https://github.com/vercel/turborepo/releases/tag/v2.6.1): Turborepo v2.6.1 [Compare Source](vercel/turborepo@v2.6.0...v2.6.1) <!-- Release notes generated using configuration in .github/release.yml at v2.6.1 --> #### What's Changed ##### Docs - docs: 2.6 release blog post by [@​anthonyshew](https://github.com/anthonyshew) in [#​11003](vercel/turborepo#11003) - docs: update typo'd link by [@​lishaduck](https://github.com/lishaduck) in [#​11032](vercel/turborepo#11032) - chore(with-docker/Dockerfile): Some improvements by [@​yairopro](https://github.com/yairopro) in [#​11010](vercel/turborepo#11010) - docs: Fix grammatical mistake on structuring-a-repository.mdx by [@​Andrew-Pynch](https://github.com/Andrew-Pynch) in [#​11091](vercel/turborepo#11091) - feat: Cross-platform microfrontends port command by [@​anthonyshew](https://github.com/anthonyshew) in [#​11098](vercel/turborepo#11098) ##### [@​turbo/codemod](https://github.com/turbo/codemod) - ci: Fix flake in JS tests by [@​anthonyshew](https://github.com/anthonyshew) in [#​11067](vercel/turborepo#11067) ##### [@​turbo/repository](https://github.com/turbo/repository) - chore: Update to Rust 1.91.0 by [@​ognevny](https://github.com/ognevny) in [#​10885](vercel/turborepo#10885) ##### Examples - examples(deps-dev): bump [@​types/node](https://github.com/types/node) from 18.17.4 to 24.10.0 in /examples/non-monorepo by [@​dependabot](https://github.com/dependabot)\[bot] in [#​11037](vercel/turborepo#11037) - examples(deps-dev): bump the kitchen-sink group in /examples/kitchen-sink with 9 updates by [@​dependabot](https://github.com/dependabot)\[bot] in [#​11043](vercel/turborepo#11043) - examples: Remove redundant border declaration by [@​Yeom-JinHo](https://github.com/Yeom-JinHo) in [#​11042](vercel/turborepo#11042) - examples(deps-dev): bump turbo from 2.5.6 to 2.6.0 in /examples/with-shell-commands in the with-shell-commands group by [@​dependabot](https://github.com/dependabot)\[bot] in [#​11039](vercel/turborepo#11039) - examples(deps-dev): bump the with-svelte group in /examples/with-svelte with 7 updates by [@​dependabot](https://github.com/dependabot)\[bot] in [#​11041](vercel/turborepo#11041) - examples(deps): bump the basic group in /examples/basic with 9 updates by [@​dependabot](https://github.com/dependabot)\[bot] in [#​11040](vercel/turborepo#11040) - examples(deps-dev): bump the with-tailwind group in /examples/with-tailwind with 6 updates by [@​dependabot](https://github.com/dependabot)\[bot] in [#​11038](vercel/turborepo#11038) - examples(deps): bump next from 16.0.0 to 16.0.1 in /examples/non-monorepo by [@​dependabot](https://github.com/dependabot)\[bot] in [#​11051](vercel/turborepo#11051) - examples(deps): bump next from 16.0.0 to 16.0.1 in /examples/basic by [@​dependabot](https://github.com/dependabot)\[bot] in [#​11082](vercel/turborepo#11082) - examples(deps): bump next from 16.0.0 to 16.0.1 in /examples/with-tailwind by [@​dependabot](https://github.com/dependabot)\[bot] in [#​11083](vercel/turborepo#11083) - examples(dev-deps): bump eslint-config-next from 16.0.0 to 16.0.1 in /examples/non-monorepo by [@​dependabot](https://github.com/dependabot)\[bot] in [#​11086](vercel/turborepo#11086) - examples(fix): Gradient in `with-tailwind` by [@​mahi656](https://github.com/mahi656) in [#​11073](vercel/turborepo#11073) - examples(dev-deps): bump svelte from 5.43.3 to 5.43.5 in /examples/with-svelte by [@​dependabot](https://github.com/dependabot)\[bot] in [#​11087](vercel/turborepo#11087) - examples(deps): bump next from 16.0.0 to 16.0.1 in /examples/kitchen-sink by [@​dependabot](https://github.com/dependabot)\[bot] in [#​11088](vercel/turborepo#11088) ##### Changelog - fix: Improve parity with real Bun lockfile format for `prune` by [@​anthonyshew](https://github.com/anthonyshew) in [#​11048](vercel/turborepo#11048) - fix: add some Linux variables to default passthrough env vars by [@​anthonyshew](https://github.com/anthonyshew) in [#​10959](vercel/turborepo#10959) - fix: Labels for k + j backwards in binds list by [@​ethan-fraser](https://github.com/ethan-fraser) in [#​11036](vercel/turborepo#11036) - fix(prune): Add bunfig.toml to list of copied files by [@​Gabrola](https://github.com/Gabrola) in [#​11055](vercel/turborepo#11055) - fix(prune): Handle `patchedDependencies` for bun by [@​Gabrola](https://github.com/Gabrola) in [#​11027](vercel/turborepo#11027) - fix(boundaries): Enable import attributes parsing by [@​anthonyshew](https://github.com/anthonyshew) in [#​11053](vercel/turborepo#11053) - fix: Improve determinism for graceful shutdown by [@​anthonyshew](https://github.com/anthonyshew) in [#​11063](vercel/turborepo#11063) - ci: Lower opt-level and remove debug symbols for dev profile by [@​anthonyshew](https://github.com/anthonyshew) in [#​11068](vercel/turborepo#11068) - ci: Avoid flaking for test server mock by [@​anthonyshew](https://github.com/anthonyshew) in [#​11066](vercel/turborepo#11066) - ci: Don't install dependencies in tests that don't need it by [@​anthonyshew](https://github.com/anthonyshew) in [#​11071](vercel/turborepo#11071) - fix: Revert "fix(logs): create log files for non-cached tasks" by [@​anthonyshew](https://github.com/anthonyshew) in [#​11072](vercel/turborepo#11072) - ci: Fix leaky tests by [@​anthonyshew](https://github.com/anthonyshew) in [#​11081](vercel/turborepo#11081) - fix: Bun lockfile pruner adjustment by [@​anthonyshew](https://github.com/anthonyshew) in [#​11092](vercel/turborepo#11092) - fix: Improve version resolution in Bun lockfiles by [@​anthonyshew](https://github.com/anthonyshew) in [#​11095](vercel/turborepo#11095) - feat: Move icon to left side in TUI by [@​anthonyshew](https://github.com/anthonyshew) in [#​11097](vercel/turborepo#11097) #### New Contributors - [@​lishaduck](https://github.com/lishaduck) made their first contribution in [#​11032](vercel/turborepo#11032) - [@​Yeom-JinHo](https://github.com/Yeom-JinHo) made their first contribution in [#​11042](vercel/turborepo#11042) - [@​ethan-fraser](https://github.com/ethan-fraser) made their first contribution in [#​11036](vercel/turborepo#11036) - [@​yairopro](https://github.com/yairopro) made their first contribution in [#​11010](vercel/turborepo#11010) - [@​Gabrola](https://github.com/Gabrola) made their first contribution in [#​11055](vercel/turborepo#11055) - [@​mahi656](https://github.com/mahi656) made their first contribution in [#​11073](vercel/turborepo#11073) - [@​Andrew-Pynch](https://github.com/Andrew-Pynch) made their first contribution in [#​11091](vercel/turborepo#11091) **Full Changelog**: <vercel/turborepo@v2.6.0...v2.6.1> ### [`v2.6.0`](https://github.com/vercel/turborepo/releases/tag/v2.6.0): Turborepo v2.6.0 [Compare Source](vercel/turborepo@v2.5.8...v2.6.0) <!-- Release notes generated using configuration in .github/release.yml at v2.6.0 --> #### What's Changed ##### Docs - docs: clarification on Transit Nodes docs by [@​maschwenk](https://github.com/maschwenk) in [#​9181](vercel/turborepo#9181) - docs: add GitHub Actions reusable workflow documentation for remote caching by [@​anthonyshew](https://github.com/anthonyshew) in [#​10923](vercel/turborepo#10923) - docs: generate blog release OG images by [@​anthonyshew](https://github.com/anthonyshew) in [#​10936](vercel/turborepo#10936) - docs: fix correct package name from eslint-config-turbo to eslint-plugin-turbo by [@​tetzng](https://github.com/tetzng) in [#​10954](vercel/turborepo#10954) - docs: align tailwindcss 4 guide to the with-tailwind example by [@​esauri](https://github.com/esauri) in [#​10963](vercel/turborepo#10963) - docs: fix typos and formatting issues in Playwright guide by [@​yamcodes](https://github.com/yamcodes) in [#​10980](vercel/turborepo#10980) - docs: adjust compute hours saved component initial value by [@​anthonyshew](https://github.com/anthonyshew) in [#​10958](vercel/turborepo#10958) - docs: clarify passthrough args comparison by [@​emilbjorklund](https://github.com/emilbjorklund) in [#​10990](vercel/turborepo#10990) - docs: fix profile images on home page by [@​anthonyshew](https://github.com/anthonyshew) in [#​10993](vercel/turborepo#10993) - feat: microfrontends by [@​anthonyshew](https://github.com/anthonyshew) in [#​10982](vercel/turborepo#10982) - docs: Clarify passtrhough args cache miss by [@​eug-vs](https://github.com/eug-vs) in [#​11026](vercel/turborepo#11026) - fix: path validation in `microfrontends.json` by [@​anthonyshew](https://github.com/anthonyshew) in [#​11006](vercel/turborepo#11006) - feat(microfrontends): schema.json for microfrontends.json by [@​anthonyshew](https://github.com/anthonyshew) in [#​11008](vercel/turborepo#11008) ##### create-turbo - feat: update `create-turbo` Bun prompt text by [@​anthonyshew](https://github.com/anthonyshew) in [#​10918](vercel/turborepo#10918) ##### eslint - fix(eslint-config-turbo): use module.exports for ESLint v8 compatibility by [@​anthonyshew](https://github.com/anthonyshew) in [#​10902](vercel/turborepo#10902) - perf: \~8.6x faster ESLint rule by [@​anthonyshew](https://github.com/anthonyshew) in [#​10943](vercel/turborepo#10943) ##### Examples - Update package.json by [@​Satheeshsk369](https://github.com/Satheeshsk369) in [#​10892](vercel/turborepo#10892) - docs: fix JSDoc type for ESLint config in basic example by [@​victor-code19](https://github.com/victor-code19) in [#​10727](vercel/turborepo#10727) - refactor(examples): enhance `with-nestjs` ([#​8131](vercel/turborepo#8131)) by [@​Neosoulink](https://github.com/Neosoulink) in [#​10964](vercel/turborepo#10964) - examples: Upgrade core-team-maintained examples to Next.js 16 by [@​anthonyshew](https://github.com/anthonyshew) in [#​11014](vercel/turborepo#11014) ##### Changelog - chore: remove missing turbow\.js references by [@​pauloZion1](https://github.com/pauloZion1) in [#​10893](vercel/turborepo#10893) - fix(turborepo-lockfiles): handle missing optional dependencies in Bun lockfiles by [@​anthonyshew](https://github.com/anthonyshew) in [#​10909](vercel/turborepo#10909) - fix: update `ui` suggested value in error message for turbo.json by [@​hugomassing](https://github.com/hugomassing) in [#​10896](vercel/turborepo#10896) - chore: remove unused `origin` field from auth structs by [@​anthonyshew](https://github.com/anthonyshew) in [#​10910](vercel/turborepo#10910) - feat: new OAuth flow for Turborepo CLI with Vercel by [@​anthonyshew](https://github.com/anthonyshew) in [#​10911](vercel/turborepo#10911) - fix(lockfiles): include bundled dependencies in Bun lockfile subgraphs by [@​anthonyshew](https://github.com/anthonyshew) in [#​10915](vercel/turborepo#10915) - test: increase coverage for lockfiles by [@​anthonyshew](https://github.com/anthonyshew) in [#​10633](vercel/turborepo#10633) - fix: update remote cache OAuth refresh flow by [@​anthonyshew](https://github.com/anthonyshew) in [#​10916](vercel/turborepo#10916) - feat(tui): task list search with `/` by [@​anthonyshew](https://github.com/anthonyshew) in [#​10908](vercel/turborepo#10908) - fix: --graph=foo.dot should not require graphviz installed by [@​blast-hardcheese](https://github.com/blast-hardcheese) in [#​10942](vercel/turborepo#10942) - chore: update devcontainer configuration by [@​anthonyshew](https://github.com/anthonyshew) in [#​10955](vercel/turborepo#10955) - fix: `injectWorkspacePackages` for `turbo prune` with pnpm by [@​anthonyshew](https://github.com/anthonyshew) in [#​10945](vercel/turborepo#10945) - fix: adjust binary call for microfrontends proxy on Windows by [@​mknichel](https://github.com/mknichel) in [#​10962](vercel/turborepo#10962) - Add worktrees.json configuration to .cursor directory by [@​Copilot](https://github.com/Copilot) in [#​10986](vercel/turborepo#10986) - fix: windows symlinking bug by [@​anthonyshew](https://github.com/anthonyshew) in [#​10992](vercel/turborepo#10992) - fix: added Linux env vars to global passthroughs by [@​aviramha](https://github.com/aviramha) in [#​10984](vercel/turborepo#10984) - fix: recursive transitive closure analysis in npm lockfile parser by [@​anthonyshew](https://github.com/anthonyshew) in [#​10988](vercel/turborepo#10988) - ci(fix): dynamically set ports in proxy integration tests by [@​anthonyshew](https://github.com/anthonyshew) in [#​11009](vercel/turborepo#11009) - feat: Add support for custom microfrontends.json naming by [@​kitfoster](https://github.com/kitfoster) in [#​11022](vercel/turborepo#11022) #### New Contributors - [@​Satheeshsk369](https://github.com/Satheeshsk369) made their first contribution in [#​10892](vercel/turborepo#10892) - [@​robobun](https://github.com/robobun) made their first contribution in [#​10729](vercel/turborepo#10729) - [@​hugomassing](https://github.com/hugomassing) made their first contribution in [#​10896](vercel/turborepo#10896) - [@​victor-code19](https://github.com/victor-code19) made their first contribution in [#​10727](vercel/turborepo#10727) - [@​blast-hardcheese](https://github.com/blast-hardcheese) made their first contribution in [#​10942](vercel/turborepo#10942) - [@​tetzng](https://github.com/tetzng) made their first contribution in [#​10954](vercel/turborepo#10954) - [@​esauri](https://github.com/esauri) made their first contribution in [#​10963](vercel/turborepo#10963) - [@​Copilot](https://github.com/Copilot) made their first contribution in [#​10986](vercel/turborepo#10986) - [@​emilbjorklund](https://github.com/emilbjorklund) made their first contribution in [#​10990](vercel/turborepo#10990) - [@​aviramha](https://github.com/aviramha) made their first contribution in [#​10984](vercel/turborepo#10984) - [@​eug-vs](https://github.com/eug-vs) made their first contribution in [#​11026](vercel/turborepo#11026) - [@​kitfoster](https://github.com/kitfoster) made their first contribution in [#​11022](vercel/turborepo#11022) **Full Changelog**: <vercel/turborepo@v2.5.8...v2.6.0> ### [`v2.5.8`](https://github.com/vercel/turborepo/releases/tag/v2.5.8): Turborepo v2.5.8 [Compare Source](vercel/turborepo@v2.5.7...v2.5.8) <!-- Release notes generated using configuration in .github/release.yml at v2.5.8 --> #### What's Changed ##### create-turbo - fix: revert [#​10847](vercel/turborepo#10847) by [@​anthonyshew](https://github.com/anthonyshew) in [#​10882](vercel/turborepo#10882) ##### Changelog - chore: add Cursor slash command by [@​anthonyshew](https://github.com/anthonyshew) in [#​10881](vercel/turborepo#10881) **Full Changelog**: <vercel/turborepo@v2.5.7...v2.5.8> ### [`v2.5.7`](https://github.com/vercel/turborepo/releases/tag/v2.5.7): Turborepo v2.5.7 [Compare Source](vercel/turborepo@v2.5.6...v2.5.7) <!-- Release notes generated using configuration in .github/release.yml at v2.5.7 --> #### What's Changed ##### Docs - docs: add `TURBO_CONCURRENCY` to options overview page by [@​anthonyshew](https://github.com/anthonyshew) in [#​10772](vercel/turborepo#10772) - fix(docs): fix broken anchor links to --graph option by [@​anthonyshew](https://github.com/anthonyshew) in [#​10773](vercel/turborepo#10773) - docs: clarify TURBO\_TEAM secret usage by [@​vikhyathdevadiga](https://github.com/vikhyathdevadiga) in [#​10795](vercel/turborepo#10795) - docs: add Buildkite example to CI Vendors documentation by [@​AndrewDiMola](https://github.com/AndrewDiMola) in [#​10721](vercel/turborepo#10721) - docs: rework llms.txt and add .md responses by [@​anthonyshew](https://github.com/anthonyshew) in [#​10811](vercel/turborepo#10811) - docs: add `name` field mention to migration page by [@​anthonyshew](https://github.com/anthonyshew) in [#​10823](vercel/turborepo#10823) - docs: update configuration reference to use correct turbo.json title by [@​xcfio](https://github.com/xcfio) in [#​10843](vercel/turborepo#10843) - docs: correct description of how `^` works by [@​anthonyshew](https://github.com/anthonyshew) in [#​10865](vercel/turborepo#10865) ##### create-turbo - feat(create-turbo): `--no-git` flag by [@​anthonyshew](https://github.com/anthonyshew) in [#​10720](vercel/turborepo#10720) - chore(create-turbo): fix lint by [@​chris-olszewski](https://github.com/chris-olszewski) in [#​10807](vercel/turborepo#10807) - fix(security): update dependencies to resolve warning for `node-plop` by [@​anthonyshew](https://github.com/anthonyshew) in [#​10847](vercel/turborepo#10847) ##### eslint - docs: adjust typo on instructions for eslint-config-turbo legacy config by [@​evsasse](https://github.com/evsasse) in [#​10717](vercel/turborepo#10717) ##### [@​turbo/repository](https://github.com/turbo/repository) - chore: reformat code with 2024 edition by [@​ognevny](https://github.com/ognevny) in [#​10775](vercel/turborepo#10775) ##### Examples - chore(deps-dev): bump the with-svelte group in /examples/with-svelte with 6 updates by [@​dependabot](https://github.com/dependabot)\[bot] in [#​10752](vercel/turborepo#10752) - chore(deps-dev): bump turbo from 2.5.5 to 2.5.6 in /examples/with-shell-commands by [@​dependabot](https://github.com/dependabot)\[bot] in [#​10781](vercel/turborepo#10781) - chore(deps-dev): bump [@​sveltejs/kit](https://github.com/sveltejs/kit) from 2.27.3 to 2.31.1 in /examples/with-svelte in the with-svelte group by [@​dependabot](https://github.com/dependabot)\[bot] in [#​10780](vercel/turborepo#10780) - chore(deps-dev): bump [@​next/eslint-plugin-next](https://github.com/next/eslint-plugin-next) from 15.4.2 to 15.4.6 in /examples/with-tailwind by [@​dependabot](https://github.com/dependabot)\[bot] in [#​10779](vercel/turborepo#10779) - chore(deps-dev): bump [@​next/eslint-plugin-next](https://github.com/next/eslint-plugin-next) from 15.4.2 to 15.4.6 in /examples/basic by [@​dependabot](https://github.com/dependabot)\[bot] in [#​10776](vercel/turborepo#10776) - chore(deps): bump next from 15.4.2 to 15.4.6 in /examples/non-monorepo by [@​dependabot](https://github.com/dependabot)\[bot] in [#​10778](vercel/turborepo#10778) - chore(deps-dev): bump the with-svelte group in /examples/with-svelte with 3 updates by [@​dependabot](https://github.com/dependabot)\[bot] in [#​10787](vercel/turborepo#10787) - chore(deps): bump the basic group in /examples/basic with 3 updates by [@​dependabot](https://github.com/dependabot)\[bot] in [#​10788](vercel/turborepo#10788) - fix: add types node to fix minimatch issue by [@​oliveirabalsa](https://github.com/oliveirabalsa) in [#​10730](vercel/turborepo#10730) - chore(deps-dev): bump the basic group in /examples/basic with 2 updates by [@​dependabot](https://github.com/dependabot)\[bot] in [#​10797](vercel/turborepo#10797) - chore(deps-dev): bump the with-svelte group in /examples/with-svelte with 2 updates by [@​dependabot](https://github.com/dependabot)\[bot] in [#​10800](vercel/turborepo#10800) ##### Changelog - feat(turbo\_json): add `$TURBO_EXTENDS$` by [@​chris-olszewski](https://github.com/chris-olszewski) in [#​10763](vercel/turborepo#10763) - chore(deps): bump the kitchen-sink group in /examples/kitchen-sink with 10 updates by [@​dependabot](https://github.com/dependabot)\[bot] in [#​10758](vercel/turborepo#10758) - chore: fix lints by [@​chris-olszewski](https://github.com/chris-olszewski) in [#​10786](vercel/turborepo#10786) - docs: add top level crate documentation by [@​chris-olszewski](https://github.com/chris-olszewski) in [#​10801](vercel/turborepo#10801) - docs: add more doc comments for working with the lockfile trait by [@​chris-olszewski](https://github.com/chris-olszewski) in [#​10802](vercel/turborepo#10802) - fix(logs): create log files for non-cached tasks by [@​chris-olszewski](https://github.com/chris-olszewski) in [#​10806](vercel/turborepo#10806) - ci: add packaging checks for some JS packages by [@​anthonyshew](https://github.com/anthonyshew) in [#​10810](vercel/turborepo#10810) - docs: fix typos by [@​pauloZion1](https://github.com/pauloZion1) in [#​10821](vercel/turborepo#10821) - feat(turbo\_json): allow for extending form non-root `turbo.json` by [@​chris-olszewski](https://github.com/chris-olszewski) in [#​10812](vercel/turborepo#10812) - feat(tui): add shortcut for clearing task logs by [@​mcky](https://github.com/mcky) in [#​10828](vercel/turborepo#10828) - chore: mention other package managers in bug report template by [@​anthonyshew](https://github.com/anthonyshew) in [#​10849](vercel/turborepo#10849) - feat: add Expo to common frameworks by [@​Alvi24](https://github.com/Alvi24) in [#​10861](vercel/turborepo#10861) - chore: remove label from workflows by [@​anthonyshew](https://github.com/anthonyshew) in [#​10864](vercel/turborepo#10864) - fix: add WINDIR to default passthroughs by [@​anthonyshew](https://github.com/anthonyshew) in [#​10868](vercel/turborepo#10868) - fix: output valid turbo.json for prune with Boundaries definition by [@​anthonyshew](https://github.com/anthonyshew) in [#​10866](vercel/turborepo#10866) - fix: sanitize logging prefix for GitLab groups by [@​anthonyshew](https://github.com/anthonyshew) in [#​10850](vercel/turborepo#10850) #### New Contributors - [@​oliveirabalsa](https://github.com/oliveirabalsa) made their first contribution in [#​10730](vercel/turborepo#10730) - [@​vikhyathdevadiga](https://github.com/vikhyathdevadiga) made their first contribution in [#​10795](vercel/turborepo#10795) - [@​AndrewDiMola](https://github.com/AndrewDiMola) made their first contribution in [#​10721](vercel/turborepo#10721) - [@​pauloZion1](https://github.com/pauloZion1) made their first contribution in [#​10821](vercel/turborepo#10821) - [@​mcky](https://github.com/mcky) made their first contribution in [#​10828](vercel/turborepo#10828) - [@​xcfio](https://github.com/xcfio) made their first contribution in [#​10843](vercel/turborepo#10843) - [@​evsasse](https://github.com/evsasse) made their first contribution in [#​10717](vercel/turborepo#10717) - [@​Alvi24](https://github.com/Alvi24) made their first contribution in [#​10861](vercel/turborepo#10861) **Full Changelog**: <vercel/turborepo@v2.5.6...v2.5.7> </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MS4xNDguNCIsInVwZGF0ZWRJblZlciI6IjQyLjEuMyIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==--> Reviewed-on: https://git.in.csmpro.ru/csmpro/csm-mapban/pulls/30 Co-authored-by: Renovate Bot <renovate@csmpro.ru> Co-committed-by: Renovate Bot <renovate@csmpro.ru>
Description
Updates Turborepo's bun.lock parser to better align with Bun's current lockfile format implementation. This addresses version detection issues, adds support for new lockfile fields, and implements v1 optimizations.
Testing Instructions
Test Results
Background
While investigating Turborepo's bun.lock support against Bun's implementation (
src/install/lockfile/bun.lock.zig), I identified several gaps:global_change()only detected package manager changes, not lockfile version changesChanges
Core Fixes
Version Detection
LockfileVersionenum for v0/v1 handlingglobal_change()to detect version changes (prevents incorrect cache hits)bun_global_change()for API consistency with other package managersNew Field Support
Platform Constraints
Feature Implementations
resolve_catalog_version()methodapply_overrides()methodNegatabletype with serde supportResolution Order
The implementation follows this precedence: catalog → override → patch
Areas of Uncertainty
I want to be transparent about areas where I'm less confident or made assumptions:
V1 Behavior Beyond Workspaces: While I implemented the workspace optimization mentioned in Bun's source, there may be other v1-specific behaviors I'm not aware of.
Trusted Dependencies: I parse and filter these, but I'm unsure if Turborepo needs to actually use this information for any security/installation decisions.
Platform Constraint Application: The
Negatable::allows()method is implemented but unused. I'm not sure where in Turborepo's architecture platform filtering should actually occur.Catalog Precedence: I assumed catalogs should be resolved before overrides based on the code structure, but this precedence isn't explicitly documented.
Error Handling: Some edge cases (like circular workspace dependencies or conflicting overrides) may not be handled optimally.
Potential Issues
Performance: The catalog resolution adds an extra lookup step during package resolution. For large monorepos with many catalog references, this could impact performance.
Backward Compatibility: While I've maintained compatibility with existing lockfiles, the changes to
global_change()will cause cache invalidation for projects upgrading Turborepo.Incomplete Platform Support: The platform constraints are parsed but not actively used for filtering during dependency resolution.
Questions for Reviewers
UnsupportedVersionerror be recoverable or fatal?Known Limitations
Negatable::allows()method for platform matching is unused (added for completeness)Additional Context
This is a draft PR as I would appreciate feedback on the implementation approach, particularly in areas where I made assumptions about intended behavior.
🤖 Generated with Claude Code
Co-Authored-By: Claude noreply@anthropic.com