Skip to content

add support for pnpm catalogs #866

Open
@hacknug

Description

@hacknug

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: nuxtrdev/nuxtr-vscode#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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions