esbuild 0.14.19 → 0.14.23
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/bin/esbuild +1 -0
- package/install.js +5 -4
- package/lib/main.js +15 -8
- package/package.json +20 -19
package/bin/esbuild
CHANGED
|
@@ -39,6 +39,7 @@ var knownUnixlikePackages = {
|
|
|
39
39
|
"linux ia32 LE": "esbuild-linux-32",
|
|
40
40
|
"linux mips64el LE": "esbuild-linux-mips64le",
|
|
41
41
|
"linux ppc64 LE": "esbuild-linux-ppc64le",
|
|
42
|
+
"linux riscv64 LE": "esbuild-linux-riscv64",
|
|
42
43
|
"linux s390x BE": "esbuild-linux-s390x",
|
|
43
44
|
"linux x64 LE": "esbuild-linux-64",
|
|
44
45
|
"netbsd x64 LE": "esbuild-netbsd-64",
|
package/install.js
CHANGED
|
@@ -55,6 +55,7 @@ var knownUnixlikePackages = {
|
|
|
55
55
|
"linux ia32 LE": "esbuild-linux-32",
|
|
56
56
|
"linux mips64el LE": "esbuild-linux-mips64le",
|
|
57
57
|
"linux ppc64 LE": "esbuild-linux-ppc64le",
|
|
58
|
+
"linux riscv64 LE": "esbuild-linux-riscv64",
|
|
58
59
|
"linux s390x BE": "esbuild-linux-s390x",
|
|
59
60
|
"linux x64 LE": "esbuild-linux-64",
|
|
60
61
|
"netbsd x64 LE": "esbuild-netbsd-64",
|
|
@@ -95,8 +96,8 @@ function validateBinaryVersion(...command) {
|
|
|
95
96
|
const stdout = child_process.execFileSync(command.shift(), command, {
|
|
96
97
|
stdio: "pipe"
|
|
97
98
|
}).toString().trim();
|
|
98
|
-
if (stdout !== "0.14.
|
|
99
|
-
throw new Error(`Expected ${JSON.stringify("0.14.
|
|
99
|
+
if (stdout !== "0.14.23") {
|
|
100
|
+
throw new Error(`Expected ${JSON.stringify("0.14.23")} but got ${JSON.stringify(stdout)}`);
|
|
100
101
|
}
|
|
101
102
|
}
|
|
102
103
|
function isYarn() {
|
|
@@ -147,7 +148,7 @@ function installUsingNPM(pkg, subpath, binPath) {
|
|
|
147
148
|
fs2.mkdirSync(installDir);
|
|
148
149
|
try {
|
|
149
150
|
fs2.writeFileSync(path2.join(installDir, "package.json"), "{}");
|
|
150
|
-
child_process.execSync(`npm install --loglevel=error --prefer-offline --no-audit --progress=false ${pkg}@${"0.14.
|
|
151
|
+
child_process.execSync(`npm install --loglevel=error --prefer-offline --no-audit --progress=false ${pkg}@${"0.14.23"}`, { cwd: installDir, stdio: "pipe", env });
|
|
151
152
|
const installedBinPath = path2.join(installDir, "node_modules", pkg, subpath);
|
|
152
153
|
fs2.renameSync(installedBinPath, binPath);
|
|
153
154
|
} finally {
|
|
@@ -196,7 +197,7 @@ function maybeOptimizePackage(binPath) {
|
|
|
196
197
|
}
|
|
197
198
|
}
|
|
198
199
|
async function downloadDirectlyFromNPM(pkg, subpath, binPath) {
|
|
199
|
-
const url = `https://registry.npmjs.org/${pkg}/-/${pkg}-${"0.14.
|
|
200
|
+
const url = `https://registry.npmjs.org/${pkg}/-/${pkg}-${"0.14.23"}.tgz`;
|
|
200
201
|
console.error(`[esbuild] Trying to download ${JSON.stringify(url)}`);
|
|
201
202
|
try {
|
|
202
203
|
fs2.writeFileSync(binPath, extractFileFromTarGzip(await fetch(url), subpath));
|
package/lib/main.js
CHANGED
|
@@ -50,6 +50,7 @@ __export(node_exports, {
|
|
|
50
50
|
analyzeMetafileSync: () => analyzeMetafileSync,
|
|
51
51
|
build: () => build,
|
|
52
52
|
buildSync: () => buildSync,
|
|
53
|
+
default: () => node_default,
|
|
53
54
|
formatMessages: () => formatMessages,
|
|
54
55
|
formatMessagesSync: () => formatMessagesSync,
|
|
55
56
|
initialize: () => initialize,
|
|
@@ -744,8 +745,8 @@ function createChannel(streamIn) {
|
|
|
744
745
|
if (isFirstPacket) {
|
|
745
746
|
isFirstPacket = false;
|
|
746
747
|
let binaryVersion = String.fromCharCode(...bytes);
|
|
747
|
-
if (binaryVersion !== "0.14.
|
|
748
|
-
throw new Error(`Cannot start service: Host version "${"0.14.
|
|
748
|
+
if (binaryVersion !== "0.14.23") {
|
|
749
|
+
throw new Error(`Cannot start service: Host version "${"0.14.23"}" does not match binary version ${JSON.stringify(binaryVersion)}`);
|
|
749
750
|
}
|
|
750
751
|
return;
|
|
751
752
|
}
|
|
@@ -1710,6 +1711,7 @@ var knownUnixlikePackages = {
|
|
|
1710
1711
|
"linux ia32 LE": "esbuild-linux-32",
|
|
1711
1712
|
"linux mips64el LE": "esbuild-linux-mips64le",
|
|
1712
1713
|
"linux ppc64 LE": "esbuild-linux-ppc64le",
|
|
1714
|
+
"linux riscv64 LE": "esbuild-linux-riscv64",
|
|
1713
1715
|
"linux s390x BE": "esbuild-linux-s390x",
|
|
1714
1716
|
"linux x64 LE": "esbuild-linux-64",
|
|
1715
1717
|
"netbsd x64 LE": "esbuild-netbsd-64",
|
|
@@ -1848,7 +1850,7 @@ if (process.env.ESBUILD_WORKER_THREADS !== "0") {
|
|
|
1848
1850
|
}
|
|
1849
1851
|
}
|
|
1850
1852
|
var _a;
|
|
1851
|
-
var isInternalWorkerThread = ((_a = worker_threads == null ? void 0 : worker_threads.workerData) == null ? void 0 : _a.esbuildVersion) === "0.14.
|
|
1853
|
+
var isInternalWorkerThread = ((_a = worker_threads == null ? void 0 : worker_threads.workerData) == null ? void 0 : _a.esbuildVersion) === "0.14.23";
|
|
1852
1854
|
var esbuildCommandAndArgs = () => {
|
|
1853
1855
|
if ((!ESBUILD_BINARY_PATH || false) && (path2.basename(__filename) !== "main.js" || path2.basename(__dirname) !== "lib")) {
|
|
1854
1856
|
throw new Error(`The esbuild JavaScript API cannot be bundled. Please mark the "esbuild" package as external so it's not included in the bundle.
|
|
@@ -1907,7 +1909,7 @@ var fsAsync = {
|
|
|
1907
1909
|
}
|
|
1908
1910
|
}
|
|
1909
1911
|
};
|
|
1910
|
-
var version = "0.14.
|
|
1912
|
+
var version = "0.14.23";
|
|
1911
1913
|
var build = (options) => ensureServiceIsRunning().build(options);
|
|
1912
1914
|
var serve = (serveOptions, buildOptions) => ensureServiceIsRunning().serve(serveOptions, buildOptions);
|
|
1913
1915
|
var transform = (input, options) => ensureServiceIsRunning().transform(input, options);
|
|
@@ -2016,20 +2018,24 @@ var ensureServiceIsRunning = () => {
|
|
|
2016
2018
|
if (longLivedService)
|
|
2017
2019
|
return longLivedService;
|
|
2018
2020
|
let [command, args] = esbuildCommandAndArgs();
|
|
2019
|
-
let child = child_process.spawn(command, args.concat(`--service=${"0.14.
|
|
2021
|
+
let child = child_process.spawn(command, args.concat(`--service=${"0.14.23"}`, "--ping"), {
|
|
2020
2022
|
windowsHide: true,
|
|
2021
2023
|
stdio: ["pipe", "pipe", "inherit"],
|
|
2022
2024
|
cwd: defaultWD
|
|
2023
2025
|
});
|
|
2024
2026
|
let { readFromStdout, afterClose, service } = createChannel({
|
|
2025
2027
|
writeToStdin(bytes) {
|
|
2026
|
-
child.stdin.write(bytes)
|
|
2028
|
+
child.stdin.write(bytes, (err) => {
|
|
2029
|
+
if (err)
|
|
2030
|
+
afterClose();
|
|
2031
|
+
});
|
|
2027
2032
|
},
|
|
2028
2033
|
readFileSync: fs2.readFileSync,
|
|
2029
2034
|
isSync: false,
|
|
2030
2035
|
isBrowser: false,
|
|
2031
2036
|
esbuild: node_exports
|
|
2032
2037
|
});
|
|
2038
|
+
child.stdin.on("error", afterClose);
|
|
2033
2039
|
const stdin = child.stdin;
|
|
2034
2040
|
const stdout = child.stdout;
|
|
2035
2041
|
stdout.on("data", readFromStdout);
|
|
@@ -2125,7 +2131,7 @@ var runServiceSync = (callback) => {
|
|
|
2125
2131
|
esbuild: node_exports
|
|
2126
2132
|
});
|
|
2127
2133
|
callback(service);
|
|
2128
|
-
let stdout = child_process.execFileSync(command, args.concat(`--service=${"0.14.
|
|
2134
|
+
let stdout = child_process.execFileSync(command, args.concat(`--service=${"0.14.23"}`), {
|
|
2129
2135
|
cwd: defaultWD,
|
|
2130
2136
|
windowsHide: true,
|
|
2131
2137
|
input: stdin,
|
|
@@ -2141,7 +2147,7 @@ var workerThreadService = null;
|
|
|
2141
2147
|
var startWorkerThreadService = (worker_threads2) => {
|
|
2142
2148
|
let { port1: mainPort, port2: workerPort } = new worker_threads2.MessageChannel();
|
|
2143
2149
|
let worker = new worker_threads2.Worker(__filename, {
|
|
2144
|
-
workerData: { workerPort, defaultWD, esbuildVersion: "0.14.
|
|
2150
|
+
workerData: { workerPort, defaultWD, esbuildVersion: "0.14.23" },
|
|
2145
2151
|
transferList: [workerPort],
|
|
2146
2152
|
execArgv: []
|
|
2147
2153
|
});
|
|
@@ -2256,6 +2262,7 @@ var startSyncServiceWorker = () => {
|
|
|
2256
2262
|
if (isInternalWorkerThread) {
|
|
2257
2263
|
startSyncServiceWorker();
|
|
2258
2264
|
}
|
|
2265
|
+
var node_default = node_exports;
|
|
2259
2266
|
module.exports = __toCommonJS(node_exports);
|
|
2260
2267
|
// Annotate the CommonJS export names for ESM import in node:
|
|
2261
2268
|
0 && (module.exports = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "esbuild",
|
|
3
|
-
"version": "0.14.
|
|
3
|
+
"version": "0.14.23",
|
|
4
4
|
"description": "An extremely fast JavaScript and CSS bundler and minifier.",
|
|
5
5
|
"repository": "https://github.com/evanw/esbuild",
|
|
6
6
|
"scripts": {
|
|
@@ -15,24 +15,25 @@
|
|
|
15
15
|
"esbuild": "bin/esbuild"
|
|
16
16
|
},
|
|
17
17
|
"optionalDependencies": {
|
|
18
|
-
"esbuild-android-arm64": "0.14.
|
|
19
|
-
"esbuild-darwin-64": "0.14.
|
|
20
|
-
"esbuild-darwin-arm64": "0.14.
|
|
21
|
-
"esbuild-freebsd-64": "0.14.
|
|
22
|
-
"esbuild-freebsd-arm64": "0.14.
|
|
23
|
-
"esbuild-linux-32": "0.14.
|
|
24
|
-
"esbuild-linux-64": "0.14.
|
|
25
|
-
"esbuild-linux-arm": "0.14.
|
|
26
|
-
"esbuild-linux-arm64": "0.14.
|
|
27
|
-
"esbuild-linux-mips64le": "0.14.
|
|
28
|
-
"esbuild-linux-ppc64le": "0.14.
|
|
29
|
-
"esbuild-linux-
|
|
30
|
-
"esbuild-
|
|
31
|
-
"esbuild-
|
|
32
|
-
"esbuild-
|
|
33
|
-
"esbuild-
|
|
34
|
-
"esbuild-windows-
|
|
35
|
-
"esbuild-windows-
|
|
18
|
+
"esbuild-android-arm64": "0.14.23",
|
|
19
|
+
"esbuild-darwin-64": "0.14.23",
|
|
20
|
+
"esbuild-darwin-arm64": "0.14.23",
|
|
21
|
+
"esbuild-freebsd-64": "0.14.23",
|
|
22
|
+
"esbuild-freebsd-arm64": "0.14.23",
|
|
23
|
+
"esbuild-linux-32": "0.14.23",
|
|
24
|
+
"esbuild-linux-64": "0.14.23",
|
|
25
|
+
"esbuild-linux-arm": "0.14.23",
|
|
26
|
+
"esbuild-linux-arm64": "0.14.23",
|
|
27
|
+
"esbuild-linux-mips64le": "0.14.23",
|
|
28
|
+
"esbuild-linux-ppc64le": "0.14.23",
|
|
29
|
+
"esbuild-linux-riscv64": "0.14.23",
|
|
30
|
+
"esbuild-linux-s390x": "0.14.23",
|
|
31
|
+
"esbuild-netbsd-64": "0.14.23",
|
|
32
|
+
"esbuild-openbsd-64": "0.14.23",
|
|
33
|
+
"esbuild-sunos-64": "0.14.23",
|
|
34
|
+
"esbuild-windows-32": "0.14.23",
|
|
35
|
+
"esbuild-windows-64": "0.14.23",
|
|
36
|
+
"esbuild-windows-arm64": "0.14.23"
|
|
36
37
|
},
|
|
37
38
|
"license": "MIT"
|
|
38
39
|
}
|