esbuild 0.16.13 → 0.16.14
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 +5 -1
- package/install.js +19 -4
- package/lib/main.js +27 -9
- package/package.json +23 -23
package/bin/esbuild
CHANGED
|
@@ -15,6 +15,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
15
15
|
return to;
|
|
16
16
|
};
|
|
17
17
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
18
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
19
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
20
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
21
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
18
22
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
19
23
|
mod
|
|
20
24
|
));
|
|
@@ -190,7 +194,7 @@ for your current platform.`);
|
|
|
190
194
|
"node_modules",
|
|
191
195
|
".cache",
|
|
192
196
|
"esbuild",
|
|
193
|
-
`pnpapi-${pkg.replace("/", "-")}-${"0.16.
|
|
197
|
+
`pnpapi-${pkg.replace("/", "-")}-${"0.16.14"}-${path.basename(subpath)}`
|
|
194
198
|
);
|
|
195
199
|
if (!fs.existsSync(binTargetPath)) {
|
|
196
200
|
fs.mkdirSync(path.dirname(binTargetPath), { recursive: true });
|
package/install.js
CHANGED
|
@@ -14,6 +14,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
14
14
|
return to;
|
|
15
15
|
};
|
|
16
16
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
17
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
18
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
19
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
20
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
17
21
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
18
22
|
mod
|
|
19
23
|
));
|
|
@@ -90,6 +94,17 @@ function validateBinaryVersion(...command) {
|
|
|
90
94
|
let stdout;
|
|
91
95
|
try {
|
|
92
96
|
stdout = child_process.execFileSync(command.shift(), command, {
|
|
97
|
+
// Without this, this install script strangely crashes with the error
|
|
98
|
+
// "EACCES: permission denied, write" but only on Ubuntu Linux when node is
|
|
99
|
+
// installed from the Snap Store. This is not a problem when you download
|
|
100
|
+
// the official version of node. The problem appears to be that stderr
|
|
101
|
+
// (i.e. file descriptor 2) isn't writable?
|
|
102
|
+
//
|
|
103
|
+
// More info:
|
|
104
|
+
// - https://snapcraft.io/ (what the Snap Store is)
|
|
105
|
+
// - https://nodejs.org/dist/ (download the official version of node)
|
|
106
|
+
// - https://github.com/evanw/esbuild/issues/1711#issuecomment-1027554035
|
|
107
|
+
//
|
|
93
108
|
stdio: "pipe"
|
|
94
109
|
}).toString().trim();
|
|
95
110
|
} catch (err) {
|
|
@@ -111,8 +126,8 @@ which means the "esbuild" binary executable can't be run. You can either:
|
|
|
111
126
|
}
|
|
112
127
|
throw err;
|
|
113
128
|
}
|
|
114
|
-
if (stdout !== "0.16.
|
|
115
|
-
throw new Error(`Expected ${JSON.stringify("0.16.
|
|
129
|
+
if (stdout !== "0.16.14") {
|
|
130
|
+
throw new Error(`Expected ${JSON.stringify("0.16.14")} but got ${JSON.stringify(stdout)}`);
|
|
116
131
|
}
|
|
117
132
|
}
|
|
118
133
|
function isYarn() {
|
|
@@ -164,7 +179,7 @@ function installUsingNPM(pkg, subpath, binPath) {
|
|
|
164
179
|
try {
|
|
165
180
|
fs2.writeFileSync(path2.join(installDir, "package.json"), "{}");
|
|
166
181
|
child_process.execSync(
|
|
167
|
-
`npm install --loglevel=error --prefer-offline --no-audit --progress=false ${pkg}@${"0.16.
|
|
182
|
+
`npm install --loglevel=error --prefer-offline --no-audit --progress=false ${pkg}@${"0.16.14"}`,
|
|
168
183
|
{ cwd: installDir, stdio: "pipe", env }
|
|
169
184
|
);
|
|
170
185
|
const installedBinPath = path2.join(installDir, "node_modules", pkg, subpath);
|
|
@@ -215,7 +230,7 @@ function maybeOptimizePackage(binPath) {
|
|
|
215
230
|
}
|
|
216
231
|
}
|
|
217
232
|
async function downloadDirectlyFromNPM(pkg, subpath, binPath) {
|
|
218
|
-
const url = `https://registry.npmjs.org/${pkg}/-/${pkg.replace("@esbuild/", "")}-${"0.16.
|
|
233
|
+
const url = `https://registry.npmjs.org/${pkg}/-/${pkg.replace("@esbuild/", "")}-${"0.16.14"}.tgz`;
|
|
219
234
|
console.error(`[esbuild] Trying to download ${JSON.stringify(url)}`);
|
|
220
235
|
try {
|
|
221
236
|
fs2.writeFileSync(binPath, extractFileFromTarGzip(await fetch(url), subpath));
|
package/lib/main.js
CHANGED
|
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
return to;
|
|
19
19
|
};
|
|
20
20
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
21
25
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
26
|
mod
|
|
23
27
|
));
|
|
@@ -735,8 +739,8 @@ function createChannel(streamIn) {
|
|
|
735
739
|
if (isFirstPacket) {
|
|
736
740
|
isFirstPacket = false;
|
|
737
741
|
let binaryVersion = String.fromCharCode(...bytes);
|
|
738
|
-
if (binaryVersion !== "0.16.
|
|
739
|
-
throw new Error(`Cannot start service: Host version "${"0.16.
|
|
742
|
+
if (binaryVersion !== "0.16.14") {
|
|
743
|
+
throw new Error(`Cannot start service: Host version "${"0.16.14"}" does not match binary version ${quote(binaryVersion)}`);
|
|
740
744
|
}
|
|
741
745
|
return;
|
|
742
746
|
}
|
|
@@ -1860,7 +1864,7 @@ for your current platform.`);
|
|
|
1860
1864
|
"node_modules",
|
|
1861
1865
|
".cache",
|
|
1862
1866
|
"esbuild",
|
|
1863
|
-
`pnpapi-${pkg.replace("/", "-")}-${"0.16.
|
|
1867
|
+
`pnpapi-${pkg.replace("/", "-")}-${"0.16.14"}-${path.basename(subpath)}`
|
|
1864
1868
|
);
|
|
1865
1869
|
if (!fs.existsSync(binTargetPath)) {
|
|
1866
1870
|
fs.mkdirSync(path.dirname(binTargetPath), { recursive: true });
|
|
@@ -1887,12 +1891,13 @@ if (process.env.ESBUILD_WORKER_THREADS !== "0") {
|
|
|
1887
1891
|
} catch {
|
|
1888
1892
|
}
|
|
1889
1893
|
let [major, minor] = process.versions.node.split(".");
|
|
1890
|
-
if (
|
|
1894
|
+
if (// <v12.17.0 does not work
|
|
1895
|
+
+major < 12 || +major === 12 && +minor < 17 || +major === 13 && +minor < 13) {
|
|
1891
1896
|
worker_threads = void 0;
|
|
1892
1897
|
}
|
|
1893
1898
|
}
|
|
1894
1899
|
var _a;
|
|
1895
|
-
var isInternalWorkerThread = ((_a = worker_threads == null ? void 0 : worker_threads.workerData) == null ? void 0 : _a.esbuildVersion) === "0.16.
|
|
1900
|
+
var isInternalWorkerThread = ((_a = worker_threads == null ? void 0 : worker_threads.workerData) == null ? void 0 : _a.esbuildVersion) === "0.16.14";
|
|
1896
1901
|
var esbuildCommandAndArgs = () => {
|
|
1897
1902
|
if ((!ESBUILD_BINARY_PATH || false) && (path2.basename(__filename) !== "main.js" || path2.basename(__dirname) !== "lib")) {
|
|
1898
1903
|
throw new Error(
|
|
@@ -1959,7 +1964,7 @@ var fsAsync = {
|
|
|
1959
1964
|
}
|
|
1960
1965
|
}
|
|
1961
1966
|
};
|
|
1962
|
-
var version = "0.16.
|
|
1967
|
+
var version = "0.16.14";
|
|
1963
1968
|
var build = (options) => ensureServiceIsRunning().build(options);
|
|
1964
1969
|
var serve = (serveOptions, buildOptions) => ensureServiceIsRunning().serve(serveOptions, buildOptions);
|
|
1965
1970
|
var transform = (input, options) => ensureServiceIsRunning().transform(input, options);
|
|
@@ -2070,7 +2075,7 @@ var ensureServiceIsRunning = () => {
|
|
|
2070
2075
|
if (longLivedService)
|
|
2071
2076
|
return longLivedService;
|
|
2072
2077
|
let [command, args] = esbuildCommandAndArgs();
|
|
2073
|
-
let child = child_process.spawn(command, args.concat(`--service=${"0.16.
|
|
2078
|
+
let child = child_process.spawn(command, args.concat(`--service=${"0.16.14"}`, "--ping"), {
|
|
2074
2079
|
windowsHide: true,
|
|
2075
2080
|
stdio: ["pipe", "pipe", "inherit"],
|
|
2076
2081
|
cwd: defaultWD
|
|
@@ -2184,10 +2189,14 @@ var runServiceSync = (callback) => {
|
|
|
2184
2189
|
esbuild: node_exports
|
|
2185
2190
|
});
|
|
2186
2191
|
callback(service);
|
|
2187
|
-
let stdout = child_process.execFileSync(command, args.concat(`--service=${"0.16.
|
|
2192
|
+
let stdout = child_process.execFileSync(command, args.concat(`--service=${"0.16.14"}`), {
|
|
2188
2193
|
cwd: defaultWD,
|
|
2189
2194
|
windowsHide: true,
|
|
2190
2195
|
input: stdin,
|
|
2196
|
+
// We don't know how large the output could be. If it's too large, the
|
|
2197
|
+
// command will fail with ENOBUFS. Reserve 16mb for now since that feels
|
|
2198
|
+
// like it should be enough. Also allow overriding this with an environment
|
|
2199
|
+
// variable.
|
|
2191
2200
|
maxBuffer: +process.env.ESBUILD_MAX_BUFFER || 16 * 1024 * 1024
|
|
2192
2201
|
});
|
|
2193
2202
|
readFromStdout(stdout);
|
|
@@ -2200,8 +2209,17 @@ var workerThreadService = null;
|
|
|
2200
2209
|
var startWorkerThreadService = (worker_threads2) => {
|
|
2201
2210
|
let { port1: mainPort, port2: workerPort } = new worker_threads2.MessageChannel();
|
|
2202
2211
|
let worker = new worker_threads2.Worker(__filename, {
|
|
2203
|
-
workerData: { workerPort, defaultWD, esbuildVersion: "0.16.
|
|
2212
|
+
workerData: { workerPort, defaultWD, esbuildVersion: "0.16.14" },
|
|
2204
2213
|
transferList: [workerPort],
|
|
2214
|
+
// From node's documentation: https://nodejs.org/api/worker_threads.html
|
|
2215
|
+
//
|
|
2216
|
+
// Take care when launching worker threads from preload scripts (scripts loaded
|
|
2217
|
+
// and run using the `-r` command line flag). Unless the `execArgv` option is
|
|
2218
|
+
// explicitly set, new Worker threads automatically inherit the command line flags
|
|
2219
|
+
// from the running process and will preload the same preload scripts as the main
|
|
2220
|
+
// thread. If the preload script unconditionally launches a worker thread, every
|
|
2221
|
+
// thread spawned will spawn another until the application crashes.
|
|
2222
|
+
//
|
|
2205
2223
|
execArgv: []
|
|
2206
2224
|
});
|
|
2207
2225
|
let nextID = 0;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "esbuild",
|
|
3
|
-
"version": "0.16.
|
|
3
|
+
"version": "0.16.14",
|
|
4
4
|
"description": "An extremely fast JavaScript and CSS bundler and minifier.",
|
|
5
5
|
"repository": "https://github.com/evanw/esbuild",
|
|
6
6
|
"scripts": {
|
|
@@ -15,28 +15,28 @@
|
|
|
15
15
|
"esbuild": "bin/esbuild"
|
|
16
16
|
},
|
|
17
17
|
"optionalDependencies": {
|
|
18
|
-
"@esbuild/android-arm": "0.16.
|
|
19
|
-
"@esbuild/android-arm64": "0.16.
|
|
20
|
-
"@esbuild/android-x64": "0.16.
|
|
21
|
-
"@esbuild/darwin-arm64": "0.16.
|
|
22
|
-
"@esbuild/darwin-x64": "0.16.
|
|
23
|
-
"@esbuild/freebsd-arm64": "0.16.
|
|
24
|
-
"@esbuild/freebsd-x64": "0.16.
|
|
25
|
-
"@esbuild/linux-arm": "0.16.
|
|
26
|
-
"@esbuild/linux-arm64": "0.16.
|
|
27
|
-
"@esbuild/linux-ia32": "0.16.
|
|
28
|
-
"@esbuild/linux-loong64": "0.16.
|
|
29
|
-
"@esbuild/linux-mips64el": "0.16.
|
|
30
|
-
"@esbuild/linux-ppc64": "0.16.
|
|
31
|
-
"@esbuild/linux-riscv64": "0.16.
|
|
32
|
-
"@esbuild/linux-s390x": "0.16.
|
|
33
|
-
"@esbuild/linux-x64": "0.16.
|
|
34
|
-
"@esbuild/netbsd-x64": "0.16.
|
|
35
|
-
"@esbuild/openbsd-x64": "0.16.
|
|
36
|
-
"@esbuild/sunos-x64": "0.16.
|
|
37
|
-
"@esbuild/win32-arm64": "0.16.
|
|
38
|
-
"@esbuild/win32-ia32": "0.16.
|
|
39
|
-
"@esbuild/win32-x64": "0.16.
|
|
18
|
+
"@esbuild/android-arm": "0.16.14",
|
|
19
|
+
"@esbuild/android-arm64": "0.16.14",
|
|
20
|
+
"@esbuild/android-x64": "0.16.14",
|
|
21
|
+
"@esbuild/darwin-arm64": "0.16.14",
|
|
22
|
+
"@esbuild/darwin-x64": "0.16.14",
|
|
23
|
+
"@esbuild/freebsd-arm64": "0.16.14",
|
|
24
|
+
"@esbuild/freebsd-x64": "0.16.14",
|
|
25
|
+
"@esbuild/linux-arm": "0.16.14",
|
|
26
|
+
"@esbuild/linux-arm64": "0.16.14",
|
|
27
|
+
"@esbuild/linux-ia32": "0.16.14",
|
|
28
|
+
"@esbuild/linux-loong64": "0.16.14",
|
|
29
|
+
"@esbuild/linux-mips64el": "0.16.14",
|
|
30
|
+
"@esbuild/linux-ppc64": "0.16.14",
|
|
31
|
+
"@esbuild/linux-riscv64": "0.16.14",
|
|
32
|
+
"@esbuild/linux-s390x": "0.16.14",
|
|
33
|
+
"@esbuild/linux-x64": "0.16.14",
|
|
34
|
+
"@esbuild/netbsd-x64": "0.16.14",
|
|
35
|
+
"@esbuild/openbsd-x64": "0.16.14",
|
|
36
|
+
"@esbuild/sunos-x64": "0.16.14",
|
|
37
|
+
"@esbuild/win32-arm64": "0.16.14",
|
|
38
|
+
"@esbuild/win32-ia32": "0.16.14",
|
|
39
|
+
"@esbuild/win32-x64": "0.16.14"
|
|
40
40
|
},
|
|
41
41
|
"license": "MIT"
|
|
42
42
|
}
|