mirror of
https://github.com/oven-sh/bun
synced 2026-02-10 19:08:50 +00:00
Merges Yarn v1 and Yarn Berry (v2+) migration into ONE yarn.zig file. Changes: - Auto-detects v1 vs Berry at runtime - Shared workspace scanning and package.json parsing - Full Berry metadata support: ✅ bin definitions (single/named/map formats) ✅ peerDependencies (added with .peer behavior) ✅ dependenciesMeta (optional markers) ✅ checksum conversion (Berry format → Bun integrity) Deleted files: - yarn_berry.zig (merged into yarn.zig) - yarn_common.zig (merged into yarn.zig) Missing from Berry (Bun will fetch from npm registry): - scripts (not in lockfile) - os/cpu constraints (not commonly in Berry lockfiles) - man pages Test status: - v1 tests: ✅ passing - Berry tests: need fixtures with proper YAML format
this case has a very fun and hard to understand dependency graph. bun pm migrate is expected to migrate it without changing what packages will install. the hoisting doesnt match exactly what npm does, but it is equally valid.