admin: fixed update scripts to not conflict with reticulate used in v6

This commit is contained in:
Richard Moore 2022-04-13 00:26:24 -04:00
parent 9e57e71dc0
commit 948f77050d
2 changed files with 11 additions and 2 deletions

@ -47,8 +47,12 @@ function getPackage(name, version) {
if (version == null) {
const versions = Object.keys(infos.versions);
versions.sort(semver_1.default.compare);
// HACK: So v5 continues working while v6 is managed by reticulate
version = "6.0.0";
while (version.indexOf("beta") >= 0 || semver_1.default.gte(version, "6.0.0")) {
version = versions.pop();
}
}
const info = infos.versions[version];
return {
dependencies: (info.dependencies || {}),

@ -32,8 +32,13 @@ export async function getPackage(name: string, version?: string): Promise<Packag
if (version == null) {
const versions = Object.keys(infos.versions);
versions.sort(semver.compare);
// HACK: So v5 continues working while v6 is managed by reticulate
version = "6.0.0";
while (version.indexOf("beta") >= 0 || semver.gte(version, "6.0.0")) {
version = versions.pop();
}
}
const info = infos.versions[version];