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: trim off leading "v" in version strings when parsing #74

Merged
merged 1 commit into from
Mar 18, 2022

Conversation

G-Rath
Copy link
Owner

@G-Rath G-Rath commented Mar 18, 2022

All versions in the OSV advisories are strictly semver, so have no leading "v" - however composer packages can have an optional leading v, which currently causes the whole version string to be treated as having no components and just a build string.

This changes that to trim out the leading "v" if present - I've implemented this to actually track if the version had a leading "v" and undo the trim + track if the string turns out to have no components, because it was straightforward to do and so a nice optional extra.

@G-Rath G-Rath merged commit dbf79f3 into main Mar 18, 2022
@G-Rath G-Rath deleted the remove-version-prefix-when-parsing branch March 18, 2022 22:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant