Skip to content
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

fix(volta): make sure volta uses the same yarn package overwrite #18893

Merged
merged 12 commits into from Nov 16, 2022
Merged

fix(volta): make sure volta uses the same yarn package overwrite #18893

merged 12 commits into from Nov 16, 2022

Conversation

pataar
Copy link
Contributor

@pataar pataar commented Nov 13, 2022

Changes

This makes sure that the 'volta' behavior for Yarn is the same as the 'engines' behavior.

Context

When using yarn 2+ in Volta, Renovate will make rollback PR's because it can't find new versions. This is caused because it's looking in the wrong repository.

Documentation (please check one with an [x])

  • I have updated the documentation, or
  • No documentation update is required

How I've tested my work (please tick one)

I have verified these changes via:

  • Code inspection only, or
  • Newly added/modified unit tests, or
  • No unit tests but ran on a real repository, or
  • Both unit tests + ran on a real repository

Copy link
Member

@viceice viceice left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please revert the format changes

@pataar pataar requested a review from viceice November 13, 2022 19:02
@pataar pataar marked this pull request as ready for review November 13, 2022 19:11
Copy link
Member

@viceice viceice left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think we already set his anywhere else.

this also doesn't work for simple ranges like ^3.2.0

@pataar
Copy link
Contributor Author

pataar commented Nov 13, 2022

i think we already set his anywhere else.

this also doesn't work for simple ranges like ^3.2.0

Yes, it's the same piece of code as used in the check for engines:
https://github.com/renovatebot/renovate/blob/main/lib/modules/manager/npm/extract/index.ts#L203

Ranges are not supported in Volta, so that shouldn't be an issue.

@viceice
Copy link
Member

viceice commented Nov 13, 2022

ok, but it will fill soon again as yarn V4 is around the corner.

so i think you should check if it's not starting with 1.

@pataar
Copy link
Contributor Author

pataar commented Nov 13, 2022

ok, but it will fill soon again as yarn V4 is around the corner.

so i think you should check if it's not starting with 1.

I've improved the check for both cases

pataar and others added 2 commits November 13, 2022 20:42
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
lib/modules/manager/npm/extract/index.ts Outdated Show resolved Hide resolved
lib/modules/manager/npm/extract/index.ts Outdated Show resolved Hide resolved
@pataar pataar requested a review from viceice November 13, 2022 20:10
@pataar pataar requested a review from viceice November 14, 2022 08:20
@viceice viceice requested a review from rarkins November 14, 2022 22:17
@rarkins rarkins enabled auto-merge (squash) November 16, 2022 05:03
@rarkins rarkins merged commit 7adc861 into renovatebot:main Nov 16, 2022
@renovate-release
Copy link
Collaborator

🎉 This PR is included in version 34.26.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 17, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants