Fixes to NodeJS version.
This commit is contained in:
@@ -4,7 +4,7 @@ const semverSortKey = (value: string): number[] => value.split(".").map((part) =
|
||||
|
||||
export const sortImageVersionsIfSemantic = (versions: string[]): string[] => {
|
||||
if (!versions.every((value) => SEMVER_PATTERN.test(value))) {
|
||||
return versions;
|
||||
return [...versions].sort((a, b) => a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }));
|
||||
}
|
||||
|
||||
return [...versions].sort((a, b) => {
|
||||
|
||||
Reference in New Issue
Block a user