- valid does not take the includePrerelease option

This commit is contained in:
Mike Penz
2022-08-16 17:07:20 +02:00
parent e5c1179611
commit 89e7a9caf5
3 changed files with 3 additions and 5 deletions
Generated Vendored
+1 -2
View File
@@ -1383,8 +1383,7 @@ exports.sortTags = sortTags;
function semVerSorting(tags) { function semVerSorting(tags) {
// filter out tags which do not follow semver // filter out tags which do not follow semver
const validatedTags = tags.filter(tag => { const validatedTags = tags.filter(tag => {
const isValid = semver.validRange(tag.name, { const isValid = semver.valid(tag.name, {
includePrerelease: true,
loose: true loose: true
}) !== null; }) !== null;
if (!isValid) { if (!isValid) {
Generated Vendored
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -2
View File
@@ -294,8 +294,7 @@ function semVerSorting(tags: TagInfo[]): TagInfo[] {
// filter out tags which do not follow semver // filter out tags which do not follow semver
const validatedTags = tags.filter(tag => { const validatedTags = tags.filter(tag => {
const isValid = const isValid =
semver.validRange(tag.name, { semver.valid(tag.name, {
includePrerelease: true,
loose: true loose: true
}) !== null }) !== null
if (!isValid) { if (!isValid) {