-
-
Notifications
You must be signed in to change notification settings - Fork 703
feat: add yarn v2 (berry) support #820
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
Conversation
As json5 is required by some code with yarn v2 @nuxt/content has to declare it in the dependencies. This is a single line change to the package.json Just wondering why is yarn.lock not in git and not in .gitignore? One of this should be true!? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would you share some references so that we can know better why json5
package is needed?
Once it's verified, I think I can merge this PR.
By the way, yarn.lock
was generated again after you had created this PR.
So it would be safer if you merge the main branch to your branch and update yarn.lock
file as needed.
JSON5 is imported here: https://github.com/nuxt/content/blob/main/packages/content/lib/database.js#L5 so for yarn v2 (berry) it would be optimal to add it to dependencies. (You can have multiple versions of a package with yarn v2 so yarn doesn't know wich to use. (There are workarounds but I think adding the dependencie would be a good idea). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for quick response!
I see, and yeah, JSON5 package definitely should be added as a dependency if it's directly used by the package, regardless of Yarn's requirement. 🙌
Types of changes
Description
This PR adds yarn v2 support. For this the json5 dependencie has to be added directly in package.json
Checklist: