cli icon indicating copy to clipboard operation
cli copied to clipboard

add support for `pnpm` catalogs

Open hacknug opened this issue 11 months ago • 0 comments

pnpm catalogs are a great way to manage dependencies that need to be kept in sync. Since the config is stored in pnpm-workspace.yaml, users can benefit from yaml's anchors and aliases to define these values only once (more details here: https://smcleod.net/2022/11/yaml-anchors-and-aliases/).

I recently opened a PR for the nuxtr vscode extension to allow it to resolve nuxt's version when using catalogs: https://github.com/nuxtrdev/nuxtr-vscode/pull/185

A similar approach could be applied here but I believe it would be better to make the changes upstream in pkg-types and/or nypm so the whole ecosystem can benefit from the update. Plus that approach is incredibly naive and lacks tests to ensure proper resolution for all possible types of configs.

I know @antfu has done some work on his projects to start supporting catalogs, so he probably has a better understanding of the things we're missing to get this done.

hacknug avatar Apr 30 '25 10:04 hacknug