-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Support Yarn v2 #5230
Comments
@viceice have you been able to gather the list of things we need to do differently? |
Migration guide: https://yarnpkg.com/advanced/migration Things I've noted:
|
Hello, do you plan to work on this ? Is there something I can do to help ? |
If you can create one or more repos to test against plus identify any shortcomings compared to today then that would help. I’m not using v2 yet so don’t have personal experience to reflect on |
I have this repo: https://github.com/christophehurpeau/pob-eslint-config |
And how are Renovate PRs wrong today? What’s missing? |
There's an error: christophehurpeau/eslint-config-pob#116 (comment)
|
I'm not sure that the app is using Yarn v2 already, but in that case that error message is extra concerning |
All such settings are now expected to be kept within the yarnrc or the environment, so that they affect all commands and not only the one running now. In this case you'd replace |
(Note that the engine and platform checks haven't been implemented yet but will generate warnings, not errors, so you won't need options or settings) |
so the problem is on this line:
YARN_ENABLE_SCRIPTS=0 is also supported in yarn 1 ?
|
As far as I can tell, yep!
No, it's 2.x only (it can be semver-checked on |
So I tried the latest release and there is another issue: the yarn.lock is not updated. There is this warning in the logs:
Code: https://github.com/renovatebot/renovate/blob/master/lib/manager/npm/extract/yarn.ts#L1 I think we should use |
While waiting for the full support is there any special config/patch which could make renovate work with yarn berry even if it breaks yarn 1 support ? |
No, but after some recent refactoring I think we’re in a much better position to implement this. So you have any example repo you can contribute towards testing? |
@adriencohen We're waiting on yarnpkg/berry#1278 before we can fully support yarn v2. It's got a lot of attention right now, so I expect it won't be too much longer to wait. |
Thank you for the update, unfortunately I can't share with you my repo but it's a yarn 2 monorepo and if you need to test some stuff i'll try on it and report to you. |
@rarkins, you'd asked for an example repo that exhibits the problems with yarn 2 repos. This isn't a pure example repo, but it's a public repo and has a PR here from renovate bot that fails: The likely relevant parts in the logs in the renovate console are:
And
Hopefully this is helpful |
I'm having this issue as well. Is there some estimate when this will be supported? I don't consider myself early adopter, would be nice to have this running! |
This is marked as Done, but when I run it with the latest release in what I believe is a basic yarn 2 configuration, I'm still getting errors: Specifically the
This can be seen in a public repository here: itaylor/bucket-ts#7 (comment) I think this was also noted by @christophehurpeau in #6045 (comment). |
Reopening. Should hopefully be quick to fix. |
It would be awesome if anybody can send us a pr with the required argument changes for yarn v2 🙃 |
This was partly covered earlier in the thread: #5230 (comment)
|
Few notes:
|
With the current release of renovate In order to make it work, I had to add to my
In the docs, It would be much nicer if renovate could query yarn to determine what yarn version is used, instead of making me declare which version I'm using. I understand that this is complicated by the fact that the |
@itaylor Renovate is able to detect the Yarn version from its lockfile: renovate/lib/manager/npm/extract/locked-versions.ts Lines 15 to 27 in 605346f
|
@ylemkimon maybe it should use that when it goes to compute renovate/lib/manager/npm/post-update/yarn.ts Lines 50 to 55 in fbd0fdd
As the code works right now, the lockfile doesn't get regenerated and the renovate run ends with an error on yarn 2 unless you've specified a |
Thanks for the list and the PRs @ylemkimon. I'm currently looking at the |
@JamieMagee Could you check whether it still needs configuring |
@ylemkimon I'm still seeing the same issue when running the latest Renovate |
Okay, I've fixed it. The issue is that the compatibility was only being set for the first renovate/lib/manager/npm/extract/locked-versions.ts Lines 16 to 30 in 1b99f4f
Here's a sample PR I just generated JamieMagee/bookshelf#15. I need to look at tests + coverage, but I will send out a PR shortly. |
Opened PR at #7330 |
@ylemkimon My fix is in version |
@JamieMagee Actually, my installation worked before. Probably the issue was with Yarn workspaces (monorepo) because mine was |
@ylemkimon Excellent! I fixed a bug no-one complained about yet 😅 I think that the basic scenarios for Yarn v2 should now be covered without any additional Renovate conviguration. However, the issues you detailed above are still an issue. Would you agree? |
Yes #7220 is still an issue. Otherwise a pipeline that uses |
@brummelte Looks like #7220 was approved waiting to be merged. I've merged in the latest changes from |
It seems to work well with yarn 2 in my case. I've only noticed a minor inconvenience (#7584). |
Let's close this general issue then. Thanks everyone for the help |
What would you like Renovate to be able to do?
Support updating repositories which use Yarn v2
Describe the solution you'd like
It should require no custom config and "just work".
Describe alternatives you've considered
Additional context
https://dev.to/arcanis/introducing-yarn-2-4eh1 by @arcanis
The text was updated successfully, but these errors were encountered: