esbuild 0.28.1 → 0.28.2
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 +4 -0
- package/lib/main.js +12 -8
- package/package.json +50 -50
package/bin/esbuild
CHANGED
|
@@ -201,7 +201,7 @@ for your current platform.`);
|
|
|
201
201
|
"node_modules",
|
|
202
202
|
".cache",
|
|
203
203
|
"esbuild",
|
|
204
|
-
`pnpapi-${pkg.replace("/", "-")}-${"0.28.
|
|
204
|
+
`pnpapi-${pkg.replace("/", "-")}-${"0.28.2"}-${path.basename(subpath)}`
|
|
205
205
|
);
|
|
206
206
|
if (!fs.existsSync(binTargetPath)) {
|
|
207
207
|
fs.mkdirSync(path.dirname(binTargetPath), { recursive: true });
|
package/lib/main.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ export type Platform = 'browser' | 'node' | 'neutral'
|
|
|
2
2
|
export type Format = 'iife' | 'cjs' | 'esm'
|
|
3
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
|
+
export type LogStyle = 'default' | 'visualstudio'
|
|
5
6
|
export type Charset = 'ascii' | 'utf8'
|
|
6
7
|
export type Drop = 'console' | 'debugger'
|
|
7
8
|
export type AbsPaths = 'code' | 'log' | 'metafile'
|
|
@@ -86,6 +87,8 @@ interface CommonOptions {
|
|
|
86
87
|
logLimit?: number
|
|
87
88
|
/** Documentation: https://esbuild.github.io/api/#log-override */
|
|
88
89
|
logOverride?: Record<string, LogLevel>
|
|
90
|
+
/** Documentation: https://esbuild.github.io/api/#log-style */
|
|
91
|
+
logStyle?: LogStyle
|
|
89
92
|
|
|
90
93
|
/** Documentation: https://esbuild.github.io/api/#tsconfig-raw */
|
|
91
94
|
tsconfigRaw?: string | TsconfigRaw
|
|
@@ -509,6 +512,7 @@ export interface FormatMessagesOptions {
|
|
|
509
512
|
kind: 'error' | 'warning'
|
|
510
513
|
color?: boolean
|
|
511
514
|
terminalWidth?: number
|
|
515
|
+
logStyle?: LogStyle
|
|
512
516
|
}
|
|
513
517
|
|
|
514
518
|
export interface AnalyzeMetafileOptions {
|
package/lib/main.js
CHANGED
|
@@ -572,10 +572,12 @@ function pushLogFlags(flags, options, keys, isTTY2, logLevelDefault) {
|
|
|
572
572
|
let color = getFlag(options, keys, "color", mustBeBoolean);
|
|
573
573
|
let logLevel = getFlag(options, keys, "logLevel", mustBeString);
|
|
574
574
|
let logLimit = getFlag(options, keys, "logLimit", mustBeInteger);
|
|
575
|
+
let logStyle = getFlag(options, keys, "logStyle", mustBeString);
|
|
575
576
|
if (color !== void 0) flags.push(`--color=${color}`);
|
|
576
577
|
else if (isTTY2) flags.push(`--color=true`);
|
|
577
578
|
flags.push(`--log-level=${logLevel || logLevelDefault}`);
|
|
578
579
|
flags.push(`--log-limit=${logLimit || 0}`);
|
|
580
|
+
if (logStyle) flags.push(`--log-style=${logStyle}`);
|
|
579
581
|
}
|
|
580
582
|
function validateStringValue(value, what, key) {
|
|
581
583
|
if (typeof value !== "string") {
|
|
@@ -924,8 +926,8 @@ function createChannel(streamIn) {
|
|
|
924
926
|
if (isFirstPacket) {
|
|
925
927
|
isFirstPacket = false;
|
|
926
928
|
let binaryVersion = String.fromCharCode(...bytes);
|
|
927
|
-
if (binaryVersion !== "0.28.
|
|
928
|
-
throw new Error(`Cannot start service: Host version "${"0.28.
|
|
929
|
+
if (binaryVersion !== "0.28.2") {
|
|
930
|
+
throw new Error(`Cannot start service: Host version "${"0.28.2"}" does not match binary version ${quote(binaryVersion)}`);
|
|
929
931
|
}
|
|
930
932
|
return;
|
|
931
933
|
}
|
|
@@ -1064,6 +1066,7 @@ function createChannel(streamIn) {
|
|
|
1064
1066
|
let kind = getFlag(options, keys, "kind", mustBeString);
|
|
1065
1067
|
let color = getFlag(options, keys, "color", mustBeBoolean);
|
|
1066
1068
|
let terminalWidth = getFlag(options, keys, "terminalWidth", mustBeInteger);
|
|
1069
|
+
let logStyle = getFlag(options, keys, "logStyle", mustBeString);
|
|
1067
1070
|
checkForInvalidFlags(options, keys, `in ${callName}() call`);
|
|
1068
1071
|
if (kind === void 0) throw new Error(`Missing "kind" in ${callName}() call`);
|
|
1069
1072
|
if (kind !== "error" && kind !== "warning") throw new Error(`Expected "kind" to be "error" or "warning" in ${callName}() call`);
|
|
@@ -1074,6 +1077,7 @@ function createChannel(streamIn) {
|
|
|
1074
1077
|
};
|
|
1075
1078
|
if (color !== void 0) request.color = color;
|
|
1076
1079
|
if (terminalWidth !== void 0) request.terminalWidth = terminalWidth;
|
|
1080
|
+
if (logStyle !== void 0) request.logStyle = logStyle;
|
|
1077
1081
|
sendRequest(refs, request, (error, response) => {
|
|
1078
1082
|
if (error) return callback(new Error(error), null);
|
|
1079
1083
|
callback(null, response.messages);
|
|
@@ -2060,7 +2064,7 @@ for your current platform.`);
|
|
|
2060
2064
|
"node_modules",
|
|
2061
2065
|
".cache",
|
|
2062
2066
|
"esbuild",
|
|
2063
|
-
`pnpapi-${pkg.replace("/", "-")}-${"0.28.
|
|
2067
|
+
`pnpapi-${pkg.replace("/", "-")}-${"0.28.2"}-${path.basename(subpath)}`
|
|
2064
2068
|
);
|
|
2065
2069
|
if (!fs.existsSync(binTargetPath)) {
|
|
2066
2070
|
fs.mkdirSync(path.dirname(binTargetPath), { recursive: true });
|
|
@@ -2095,7 +2099,7 @@ if (process.env.ESBUILD_WORKER_THREADS !== "0") {
|
|
|
2095
2099
|
}
|
|
2096
2100
|
}
|
|
2097
2101
|
var _a;
|
|
2098
|
-
var isInternalWorkerThread = ((_a = worker_threads == null ? void 0 : worker_threads.workerData) == null ? void 0 : _a.esbuildVersion) === "0.28.
|
|
2102
|
+
var isInternalWorkerThread = ((_a = worker_threads == null ? void 0 : worker_threads.workerData) == null ? void 0 : _a.esbuildVersion) === "0.28.2";
|
|
2099
2103
|
var esbuildCommandAndArgs = () => {
|
|
2100
2104
|
if ((!ESBUILD_BINARY_PATH || false) && (path2.basename(__filename) !== "main.js" || path2.basename(__dirname) !== "lib")) {
|
|
2101
2105
|
throw new Error(
|
|
@@ -2162,7 +2166,7 @@ var fsAsync = {
|
|
|
2162
2166
|
}
|
|
2163
2167
|
}
|
|
2164
2168
|
};
|
|
2165
|
-
var version = "0.28.
|
|
2169
|
+
var version = "0.28.2";
|
|
2166
2170
|
var build = (options) => ensureServiceIsRunning().build(options);
|
|
2167
2171
|
var context = (buildOptions) => ensureServiceIsRunning().context(buildOptions);
|
|
2168
2172
|
var transform = (input, options) => ensureServiceIsRunning().transform(input, options);
|
|
@@ -2265,7 +2269,7 @@ var stopService;
|
|
|
2265
2269
|
var ensureServiceIsRunning = () => {
|
|
2266
2270
|
if (longLivedService) return longLivedService;
|
|
2267
2271
|
let [command, args] = esbuildCommandAndArgs();
|
|
2268
|
-
let child = child_process.spawn(command, args.concat(`--service=${"0.28.
|
|
2272
|
+
let child = child_process.spawn(command, args.concat(`--service=${"0.28.2"}`, "--ping"), {
|
|
2269
2273
|
windowsHide: true,
|
|
2270
2274
|
stdio: ["pipe", "pipe", "inherit"],
|
|
2271
2275
|
cwd: defaultWD
|
|
@@ -2369,7 +2373,7 @@ var runServiceSync = (callback) => {
|
|
|
2369
2373
|
esbuild: node_exports
|
|
2370
2374
|
});
|
|
2371
2375
|
callback(service);
|
|
2372
|
-
let stdout = child_process.execFileSync(command, args.concat(`--service=${"0.28.
|
|
2376
|
+
let stdout = child_process.execFileSync(command, args.concat(`--service=${"0.28.2"}`), {
|
|
2373
2377
|
cwd: defaultWD,
|
|
2374
2378
|
windowsHide: true,
|
|
2375
2379
|
input: stdin,
|
|
@@ -2389,7 +2393,7 @@ var workerThreadService = null;
|
|
|
2389
2393
|
var startWorkerThreadService = (worker_threads2) => {
|
|
2390
2394
|
let { port1: mainPort, port2: workerPort } = new worker_threads2.MessageChannel();
|
|
2391
2395
|
let worker = new worker_threads2.Worker(__filename, {
|
|
2392
|
-
workerData: { workerPort, defaultWD, esbuildVersion: "0.28.
|
|
2396
|
+
workerData: { workerPort, defaultWD, esbuildVersion: "0.28.2" },
|
|
2393
2397
|
transferList: [workerPort],
|
|
2394
2398
|
// From node's documentation: https://nodejs.org/api/worker_threads.html
|
|
2395
2399
|
//
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "esbuild",
|
|
3
|
-
"version": "0.28.
|
|
3
|
+
"version": "0.28.2",
|
|
4
4
|
"description": "An extremely fast JavaScript and CSS bundler and minifier.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -18,57 +18,57 @@
|
|
|
18
18
|
"esbuild": "bin/esbuild"
|
|
19
19
|
},
|
|
20
20
|
"optionalDependencies": {
|
|
21
|
-
"@esbuild/aix-ppc64": "0.28.
|
|
22
|
-
"@esbuild/android-arm": "0.28.
|
|
23
|
-
"@esbuild/android-arm64": "0.28.
|
|
24
|
-
"@esbuild/android-x64": "0.28.
|
|
25
|
-
"@esbuild/darwin-arm64": "0.28.
|
|
26
|
-
"@esbuild/darwin-x64": "0.28.
|
|
27
|
-
"@esbuild/freebsd-arm64": "0.28.
|
|
28
|
-
"@esbuild/freebsd-x64": "0.28.
|
|
29
|
-
"@esbuild/linux-arm": "0.28.
|
|
30
|
-
"@esbuild/linux-arm64": "0.28.
|
|
31
|
-
"@esbuild/linux-ia32": "0.28.
|
|
32
|
-
"@esbuild/linux-loong64": "0.28.
|
|
33
|
-
"@esbuild/linux-mips64el": "0.28.
|
|
34
|
-
"@esbuild/linux-ppc64": "0.28.
|
|
35
|
-
"@esbuild/linux-riscv64": "0.28.
|
|
36
|
-
"@esbuild/linux-s390x": "0.28.
|
|
37
|
-
"@esbuild/linux-x64": "0.28.
|
|
38
|
-
"@esbuild/netbsd-arm64": "0.28.
|
|
39
|
-
"@esbuild/netbsd-x64": "0.28.
|
|
40
|
-
"@esbuild/openbsd-arm64": "0.28.
|
|
41
|
-
"@esbuild/openbsd-x64": "0.28.
|
|
42
|
-
"@esbuild/openharmony-arm64": "0.28.
|
|
43
|
-
"@esbuild/sunos-x64": "0.28.
|
|
44
|
-
"@esbuild/win32-arm64": "0.28.
|
|
45
|
-
"@esbuild/win32-ia32": "0.28.
|
|
46
|
-
"@esbuild/win32-x64": "0.28.
|
|
21
|
+
"@esbuild/aix-ppc64": "0.28.2",
|
|
22
|
+
"@esbuild/android-arm": "0.28.2",
|
|
23
|
+
"@esbuild/android-arm64": "0.28.2",
|
|
24
|
+
"@esbuild/android-x64": "0.28.2",
|
|
25
|
+
"@esbuild/darwin-arm64": "0.28.2",
|
|
26
|
+
"@esbuild/darwin-x64": "0.28.2",
|
|
27
|
+
"@esbuild/freebsd-arm64": "0.28.2",
|
|
28
|
+
"@esbuild/freebsd-x64": "0.28.2",
|
|
29
|
+
"@esbuild/linux-arm": "0.28.2",
|
|
30
|
+
"@esbuild/linux-arm64": "0.28.2",
|
|
31
|
+
"@esbuild/linux-ia32": "0.28.2",
|
|
32
|
+
"@esbuild/linux-loong64": "0.28.2",
|
|
33
|
+
"@esbuild/linux-mips64el": "0.28.2",
|
|
34
|
+
"@esbuild/linux-ppc64": "0.28.2",
|
|
35
|
+
"@esbuild/linux-riscv64": "0.28.2",
|
|
36
|
+
"@esbuild/linux-s390x": "0.28.2",
|
|
37
|
+
"@esbuild/linux-x64": "0.28.2",
|
|
38
|
+
"@esbuild/netbsd-arm64": "0.28.2",
|
|
39
|
+
"@esbuild/netbsd-x64": "0.28.2",
|
|
40
|
+
"@esbuild/openbsd-arm64": "0.28.2",
|
|
41
|
+
"@esbuild/openbsd-x64": "0.28.2",
|
|
42
|
+
"@esbuild/openharmony-arm64": "0.28.2",
|
|
43
|
+
"@esbuild/sunos-x64": "0.28.2",
|
|
44
|
+
"@esbuild/win32-arm64": "0.28.2",
|
|
45
|
+
"@esbuild/win32-ia32": "0.28.2",
|
|
46
|
+
"@esbuild/win32-x64": "0.28.2"
|
|
47
47
|
},
|
|
48
48
|
"license": "MIT",
|
|
49
49
|
"esbuild.binaryHashes": {
|
|
50
|
-
"@esbuild/aix-ppc64/bin/esbuild": "
|
|
51
|
-
"@esbuild/android-arm64/bin/esbuild": "
|
|
52
|
-
"@esbuild/darwin-arm64/bin/esbuild": "
|
|
53
|
-
"@esbuild/darwin-x64/bin/esbuild": "
|
|
54
|
-
"@esbuild/freebsd-arm64/bin/esbuild": "
|
|
55
|
-
"@esbuild/freebsd-x64/bin/esbuild": "
|
|
56
|
-
"@esbuild/linux-arm/bin/esbuild": "
|
|
57
|
-
"@esbuild/linux-arm64/bin/esbuild": "
|
|
58
|
-
"@esbuild/linux-ia32/bin/esbuild": "
|
|
59
|
-
"@esbuild/linux-loong64/bin/esbuild": "
|
|
60
|
-
"@esbuild/linux-mips64el/bin/esbuild": "
|
|
61
|
-
"@esbuild/linux-ppc64/bin/esbuild": "
|
|
62
|
-
"@esbuild/linux-riscv64/bin/esbuild": "
|
|
63
|
-
"@esbuild/linux-s390x/bin/esbuild": "
|
|
64
|
-
"@esbuild/linux-x64/bin/esbuild": "
|
|
65
|
-
"@esbuild/netbsd-arm64/bin/esbuild": "
|
|
66
|
-
"@esbuild/netbsd-x64/bin/esbuild": "
|
|
67
|
-
"@esbuild/openbsd-arm64/bin/esbuild": "
|
|
68
|
-
"@esbuild/openbsd-x64/bin/esbuild": "
|
|
69
|
-
"@esbuild/sunos-x64/bin/esbuild": "
|
|
70
|
-
"@esbuild/win32-arm64/esbuild.exe": "
|
|
71
|
-
"@esbuild/win32-ia32/esbuild.exe": "
|
|
72
|
-
"@esbuild/win32-x64/esbuild.exe": "
|
|
50
|
+
"@esbuild/aix-ppc64/bin/esbuild": "6de148b932fc5d3b28a97f9f0bc4de8e2b47db478b8ad679e0eaa6b96e00420d",
|
|
51
|
+
"@esbuild/android-arm64/bin/esbuild": "84efbbd2cbf21bbfec2aaf304bee79cb2a4a05fe2ea7b861a87f7b8f213ac27d",
|
|
52
|
+
"@esbuild/darwin-arm64/bin/esbuild": "10b6243df618d374bb2d5c9cfbe7052e1405f6aa4e53a6164f11a91b9f2e1384",
|
|
53
|
+
"@esbuild/darwin-x64/bin/esbuild": "7fe5c9c905fff0a05d92db98929434ab4d3b6dd92d7a7688922db74380c75df3",
|
|
54
|
+
"@esbuild/freebsd-arm64/bin/esbuild": "6aba108a68b93064e491bfb1ecfa28843b4d4e504dff0627f53f68f6bb015c01",
|
|
55
|
+
"@esbuild/freebsd-x64/bin/esbuild": "8a237e222bee0e50556e7b00d83ec2ff43721bf72f19811a5f0ee56f1d40177c",
|
|
56
|
+
"@esbuild/linux-arm/bin/esbuild": "d88f751b22095b2f3b42c8c2e8a3f36fabc1705438c5d6e78366b681f8b4e7a5",
|
|
57
|
+
"@esbuild/linux-arm64/bin/esbuild": "90bd269553d258e80b19e3ccab4f98f0831f87442a2f056510ce24fd1b425fc2",
|
|
58
|
+
"@esbuild/linux-ia32/bin/esbuild": "b1e2d87d79f9a2baa0d3043cdf0dc6716f9f2eea66c58f47588641fd6019f36f",
|
|
59
|
+
"@esbuild/linux-loong64/bin/esbuild": "55a66f9854d6798f36b2b5471db74f2e552481887ea14d8bda1634a512383a43",
|
|
60
|
+
"@esbuild/linux-mips64el/bin/esbuild": "6bf7921a3af4a801051e056d85c360fe24bb446f488ef3da25f0b8e5cf973db1",
|
|
61
|
+
"@esbuild/linux-ppc64/bin/esbuild": "c30df60d09bb0ba4853d7b06e244ce966890d61ce60cadd9b22335f6379c316a",
|
|
62
|
+
"@esbuild/linux-riscv64/bin/esbuild": "36bdcdc8230eef385838cdfeb0d9a1565cbe4b9ace30097a511d77e894de36a1",
|
|
63
|
+
"@esbuild/linux-s390x/bin/esbuild": "bbbc1f92a76a5ca6e2976065222e42b02797363a1f119490dda315f74047741f",
|
|
64
|
+
"@esbuild/linux-x64/bin/esbuild": "e1698a3d5c6c0798fee4fd3b5cc816651f460c63d390a7a26ea4beb0b1884100",
|
|
65
|
+
"@esbuild/netbsd-arm64/bin/esbuild": "62548519d7ae875d060aa8c94bfb8ed38ef191671a5173d9f626bdb6b7516970",
|
|
66
|
+
"@esbuild/netbsd-x64/bin/esbuild": "f9d0e59d2b404559e3a0c958164d96960ebf0e04583b878b1d64d8f1c3698fcc",
|
|
67
|
+
"@esbuild/openbsd-arm64/bin/esbuild": "e10c45a0b62456632da41df058d7626b2e7cfe710780a2dc7f9f84681753f3aa",
|
|
68
|
+
"@esbuild/openbsd-x64/bin/esbuild": "720bbe607736716f2ecd37962436c5589d801966e868a2ae4e0e7e62d1e4e887",
|
|
69
|
+
"@esbuild/sunos-x64/bin/esbuild": "01a3bd9183631ca749f34d15601ea21ba6834614184c5c859f99d54bd683203d",
|
|
70
|
+
"@esbuild/win32-arm64/esbuild.exe": "530fb3933af14eefe85dfd06502f826e6ef60fdf4e75228ea67c696db312ecb1",
|
|
71
|
+
"@esbuild/win32-ia32/esbuild.exe": "b2e62af5c17e00939583be0a0762fdc469f352869a617edc91371b00454c76f0",
|
|
72
|
+
"@esbuild/win32-x64/esbuild.exe": "c7bee37877d0aa6a046e52783fa0a2cf1a9ce5579d68bb3083bda99d4bff18ef"
|
|
73
73
|
}
|
|
74
74
|
}
|