Skip to content

Commit c470939

Browse files
committed
download engine262 from npm
1 parent 82a0610 commit c470939

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/engines/engine262.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,17 @@ class Engine262Installer extends Installer {
1616

1717
static resolveVersion(version) {
1818
if (version === 'latest') {
19-
return fetch('https://api.engine262.js.org/latest-version')
19+
return fetch('https://registry.npmjs.org/@engine262/engine262')
2020
.then((r) => r.json())
21-
.then((b) => b.latest);
21+
.then((b) => b['dist-tags'].latest);
2222
}
2323
return version;
2424
}
2525

2626
getDownloadURL(version) {
27-
return `https://api.engine262.js.org/download?version=${version}`;
27+
return fetch('https://registry.npmjs.org/@engine262/engine262')
28+
.then((r) => r.json())
29+
.then((b) => b.versions[version].dist.tarball);
2830
}
2931

3032
async extract() {

0 commit comments

Comments
 (0)