[Feature] Better documentation for yarn constraints
command
#6235
Labels
enhancement
New feature or request
yarn constraints
command
#6235
Describe the user story
Long-time
yarn
user, but first time diving into theyarn constraints
command (JS-based version in yarn@4, not the old Prolog version). My first impression of the docs (https://yarnpkg.com/features/constraints) is that they're enough to just barely get started, but are missing the key information to allow a developer to actually do anything useful.Specifically, it'd be nice to have answers to the following questions ...
Yarn
object passed to theconstraints()
method?Yarn.*
methods? ("The examples show you can pass an object with anident
string property. What are the allowed patterns / values for that property? What other properties can be provided?)Yarn
API? What are the return values for methods likedependencies
andworkspaces
? What is the API for those things?Error
? If so, what type?")After a big of digging, I found the following resources that I suspect developers would find helpful. These aren't really documentation per-se, but they at least provide some information that answers some of the above questions:
yarn
project's own yarn.config.cjs (provides more complex examples, that I'm guessing have driven much of the existingYarn
API requirements?)Adding examples for the following would be helpful:
dependency.error()
?)workspace.error()
?)The text was updated successfully, but these errors were encountered: