Add doc string to semVerToken

Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com>
This commit is contained in:
Asger F
2020-09-22 14:07:21 +01:00
committed by Asger Feldthaus
parent 0ddd825ea6
commit 4e2b990d14

View File

@@ -57,7 +57,8 @@ public class DependencyResolver {
}
}
private static final Pattern semVerToken = Pattern.compile("[~^<>=|&-]+|\\d+(?:\\.[\\dx]+)+(?:-[\\w.-]*)?");
// Matches either a version ("2.1.x" / "3.0", etc..), or a version constraint operator ("<", "||", "~", etc...).
private static final Pattern semVerToken = Pattern.compile("\\d+(?:\\.[\\dx]+)+(?:-[\\w.-]*)?|[~^<>=|&-]+");
/**
* Returns the first version number mentioned in the given constraints, excluding upper bounds such as `< 2.0.0`,