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
[docs] document packageExtensions.package.peerDependenciesMeta.optional
#1658
Comments
It's actually already possible to specify optional peer dependencies in the package extensions, e.g. Lines 76 to 83 in b94bcf9
The example configuration you've given should work as well. Could you try it out? I did notice the documentation only shows peerDependencies and dependencies. That could be improved, as both dependenciesMeta and peerDependenciesMeta are also supported. |
@bgotlink yeah, it looks like those work. Could you update the docs then? |
@nicholaschiang Do you mean something like this?: https://yarnpkg.com/configuration/manifest#peerDependenciesMeta |
I'll reopen this so we don't forget to document it
That's not the same thing, this issue was about |
packageExtensions.package.peerDependenciesMeta.optional
Describe the user story
When migrating over to Yarn v2, you'll likely be opening up a bunch of PRs in projects to add their dependency's peer dependencies to their
package.json
to address these errors:I've already created two such PRs (this one which fixes the errors above and this one for Next.js's use of
sass-loader
) and have only been working on migrating to Yarn v2 for about 30 mins haha.Describe the solution you'd like
One should be able to specify optional peer dependencies in the
.yarnrc.yml
file under thepackageExtensions
key like so:This follows the same specs implemented here.
Describe the drawbacks of your solution
This section is important not only to identify future issues, but also to see whether you thought your request through. When filling it, ask yourself "how can I break it".
There is a much more concise way to specify the same thing (but it doesn't follow the current
package.json
syntax, which is why I think it should be avoided for now):The text was updated successfully, but these errors were encountered: