Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add built-in PNPM support (workspace version protocol) #185

Open
adbayb opened this issue Nov 26, 2024 · 1 comment
Open

Add built-in PNPM support (workspace version protocol) #185

adbayb opened this issue Nov 26, 2024 · 1 comment

Comments

@adbayb
Copy link

adbayb commented Nov 26, 2024

Description

In order to enforce local dependency resolution, PNPM offers the workspace:(*|^|~) protocol to resolve a local dependency version.

However, It seems the plugin does not provide built-in support for this (especially for the no-branch-dependencies and restrict-ranges rules). But, the plugin is flexible enough to provide escape hatches through verbose configuration (a good example is available here).

To allow a wider adoption and ease the consumer experience, It would be really great to consider PNPM also a first-class citizen to remove avoidable extra configurations consumer side (the workspace version protocol is also used on other package managers like yarn).

What do you think?

Implementation suggestion

Here're some thoughts on how it can be implemented:

  • For the restrict-ranges implementation with workspace protocol support, we can strip the workspace:xxx part and check the xxx part based on the provided versionTypes or versionRegex. This implementation is inspired by what's done Changesets side 👍 .
  • For the no-branch-in-dependencies rules, we can ignore version starting with /^workspace:/.
@adbayb adbayb changed the title Add built-in PNPM support (workspace protocol) Add built-in PNPM support (workspace version protocol) Nov 26, 2024
@kellyselden
Copy link
Owner

Sounds good to me!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants