+ninja+cmake (#61)

This commit is contained in:
Max Howell 2022-08-01 22:50:33 -04:00 committed by GitHub
parent 5880b26de2
commit f13750bb50

View file

@ -55,9 +55,12 @@ async function get_versions(pkg: Package): Promise<SemVer[]> {
//FIXME? API isnt clear if these nulls indicate failure or not //FIXME? API isnt clear if these nulls indicate failure or not
//NOTE if this is a new package then some empty results is expected //NOTE if this is a new package then some empty results is expected
return rsp const got = rsp
?.contents ?.contents
?.compactMap(x => x.key?.split("/").pop()) ?.compactMap(x => x.key?.split("/").pop())
.compactMap(semver.coerce) //FIXME coerce is too loose .compactMap(semver.coerce) //FIXME coerce is too loose
.sort() ?? [] ?? []
// have to add pkg.version as put and get are not atomic
return [...new Set([...got, pkg.version])].sort()
} }