Skip to content

Commit

Permalink
admin: fixed update scripts to not conflict with reticulate used in v6
Browse files Browse the repository at this point in the history
  • Loading branch information
ricmoo committed Apr 13, 2022
1 parent 9e57e71 commit 948f770
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
6 changes: 5 additions & 1 deletion misc/admin/lib/npm.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,11 @@ function getPackage(name, version) {
if (version == null) {
const versions = Object.keys(infos.versions);
versions.sort(semver_1.default.compare);
version = versions.pop();
// 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 {
Expand Down
7 changes: 6 additions & 1 deletion misc/admin/src.ts/npm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,12 @@ export async function getPackage(name: string, version?: string): Promise<Packag
if (version == null) {
const versions = Object.keys(infos.versions);
versions.sort(semver.compare);
version = versions.pop();

// 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];
Expand Down

0 comments on commit 948f770

Please sign in to comment.