esbuild 0.18.12 → 0.18.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 +1 -1
- package/lib/main.d.ts +3 -1
- package/lib/main.js +16 -9
- package/package.json +23 -23
package/bin/esbuild
CHANGED
|
@@ -199,7 +199,7 @@ for your current platform.`);
|
|
|
199
199
|
"node_modules",
|
|
200
200
|
".cache",
|
|
201
201
|
"esbuild",
|
|
202
|
-
`pnpapi-${pkg.replace("/", "-")}-${"0.18.
|
|
202
|
+
`pnpapi-${pkg.replace("/", "-")}-${"0.18.14"}-${path.basename(subpath)}`
|
|
203
203
|
);
|
|
204
204
|
if (!fs.existsSync(binTargetPath)) {
|
|
205
205
|
fs.mkdirSync(path.dirname(binTargetPath), { recursive: true });
|
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 = 'base64' | 'binary' | 'copy' | 'css' | 'dataurl' | 'default' | 'empty' | 'file' | 'js' | 'json' | 'jsx' | 'text' | 'ts' | 'tsx'
|
|
3
|
+
export type Loader = 'base64' | 'binary' | 'copy' | 'css' | 'dataurl' | 'default' | 'empty' | 'file' | 'js' | 'json' | 'jsx' | 'local-css' | 'text' | 'ts' | 'tsx'
|
|
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'
|
|
@@ -36,6 +36,8 @@ interface CommonOptions {
|
|
|
36
36
|
mangleCache?: Record<string, string | false>
|
|
37
37
|
/** Documentation: https://esbuild.github.io/api/#drop */
|
|
38
38
|
drop?: Drop[]
|
|
39
|
+
/** Documentation: https://esbuild.github.io/api/#drop-labels */
|
|
40
|
+
dropLabels?: string[]
|
|
39
41
|
/** Documentation: https://esbuild.github.io/api/#minify */
|
|
40
42
|
minify?: boolean
|
|
41
43
|
/** Documentation: https://esbuild.github.io/api/#minify */
|
package/lib/main.js
CHANGED
|
@@ -316,6 +316,7 @@ function pushCommonFlags(flags, options, keys) {
|
|
|
316
316
|
let minifyIdentifiers = getFlag(options, keys, "minifyIdentifiers", mustBeBoolean);
|
|
317
317
|
let lineLimit = getFlag(options, keys, "lineLimit", mustBeInteger);
|
|
318
318
|
let drop = getFlag(options, keys, "drop", mustBeArray);
|
|
319
|
+
let dropLabels = getFlag(options, keys, "dropLabels", mustBeArray);
|
|
319
320
|
let charset = getFlag(options, keys, "charset", mustBeString);
|
|
320
321
|
let treeShaking = getFlag(options, keys, "treeShaking", mustBeBoolean);
|
|
321
322
|
let ignoreAnnotations = getFlag(options, keys, "ignoreAnnotations", mustBeBoolean);
|
|
@@ -371,6 +372,8 @@ function pushCommonFlags(flags, options, keys) {
|
|
|
371
372
|
if (drop)
|
|
372
373
|
for (let what of drop)
|
|
373
374
|
flags.push(`--drop:${validateStringValue(what, "drop")}`);
|
|
375
|
+
if (dropLabels)
|
|
376
|
+
flags.push(`--drop-labels=${Array.from(dropLabels).map((what) => validateStringValue(what, "dropLabels")).join(",")}`);
|
|
374
377
|
if (mangleProps)
|
|
375
378
|
flags.push(`--mangle-props=${mangleProps.source}`);
|
|
376
379
|
if (reserveProps)
|
|
@@ -730,7 +733,11 @@ function createChannel(streamIn) {
|
|
|
730
733
|
}
|
|
731
734
|
throw new Error(`Invalid command: ` + request.command);
|
|
732
735
|
} catch (e) {
|
|
733
|
-
|
|
736
|
+
const errors = [extractErrorMessageV8(e, streamIn, null, void 0, "")];
|
|
737
|
+
try {
|
|
738
|
+
sendResponse(id, { errors });
|
|
739
|
+
} catch {
|
|
740
|
+
}
|
|
734
741
|
}
|
|
735
742
|
};
|
|
736
743
|
let isFirstPacket = true;
|
|
@@ -738,8 +745,8 @@ function createChannel(streamIn) {
|
|
|
738
745
|
if (isFirstPacket) {
|
|
739
746
|
isFirstPacket = false;
|
|
740
747
|
let binaryVersion = String.fromCharCode(...bytes);
|
|
741
|
-
if (binaryVersion !== "0.18.
|
|
742
|
-
throw new Error(`Cannot start service: Host version "${"0.18.
|
|
748
|
+
if (binaryVersion !== "0.18.14") {
|
|
749
|
+
throw new Error(`Cannot start service: Host version "${"0.18.14"}" does not match binary version ${quote(binaryVersion)}`);
|
|
743
750
|
}
|
|
744
751
|
return;
|
|
745
752
|
}
|
|
@@ -1908,7 +1915,7 @@ for your current platform.`);
|
|
|
1908
1915
|
"node_modules",
|
|
1909
1916
|
".cache",
|
|
1910
1917
|
"esbuild",
|
|
1911
|
-
`pnpapi-${pkg.replace("/", "-")}-${"0.18.
|
|
1918
|
+
`pnpapi-${pkg.replace("/", "-")}-${"0.18.14"}-${path.basename(subpath)}`
|
|
1912
1919
|
);
|
|
1913
1920
|
if (!fs.existsSync(binTargetPath)) {
|
|
1914
1921
|
fs.mkdirSync(path.dirname(binTargetPath), { recursive: true });
|
|
@@ -1943,7 +1950,7 @@ if (process.env.ESBUILD_WORKER_THREADS !== "0") {
|
|
|
1943
1950
|
}
|
|
1944
1951
|
}
|
|
1945
1952
|
var _a;
|
|
1946
|
-
var isInternalWorkerThread = ((_a = worker_threads == null ? void 0 : worker_threads.workerData) == null ? void 0 : _a.esbuildVersion) === "0.18.
|
|
1953
|
+
var isInternalWorkerThread = ((_a = worker_threads == null ? void 0 : worker_threads.workerData) == null ? void 0 : _a.esbuildVersion) === "0.18.14";
|
|
1947
1954
|
var esbuildCommandAndArgs = () => {
|
|
1948
1955
|
if ((!ESBUILD_BINARY_PATH || false) && (path2.basename(__filename) !== "main.js" || path2.basename(__dirname) !== "lib")) {
|
|
1949
1956
|
throw new Error(
|
|
@@ -2010,7 +2017,7 @@ var fsAsync = {
|
|
|
2010
2017
|
}
|
|
2011
2018
|
}
|
|
2012
2019
|
};
|
|
2013
|
-
var version = "0.18.
|
|
2020
|
+
var version = "0.18.14";
|
|
2014
2021
|
var build = (options) => ensureServiceIsRunning().build(options);
|
|
2015
2022
|
var context = (buildOptions) => ensureServiceIsRunning().context(buildOptions);
|
|
2016
2023
|
var transform = (input, options) => ensureServiceIsRunning().transform(input, options);
|
|
@@ -2120,7 +2127,7 @@ var ensureServiceIsRunning = () => {
|
|
|
2120
2127
|
if (longLivedService)
|
|
2121
2128
|
return longLivedService;
|
|
2122
2129
|
let [command, args] = esbuildCommandAndArgs();
|
|
2123
|
-
let child = child_process.spawn(command, args.concat(`--service=${"0.18.
|
|
2130
|
+
let child = child_process.spawn(command, args.concat(`--service=${"0.18.14"}`, "--ping"), {
|
|
2124
2131
|
windowsHide: true,
|
|
2125
2132
|
stdio: ["pipe", "pipe", "inherit"],
|
|
2126
2133
|
cwd: defaultWD
|
|
@@ -2220,7 +2227,7 @@ var runServiceSync = (callback) => {
|
|
|
2220
2227
|
esbuild: node_exports
|
|
2221
2228
|
});
|
|
2222
2229
|
callback(service);
|
|
2223
|
-
let stdout = child_process.execFileSync(command, args.concat(`--service=${"0.18.
|
|
2230
|
+
let stdout = child_process.execFileSync(command, args.concat(`--service=${"0.18.14"}`), {
|
|
2224
2231
|
cwd: defaultWD,
|
|
2225
2232
|
windowsHide: true,
|
|
2226
2233
|
input: stdin,
|
|
@@ -2240,7 +2247,7 @@ var workerThreadService = null;
|
|
|
2240
2247
|
var startWorkerThreadService = (worker_threads2) => {
|
|
2241
2248
|
let { port1: mainPort, port2: workerPort } = new worker_threads2.MessageChannel();
|
|
2242
2249
|
let worker = new worker_threads2.Worker(__filename, {
|
|
2243
|
-
workerData: { workerPort, defaultWD, esbuildVersion: "0.18.
|
|
2250
|
+
workerData: { workerPort, defaultWD, esbuildVersion: "0.18.14" },
|
|
2244
2251
|
transferList: [workerPort],
|
|
2245
2252
|
// From node's documentation: https://nodejs.org/api/worker_threads.html
|
|
2246
2253
|
//
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "esbuild",
|
|
3
|
-
"version": "0.18.
|
|
3
|
+
"version": "0.18.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.18.
|
|
19
|
-
"@esbuild/android-arm64": "0.18.
|
|
20
|
-
"@esbuild/android-x64": "0.18.
|
|
21
|
-
"@esbuild/darwin-arm64": "0.18.
|
|
22
|
-
"@esbuild/darwin-x64": "0.18.
|
|
23
|
-
"@esbuild/freebsd-arm64": "0.18.
|
|
24
|
-
"@esbuild/freebsd-x64": "0.18.
|
|
25
|
-
"@esbuild/linux-arm": "0.18.
|
|
26
|
-
"@esbuild/linux-arm64": "0.18.
|
|
27
|
-
"@esbuild/linux-ia32": "0.18.
|
|
28
|
-
"@esbuild/linux-loong64": "0.18.
|
|
29
|
-
"@esbuild/linux-mips64el": "0.18.
|
|
30
|
-
"@esbuild/linux-ppc64": "0.18.
|
|
31
|
-
"@esbuild/linux-riscv64": "0.18.
|
|
32
|
-
"@esbuild/linux-s390x": "0.18.
|
|
33
|
-
"@esbuild/linux-x64": "0.18.
|
|
34
|
-
"@esbuild/netbsd-x64": "0.18.
|
|
35
|
-
"@esbuild/openbsd-x64": "0.18.
|
|
36
|
-
"@esbuild/sunos-x64": "0.18.
|
|
37
|
-
"@esbuild/win32-arm64": "0.18.
|
|
38
|
-
"@esbuild/win32-ia32": "0.18.
|
|
39
|
-
"@esbuild/win32-x64": "0.18.
|
|
18
|
+
"@esbuild/android-arm": "0.18.14",
|
|
19
|
+
"@esbuild/android-arm64": "0.18.14",
|
|
20
|
+
"@esbuild/android-x64": "0.18.14",
|
|
21
|
+
"@esbuild/darwin-arm64": "0.18.14",
|
|
22
|
+
"@esbuild/darwin-x64": "0.18.14",
|
|
23
|
+
"@esbuild/freebsd-arm64": "0.18.14",
|
|
24
|
+
"@esbuild/freebsd-x64": "0.18.14",
|
|
25
|
+
"@esbuild/linux-arm": "0.18.14",
|
|
26
|
+
"@esbuild/linux-arm64": "0.18.14",
|
|
27
|
+
"@esbuild/linux-ia32": "0.18.14",
|
|
28
|
+
"@esbuild/linux-loong64": "0.18.14",
|
|
29
|
+
"@esbuild/linux-mips64el": "0.18.14",
|
|
30
|
+
"@esbuild/linux-ppc64": "0.18.14",
|
|
31
|
+
"@esbuild/linux-riscv64": "0.18.14",
|
|
32
|
+
"@esbuild/linux-s390x": "0.18.14",
|
|
33
|
+
"@esbuild/linux-x64": "0.18.14",
|
|
34
|
+
"@esbuild/netbsd-x64": "0.18.14",
|
|
35
|
+
"@esbuild/openbsd-x64": "0.18.14",
|
|
36
|
+
"@esbuild/sunos-x64": "0.18.14",
|
|
37
|
+
"@esbuild/win32-arm64": "0.18.14",
|
|
38
|
+
"@esbuild/win32-ia32": "0.18.14",
|
|
39
|
+
"@esbuild/win32-x64": "0.18.14"
|
|
40
40
|
},
|
|
41
41
|
"license": "MIT"
|
|
42
42
|
}
|