esbuild 0.24.2 → 0.25.1

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
@@ -200,7 +200,7 @@ for your current platform.`);
200
200
  "node_modules",
201
201
  ".cache",
202
202
  "esbuild",
203
- `pnpapi-${pkg.replace("/", "-")}-${"0.24.2"}-${path.basename(subpath)}`
203
+ `pnpapi-${pkg.replace("/", "-")}-${"0.25.1"}-${path.basename(subpath)}`
204
204
  );
205
205
  if (!fs.existsSync(binTargetPath)) {
206
206
  fs.mkdirSync(path.dirname(binTargetPath), { recursive: true });
package/lib/main.d.ts CHANGED
@@ -256,7 +256,7 @@ export interface ServeOnRequestArgs {
256
256
  /** Documentation: https://esbuild.github.io/api/#serve-return-values */
257
257
  export interface ServeResult {
258
258
  port: number
259
- host: string
259
+ hosts: string[]
260
260
  }
261
261
 
262
262
  export interface TransformOptions extends CommonOptions {
package/lib/main.js CHANGED
@@ -228,6 +228,7 @@ var mustBeBoolean = (value) => typeof value === "boolean" ? null : "a boolean";
228
228
  var mustBeString = (value) => typeof value === "string" ? null : "a string";
229
229
  var mustBeRegExp = (value) => value instanceof RegExp ? null : "a RegExp object";
230
230
  var mustBeInteger = (value) => typeof value === "number" && value === (value | 0) ? null : "an integer";
231
+ var mustBeValidPortNumber = (value) => typeof value === "number" && value === (value | 0) && value >= 0 && value <= 65535 ? null : "a valid port number";
231
232
  var mustBeFunction = (value) => typeof value === "function" ? null : "a function";
232
233
  var mustBeArray = (value) => Array.isArray(value) ? null : "an array";
233
234
  var mustBeObject = (value) => typeof value === "object" && value !== null && !Array.isArray(value) ? null : "an object";
@@ -662,8 +663,8 @@ function createChannel(streamIn) {
662
663
  if (isFirstPacket) {
663
664
  isFirstPacket = false;
664
665
  let binaryVersion = String.fromCharCode(...bytes);
665
- if (binaryVersion !== "0.24.2") {
666
- throw new Error(`Cannot start service: Host version "${"0.24.2"}" does not match binary version ${quote(binaryVersion)}`);
666
+ if (binaryVersion !== "0.25.1") {
667
+ throw new Error(`Cannot start service: Host version "${"0.25.1"}" does not match binary version ${quote(binaryVersion)}`);
667
668
  }
668
669
  return;
669
670
  }
@@ -1018,7 +1019,7 @@ function buildOrContextImpl(callName, buildKey, sendRequest, sendResponse, refs,
1018
1019
  serve: (options2 = {}) => new Promise((resolve, reject) => {
1019
1020
  if (!streamIn.hasFS) throw new Error(`Cannot use the "serve" API in this environment`);
1020
1021
  const keys = {};
1021
- const port = getFlag(options2, keys, "port", mustBeInteger);
1022
+ const port = getFlag(options2, keys, "port", mustBeValidPortNumber);
1022
1023
  const host = getFlag(options2, keys, "host", mustBeString);
1023
1024
  const servedir = getFlag(options2, keys, "servedir", mustBeString);
1024
1025
  const keyfile = getFlag(options2, keys, "keyfile", mustBeString);
@@ -1773,7 +1774,7 @@ for your current platform.`);
1773
1774
  "node_modules",
1774
1775
  ".cache",
1775
1776
  "esbuild",
1776
- `pnpapi-${pkg.replace("/", "-")}-${"0.24.2"}-${path.basename(subpath)}`
1777
+ `pnpapi-${pkg.replace("/", "-")}-${"0.25.1"}-${path.basename(subpath)}`
1777
1778
  );
1778
1779
  if (!fs.existsSync(binTargetPath)) {
1779
1780
  fs.mkdirSync(path.dirname(binTargetPath), { recursive: true });
@@ -1808,7 +1809,7 @@ if (process.env.ESBUILD_WORKER_THREADS !== "0") {
1808
1809
  }
1809
1810
  }
1810
1811
  var _a;
1811
- var isInternalWorkerThread = ((_a = worker_threads == null ? void 0 : worker_threads.workerData) == null ? void 0 : _a.esbuildVersion) === "0.24.2";
1812
+ var isInternalWorkerThread = ((_a = worker_threads == null ? void 0 : worker_threads.workerData) == null ? void 0 : _a.esbuildVersion) === "0.25.1";
1812
1813
  var esbuildCommandAndArgs = () => {
1813
1814
  if ((!ESBUILD_BINARY_PATH || false) && (path2.basename(__filename) !== "main.js" || path2.basename(__dirname) !== "lib")) {
1814
1815
  throw new Error(
@@ -1875,7 +1876,7 @@ var fsAsync = {
1875
1876
  }
1876
1877
  }
1877
1878
  };
1878
- var version = "0.24.2";
1879
+ var version = "0.25.1";
1879
1880
  var build = (options) => ensureServiceIsRunning().build(options);
1880
1881
  var context = (buildOptions) => ensureServiceIsRunning().context(buildOptions);
1881
1882
  var transform = (input, options) => ensureServiceIsRunning().transform(input, options);
@@ -1978,7 +1979,7 @@ var stopService;
1978
1979
  var ensureServiceIsRunning = () => {
1979
1980
  if (longLivedService) return longLivedService;
1980
1981
  let [command, args] = esbuildCommandAndArgs();
1981
- let child = child_process.spawn(command, args.concat(`--service=${"0.24.2"}`, "--ping"), {
1982
+ let child = child_process.spawn(command, args.concat(`--service=${"0.25.1"}`, "--ping"), {
1982
1983
  windowsHide: true,
1983
1984
  stdio: ["pipe", "pipe", "inherit"],
1984
1985
  cwd: defaultWD
@@ -2082,7 +2083,7 @@ var runServiceSync = (callback) => {
2082
2083
  esbuild: node_exports
2083
2084
  });
2084
2085
  callback(service);
2085
- let stdout = child_process.execFileSync(command, args.concat(`--service=${"0.24.2"}`), {
2086
+ let stdout = child_process.execFileSync(command, args.concat(`--service=${"0.25.1"}`), {
2086
2087
  cwd: defaultWD,
2087
2088
  windowsHide: true,
2088
2089
  input: stdin,
@@ -2102,7 +2103,7 @@ var workerThreadService = null;
2102
2103
  var startWorkerThreadService = (worker_threads2) => {
2103
2104
  let { port1: mainPort, port2: workerPort } = new worker_threads2.MessageChannel();
2104
2105
  let worker = new worker_threads2.Worker(__filename, {
2105
- workerData: { workerPort, defaultWD, esbuildVersion: "0.24.2" },
2106
+ workerData: { workerPort, defaultWD, esbuildVersion: "0.25.1" },
2106
2107
  transferList: [workerPort],
2107
2108
  // From node's documentation: https://nodejs.org/api/worker_threads.html
2108
2109
  //
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "esbuild",
3
- "version": "0.24.2",
3
+ "version": "0.25.1",
4
4
  "description": "An extremely fast JavaScript and CSS bundler and minifier.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -18,31 +18,31 @@
18
18
  "esbuild": "bin/esbuild"
19
19
  },
20
20
  "optionalDependencies": {
21
- "@esbuild/aix-ppc64": "0.24.2",
22
- "@esbuild/android-arm": "0.24.2",
23
- "@esbuild/android-arm64": "0.24.2",
24
- "@esbuild/android-x64": "0.24.2",
25
- "@esbuild/darwin-arm64": "0.24.2",
26
- "@esbuild/darwin-x64": "0.24.2",
27
- "@esbuild/freebsd-arm64": "0.24.2",
28
- "@esbuild/freebsd-x64": "0.24.2",
29
- "@esbuild/linux-arm": "0.24.2",
30
- "@esbuild/linux-arm64": "0.24.2",
31
- "@esbuild/linux-ia32": "0.24.2",
32
- "@esbuild/linux-loong64": "0.24.2",
33
- "@esbuild/linux-mips64el": "0.24.2",
34
- "@esbuild/linux-ppc64": "0.24.2",
35
- "@esbuild/linux-riscv64": "0.24.2",
36
- "@esbuild/linux-s390x": "0.24.2",
37
- "@esbuild/linux-x64": "0.24.2",
38
- "@esbuild/netbsd-arm64": "0.24.2",
39
- "@esbuild/netbsd-x64": "0.24.2",
40
- "@esbuild/openbsd-arm64": "0.24.2",
41
- "@esbuild/openbsd-x64": "0.24.2",
42
- "@esbuild/sunos-x64": "0.24.2",
43
- "@esbuild/win32-arm64": "0.24.2",
44
- "@esbuild/win32-ia32": "0.24.2",
45
- "@esbuild/win32-x64": "0.24.2"
21
+ "@esbuild/aix-ppc64": "0.25.1",
22
+ "@esbuild/android-arm": "0.25.1",
23
+ "@esbuild/android-arm64": "0.25.1",
24
+ "@esbuild/android-x64": "0.25.1",
25
+ "@esbuild/darwin-arm64": "0.25.1",
26
+ "@esbuild/darwin-x64": "0.25.1",
27
+ "@esbuild/freebsd-arm64": "0.25.1",
28
+ "@esbuild/freebsd-x64": "0.25.1",
29
+ "@esbuild/linux-arm": "0.25.1",
30
+ "@esbuild/linux-arm64": "0.25.1",
31
+ "@esbuild/linux-ia32": "0.25.1",
32
+ "@esbuild/linux-loong64": "0.25.1",
33
+ "@esbuild/linux-mips64el": "0.25.1",
34
+ "@esbuild/linux-ppc64": "0.25.1",
35
+ "@esbuild/linux-riscv64": "0.25.1",
36
+ "@esbuild/linux-s390x": "0.25.1",
37
+ "@esbuild/linux-x64": "0.25.1",
38
+ "@esbuild/netbsd-arm64": "0.25.1",
39
+ "@esbuild/netbsd-x64": "0.25.1",
40
+ "@esbuild/openbsd-arm64": "0.25.1",
41
+ "@esbuild/openbsd-x64": "0.25.1",
42
+ "@esbuild/sunos-x64": "0.25.1",
43
+ "@esbuild/win32-arm64": "0.25.1",
44
+ "@esbuild/win32-ia32": "0.25.1",
45
+ "@esbuild/win32-x64": "0.25.1"
46
46
  },
47
47
  "license": "MIT"
48
48
  }