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: rangeStrategy=replace with lockedVersion #9634

Merged
merged 2 commits into from Apr 20, 2021
Merged

Conversation

rarkins
Copy link
Collaborator

@rarkins rarkins commented Apr 19, 2021

Changes:

Fixes an edge case where:

  • rangeStrategy=replace
  • A range is in use
  • A lock file is in use
  • The locked version is not the highest version matching the range, or the same version as the range

In such scenarios the incorrect result was a PR which essentially "bumped" the range to start with the current locked version.

Context:

Closes #9627

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 unit tests, or
  • No new tests but ran on a real repository, or
  • Both unit tests + ran on a real repository

@rarkins rarkins requested a review from viceice April 19, 2021 20:27
@rarkins
Copy link
Collaborator Author

rarkins commented Apr 19, 2021

Confirmed that the new test failed against master without this fix. Also confirm against a fork of JustinBeckwith/linkinator

@rarkins
Copy link
Collaborator Author

rarkins commented Apr 19, 2021

Example:

  • range is ^1.0.0
  • locked version is 1.1.0
  • 1.2.0 is also available

The result would be that the range is bumped to ^1.1.0

@rarkins rarkins enabled auto-merge (squash) April 20, 2021 04:41
@rarkins rarkins merged commit 9a30604 into master Apr 20, 2021
@rarkins rarkins deleted the fix/9627-range-locked branch April 20, 2021 04:56
@renovate-release
Copy link
Collaborator

🎉 This PR is included in version 24.119.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 21, 2021
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.

:preserveSemverRanges is no longer respected for NPM package updates
3 participants