Add support for catalog references in peer dependencies#6926
Add support for catalog references in peer dependencies#6926WooWan wants to merge 6 commits intoyarnpkg:masterfrom
Conversation
|
Hi, |
|
I'm not certain that's correct - afaik the |
I'm not very familiar with reduceDependency, do you think the fundamental solution would be to fix reduceDependency so that it iterates over peerDependencies as well? |
|
Hey, |
|
I've been busy and haven't been able to get to the PR. I'll work on it by next weekend! |
|
@arcanis @MKruschke Hello! I've added a reducePeerDependency hook and test code. Verified that it works. Happy to get a review! |
|
Is there any progress? |
|
@arcanis could you please have a look |
What's the problem this PR addresses?
Fixes: #6925
What?
Added catalog: protocol support in peerDependencies. Previously, catalog: references worked in dependencies and devDependencies but were incorrectly flagged as errors in peerDependencies.
How?
Created resolvePeerDescriptorFromCatalog to resolve catalog: references from project configuration
Registered a reducePeerDependency hook in the resolution pipeline to intercept and resolve catalog: references in peer deps
Fixes #6925
How did you fix it?
Updated the dependency range validation logic in
Manifest.tsto treatcatalog:protocol as a valid range format. This prevents catalog references from beingflagged as errors when used in peer dependencies.
...
Checklist