esbuild 0.13.4 → 0.13.8

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
@@ -34,13 +34,14 @@ var knownUnixlikePackages = {
34
34
  "darwin x64 LE": "esbuild-darwin-64",
35
35
  "freebsd arm64 LE": "esbuild-freebsd-arm64",
36
36
  "freebsd x64 LE": "esbuild-freebsd-64",
37
- "openbsd x64 LE": "esbuild-openbsd-64",
38
37
  "linux arm LE": "esbuild-linux-arm",
39
38
  "linux arm64 LE": "esbuild-linux-arm64",
40
39
  "linux ia32 LE": "esbuild-linux-32",
41
40
  "linux mips64el LE": "esbuild-linux-mips64le",
42
41
  "linux ppc64 LE": "esbuild-linux-ppc64le",
43
42
  "linux x64 LE": "esbuild-linux-64",
43
+ "netbsd x64 LE": "esbuild-netbsd-64",
44
+ "openbsd x64 LE": "esbuild-openbsd-64",
44
45
  "sunos x64 LE": "esbuild-sunos-64"
45
46
  };
46
47
  function pkgAndSubpathForCurrentPlatform() {
package/install.js CHANGED
@@ -50,13 +50,14 @@ var knownUnixlikePackages = {
50
50
  "darwin x64 LE": "esbuild-darwin-64",
51
51
  "freebsd arm64 LE": "esbuild-freebsd-arm64",
52
52
  "freebsd x64 LE": "esbuild-freebsd-64",
53
- "openbsd x64 LE": "esbuild-openbsd-64",
54
53
  "linux arm LE": "esbuild-linux-arm",
55
54
  "linux arm64 LE": "esbuild-linux-arm64",
56
55
  "linux ia32 LE": "esbuild-linux-32",
57
56
  "linux mips64el LE": "esbuild-linux-mips64le",
58
57
  "linux ppc64 LE": "esbuild-linux-ppc64le",
59
58
  "linux x64 LE": "esbuild-linux-64",
59
+ "netbsd x64 LE": "esbuild-netbsd-64",
60
+ "openbsd x64 LE": "esbuild-openbsd-64",
60
61
  "sunos x64 LE": "esbuild-sunos-64"
61
62
  };
62
63
  function pkgAndSubpathForCurrentPlatform() {
@@ -91,8 +92,8 @@ var isToPathJS = true;
91
92
  function validateBinaryVersion(...command) {
92
93
  command.push("--version");
93
94
  const stdout = child_process.execFileSync(command.shift(), command).toString().trim();
94
- if (stdout !== "0.13.4") {
95
- throw new Error(`Expected ${JSON.stringify("0.13.4")} but got ${JSON.stringify(stdout)}`);
95
+ if (stdout !== "0.13.8") {
96
+ throw new Error(`Expected ${JSON.stringify("0.13.8")} but got ${JSON.stringify(stdout)}`);
96
97
  }
97
98
  }
98
99
  function isYarn() {
@@ -143,7 +144,7 @@ function installUsingNPM(pkg, subpath, binPath) {
143
144
  fs2.mkdirSync(installDir);
144
145
  try {
145
146
  fs2.writeFileSync(path2.join(installDir, "package.json"), "{}");
146
- child_process.execSync(`npm install --loglevel=error --prefer-offline --no-audit --progress=false ${pkg}@${"0.13.4"}`, { cwd: installDir, stdio: "pipe", env });
147
+ child_process.execSync(`npm install --loglevel=error --prefer-offline --no-audit --progress=false ${pkg}@${"0.13.8"}`, { cwd: installDir, stdio: "pipe", env });
147
148
  const installedBinPath = path2.join(installDir, "node_modules", pkg, subpath);
148
149
  fs2.renameSync(installedBinPath, binPath);
149
150
  } finally {
@@ -191,7 +192,7 @@ function maybeOptimizePackage(binPath) {
191
192
  }
192
193
  }
193
194
  async function downloadDirectlyFromNPM(pkg, subpath, binPath) {
194
- const url = `https://registry.npmjs.org/${pkg}/-/${pkg}-${"0.13.4"}.tgz`;
195
+ const url = `https://registry.npmjs.org/${pkg}/-/${pkg}-${"0.13.8"}.tgz`;
195
196
  console.error(`[esbuild] Trying to download ${JSON.stringify(url)}`);
196
197
  try {
197
198
  fs2.writeFileSync(binPath, extractFileFromTarGzip(await fetch(url), subpath));
@@ -202,8 +203,8 @@ async function downloadDirectlyFromNPM(pkg, subpath, binPath) {
202
203
  }
203
204
  }
204
205
  async function checkAndPreparePackage() {
205
- if (process.env.ESBUILD_BINARY_PATH) {
206
- applyManualBinaryPathOverride(process.env.ESBUILD_BINARY_PATH);
206
+ if (ESBUILD_BINARY_PATH) {
207
+ applyManualBinaryPathOverride(ESBUILD_BINARY_PATH);
207
208
  return;
208
209
  }
209
210
  const { pkg, subpath } = pkgAndSubpathForCurrentPlatform();
package/lib/main.js CHANGED
@@ -709,8 +709,8 @@ function createChannel(streamIn) {
709
709
  if (isFirstPacket) {
710
710
  isFirstPacket = false;
711
711
  let binaryVersion = String.fromCharCode(...bytes);
712
- if (binaryVersion !== "0.13.4") {
713
- throw new Error(`Cannot start service: Host version "${"0.13.4"}" does not match binary version ${JSON.stringify(binaryVersion)}`);
712
+ if (binaryVersion !== "0.13.8") {
713
+ throw new Error(`Cannot start service: Host version "${"0.13.8"}" does not match binary version ${JSON.stringify(binaryVersion)}`);
714
714
  }
715
715
  return;
716
716
  }
@@ -1597,13 +1597,14 @@ var knownUnixlikePackages = {
1597
1597
  "darwin x64 LE": "esbuild-darwin-64",
1598
1598
  "freebsd arm64 LE": "esbuild-freebsd-arm64",
1599
1599
  "freebsd x64 LE": "esbuild-freebsd-64",
1600
- "openbsd x64 LE": "esbuild-openbsd-64",
1601
1600
  "linux arm LE": "esbuild-linux-arm",
1602
1601
  "linux arm64 LE": "esbuild-linux-arm64",
1603
1602
  "linux ia32 LE": "esbuild-linux-32",
1604
1603
  "linux mips64el LE": "esbuild-linux-mips64le",
1605
1604
  "linux ppc64 LE": "esbuild-linux-ppc64le",
1606
1605
  "linux x64 LE": "esbuild-linux-64",
1606
+ "netbsd x64 LE": "esbuild-netbsd-64",
1607
+ "openbsd x64 LE": "esbuild-openbsd-64",
1607
1608
  "sunos x64 LE": "esbuild-sunos-64"
1608
1609
  };
1609
1610
  function pkgAndSubpathForCurrentPlatform() {
@@ -1685,9 +1686,9 @@ if (process.env.ESBUILD_WORKER_THREADS !== "0") {
1685
1686
  }
1686
1687
  }
1687
1688
  var _a;
1688
- var isInternalWorkerThread = ((_a = worker_threads == null ? void 0 : worker_threads.workerData) == null ? void 0 : _a.esbuildVersion) === "0.13.4";
1689
+ var isInternalWorkerThread = ((_a = worker_threads == null ? void 0 : worker_threads.workerData) == null ? void 0 : _a.esbuildVersion) === "0.13.8";
1689
1690
  var esbuildCommandAndArgs = () => {
1690
- if (path2.basename(__filename) !== "main.js" || path2.basename(__dirname) !== "lib") {
1691
+ if ((!ESBUILD_BINARY_PATH || false) && (path2.basename(__filename) !== "main.js" || path2.basename(__dirname) !== "lib")) {
1691
1692
  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.
1692
1693
 
1693
1694
  More information: The file containing the code for esbuild's JavaScript API (${__filename}) does not appear to be inside the esbuild package on the file system, which usually means that the esbuild package was bundled into another file. This is problematic because the API needs to run a binary executable inside the esbuild package which is located using a relative path from the API code to the executable. If the esbuild package is bundled, the relative path will be incorrect and the executable won't be found.`);
@@ -1744,7 +1745,7 @@ var fsAsync = {
1744
1745
  }
1745
1746
  }
1746
1747
  };
1747
- var version = "0.13.4";
1748
+ var version = "0.13.8";
1748
1749
  var build = (options) => ensureServiceIsRunning().build(options);
1749
1750
  var serve = (serveOptions, buildOptions) => ensureServiceIsRunning().serve(serveOptions, buildOptions);
1750
1751
  var transform = (input, options) => ensureServiceIsRunning().transform(input, options);
@@ -1853,7 +1854,7 @@ var ensureServiceIsRunning = () => {
1853
1854
  if (longLivedService)
1854
1855
  return longLivedService;
1855
1856
  let [command, args] = esbuildCommandAndArgs();
1856
- let child = child_process.spawn(command, args.concat(`--service=${"0.13.4"}`, "--ping"), {
1857
+ let child = child_process.spawn(command, args.concat(`--service=${"0.13.8"}`, "--ping"), {
1857
1858
  windowsHide: true,
1858
1859
  stdio: ["pipe", "pipe", "inherit"],
1859
1860
  cwd: defaultWD
@@ -1960,7 +1961,7 @@ var runServiceSync = (callback) => {
1960
1961
  isBrowser: false
1961
1962
  });
1962
1963
  callback(service);
1963
- let stdout = child_process.execFileSync(command, args.concat(`--service=${"0.13.4"}`), {
1964
+ let stdout = child_process.execFileSync(command, args.concat(`--service=${"0.13.8"}`), {
1964
1965
  cwd: defaultWD,
1965
1966
  windowsHide: true,
1966
1967
  input: stdin,
@@ -1976,7 +1977,7 @@ var workerThreadService = null;
1976
1977
  var startWorkerThreadService = (worker_threads2) => {
1977
1978
  let { port1: mainPort, port2: workerPort } = new worker_threads2.MessageChannel();
1978
1979
  let worker = new worker_threads2.Worker(__filename, {
1979
- workerData: { workerPort, defaultWD, esbuildVersion: "0.13.4" },
1980
+ workerData: { workerPort, defaultWD, esbuildVersion: "0.13.8" },
1980
1981
  transferList: [workerPort],
1981
1982
  execArgv: []
1982
1983
  });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "esbuild",
3
- "version": "0.13.4",
4
- "description": "An extremely fast JavaScript bundler and minifier.",
3
+ "version": "0.13.8",
4
+ "description": "An extremely fast JavaScript and CSS bundler and minifier.",
5
5
  "repository": "https://github.com/evanw/esbuild",
6
6
  "scripts": {
7
7
  "postinstall": "node install.js"
@@ -12,22 +12,23 @@
12
12
  "esbuild": "bin/esbuild"
13
13
  },
14
14
  "optionalDependencies": {
15
- "esbuild-android-arm64": "0.13.4",
16
- "esbuild-darwin-64": "0.13.4",
17
- "esbuild-darwin-arm64": "0.13.4",
18
- "esbuild-freebsd-64": "0.13.4",
19
- "esbuild-freebsd-arm64": "0.13.4",
20
- "esbuild-linux-32": "0.13.4",
21
- "esbuild-linux-64": "0.13.4",
22
- "esbuild-linux-arm": "0.13.4",
23
- "esbuild-linux-arm64": "0.13.4",
24
- "esbuild-linux-mips64le": "0.13.4",
25
- "esbuild-linux-ppc64le": "0.13.4",
26
- "esbuild-openbsd-64": "0.13.4",
27
- "esbuild-sunos-64": "0.13.4",
28
- "esbuild-windows-32": "0.13.4",
29
- "esbuild-windows-64": "0.13.4",
30
- "esbuild-windows-arm64": "0.13.4"
15
+ "esbuild-android-arm64": "0.13.8",
16
+ "esbuild-darwin-64": "0.13.8",
17
+ "esbuild-darwin-arm64": "0.13.8",
18
+ "esbuild-freebsd-64": "0.13.8",
19
+ "esbuild-freebsd-arm64": "0.13.8",
20
+ "esbuild-linux-32": "0.13.8",
21
+ "esbuild-linux-64": "0.13.8",
22
+ "esbuild-linux-arm": "0.13.8",
23
+ "esbuild-linux-arm64": "0.13.8",
24
+ "esbuild-linux-mips64le": "0.13.8",
25
+ "esbuild-linux-ppc64le": "0.13.8",
26
+ "esbuild-netbsd-64": "0.13.8",
27
+ "esbuild-openbsd-64": "0.13.8",
28
+ "esbuild-sunos-64": "0.13.8",
29
+ "esbuild-windows-32": "0.13.8",
30
+ "esbuild-windows-64": "0.13.8",
31
+ "esbuild-windows-arm64": "0.13.8"
31
32
  },
32
33
  "license": "MIT"
33
34
  }