-
-
Notifications
You must be signed in to change notification settings - Fork 186
fix: semver sorting #143
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: semver sorting #143
Conversation
uses the built-in compare method from the semver package.
|
@MatteoGabriele is attempting to deploy a commit to the danielroe Team on Vercel. A member of the Team first needs to authorize it. |
app/utils/versions.ts
Outdated
| @@ -47,19 +47,7 @@ export function parseVersion(version: string): ParsedVersion { | |||
| * @returns Comparison result for sorting | |||
| */ | |||
| export function compareVersions(a: string, b: string): number { | |||
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.
can we just use compare wherever compareVersions is used instead of wrapping it?
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.
Definitely! I thought about keeping the wrapper for future changes, but it's indeed cleaner to use the package's method where needed, which also eliminates the need for tests.
danielroe
left a comment
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.
💯
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Uses the built-in compare method from the
semverpackage.before

after

closes #139