esbuild 0.14.8 → 0.14.9

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/install.js CHANGED
@@ -93,8 +93,8 @@ var isToPathJS = true;
93
93
  function validateBinaryVersion(...command) {
94
94
  command.push("--version");
95
95
  const stdout = child_process.execFileSync(command.shift(), command).toString().trim();
96
- if (stdout !== "0.14.8") {
97
- throw new Error(`Expected ${JSON.stringify("0.14.8")} but got ${JSON.stringify(stdout)}`);
96
+ if (stdout !== "0.14.9") {
97
+ throw new Error(`Expected ${JSON.stringify("0.14.9")} but got ${JSON.stringify(stdout)}`);
98
98
  }
99
99
  }
100
100
  function isYarn() {
@@ -145,7 +145,7 @@ function installUsingNPM(pkg, subpath, binPath) {
145
145
  fs2.mkdirSync(installDir);
146
146
  try {
147
147
  fs2.writeFileSync(path2.join(installDir, "package.json"), "{}");
148
- child_process.execSync(`npm install --loglevel=error --prefer-offline --no-audit --progress=false ${pkg}@${"0.14.8"}`, { cwd: installDir, stdio: "pipe", env });
148
+ child_process.execSync(`npm install --loglevel=error --prefer-offline --no-audit --progress=false ${pkg}@${"0.14.9"}`, { cwd: installDir, stdio: "pipe", env });
149
149
  const installedBinPath = path2.join(installDir, "node_modules", pkg, subpath);
150
150
  fs2.renameSync(installedBinPath, binPath);
151
151
  } finally {
@@ -194,7 +194,7 @@ function maybeOptimizePackage(binPath) {
194
194
  }
195
195
  }
196
196
  async function downloadDirectlyFromNPM(pkg, subpath, binPath) {
197
- const url = `https://registry.npmjs.org/${pkg}/-/${pkg}-${"0.14.8"}.tgz`;
197
+ const url = `https://registry.npmjs.org/${pkg}/-/${pkg}-${"0.14.9"}.tgz`;
198
198
  console.error(`[esbuild] Trying to download ${JSON.stringify(url)}`);
199
199
  try {
200
200
  fs2.writeFileSync(binPath, extractFileFromTarGzip(await fetch(url), subpath));
package/lib/main.d.ts CHANGED
@@ -288,6 +288,7 @@ export interface PluginBuild {
288
288
  }
289
289
 
290
290
  export interface ResolveOptions {
291
+ pluginName?: string;
291
292
  importer?: string;
292
293
  namespace?: string;
293
294
  resolveDir?: string;
package/lib/main.js CHANGED
@@ -713,8 +713,8 @@ function createChannel(streamIn) {
713
713
  if (isFirstPacket) {
714
714
  isFirstPacket = false;
715
715
  let binaryVersion = String.fromCharCode(...bytes);
716
- if (binaryVersion !== "0.14.8") {
717
- throw new Error(`Cannot start service: Host version "${"0.14.8"}" does not match binary version ${JSON.stringify(binaryVersion)}`);
716
+ if (binaryVersion !== "0.14.9") {
717
+ throw new Error(`Cannot start service: Host version "${"0.14.9"}" does not match binary version ${JSON.stringify(binaryVersion)}`);
718
718
  }
719
719
  return;
720
720
  }
@@ -764,6 +764,7 @@ function createChannel(streamIn) {
764
764
  if (typeof path3 !== "string")
765
765
  throw new Error(`The path to resolve must be a string`);
766
766
  let keys2 = Object.create(null);
767
+ let pluginName = getFlag(options, keys2, "pluginName", mustBeString);
767
768
  let importer = getFlag(options, keys2, "importer", mustBeString);
768
769
  let namespace = getFlag(options, keys2, "namespace", mustBeString);
769
770
  let resolveDir = getFlag(options, keys2, "resolveDir", mustBeString);
@@ -777,6 +778,8 @@ function createChannel(streamIn) {
777
778
  key: buildKey,
778
779
  pluginName: name
779
780
  };
781
+ if (pluginName != null)
782
+ request.pluginName = pluginName;
780
783
  if (importer != null)
781
784
  request.importer = importer;
782
785
  if (namespace != null)
@@ -1744,7 +1747,7 @@ if (process.env.ESBUILD_WORKER_THREADS !== "0") {
1744
1747
  }
1745
1748
  }
1746
1749
  var _a;
1747
- var isInternalWorkerThread = ((_a = worker_threads == null ? void 0 : worker_threads.workerData) == null ? void 0 : _a.esbuildVersion) === "0.14.8";
1750
+ var isInternalWorkerThread = ((_a = worker_threads == null ? void 0 : worker_threads.workerData) == null ? void 0 : _a.esbuildVersion) === "0.14.9";
1748
1751
  var esbuildCommandAndArgs = () => {
1749
1752
  if ((!ESBUILD_BINARY_PATH || false) && (path2.basename(__filename) !== "main.js" || path2.basename(__dirname) !== "lib")) {
1750
1753
  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.
@@ -1803,7 +1806,7 @@ var fsAsync = {
1803
1806
  }
1804
1807
  }
1805
1808
  };
1806
- var version = "0.14.8";
1809
+ var version = "0.14.9";
1807
1810
  var build = (options) => ensureServiceIsRunning().build(options);
1808
1811
  var serve = (serveOptions, buildOptions) => ensureServiceIsRunning().serve(serveOptions, buildOptions);
1809
1812
  var transform = (input, options) => ensureServiceIsRunning().transform(input, options);
@@ -1912,7 +1915,7 @@ var ensureServiceIsRunning = () => {
1912
1915
  if (longLivedService)
1913
1916
  return longLivedService;
1914
1917
  let [command, args] = esbuildCommandAndArgs();
1915
- let child = child_process.spawn(command, args.concat(`--service=${"0.14.8"}`, "--ping"), {
1918
+ let child = child_process.spawn(command, args.concat(`--service=${"0.14.9"}`, "--ping"), {
1916
1919
  windowsHide: true,
1917
1920
  stdio: ["pipe", "pipe", "inherit"],
1918
1921
  cwd: defaultWD
@@ -2021,7 +2024,7 @@ var runServiceSync = (callback) => {
2021
2024
  esbuild: node_exports
2022
2025
  });
2023
2026
  callback(service);
2024
- let stdout = child_process.execFileSync(command, args.concat(`--service=${"0.14.8"}`), {
2027
+ let stdout = child_process.execFileSync(command, args.concat(`--service=${"0.14.9"}`), {
2025
2028
  cwd: defaultWD,
2026
2029
  windowsHide: true,
2027
2030
  input: stdin,
@@ -2037,7 +2040,7 @@ var workerThreadService = null;
2037
2040
  var startWorkerThreadService = (worker_threads2) => {
2038
2041
  let { port1: mainPort, port2: workerPort } = new worker_threads2.MessageChannel();
2039
2042
  let worker = new worker_threads2.Worker(__filename, {
2040
- workerData: { workerPort, defaultWD, esbuildVersion: "0.14.8" },
2043
+ workerData: { workerPort, defaultWD, esbuildVersion: "0.14.9" },
2041
2044
  transferList: [workerPort],
2042
2045
  execArgv: []
2043
2046
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "esbuild",
3
- "version": "0.14.8",
3
+ "version": "0.14.9",
4
4
  "description": "An extremely fast JavaScript and CSS bundler and minifier.",
5
5
  "repository": "https://github.com/evanw/esbuild",
6
6
  "scripts": {
@@ -12,24 +12,24 @@
12
12
  "esbuild": "bin/esbuild"
13
13
  },
14
14
  "optionalDependencies": {
15
- "esbuild-android-arm64": "0.14.8",
16
- "esbuild-darwin-64": "0.14.8",
17
- "esbuild-darwin-arm64": "0.14.8",
18
- "esbuild-freebsd-64": "0.14.8",
19
- "esbuild-freebsd-arm64": "0.14.8",
20
- "esbuild-linux-32": "0.14.8",
21
- "esbuild-linux-64": "0.14.8",
22
- "esbuild-linux-arm": "0.14.8",
23
- "esbuild-linux-arm64": "0.14.8",
24
- "esbuild-linux-mips64le": "0.14.8",
25
- "esbuild-linux-ppc64le": "0.14.8",
26
- "esbuild-linux-s390x": "0.14.8",
27
- "esbuild-netbsd-64": "0.14.8",
28
- "esbuild-openbsd-64": "0.14.8",
29
- "esbuild-sunos-64": "0.14.8",
30
- "esbuild-windows-32": "0.14.8",
31
- "esbuild-windows-64": "0.14.8",
32
- "esbuild-windows-arm64": "0.14.8"
15
+ "esbuild-android-arm64": "0.14.9",
16
+ "esbuild-darwin-64": "0.14.9",
17
+ "esbuild-darwin-arm64": "0.14.9",
18
+ "esbuild-freebsd-64": "0.14.9",
19
+ "esbuild-freebsd-arm64": "0.14.9",
20
+ "esbuild-linux-32": "0.14.9",
21
+ "esbuild-linux-64": "0.14.9",
22
+ "esbuild-linux-arm": "0.14.9",
23
+ "esbuild-linux-arm64": "0.14.9",
24
+ "esbuild-linux-mips64le": "0.14.9",
25
+ "esbuild-linux-ppc64le": "0.14.9",
26
+ "esbuild-linux-s390x": "0.14.9",
27
+ "esbuild-netbsd-64": "0.14.9",
28
+ "esbuild-openbsd-64": "0.14.9",
29
+ "esbuild-sunos-64": "0.14.9",
30
+ "esbuild-windows-32": "0.14.9",
31
+ "esbuild-windows-64": "0.14.9",
32
+ "esbuild-windows-arm64": "0.14.9"
33
33
  },
34
34
  "license": "MIT"
35
35
  }