Allow tilde as optional suffix separator (#3378)

For example [Debian] uses them, typically for pre-releases.
This commit is contained in:
Ville Skyttä
2019-04-29 17:11:55 +03:00
committed by chris48s
parent 5f29f6a175
commit 802c3cd8e8

View File

@@ -21,9 +21,9 @@ const isVPlusDottedVersionNClauses = withRegex(/^v\d+(\.\d+)*$/)
// matches a version number with N 'clauses'
// and an optional text suffix
// e.g: -beta, -preview1, -release-candidate, +beta etc
// e.g: -beta, -preview1, -release-candidate, +beta, ~pre9-12 etc
const isVPlusDottedVersionNClausesWithOptionalSuffix = withRegex(
/^v\d+(\.\d+)*([-+].*)?$/
/^v\d+(\.\d+)*([-+~].*)?$/
)
// Simple regex for test Composer versions rule