Closed gcmurphy closed 1 year ago
It should be fixed now and released to npm as version 1.8.0. Hopefully it supports all variations of a four-part version now. Thanks for reporting this issue 🙏
@watson I just encountered another different variation of this problem with this package. I'll re-open the issue but feel free to close it as I understand how this may become a case of whack-a-mole to support all the weird versioning schemes.
@gcmurphy As far as I can see this is because there's only two parts to the version right? I'll make an update that supports it so that the patch or even the minor is "missing" (in which case I'll just default them to zero).
I've now released v1.9.0 to npm with a less strict version string parser. So it now supports both 1
and 1.2
and even v1.2.3
and a few others. Feel free to reopen the issue if I've missed something. If it turns out that this still doesn't cover everything, I think the next cause of action is to simply fall back to not sorting the versions that it can't parse (instead of failing as it does now).
In cases where the package is not semver compliant we are not able reconcile state.
The affected line of code - https://github.com/elastic/snyk-github-issue-creator/blob/main/cli/utils.js#L30
A minimal reproducer:
Resulting error:
There are unfortunately libraries that do this which I have to deal with.. jackson-databind for example :cry:.