esbuild 0.9.6 → 0.9.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/install.js +3 -2
- package/lib/main.js +23 -15
- package/package.json +1 -1
package/install.js
CHANGED
|
@@ -20,7 +20,7 @@ const path = require("path");
|
|
|
20
20
|
const zlib = require("zlib");
|
|
21
21
|
const https = require("https");
|
|
22
22
|
const child_process = require("child_process");
|
|
23
|
-
const version = "0.9.
|
|
23
|
+
const version = "0.9.7";
|
|
24
24
|
const binPath = path.join(__dirname, "bin", "esbuild");
|
|
25
25
|
async function installBinaryFromPackage(name, fromPath, toPath) {
|
|
26
26
|
const cachePath = getCachePath(name);
|
|
@@ -230,8 +230,9 @@ const knownWindowsPackages = {
|
|
|
230
230
|
"win32 x64 LE": "esbuild-windows-64"
|
|
231
231
|
};
|
|
232
232
|
const knownUnixlikePackages = {
|
|
233
|
-
"
|
|
233
|
+
"android arm64 LE": "esbuild-android-arm64",
|
|
234
234
|
"darwin arm64 LE": "esbuild-darwin-arm64",
|
|
235
|
+
"darwin x64 LE": "esbuild-darwin-64",
|
|
235
236
|
"freebsd arm64 LE": "esbuild-freebsd-arm64",
|
|
236
237
|
"freebsd x64 LE": "esbuild-freebsd-64",
|
|
237
238
|
"linux arm LE": "esbuild-linux-arm",
|
package/lib/main.js
CHANGED
|
@@ -640,8 +640,8 @@ function createChannel(streamIn) {
|
|
|
640
640
|
if (isFirstPacket) {
|
|
641
641
|
isFirstPacket = false;
|
|
642
642
|
let binaryVersion = String.fromCharCode(...bytes);
|
|
643
|
-
if (binaryVersion !== "0.9.
|
|
644
|
-
throw new Error(`Cannot start service: Host version "${"0.9.
|
|
643
|
+
if (binaryVersion !== "0.9.7") {
|
|
644
|
+
throw new Error(`Cannot start service: Host version "${"0.9.7"}" does not match binary version ${JSON.stringify(binaryVersion)}`);
|
|
645
645
|
}
|
|
646
646
|
return;
|
|
647
647
|
}
|
|
@@ -759,7 +759,7 @@ function createChannel(streamIn) {
|
|
|
759
759
|
break;
|
|
760
760
|
}
|
|
761
761
|
} catch (e) {
|
|
762
|
-
return {id, errors: [extractErrorMessageV8(e, streamIn, stash, note)]};
|
|
762
|
+
return {id, errors: [extractErrorMessageV8(e, streamIn, stash, note && note())]};
|
|
763
763
|
}
|
|
764
764
|
}
|
|
765
765
|
return response;
|
|
@@ -806,7 +806,7 @@ function createChannel(streamIn) {
|
|
|
806
806
|
break;
|
|
807
807
|
}
|
|
808
808
|
} catch (e) {
|
|
809
|
-
return {id, errors: [extractErrorMessageV8(e, streamIn, stash, note)]};
|
|
809
|
+
return {id, errors: [extractErrorMessageV8(e, streamIn, stash, note && note())]};
|
|
810
810
|
}
|
|
811
811
|
}
|
|
812
812
|
return response;
|
|
@@ -1133,15 +1133,23 @@ function createObjectStash() {
|
|
|
1133
1133
|
};
|
|
1134
1134
|
}
|
|
1135
1135
|
function extractCallerV8(e, streamIn, ident) {
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1136
|
+
let note;
|
|
1137
|
+
let tried = false;
|
|
1138
|
+
return () => {
|
|
1139
|
+
if (tried)
|
|
1140
|
+
return note;
|
|
1141
|
+
tried = true;
|
|
1142
|
+
try {
|
|
1143
|
+
let lines = (e.stack + "").split("\n");
|
|
1144
|
+
lines.splice(1, 1);
|
|
1145
|
+
let location = parseStackLinesV8(streamIn, lines, ident);
|
|
1146
|
+
if (location) {
|
|
1147
|
+
note = {text: e.message, location};
|
|
1148
|
+
return note;
|
|
1149
|
+
}
|
|
1150
|
+
} catch (e2) {
|
|
1142
1151
|
}
|
|
1143
|
-
}
|
|
1144
|
-
}
|
|
1152
|
+
};
|
|
1145
1153
|
}
|
|
1146
1154
|
function extractErrorMessageV8(e, streamIn, stash, note) {
|
|
1147
1155
|
let text = "Internal error";
|
|
@@ -1322,7 +1330,7 @@ var esbuildCommandAndArgs = () => {
|
|
|
1322
1330
|
return [path.join(__dirname, "..", "bin", "esbuild"), []];
|
|
1323
1331
|
};
|
|
1324
1332
|
var isTTY = () => tty.isatty(2);
|
|
1325
|
-
var version = "0.9.
|
|
1333
|
+
var version = "0.9.7";
|
|
1326
1334
|
var build = (options) => ensureServiceIsRunning().build(options);
|
|
1327
1335
|
var serve = (serveOptions, buildOptions) => ensureServiceIsRunning().serve(serveOptions, buildOptions);
|
|
1328
1336
|
var transform = (input, options) => ensureServiceIsRunning().transform(input, options);
|
|
@@ -1395,7 +1403,7 @@ var ensureServiceIsRunning = () => {
|
|
|
1395
1403
|
if (longLivedService)
|
|
1396
1404
|
return longLivedService;
|
|
1397
1405
|
let [command, args] = esbuildCommandAndArgs();
|
|
1398
|
-
let child = child_process.spawn(command, args.concat(`--service=${"0.9.
|
|
1406
|
+
let child = child_process.spawn(command, args.concat(`--service=${"0.9.7"}`, "--ping"), {
|
|
1399
1407
|
windowsHide: true,
|
|
1400
1408
|
stdio: ["pipe", "pipe", "inherit"],
|
|
1401
1409
|
cwd: defaultWD
|
|
@@ -1494,7 +1502,7 @@ var runServiceSync = (callback) => {
|
|
|
1494
1502
|
isBrowser: false
|
|
1495
1503
|
});
|
|
1496
1504
|
callback(service);
|
|
1497
|
-
let stdout = child_process.execFileSync(command, args.concat(`--service=${"0.9.
|
|
1505
|
+
let stdout = child_process.execFileSync(command, args.concat(`--service=${"0.9.7"}`), {
|
|
1498
1506
|
cwd: defaultWD,
|
|
1499
1507
|
windowsHide: true,
|
|
1500
1508
|
input: stdin,
|