Allow plus in semver [Nexus aur bintray chocolatey dubversion myget nuget powershellgallery resharper] (#2987)
* Also allow + in semver * Add test for + in semver version * Add more dashes to test version * Fix tests
This commit is contained in:
committed by
Caleb Cartwright
parent
b87d67bb18
commit
56d374a467
@@ -86,6 +86,24 @@ t.create('live: repository version of an inexistent artifact')
|
||||
value: 'artifact not found',
|
||||
})
|
||||
|
||||
t.create('snapshot version with + in version')
|
||||
.get(
|
||||
'/s/https/repository.jboss.org/nexus/com.progress.fuse/fusehq.json?style=_shields_test'
|
||||
)
|
||||
.intercept(nock =>
|
||||
nock('https://repository.jboss.org/nexus')
|
||||
.get('/service/local/lucene/search')
|
||||
.query({ g: 'com.progress.fuse', a: 'fusehq' })
|
||||
.reply(200, { data: [{ version: '7.0.1+19-8844c122-SNAPSHOT' }] })
|
||||
)
|
||||
.expectJSONTypes(
|
||||
Joi.object().keys({
|
||||
name: 'nexus',
|
||||
color: 'orange',
|
||||
value: isVersion,
|
||||
})
|
||||
)
|
||||
|
||||
t.create('search snapshot version not in latestSnapshot')
|
||||
.get(
|
||||
'/s/https/repository.jboss.org/nexus/com.progress.fuse/fusehq.json?style=_shields_test'
|
||||
|
||||
@@ -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 etc
|
||||
// e.g: -beta, -preview1, -release-candidate, +beta etc
|
||||
const isVPlusDottedVersionNClausesWithOptionalSuffix = withRegex(
|
||||
/^v\d+(\.\d+)*(-.*)?$/
|
||||
/^v\d+(\.\d+)*([-+].*)?$/
|
||||
)
|
||||
|
||||
// Simple regex for test Composer versions rule
|
||||
|
||||
@@ -21,7 +21,7 @@ module.exports = {
|
||||
.required(),
|
||||
|
||||
optionalDottedVersionNClausesWithOptionalSuffix: Joi.string().regex(
|
||||
/^\d+(\.\d+)*(-.*)?$/
|
||||
/^\d+(\.\d+)*([-+].*)?$/
|
||||
),
|
||||
|
||||
// TODO This accepts URLs with query strings and fragments, which for some
|
||||
|
||||
Reference in New Issue
Block a user