pnpm-catalogs-to-bun
Migrate pnpm workspace catalogs to bun catalog format.
Usage
bash
What it does
This codemod migrates your pnpm workspace catalog configuration to bun's catalog format:
Before (pnpm-workspace.yaml)
yaml
After (package.json)
json
All workspace packages using catalog dependencies (catalog:) will continue to work with bun.
Requirements
- Bun v1.1.30 or higher (for catalog support)
- Existing pnpm workspace with catalog configuration
After migration
-
Remove pnpm files (optional):
bash -
Install dependencies with bun:
bash -
Verify:
bash
Features
- ✅ Migrates catalog from pnpm-workspace.yaml to root package.json
- ✅ Preserves catalog: references in workspace packages
- ✅ Merges named catalogs (if any) into single catalog
- ✅ Sorts catalog entries alphabetically
- ✅ Adds workspaces configuration if missing
Notes
- Bun's catalog feature is equivalent to pnpm's catalog
- Named catalogs (pnpm's catalogs:) are merged into one catalog
- The codemod preserves all existing catalog: references
License
Apache-2.0