esbuild 0.25.5 → 0.25.6

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
@@ -60,7 +60,8 @@ var knownUnixlikePackages = {
60
60
  };
61
61
  var knownWebAssemblyFallbackPackages = {
62
62
  "android arm LE": "@esbuild/android-arm",
63
- "android x64 LE": "@esbuild/android-x64"
63
+ "android x64 LE": "@esbuild/android-x64",
64
+ "openharmony arm64 LE": "@esbuild/openharmony-arm64"
64
65
  };
65
66
  function pkgAndSubpathForCurrentPlatform() {
66
67
  let pkg;
@@ -200,7 +201,7 @@ for your current platform.`);
200
201
  "node_modules",
201
202
  ".cache",
202
203
  "esbuild",
203
- `pnpapi-${pkg.replace("/", "-")}-${"0.25.5"}-${path.basename(subpath)}`
204
+ `pnpapi-${pkg.replace("/", "-")}-${"0.25.6"}-${path.basename(subpath)}`
204
205
  );
205
206
  if (!fs.existsSync(binTargetPath)) {
206
207
  fs.mkdirSync(path.dirname(binTargetPath), { recursive: true });
package/install.js CHANGED
@@ -57,7 +57,8 @@ var knownUnixlikePackages = {
57
57
  };
58
58
  var knownWebAssemblyFallbackPackages = {
59
59
  "android arm LE": "@esbuild/android-arm",
60
- "android x64 LE": "@esbuild/android-x64"
60
+ "android x64 LE": "@esbuild/android-x64",
61
+ "openharmony arm64 LE": "@esbuild/openharmony-arm64"
61
62
  };
62
63
  function pkgAndSubpathForCurrentPlatform() {
63
64
  let pkg;
@@ -220,7 +221,8 @@ require('child_process').execFileSync(${pathString}, process.argv.slice(2), { st
220
221
  ${code}`);
221
222
  }
222
223
  function maybeOptimizePackage(binPath) {
223
- if (os2.platform() !== "win32" && !isYarn()) {
224
+ const { isWASM } = pkgAndSubpathForCurrentPlatform();
225
+ if (os2.platform() !== "win32" && !isYarn() && !isWASM) {
224
226
  const tempPath = path2.join(__dirname, "bin-esbuild");
225
227
  try {
226
228
  fs2.linkSync(binPath, tempPath);
package/lib/main.d.ts CHANGED
@@ -159,7 +159,7 @@ export interface BuildOptions extends CommonOptions {
159
159
  /** Documentation: https://esbuild.github.io/api/#footer */
160
160
  footer?: { [type: string]: string }
161
161
  /** Documentation: https://esbuild.github.io/api/#entry-points */
162
- entryPoints?: string[] | Record<string, string> | { in: string, out: string }[]
162
+ entryPoints?: (string | { in: string, out: string })[] | Record<string, string>
163
163
  /** Documentation: https://esbuild.github.io/api/#stdin */
164
164
  stdin?: StdinOptions
165
165
  /** Documentation: https://esbuild.github.io/plugins/ */
@@ -513,7 +513,9 @@ export interface AnalyzeMetafileOptions {
513
513
  verbose?: boolean
514
514
  }
515
515
 
516
+ /** Documentation: https://esbuild.github.io/api/#watch-arguments */
516
517
  export interface WatchOptions {
518
+ delay?: number // In milliseconds
517
519
  }
518
520
 
519
521
  export interface BuildContext<ProvidedOptions extends BuildOptions = BuildOptions> {
package/lib/main.js CHANGED
@@ -641,8 +641,8 @@ function createChannel(streamIn) {
641
641
  if (isFirstPacket) {
642
642
  isFirstPacket = false;
643
643
  let binaryVersion = String.fromCharCode(...bytes);
644
- if (binaryVersion !== "0.25.5") {
645
- throw new Error(`Cannot start service: Host version "${"0.25.5"}" does not match binary version ${quote(binaryVersion)}`);
644
+ if (binaryVersion !== "0.25.6") {
645
+ throw new Error(`Cannot start service: Host version "${"0.25.6"}" does not match binary version ${quote(binaryVersion)}`);
646
646
  }
647
647
  return;
648
648
  }
@@ -984,11 +984,13 @@ function buildOrContextImpl(callName, buildKey, sendRequest, sendResponse, refs,
984
984
  watch: (options2 = {}) => new Promise((resolve, reject) => {
985
985
  if (!streamIn.hasFS) throw new Error(`Cannot use the "watch" API in this environment`);
986
986
  const keys = {};
987
+ const delay = getFlag(options2, keys, "delay", mustBeInteger);
987
988
  checkForInvalidFlags(options2, keys, `in watch() call`);
988
989
  const request2 = {
989
990
  command: "watch",
990
991
  key: buildKey
991
992
  };
993
+ if (delay) request2.delay = delay;
992
994
  sendRequest(refs, request2, (error2) => {
993
995
  if (error2) reject(new Error(error2));
994
996
  else resolve(void 0);
@@ -1625,7 +1627,8 @@ var knownUnixlikePackages = {
1625
1627
  };
1626
1628
  var knownWebAssemblyFallbackPackages = {
1627
1629
  "android arm LE": "@esbuild/android-arm",
1628
- "android x64 LE": "@esbuild/android-x64"
1630
+ "android x64 LE": "@esbuild/android-x64",
1631
+ "openharmony arm64 LE": "@esbuild/openharmony-arm64"
1629
1632
  };
1630
1633
  function pkgAndSubpathForCurrentPlatform() {
1631
1634
  let pkg;
@@ -1765,7 +1768,7 @@ for your current platform.`);
1765
1768
  "node_modules",
1766
1769
  ".cache",
1767
1770
  "esbuild",
1768
- `pnpapi-${pkg.replace("/", "-")}-${"0.25.5"}-${path.basename(subpath)}`
1771
+ `pnpapi-${pkg.replace("/", "-")}-${"0.25.6"}-${path.basename(subpath)}`
1769
1772
  );
1770
1773
  if (!fs.existsSync(binTargetPath)) {
1771
1774
  fs.mkdirSync(path.dirname(binTargetPath), { recursive: true });
@@ -1800,7 +1803,7 @@ if (process.env.ESBUILD_WORKER_THREADS !== "0") {
1800
1803
  }
1801
1804
  }
1802
1805
  var _a;
1803
- var isInternalWorkerThread = ((_a = worker_threads == null ? void 0 : worker_threads.workerData) == null ? void 0 : _a.esbuildVersion) === "0.25.5";
1806
+ var isInternalWorkerThread = ((_a = worker_threads == null ? void 0 : worker_threads.workerData) == null ? void 0 : _a.esbuildVersion) === "0.25.6";
1804
1807
  var esbuildCommandAndArgs = () => {
1805
1808
  if ((!ESBUILD_BINARY_PATH || false) && (path2.basename(__filename) !== "main.js" || path2.basename(__dirname) !== "lib")) {
1806
1809
  throw new Error(
@@ -1867,7 +1870,7 @@ var fsAsync = {
1867
1870
  }
1868
1871
  }
1869
1872
  };
1870
- var version = "0.25.5";
1873
+ var version = "0.25.6";
1871
1874
  var build = (options) => ensureServiceIsRunning().build(options);
1872
1875
  var context = (buildOptions) => ensureServiceIsRunning().context(buildOptions);
1873
1876
  var transform = (input, options) => ensureServiceIsRunning().transform(input, options);
@@ -1970,7 +1973,7 @@ var stopService;
1970
1973
  var ensureServiceIsRunning = () => {
1971
1974
  if (longLivedService) return longLivedService;
1972
1975
  let [command, args] = esbuildCommandAndArgs();
1973
- let child = child_process.spawn(command, args.concat(`--service=${"0.25.5"}`, "--ping"), {
1976
+ let child = child_process.spawn(command, args.concat(`--service=${"0.25.6"}`, "--ping"), {
1974
1977
  windowsHide: true,
1975
1978
  stdio: ["pipe", "pipe", "inherit"],
1976
1979
  cwd: defaultWD
@@ -2074,7 +2077,7 @@ var runServiceSync = (callback) => {
2074
2077
  esbuild: node_exports
2075
2078
  });
2076
2079
  callback(service);
2077
- let stdout = child_process.execFileSync(command, args.concat(`--service=${"0.25.5"}`), {
2080
+ let stdout = child_process.execFileSync(command, args.concat(`--service=${"0.25.6"}`), {
2078
2081
  cwd: defaultWD,
2079
2082
  windowsHide: true,
2080
2083
  input: stdin,
@@ -2094,7 +2097,7 @@ var workerThreadService = null;
2094
2097
  var startWorkerThreadService = (worker_threads2) => {
2095
2098
  let { port1: mainPort, port2: workerPort } = new worker_threads2.MessageChannel();
2096
2099
  let worker = new worker_threads2.Worker(__filename, {
2097
- workerData: { workerPort, defaultWD, esbuildVersion: "0.25.5" },
2100
+ workerData: { workerPort, defaultWD, esbuildVersion: "0.25.6" },
2098
2101
  transferList: [workerPort],
2099
2102
  // From node's documentation: https://nodejs.org/api/worker_threads.html
2100
2103
  //
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "esbuild",
3
- "version": "0.25.5",
3
+ "version": "0.25.6",
4
4
  "description": "An extremely fast JavaScript and CSS bundler and minifier.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -18,31 +18,32 @@
18
18
  "esbuild": "bin/esbuild"
19
19
  },
20
20
  "optionalDependencies": {
21
- "@esbuild/aix-ppc64": "0.25.5",
22
- "@esbuild/android-arm": "0.25.5",
23
- "@esbuild/android-arm64": "0.25.5",
24
- "@esbuild/android-x64": "0.25.5",
25
- "@esbuild/darwin-arm64": "0.25.5",
26
- "@esbuild/darwin-x64": "0.25.5",
27
- "@esbuild/freebsd-arm64": "0.25.5",
28
- "@esbuild/freebsd-x64": "0.25.5",
29
- "@esbuild/linux-arm": "0.25.5",
30
- "@esbuild/linux-arm64": "0.25.5",
31
- "@esbuild/linux-ia32": "0.25.5",
32
- "@esbuild/linux-loong64": "0.25.5",
33
- "@esbuild/linux-mips64el": "0.25.5",
34
- "@esbuild/linux-ppc64": "0.25.5",
35
- "@esbuild/linux-riscv64": "0.25.5",
36
- "@esbuild/linux-s390x": "0.25.5",
37
- "@esbuild/linux-x64": "0.25.5",
38
- "@esbuild/netbsd-arm64": "0.25.5",
39
- "@esbuild/netbsd-x64": "0.25.5",
40
- "@esbuild/openbsd-arm64": "0.25.5",
41
- "@esbuild/openbsd-x64": "0.25.5",
42
- "@esbuild/sunos-x64": "0.25.5",
43
- "@esbuild/win32-arm64": "0.25.5",
44
- "@esbuild/win32-ia32": "0.25.5",
45
- "@esbuild/win32-x64": "0.25.5"
21
+ "@esbuild/aix-ppc64": "0.25.6",
22
+ "@esbuild/android-arm": "0.25.6",
23
+ "@esbuild/android-arm64": "0.25.6",
24
+ "@esbuild/android-x64": "0.25.6",
25
+ "@esbuild/darwin-arm64": "0.25.6",
26
+ "@esbuild/darwin-x64": "0.25.6",
27
+ "@esbuild/freebsd-arm64": "0.25.6",
28
+ "@esbuild/freebsd-x64": "0.25.6",
29
+ "@esbuild/linux-arm": "0.25.6",
30
+ "@esbuild/linux-arm64": "0.25.6",
31
+ "@esbuild/linux-ia32": "0.25.6",
32
+ "@esbuild/linux-loong64": "0.25.6",
33
+ "@esbuild/linux-mips64el": "0.25.6",
34
+ "@esbuild/linux-ppc64": "0.25.6",
35
+ "@esbuild/linux-riscv64": "0.25.6",
36
+ "@esbuild/linux-s390x": "0.25.6",
37
+ "@esbuild/linux-x64": "0.25.6",
38
+ "@esbuild/netbsd-arm64": "0.25.6",
39
+ "@esbuild/netbsd-x64": "0.25.6",
40
+ "@esbuild/openbsd-arm64": "0.25.6",
41
+ "@esbuild/openbsd-x64": "0.25.6",
42
+ "@esbuild/openharmony-arm64": "0.25.6",
43
+ "@esbuild/sunos-x64": "0.25.6",
44
+ "@esbuild/win32-arm64": "0.25.6",
45
+ "@esbuild/win32-ia32": "0.25.6",
46
+ "@esbuild/win32-x64": "0.25.6"
46
47
  },
47
48
  "license": "MIT"
48
49
  }