Enforcing usage of catalog dependencies #8567
Replies: 3 comments
-
That would be a cool addition, to enforce usage of workspace catalogs in a monorepo, and forbid usage of dependencies versions directly. |
Beta Was this translation helpful? Give feedback.
-
Hello 👋 From a read of the docs, it looks like syncpack could possibly support this if you'd like to write up an issue @rhinodavid. It already reads pnpm-workspace.yaml so it could bring the catalogs data in and try and make use of it. |
Beta Was this translation helpful? Give feedback.
-
We can probably support that but first need to add catalog support to the |
Beta Was this translation helpful? Give feedback.
-
I was excited to see the release of workspace catalogs.
My team has been using syncpack to accomplish syncing dependency versions throughout our monorepo, and having that functionality in the package manager seems appropriate.
There's one feature I think is missing, however. We run
syncpack list-mismatches
in CI to make sure no workspace is using a version of a dependency other than the one specified in the syncpack configuration. Similarly, I'd like to have a way to make sure that if a dependency is specified in the catalog, no workspace in the repo uses a version other thancatalog:
(or a named catalog).Firstly, I just want to make sure I'm not missing functionality that might do that now.
If not, I'm wondering if anyone else would be interested in either an external tool to do this, or for a command to enforce catalog usage to be added to the
pnpm
CLI.Beta Was this translation helpful? Give feedback.
All reactions