esbuild 0.14.41 → 0.14.44
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/LICENSE.md +21 -0
- package/bin/esbuild +1 -0
- package/install.js +5 -4
- package/lib/main.d.ts +3 -1
- package/lib/main.js +16 -7
- package/package.json +21 -21
package/LICENSE.md
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2020 Evan Wallace
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/bin/esbuild
CHANGED
package/install.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
var __create = Object.create;
|
|
2
3
|
var __defProp = Object.defineProperty;
|
|
3
4
|
var __defProps = Object.defineProperties;
|
|
@@ -101,8 +102,8 @@ function validateBinaryVersion(...command) {
|
|
|
101
102
|
const stdout = child_process.execFileSync(command.shift(), command, {
|
|
102
103
|
stdio: "pipe"
|
|
103
104
|
}).toString().trim();
|
|
104
|
-
if (stdout !== "0.14.
|
|
105
|
-
throw new Error(`Expected ${JSON.stringify("0.14.
|
|
105
|
+
if (stdout !== "0.14.44") {
|
|
106
|
+
throw new Error(`Expected ${JSON.stringify("0.14.44")} but got ${JSON.stringify(stdout)}`);
|
|
106
107
|
}
|
|
107
108
|
}
|
|
108
109
|
function isYarn() {
|
|
@@ -153,7 +154,7 @@ function installUsingNPM(pkg, subpath, binPath) {
|
|
|
153
154
|
fs2.mkdirSync(installDir);
|
|
154
155
|
try {
|
|
155
156
|
fs2.writeFileSync(path2.join(installDir, "package.json"), "{}");
|
|
156
|
-
child_process.execSync(`npm install --loglevel=error --prefer-offline --no-audit --progress=false ${pkg}@${"0.14.
|
|
157
|
+
child_process.execSync(`npm install --loglevel=error --prefer-offline --no-audit --progress=false ${pkg}@${"0.14.44"}`, { cwd: installDir, stdio: "pipe", env });
|
|
157
158
|
const installedBinPath = path2.join(installDir, "node_modules", pkg, subpath);
|
|
158
159
|
fs2.renameSync(installedBinPath, binPath);
|
|
159
160
|
} finally {
|
|
@@ -202,7 +203,7 @@ function maybeOptimizePackage(binPath) {
|
|
|
202
203
|
}
|
|
203
204
|
}
|
|
204
205
|
async function downloadDirectlyFromNPM(pkg, subpath, binPath) {
|
|
205
|
-
const url = `https://registry.npmjs.org/${pkg}/-/${pkg}-${"0.14.
|
|
206
|
+
const url = `https://registry.npmjs.org/${pkg}/-/${pkg}-${"0.14.44"}.tgz`;
|
|
206
207
|
console.error(`[esbuild] Trying to download ${JSON.stringify(url)}`);
|
|
207
208
|
try {
|
|
208
209
|
fs2.writeFileSync(binPath, extractFileFromTarGzip(await fetch(url), subpath));
|
package/lib/main.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export type Platform = 'browser' | 'node' | 'neutral';
|
|
2
2
|
export type Format = 'iife' | 'cjs' | 'esm';
|
|
3
|
-
export type Loader = 'js' | 'jsx' | 'ts' | 'tsx' | 'css' | 'json' | 'text' | 'base64' | 'file' | 'dataurl' | 'binary' | 'default';
|
|
3
|
+
export type Loader = 'js' | 'jsx' | 'ts' | 'tsx' | 'css' | 'json' | 'text' | 'base64' | 'file' | 'dataurl' | 'binary' | 'copy' | 'default';
|
|
4
4
|
export type LogLevel = 'verbose' | 'debug' | 'info' | 'warning' | 'error' | 'silent';
|
|
5
5
|
export type Charset = 'ascii' | 'utf8';
|
|
6
6
|
export type Drop = 'console' | 'debugger';
|
|
@@ -67,6 +67,8 @@ interface CommonOptions {
|
|
|
67
67
|
logLevel?: LogLevel;
|
|
68
68
|
/** Documentation: https://esbuild.github.io/api/#log-limit */
|
|
69
69
|
logLimit?: number;
|
|
70
|
+
/** Documentation: https://esbuild.github.io/api/#log-override */
|
|
71
|
+
logOverride?: Record<string, LogLevel>;
|
|
70
72
|
}
|
|
71
73
|
|
|
72
74
|
export interface BuildOptions extends CommonOptions {
|
package/lib/main.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
var __create = Object.create;
|
|
2
3
|
var __defProp = Object.defineProperty;
|
|
3
4
|
var __defProps = Object.defineProperties;
|
|
@@ -318,6 +319,7 @@ function pushCommonFlags(flags, options, keys) {
|
|
|
318
319
|
let jsxFactory = getFlag(options, keys, "jsxFactory", mustBeString);
|
|
319
320
|
let jsxFragment = getFlag(options, keys, "jsxFragment", mustBeString);
|
|
320
321
|
let define = getFlag(options, keys, "define", mustBeObject);
|
|
322
|
+
let logOverride = getFlag(options, keys, "logOverride", mustBeObject);
|
|
321
323
|
let pure = getFlag(options, keys, "pure", mustBeArray);
|
|
322
324
|
let keepNames = getFlag(options, keys, "keepNames", mustBeBoolean);
|
|
323
325
|
if (legalComments)
|
|
@@ -372,6 +374,13 @@ function pushCommonFlags(flags, options, keys) {
|
|
|
372
374
|
flags.push(`--define:${key}=${define[key]}`);
|
|
373
375
|
}
|
|
374
376
|
}
|
|
377
|
+
if (logOverride) {
|
|
378
|
+
for (let key in logOverride) {
|
|
379
|
+
if (key.indexOf("=") >= 0)
|
|
380
|
+
throw new Error(`Invalid log override: ${key}`);
|
|
381
|
+
flags.push(`--log-override:${key}=${logOverride[key]}`);
|
|
382
|
+
}
|
|
383
|
+
}
|
|
375
384
|
if (pure)
|
|
376
385
|
for (let fn of pure)
|
|
377
386
|
flags.push(`--pure:${fn}`);
|
|
@@ -746,8 +755,8 @@ function createChannel(streamIn) {
|
|
|
746
755
|
if (isFirstPacket) {
|
|
747
756
|
isFirstPacket = false;
|
|
748
757
|
let binaryVersion = String.fromCharCode(...bytes);
|
|
749
|
-
if (binaryVersion !== "0.14.
|
|
750
|
-
throw new Error(`Cannot start service: Host version "${"0.14.
|
|
758
|
+
if (binaryVersion !== "0.14.44") {
|
|
759
|
+
throw new Error(`Cannot start service: Host version "${"0.14.44"}" does not match binary version ${JSON.stringify(binaryVersion)}`);
|
|
751
760
|
}
|
|
752
761
|
return;
|
|
753
762
|
}
|
|
@@ -1859,7 +1868,7 @@ if (process.env.ESBUILD_WORKER_THREADS !== "0") {
|
|
|
1859
1868
|
}
|
|
1860
1869
|
}
|
|
1861
1870
|
var _a;
|
|
1862
|
-
var isInternalWorkerThread = ((_a = worker_threads == null ? void 0 : worker_threads.workerData) == null ? void 0 : _a.esbuildVersion) === "0.14.
|
|
1871
|
+
var isInternalWorkerThread = ((_a = worker_threads == null ? void 0 : worker_threads.workerData) == null ? void 0 : _a.esbuildVersion) === "0.14.44";
|
|
1863
1872
|
var esbuildCommandAndArgs = () => {
|
|
1864
1873
|
if ((!ESBUILD_BINARY_PATH || false) && (path2.basename(__filename) !== "main.js" || path2.basename(__dirname) !== "lib")) {
|
|
1865
1874
|
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.
|
|
@@ -1923,7 +1932,7 @@ var fsAsync = {
|
|
|
1923
1932
|
}
|
|
1924
1933
|
}
|
|
1925
1934
|
};
|
|
1926
|
-
var version = "0.14.
|
|
1935
|
+
var version = "0.14.44";
|
|
1927
1936
|
var build = (options) => ensureServiceIsRunning().build(options);
|
|
1928
1937
|
var serve = (serveOptions, buildOptions) => ensureServiceIsRunning().serve(serveOptions, buildOptions);
|
|
1929
1938
|
var transform = (input, options) => ensureServiceIsRunning().transform(input, options);
|
|
@@ -2032,7 +2041,7 @@ var ensureServiceIsRunning = () => {
|
|
|
2032
2041
|
if (longLivedService)
|
|
2033
2042
|
return longLivedService;
|
|
2034
2043
|
let [command, args] = esbuildCommandAndArgs();
|
|
2035
|
-
let child = child_process.spawn(command, args.concat(`--service=${"0.14.
|
|
2044
|
+
let child = child_process.spawn(command, args.concat(`--service=${"0.14.44"}`, "--ping"), {
|
|
2036
2045
|
windowsHide: true,
|
|
2037
2046
|
stdio: ["pipe", "pipe", "inherit"],
|
|
2038
2047
|
cwd: defaultWD
|
|
@@ -2146,7 +2155,7 @@ var runServiceSync = (callback) => {
|
|
|
2146
2155
|
esbuild: node_exports
|
|
2147
2156
|
});
|
|
2148
2157
|
callback(service);
|
|
2149
|
-
let stdout = child_process.execFileSync(command, args.concat(`--service=${"0.14.
|
|
2158
|
+
let stdout = child_process.execFileSync(command, args.concat(`--service=${"0.14.44"}`), {
|
|
2150
2159
|
cwd: defaultWD,
|
|
2151
2160
|
windowsHide: true,
|
|
2152
2161
|
input: stdin,
|
|
@@ -2162,7 +2171,7 @@ var workerThreadService = null;
|
|
|
2162
2171
|
var startWorkerThreadService = (worker_threads2) => {
|
|
2163
2172
|
let { port1: mainPort, port2: workerPort } = new worker_threads2.MessageChannel();
|
|
2164
2173
|
let worker = new worker_threads2.Worker(__filename, {
|
|
2165
|
-
workerData: { workerPort, defaultWD, esbuildVersion: "0.14.
|
|
2174
|
+
workerData: { workerPort, defaultWD, esbuildVersion: "0.14.44" },
|
|
2166
2175
|
transferList: [workerPort],
|
|
2167
2176
|
execArgv: []
|
|
2168
2177
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "esbuild",
|
|
3
|
-
"version": "0.14.
|
|
3
|
+
"version": "0.14.44",
|
|
4
4
|
"description": "An extremely fast JavaScript and CSS bundler and minifier.",
|
|
5
5
|
"repository": "https://github.com/evanw/esbuild",
|
|
6
6
|
"scripts": {
|
|
@@ -15,26 +15,26 @@
|
|
|
15
15
|
"esbuild": "bin/esbuild"
|
|
16
16
|
},
|
|
17
17
|
"optionalDependencies": {
|
|
18
|
-
"esbuild-android-64": "0.14.
|
|
19
|
-
"esbuild-android-arm64": "0.14.
|
|
20
|
-
"esbuild-darwin-64": "0.14.
|
|
21
|
-
"esbuild-darwin-arm64": "0.14.
|
|
22
|
-
"esbuild-freebsd-64": "0.14.
|
|
23
|
-
"esbuild-freebsd-arm64": "0.14.
|
|
24
|
-
"esbuild-linux-32": "0.14.
|
|
25
|
-
"esbuild-linux-64": "0.14.
|
|
26
|
-
"esbuild-linux-arm": "0.14.
|
|
27
|
-
"esbuild-linux-arm64": "0.14.
|
|
28
|
-
"esbuild-linux-mips64le": "0.14.
|
|
29
|
-
"esbuild-linux-ppc64le": "0.14.
|
|
30
|
-
"esbuild-linux-riscv64": "0.14.
|
|
31
|
-
"esbuild-linux-s390x": "0.14.
|
|
32
|
-
"esbuild-netbsd-64": "0.14.
|
|
33
|
-
"esbuild-openbsd-64": "0.14.
|
|
34
|
-
"esbuild-sunos-64": "0.14.
|
|
35
|
-
"esbuild-windows-32": "0.14.
|
|
36
|
-
"esbuild-windows-64": "0.14.
|
|
37
|
-
"esbuild-windows-arm64": "0.14.
|
|
18
|
+
"esbuild-android-64": "0.14.44",
|
|
19
|
+
"esbuild-android-arm64": "0.14.44",
|
|
20
|
+
"esbuild-darwin-64": "0.14.44",
|
|
21
|
+
"esbuild-darwin-arm64": "0.14.44",
|
|
22
|
+
"esbuild-freebsd-64": "0.14.44",
|
|
23
|
+
"esbuild-freebsd-arm64": "0.14.44",
|
|
24
|
+
"esbuild-linux-32": "0.14.44",
|
|
25
|
+
"esbuild-linux-64": "0.14.44",
|
|
26
|
+
"esbuild-linux-arm": "0.14.44",
|
|
27
|
+
"esbuild-linux-arm64": "0.14.44",
|
|
28
|
+
"esbuild-linux-mips64le": "0.14.44",
|
|
29
|
+
"esbuild-linux-ppc64le": "0.14.44",
|
|
30
|
+
"esbuild-linux-riscv64": "0.14.44",
|
|
31
|
+
"esbuild-linux-s390x": "0.14.44",
|
|
32
|
+
"esbuild-netbsd-64": "0.14.44",
|
|
33
|
+
"esbuild-openbsd-64": "0.14.44",
|
|
34
|
+
"esbuild-sunos-64": "0.14.44",
|
|
35
|
+
"esbuild-windows-32": "0.14.44",
|
|
36
|
+
"esbuild-windows-64": "0.14.44",
|
|
37
|
+
"esbuild-windows-arm64": "0.14.44"
|
|
38
38
|
},
|
|
39
39
|
"license": "MIT"
|
|
40
40
|
}
|