(v3.yarnpkg.com) Constraints | Yarn - Package Manager

ROAM_REFS: https://v3.yarnpkg.com/features/constraints/

Edit this page on GitHub

*Experimental*

This feature is still incubating, and its exact API might change from a release to the next.  It means it's the perfect time for you to get involved and let us hear your feedback!
*Plugin*

To access this feature, first install the =constraints= plugin: =yarn plugin import constraints=

Constraints are a solution to a very basic need: I have a lot of workspaces, and I need to make sure they use the same version of their dependencies. Or that they don't depend on a specific package. Or that they use a specific type of dependency. Anyway, you see the point: whatever is the exact logic, my goal is the same; I want to automatically enforce some kind of rule across all my workspaces. That's exactly what constraints allow you to do.

Local Graph

org-roam 01f1c5ba-c7e1-4b30-9266-40e5d74853ab (v3.yarnpkg.com) Constraints | Yarn -... //github.com/yarnpkg/berry/tree/master/packages/gatsby/content/features/constraints.md https://github.com/yarnpkg/berry/tree/master/packages/gatsby/content/features/constraints.md 01f1c5ba-c7e1-4b30-9266-40e5d74853ab->//github.com/yarnpkg/berry/tree/master/packages/gatsby/content/features/constraints.md //v3.yarnpkg.com/features/workspaces https://v3.yarnpkg.com/features/workspaces 01f1c5ba-c7e1-4b30-9266-40e5d74853ab->//v3.yarnpkg.com/features/workspaces cb896ec5-f32c-41d5-9905-4bdd839d23be (yarnpkg.com) Constraints | Yarn cb896ec5-f32c-41d5-9905-4bdd839d23be->01f1c5ba-c7e1-4b30-9266-40e5d74853ab