You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using the latest version 0.9.0 I am unable to parse certain wildcard ranges such as "5.x.x". Specifically, the wildcard specified in the patch field is a problem for the parser. Even though ranges like this are redundant they should still be valid syntax. Currently attempting to parse such a range will result in the following exception:
Unexpected token 'DOT(.) at position 3', expecting '[EOI(^(?!))]'
at com.github.zafarkhaja.semver.expr.ExpressionParser.consumeNextToken(ExpressionParser.java:507)
at com.github.zafarkhaja.semver.expr.ExpressionParser.parse(ExpressionParser.java:88)
at com.github.zafarkhaja.semver.expr.ExpressionParser.parse(ExpressionParser.java:43)
I did some debugging and found that the exception is thrown because it assumes that after parsing the wildcard in the "minor" field it should then find an EOI token. This isn't the case if parsing a version range like "5.x.x". Could we just allow version ranges like this? I can't just easily change the version ranges I'm working with because they're externally defined.
The text was updated successfully, but these errors were encountered:
heisluft
added a commit
to AntiLaby/jsemver
that referenced
this issue
Mar 24, 2019
Using the latest version 0.9.0 I am unable to parse certain wildcard ranges such as "5.x.x". Specifically, the wildcard specified in the patch field is a problem for the parser. Even though ranges like this are redundant they should still be valid syntax. Currently attempting to parse such a range will result in the following exception:
I did some debugging and found that the exception is thrown because it assumes that after parsing the wildcard in the "minor" field it should then find an EOI token. This isn't the case if parsing a version range like "5.x.x". Could we just allow version ranges like this? I can't just easily change the version ranges I'm working with because they're externally defined.
The text was updated successfully, but these errors were encountered: