You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This feature is important to have in this repository; a contrib plugin wouldn't do
Describe the user story
Long-time yarn user, but first time diving into the yarn 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 ...
What is the API of the Yarn object passed to the constraints() method?
What is the "shape" of the arguments passed to the various Yarn.* methods? ("The examples show you can pass an object with an ident string property. What are the allowed patterns / values for that property? What other properties can be provided?)
What is the API of the various sub-objects w/in the Yarn API? What are the return values for methods like dependencies and workspaces? What is the API for those things?
What is the recommended way of surfacing a constraint violation? (E.g. "Should I throw an 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:
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: