bun-catalogs-to-pnpm
Migrate bun catalog to pnpm workspace catalogs format.
Usage
bash
What it does
This codemod migrates your bun catalog configuration back to pnpm's workspace catalog format:
Before (package.json)
json
After (pnpm-workspace.yaml)
yaml
The catalog is removed from package.json and moved to pnpm-workspace.yaml.
All workspace packages using catalog dependencies (catalog:) will continue to work with pnpm.
Requirements
- pnpm v9.5.0 or higher (for catalog support)
- Existing bun workspace with catalog configuration in package.json
After migration
-
Remove bun files (optional):
bash -
Install dependencies with pnpm:
bash -
Verify:
bash
Features
- ✅ Migrates catalog from root package.json to pnpm-workspace.yaml
- ✅ Preserves catalog: references in workspace packages
- ✅ Creates pnpm-workspace.yaml if it doesn't exist
- ✅ Updates existing pnpm-workspace.yaml if present
- ✅ Removes catalog from root package.json
Notes
- This is the reverse operation of pnpm-catalogs-to-bun
- All catalog: references in workspace packages remain unchanged
- The codemod creates or updates pnpm-workspace.yaml automatically
License
Apache-2.0