- valid does not take the includePrerelease option
This commit is contained in:
+1
-2
@@ -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) {
|
||||||
|
|||||||
+1
-1
File diff suppressed because one or more lines are too long
+1
-2
@@ -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) {
|
||||||
|
|||||||
Reference in New Issue
Block a user