esbuild 0.14.40 → 0.14.43

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 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/install.js CHANGED
@@ -101,8 +101,8 @@ function validateBinaryVersion(...command) {
101
101
  const stdout = child_process.execFileSync(command.shift(), command, {
102
102
  stdio: "pipe"
103
103
  }).toString().trim();
104
- if (stdout !== "0.14.40") {
105
- throw new Error(`Expected ${JSON.stringify("0.14.40")} but got ${JSON.stringify(stdout)}`);
104
+ if (stdout !== "0.14.43") {
105
+ throw new Error(`Expected ${JSON.stringify("0.14.43")} but got ${JSON.stringify(stdout)}`);
106
106
  }
107
107
  }
108
108
  function isYarn() {
@@ -153,7 +153,7 @@ function installUsingNPM(pkg, subpath, binPath) {
153
153
  fs2.mkdirSync(installDir);
154
154
  try {
155
155
  fs2.writeFileSync(path2.join(installDir, "package.json"), "{}");
156
- child_process.execSync(`npm install --loglevel=error --prefer-offline --no-audit --progress=false ${pkg}@${"0.14.40"}`, { cwd: installDir, stdio: "pipe", env });
156
+ child_process.execSync(`npm install --loglevel=error --prefer-offline --no-audit --progress=false ${pkg}@${"0.14.43"}`, { cwd: installDir, stdio: "pipe", env });
157
157
  const installedBinPath = path2.join(installDir, "node_modules", pkg, subpath);
158
158
  fs2.renameSync(installedBinPath, binPath);
159
159
  } finally {
@@ -202,7 +202,7 @@ function maybeOptimizePackage(binPath) {
202
202
  }
203
203
  }
204
204
  async function downloadDirectlyFromNPM(pkg, subpath, binPath) {
205
- const url = `https://registry.npmjs.org/${pkg}/-/${pkg}-${"0.14.40"}.tgz`;
205
+ const url = `https://registry.npmjs.org/${pkg}/-/${pkg}-${"0.14.43"}.tgz`;
206
206
  console.error(`[esbuild] Trying to download ${JSON.stringify(url)}`);
207
207
  try {
208
208
  fs2.writeFileSync(binPath, extractFileFromTarGzip(await fetch(url), subpath));
package/lib/main.d.ts CHANGED
@@ -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
@@ -318,6 +318,7 @@ function pushCommonFlags(flags, options, keys) {
318
318
  let jsxFactory = getFlag(options, keys, "jsxFactory", mustBeString);
319
319
  let jsxFragment = getFlag(options, keys, "jsxFragment", mustBeString);
320
320
  let define = getFlag(options, keys, "define", mustBeObject);
321
+ let logOverride = getFlag(options, keys, "logOverride", mustBeObject);
321
322
  let pure = getFlag(options, keys, "pure", mustBeArray);
322
323
  let keepNames = getFlag(options, keys, "keepNames", mustBeBoolean);
323
324
  if (legalComments)
@@ -372,6 +373,13 @@ function pushCommonFlags(flags, options, keys) {
372
373
  flags.push(`--define:${key}=${define[key]}`);
373
374
  }
374
375
  }
376
+ if (logOverride) {
377
+ for (let key in logOverride) {
378
+ if (key.indexOf("=") >= 0)
379
+ throw new Error(`Invalid log override: ${key}`);
380
+ flags.push(`--log-override:${key}=${logOverride[key]}`);
381
+ }
382
+ }
375
383
  if (pure)
376
384
  for (let fn of pure)
377
385
  flags.push(`--pure:${fn}`);
@@ -746,8 +754,8 @@ function createChannel(streamIn) {
746
754
  if (isFirstPacket) {
747
755
  isFirstPacket = false;
748
756
  let binaryVersion = String.fromCharCode(...bytes);
749
- if (binaryVersion !== "0.14.40") {
750
- throw new Error(`Cannot start service: Host version "${"0.14.40"}" does not match binary version ${JSON.stringify(binaryVersion)}`);
757
+ if (binaryVersion !== "0.14.43") {
758
+ throw new Error(`Cannot start service: Host version "${"0.14.43"}" does not match binary version ${JSON.stringify(binaryVersion)}`);
751
759
  }
752
760
  return;
753
761
  }
@@ -1859,7 +1867,7 @@ if (process.env.ESBUILD_WORKER_THREADS !== "0") {
1859
1867
  }
1860
1868
  }
1861
1869
  var _a;
1862
- var isInternalWorkerThread = ((_a = worker_threads == null ? void 0 : worker_threads.workerData) == null ? void 0 : _a.esbuildVersion) === "0.14.40";
1870
+ var isInternalWorkerThread = ((_a = worker_threads == null ? void 0 : worker_threads.workerData) == null ? void 0 : _a.esbuildVersion) === "0.14.43";
1863
1871
  var esbuildCommandAndArgs = () => {
1864
1872
  if ((!ESBUILD_BINARY_PATH || false) && (path2.basename(__filename) !== "main.js" || path2.basename(__dirname) !== "lib")) {
1865
1873
  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 +1931,7 @@ var fsAsync = {
1923
1931
  }
1924
1932
  }
1925
1933
  };
1926
- var version = "0.14.40";
1934
+ var version = "0.14.43";
1927
1935
  var build = (options) => ensureServiceIsRunning().build(options);
1928
1936
  var serve = (serveOptions, buildOptions) => ensureServiceIsRunning().serve(serveOptions, buildOptions);
1929
1937
  var transform = (input, options) => ensureServiceIsRunning().transform(input, options);
@@ -2032,7 +2040,7 @@ var ensureServiceIsRunning = () => {
2032
2040
  if (longLivedService)
2033
2041
  return longLivedService;
2034
2042
  let [command, args] = esbuildCommandAndArgs();
2035
- let child = child_process.spawn(command, args.concat(`--service=${"0.14.40"}`, "--ping"), {
2043
+ let child = child_process.spawn(command, args.concat(`--service=${"0.14.43"}`, "--ping"), {
2036
2044
  windowsHide: true,
2037
2045
  stdio: ["pipe", "pipe", "inherit"],
2038
2046
  cwd: defaultWD
@@ -2146,7 +2154,7 @@ var runServiceSync = (callback) => {
2146
2154
  esbuild: node_exports
2147
2155
  });
2148
2156
  callback(service);
2149
- let stdout = child_process.execFileSync(command, args.concat(`--service=${"0.14.40"}`), {
2157
+ let stdout = child_process.execFileSync(command, args.concat(`--service=${"0.14.43"}`), {
2150
2158
  cwd: defaultWD,
2151
2159
  windowsHide: true,
2152
2160
  input: stdin,
@@ -2162,7 +2170,7 @@ var workerThreadService = null;
2162
2170
  var startWorkerThreadService = (worker_threads2) => {
2163
2171
  let { port1: mainPort, port2: workerPort } = new worker_threads2.MessageChannel();
2164
2172
  let worker = new worker_threads2.Worker(__filename, {
2165
- workerData: { workerPort, defaultWD, esbuildVersion: "0.14.40" },
2173
+ workerData: { workerPort, defaultWD, esbuildVersion: "0.14.43" },
2166
2174
  transferList: [workerPort],
2167
2175
  execArgv: []
2168
2176
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "esbuild",
3
- "version": "0.14.40",
3
+ "version": "0.14.43",
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.40",
19
- "esbuild-android-arm64": "0.14.40",
20
- "esbuild-darwin-64": "0.14.40",
21
- "esbuild-darwin-arm64": "0.14.40",
22
- "esbuild-freebsd-64": "0.14.40",
23
- "esbuild-freebsd-arm64": "0.14.40",
24
- "esbuild-linux-32": "0.14.40",
25
- "esbuild-linux-64": "0.14.40",
26
- "esbuild-linux-arm": "0.14.40",
27
- "esbuild-linux-arm64": "0.14.40",
28
- "esbuild-linux-mips64le": "0.14.40",
29
- "esbuild-linux-ppc64le": "0.14.40",
30
- "esbuild-linux-riscv64": "0.14.40",
31
- "esbuild-linux-s390x": "0.14.40",
32
- "esbuild-netbsd-64": "0.14.40",
33
- "esbuild-openbsd-64": "0.14.40",
34
- "esbuild-sunos-64": "0.14.40",
35
- "esbuild-windows-32": "0.14.40",
36
- "esbuild-windows-64": "0.14.40",
37
- "esbuild-windows-arm64": "0.14.40"
18
+ "esbuild-android-64": "0.14.43",
19
+ "esbuild-android-arm64": "0.14.43",
20
+ "esbuild-darwin-64": "0.14.43",
21
+ "esbuild-darwin-arm64": "0.14.43",
22
+ "esbuild-freebsd-64": "0.14.43",
23
+ "esbuild-freebsd-arm64": "0.14.43",
24
+ "esbuild-linux-32": "0.14.43",
25
+ "esbuild-linux-64": "0.14.43",
26
+ "esbuild-linux-arm": "0.14.43",
27
+ "esbuild-linux-arm64": "0.14.43",
28
+ "esbuild-linux-mips64le": "0.14.43",
29
+ "esbuild-linux-ppc64le": "0.14.43",
30
+ "esbuild-linux-riscv64": "0.14.43",
31
+ "esbuild-linux-s390x": "0.14.43",
32
+ "esbuild-netbsd-64": "0.14.43",
33
+ "esbuild-openbsd-64": "0.14.43",
34
+ "esbuild-sunos-64": "0.14.43",
35
+ "esbuild-windows-32": "0.14.43",
36
+ "esbuild-windows-64": "0.14.43",
37
+ "esbuild-windows-arm64": "0.14.43"
38
38
  },
39
39
  "license": "MIT"
40
40
  }