Skip to content

Commit c5c9354

Browse files
XS binaries moved (#49)
1 parent 1a57967 commit c5c9354

File tree

2 files changed

+12
-14
lines changed

2 files changed

+12
-14
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ installing engines to make eshost automatically find the installed engines.
4545
| [QuickJS][] | `quickjs`, `quickjs-run-test262` || ||| |||
4646
| [SpiderMonkey][] | `sm`, `spidermonkey` ||||| |||
4747
| [V8][] | `v8` ||||| |||
48-
| [XS][] | `xs` || | || | ||
48+
| [XS][] | `xs` || | || | ||
4949

5050
Some binaries may be exposed as batch/shell scripts to properly handling shared library loading. Some binaries on
5151
64-bit systems may be natively 32-bit.

src/engines/xs.js

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,17 @@ const execa = require('execa');
66
const Installer = require('../installer');
77
const { platform, unzip } = require('../common');
88

9-
function getFilename(version) {
9+
function getFilename() {
1010
switch (platform) {
1111
case 'darwin-x64':
12-
return 'mac';
13-
case 'linux-ia32':
14-
return 'lin32';
12+
return 'mac64';
13+
case 'darwin-arm64':
14+
return 'mac64arm';
1515
case 'linux-x64':
1616
return 'lin64';
17+
case 'linux-arm64':
18+
return 'lin64arm';
1719
case 'win32-x64':
18-
if (parseInt(version, 10) < 11) {
19-
return 'win';
20-
}
2120
return 'win64';
2221
default:
2322
throw new Error(`No XS builds available for ${platform}`);
@@ -33,15 +32,14 @@ class XSInstaller extends Installer {
3332

3433
static async resolveVersion(version) {
3534
if (version === 'latest') {
36-
const body = await fetch('https://api.github.com/repos/Moddable-OpenSource/moddable-xst/releases')
35+
const body = await fetch('https://api.github.com/repos/Moddable-OpenSource/moddable/releases')
3736
.then((r) => r.json());
38-
return body.find((b) => !b.prerelease).tag_name.slice(1);
37+
return body.find((b) => !b.prerelease).tag_name;
3938
}
4039
return version;
4140
}
42-
4341
getDownloadURL(version) {
44-
return `https://github.com/Moddable-OpenSource/moddable-xst/releases/download/v${version}/xst-${getFilename(version)}.zip`;
42+
return `https://github.com/Moddable-OpenSource/moddable/releases/download/${version}/xst-${getFilename(version)}.zip`;
4543
}
4644

4745
extract() {
@@ -72,9 +70,9 @@ XSInstaller.config = {
7270
name: 'XS',
7371
id: 'xs',
7472
supported: [
75-
'linux-ia32', 'linux-x64',
73+
'linux-arm64', 'linux-x64',
7674
'win32-x64',
77-
'darwin-x64',
75+
'darwin-arm64', 'darwin-x64',
7876
],
7977
};
8078

0 commit comments

Comments
 (0)