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: Update semver logic #4459
fix: Update semver logic #4459
Conversation
🤖 I detect that the PR title and the commit message differ and there's only one commit. To use the PR title for the commit history, you can use Github's automerge feature with squashing, or use -- conventional-commit-lint bot |
67e751f
to
3e21d7c
Compare
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.
🚀
return versions.find(({ version }) => semver.satisfies(version, pinnedVersion)) || { version: pinnedVersion } | ||
// invalid semver versions are coerced to valid ones (e.g 4.17.1-runtime.7 -> 4.17.1) | ||
return ( | ||
versions.find(({ version }) => semver.satisfies(semver.coerce(version), pinnedVersion)) || { |
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.
versions.find(({ version }) => semver.satisfies(semver.coerce(version), pinnedVersion)) || { | |
versions.find(({ version }) => semver.satisfies(version, pinnedVersion, { includePrerelease: true })) || { |
This should work
Summary
Update compatibility logic to coerced versions to valid semver (e.g 4.17.1-runtime.7 -> 4.17.1).
For us to review and ship your PR efficiently, please perform the following steps:
passes our tests.
A picture of a cute animal (not mandatory, but encouraged)