migrate-catalog
v1.0.1
Published
**Catalog Migrator** is a CLI tool for automating the migration of dependency versions from a centralized `catalog` in your `pnpm-workspace.yaml` file to all `package.json` files in a monorepo. This tool streamlines version updates in pnpm workspaces, sav
Maintainers
Readme
Migrate Catalog
Migrate Catalog is a CLI tool for automating the migration of dependency versions from a centralized catalog in your pnpm-workspace.yaml file to all package.json files in a monorepo. This tool streamlines version updates in pnpm workspaces, saving time and reducing manual errors.
Features
- Automated Migration: Scans all
package.jsonfiles and replaces"catalog:"with the correct version from yourpnpm-workspace.yamlcatalog. - Monorepo Support: Built to work seamlessly in multi-package repositories managed by pnpm.
- Easy Integration: Ideal for CI/CD pipelines and local development environments.
- TypeScript Support: Written in TypeScript with full type definitions included.
- Customizable: Extendable for additional dependency sections or custom update logic.
Installation
Install the package globally with npm:
npm install -g migrate-catalogOr use it via npx:
npx migrate-catalogUsage
Run the tool from the root of your monorepo:
migrate-catalogThe script will:
- Read the
catalogsection frompnpm-workspace.yaml. - Recursively locate all
package.jsonfiles (ignoringnode_modules). - Update dependencies with the version placeholder
"catalog:"to the actual version from the catalog.
Getting Started
Configure Your Monorepo: Ensure your
pnpm-workspace.yamlincludes a validcatalogsection and that yourpackage.jsonfiles have dependencies with"catalog:"as their version.Run Migrate Catalog: Execute the tool in your project root and verify that the updates have been applied across your packages.
Contributing
Contributions are welcome! Fork the repository, create your feature branch, and submit a pull request with your enhancements.
License
This project is licensed under the MIT License.
Keywords
catalog migration, monorepo, pnpm, npm package, dependency management, version automation, node CLI tool, automated version update
