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 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.1"}-${path.basename(subpath)}`
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.1") {
928
- throw new Error(`Cannot start service: Host version "${"0.28.1"}" does not match binary version ${quote(binaryVersion)}`);
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.1"}-${path.basename(subpath)}`
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.1";
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.1";
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.1"}`, "--ping"), {
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.1"}`), {
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.1" },
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.1",
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.1",
22
- "@esbuild/android-arm": "0.28.1",
23
- "@esbuild/android-arm64": "0.28.1",
24
- "@esbuild/android-x64": "0.28.1",
25
- "@esbuild/darwin-arm64": "0.28.1",
26
- "@esbuild/darwin-x64": "0.28.1",
27
- "@esbuild/freebsd-arm64": "0.28.1",
28
- "@esbuild/freebsd-x64": "0.28.1",
29
- "@esbuild/linux-arm": "0.28.1",
30
- "@esbuild/linux-arm64": "0.28.1",
31
- "@esbuild/linux-ia32": "0.28.1",
32
- "@esbuild/linux-loong64": "0.28.1",
33
- "@esbuild/linux-mips64el": "0.28.1",
34
- "@esbuild/linux-ppc64": "0.28.1",
35
- "@esbuild/linux-riscv64": "0.28.1",
36
- "@esbuild/linux-s390x": "0.28.1",
37
- "@esbuild/linux-x64": "0.28.1",
38
- "@esbuild/netbsd-arm64": "0.28.1",
39
- "@esbuild/netbsd-x64": "0.28.1",
40
- "@esbuild/openbsd-arm64": "0.28.1",
41
- "@esbuild/openbsd-x64": "0.28.1",
42
- "@esbuild/openharmony-arm64": "0.28.1",
43
- "@esbuild/sunos-x64": "0.28.1",
44
- "@esbuild/win32-arm64": "0.28.1",
45
- "@esbuild/win32-ia32": "0.28.1",
46
- "@esbuild/win32-x64": "0.28.1"
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": "0dd860154344f94b7a9367e64ffc2bc5b89a4313b4a399e5127cdc4ff5000303",
51
- "@esbuild/android-arm64/bin/esbuild": "087671da02d323e7915fafc13567c0929192633ed544bd8adee9bc020fddf5b4",
52
- "@esbuild/darwin-arm64/bin/esbuild": "e2dc9a52440a2a34f09434a2f4843cb1e30f84e40dcf238976ec61ef8cd7f36a",
53
- "@esbuild/darwin-x64/bin/esbuild": "dd53ccf32f9b5b3ab30d41388ef1fc8f81c44ca57ee7a32a7364a1753308d009",
54
- "@esbuild/freebsd-arm64/bin/esbuild": "5fef5a5ef24d9660d7711b756be5ddeba1fb3ca8dd62d703682ebb9fab3b68b0",
55
- "@esbuild/freebsd-x64/bin/esbuild": "4427a8cbfa0661943ccfef2606a65b35f3411ac73e447e86f7732aace61e4609",
56
- "@esbuild/linux-arm/bin/esbuild": "a2d93f7a8b1c9f91d47beec987888b4765c890501b6274f4bdff4061a5e0d9fd",
57
- "@esbuild/linux-arm64/bin/esbuild": "51e829ba36f36be6d9aea6e329ddc4f9350302339b16aaca96a3cb97f64a8ebb",
58
- "@esbuild/linux-ia32/bin/esbuild": "9cd7515a75d6f96b0aa055861cf987498315428088cd6d18de5082f904ae5794",
59
- "@esbuild/linux-loong64/bin/esbuild": "73fa76af9b13f7a27fdb20673b8c2af927fe1511d14e51edeb4b7b71f7f03d0e",
60
- "@esbuild/linux-mips64el/bin/esbuild": "d734787abc3c99d95242805047fe32da85a5822f04bf33d766a966bf5fd85488",
61
- "@esbuild/linux-ppc64/bin/esbuild": "90709144617c2adf8f6c14937f03b114c259de0b9309666e3a9d89a1fb266d04",
62
- "@esbuild/linux-riscv64/bin/esbuild": "86df35a46bedde8b756edb6565a1df7b5a832ad74dd0e179608cbf6509a2582a",
63
- "@esbuild/linux-s390x/bin/esbuild": "f8cad0db35132e5ac3065c4345c36e7ffe18fdc98417a61bcf5a95a6c694e57c",
64
- "@esbuild/linux-x64/bin/esbuild": "0c6588b092a2c291a72bab90659f3c9e0e25e0fe59c9ac12b4dae4d945e5548c",
65
- "@esbuild/netbsd-arm64/bin/esbuild": "490cfdac2d96d5608d91cf55bdf4052bbde7013dafe87ec7adc7784778ad4d4c",
66
- "@esbuild/netbsd-x64/bin/esbuild": "c61e0e4c553a4986fd0e9d63a0425e93be831ff7b13bfb8a564368fb7590f85d",
67
- "@esbuild/openbsd-arm64/bin/esbuild": "f9d814698e26c09c3f90d4c103cbdf3832c9f2c841d64a93889d63d23da9b8cf",
68
- "@esbuild/openbsd-x64/bin/esbuild": "2e30dce11f7236aa362c1c57212cc696f51472169aa417f30e9b641f3b7dcade",
69
- "@esbuild/sunos-x64/bin/esbuild": "770e0d2bc930b1a1d19d3f43243ff8f393efddb599e7f5843160feacd253267d",
70
- "@esbuild/win32-arm64/esbuild.exe": "bfb8798ab678f1ce4a723739f4a3eabab3244d7a04eeb12be2eb9f58095c13ef",
71
- "@esbuild/win32-ia32/esbuild.exe": "8fa99b6e0945830fce8d7e208fdb21763aa4aea875751f4a0eec7f6e262af1dd",
72
- "@esbuild/win32-x64/esbuild.exe": "ec02ee9b14ab332416fedd10614dfb80eed5304d94f67745067c011934a8c3c3"
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
  }