Skip to content

Commit

Permalink
fix: only retrieve stable versions
Browse files Browse the repository at this point in the history
  • Loading branch information
nhedger committed May 27, 2024
1 parent b8ada4c commit 4b03a87
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/version.ts
Original file line number Diff line number Diff line change
Expand Up @@ -170,10 +170,7 @@ const extractVersionFromPackageManifest = async (
return undefined;
}

return (
maxSatisfying(versions, versionSpecifier, { includePrerelease: false })
?.version ?? undefined
);
return maxSatisfying(versions, versionSpecifier)?.version ?? undefined;
}
} catch {
return undefined;
Expand All @@ -200,7 +197,12 @@ const fetchBiomeVersions = async (
);

const versions = releases
.filter((release) => release.tag_name.startsWith("cli/"))
.filter(
(release) =>
release.tag_name.startsWith("cli/") &&
!release.draft &&
!release.prerelease,
)
.map((release) => coerce(release.tag_name));

return rsort(versions as SemVer[]);
Expand Down

0 comments on commit 4b03a87

Please sign in to comment.