Skip to content
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

feat(bun): support bun.lock #9783

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

chris-olszewski
Copy link
Member

@chris-olszewski chris-olszewski commented Jan 23, 2025

Description

Closes #9628

Switch over from our usage of yarn.lock and directly support bun.lock parsing.

We use biome to strip out the trailing commas that appear in the workspaces and packages objects to leverage serde which I am more competent in. We can switch to biome in the future and avoid a second pass, but I do not know how to do correct deserialization logic for PackageEntry (see de.rs for examples of what this looks like) in biome.

I will call out is the fact that the lockfile keys in bun.lock include too much information so we use resolved package identifiers instead e.g. package@(protocol:)?version. The keys can shift when the underlying package does not change resulting in incorrect behavior.

A quick example to illustrate:

This PR does not add support for turbo prune.

Reviewing each commit on it's own would probably be helpful.

Testing Instructions

Unit tests. Manual testing on a create-turbo repository.

Copy link

vercel bot commented Jan 23, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
examples-basic-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 24, 2025 1:39am
examples-designsystem-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 24, 2025 1:39am
examples-gatsby-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 24, 2025 1:39am
examples-kitchensink-blog ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 24, 2025 1:39am
examples-native-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 24, 2025 1:39am
examples-nonmonorepo ❌ Failed (Inspect) Jan 24, 2025 1:39am
examples-svelte-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 24, 2025 1:39am
examples-tailwind-web ❌ Failed (Inspect) Jan 24, 2025 1:39am
examples-vite-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 24, 2025 1:39am

@nicksrandall
Copy link

This is a great step toward support turbo prune with bun's new text based lock file.

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.

Warning when using text-based Bun lockfile
2 participants