esbuild 0.16.3 → 0.16.5

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
@@ -190,7 +190,7 @@ for your current platform.`);
190
190
  "node_modules",
191
191
  ".cache",
192
192
  "esbuild",
193
- `pnpapi-${pkg.replace("/", "-")}-${"0.16.3"}-${path.basename(subpath)}`
193
+ `pnpapi-${pkg.replace("/", "-")}-${"0.16.5"}-${path.basename(subpath)}`
194
194
  );
195
195
  if (!fs.existsSync(binTargetPath)) {
196
196
  fs.mkdirSync(path.dirname(binTargetPath), { recursive: true });
package/install.js CHANGED
@@ -90,8 +90,8 @@ function validateBinaryVersion(...command) {
90
90
  const stdout = child_process.execFileSync(command.shift(), command, {
91
91
  stdio: "pipe"
92
92
  }).toString().trim();
93
- if (stdout !== "0.16.3") {
94
- throw new Error(`Expected ${JSON.stringify("0.16.3")} but got ${JSON.stringify(stdout)}`);
93
+ if (stdout !== "0.16.5") {
94
+ throw new Error(`Expected ${JSON.stringify("0.16.5")} but got ${JSON.stringify(stdout)}`);
95
95
  }
96
96
  }
97
97
  function isYarn() {
@@ -143,7 +143,7 @@ function installUsingNPM(pkg, subpath, binPath) {
143
143
  try {
144
144
  fs2.writeFileSync(path2.join(installDir, "package.json"), "{}");
145
145
  child_process.execSync(
146
- `npm install --loglevel=error --prefer-offline --no-audit --progress=false ${pkg}@${"0.16.3"}`,
146
+ `npm install --loglevel=error --prefer-offline --no-audit --progress=false ${pkg}@${"0.16.5"}`,
147
147
  { cwd: installDir, stdio: "pipe", env }
148
148
  );
149
149
  const installedBinPath = path2.join(installDir, "node_modules", pkg, subpath);
@@ -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.replace("@esbuild/", "")}-${"0.16.3"}.tgz`;
197
+ const url = `https://registry.npmjs.org/${pkg}/-/${pkg.replace("@esbuild/", "")}-${"0.16.5"}.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
@@ -98,6 +98,8 @@ export interface BuildOptions extends CommonOptions {
98
98
  outbase?: string;
99
99
  /** Documentation: https://esbuild.github.io/api/#external */
100
100
  external?: string[];
101
+ /** Documentation: https://esbuild.github.io/api/#packages */
102
+ packages?: 'external';
101
103
  /** Documentation: https://esbuild.github.io/api/#alias */
102
104
  alias?: Record<string, string>;
103
105
  /** Documentation: https://esbuild.github.io/api/#loader */
package/lib/main.js CHANGED
@@ -435,6 +435,7 @@ function flagsForBuildOptions(callName, options, isTTY2, logLevelDefault, writeD
435
435
  let mainFields = getFlag(options, keys, "mainFields", mustBeArray);
436
436
  let conditions = getFlag(options, keys, "conditions", mustBeArray);
437
437
  let external = getFlag(options, keys, "external", mustBeArray);
438
+ let packages = getFlag(options, keys, "packages", mustBeString);
438
439
  let alias = getFlag(options, keys, "alias", mustBeObject);
439
440
  let loader = getFlag(options, keys, "loader", mustBeObject);
440
441
  let outExtension = getFlag(options, keys, "outExtension", mustBeObject);
@@ -485,6 +486,8 @@ function flagsForBuildOptions(callName, options, isTTY2, logLevelDefault, writeD
485
486
  flags.push(`--outbase=${outbase}`);
486
487
  if (tsconfig)
487
488
  flags.push(`--tsconfig=${tsconfig}`);
489
+ if (packages)
490
+ flags.push(`--packages=${packages}`);
488
491
  if (resolveExtensions) {
489
492
  let values = [];
490
493
  for (let value of resolveExtensions) {
@@ -732,8 +735,8 @@ function createChannel(streamIn) {
732
735
  if (isFirstPacket) {
733
736
  isFirstPacket = false;
734
737
  let binaryVersion = String.fromCharCode(...bytes);
735
- if (binaryVersion !== "0.16.3") {
736
- throw new Error(`Cannot start service: Host version "${"0.16.3"}" does not match binary version ${quote(binaryVersion)}`);
738
+ if (binaryVersion !== "0.16.5") {
739
+ throw new Error(`Cannot start service: Host version "${"0.16.5"}" does not match binary version ${quote(binaryVersion)}`);
737
740
  }
738
741
  return;
739
742
  }
@@ -1855,7 +1858,7 @@ for your current platform.`);
1855
1858
  "node_modules",
1856
1859
  ".cache",
1857
1860
  "esbuild",
1858
- `pnpapi-${pkg.replace("/", "-")}-${"0.16.3"}-${path.basename(subpath)}`
1861
+ `pnpapi-${pkg.replace("/", "-")}-${"0.16.5"}-${path.basename(subpath)}`
1859
1862
  );
1860
1863
  if (!fs.existsSync(binTargetPath)) {
1861
1864
  fs.mkdirSync(path.dirname(binTargetPath), { recursive: true });
@@ -1887,7 +1890,7 @@ if (process.env.ESBUILD_WORKER_THREADS !== "0") {
1887
1890
  }
1888
1891
  }
1889
1892
  var _a;
1890
- var isInternalWorkerThread = ((_a = worker_threads == null ? void 0 : worker_threads.workerData) == null ? void 0 : _a.esbuildVersion) === "0.16.3";
1893
+ var isInternalWorkerThread = ((_a = worker_threads == null ? void 0 : worker_threads.workerData) == null ? void 0 : _a.esbuildVersion) === "0.16.5";
1891
1894
  var esbuildCommandAndArgs = () => {
1892
1895
  if ((!ESBUILD_BINARY_PATH || false) && (path2.basename(__filename) !== "main.js" || path2.basename(__dirname) !== "lib")) {
1893
1896
  throw new Error(
@@ -1954,7 +1957,7 @@ var fsAsync = {
1954
1957
  }
1955
1958
  }
1956
1959
  };
1957
- var version = "0.16.3";
1960
+ var version = "0.16.5";
1958
1961
  var build = (options) => ensureServiceIsRunning().build(options);
1959
1962
  var serve = (serveOptions, buildOptions) => ensureServiceIsRunning().serve(serveOptions, buildOptions);
1960
1963
  var transform = (input, options) => ensureServiceIsRunning().transform(input, options);
@@ -2065,7 +2068,7 @@ var ensureServiceIsRunning = () => {
2065
2068
  if (longLivedService)
2066
2069
  return longLivedService;
2067
2070
  let [command, args] = esbuildCommandAndArgs();
2068
- let child = child_process.spawn(command, args.concat(`--service=${"0.16.3"}`, "--ping"), {
2071
+ let child = child_process.spawn(command, args.concat(`--service=${"0.16.5"}`, "--ping"), {
2069
2072
  windowsHide: true,
2070
2073
  stdio: ["pipe", "pipe", "inherit"],
2071
2074
  cwd: defaultWD
@@ -2179,7 +2182,7 @@ var runServiceSync = (callback) => {
2179
2182
  esbuild: node_exports
2180
2183
  });
2181
2184
  callback(service);
2182
- let stdout = child_process.execFileSync(command, args.concat(`--service=${"0.16.3"}`), {
2185
+ let stdout = child_process.execFileSync(command, args.concat(`--service=${"0.16.5"}`), {
2183
2186
  cwd: defaultWD,
2184
2187
  windowsHide: true,
2185
2188
  input: stdin,
@@ -2195,7 +2198,7 @@ var workerThreadService = null;
2195
2198
  var startWorkerThreadService = (worker_threads2) => {
2196
2199
  let { port1: mainPort, port2: workerPort } = new worker_threads2.MessageChannel();
2197
2200
  let worker = new worker_threads2.Worker(__filename, {
2198
- workerData: { workerPort, defaultWD, esbuildVersion: "0.16.3" },
2201
+ workerData: { workerPort, defaultWD, esbuildVersion: "0.16.5" },
2199
2202
  transferList: [workerPort],
2200
2203
  execArgv: []
2201
2204
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "esbuild",
3
- "version": "0.16.3",
3
+ "version": "0.16.5",
4
4
  "description": "An extremely fast JavaScript and CSS bundler and minifier.",
5
5
  "repository": "https://github.com/evanw/esbuild",
6
6
  "scripts": {
@@ -15,28 +15,28 @@
15
15
  "esbuild": "bin/esbuild"
16
16
  },
17
17
  "optionalDependencies": {
18
- "@esbuild/android-arm": "0.16.3",
19
- "@esbuild/android-arm64": "0.16.3",
20
- "@esbuild/android-x64": "0.16.3",
21
- "@esbuild/darwin-arm64": "0.16.3",
22
- "@esbuild/darwin-x64": "0.16.3",
23
- "@esbuild/freebsd-arm64": "0.16.3",
24
- "@esbuild/freebsd-x64": "0.16.3",
25
- "@esbuild/linux-arm": "0.16.3",
26
- "@esbuild/linux-arm64": "0.16.3",
27
- "@esbuild/linux-ia32": "0.16.3",
28
- "@esbuild/linux-loong64": "0.16.3",
29
- "@esbuild/linux-mips64el": "0.16.3",
30
- "@esbuild/linux-ppc64": "0.16.3",
31
- "@esbuild/linux-riscv64": "0.16.3",
32
- "@esbuild/linux-s390x": "0.16.3",
33
- "@esbuild/linux-x64": "0.16.3",
34
- "@esbuild/netbsd-x64": "0.16.3",
35
- "@esbuild/openbsd-x64": "0.16.3",
36
- "@esbuild/sunos-x64": "0.16.3",
37
- "@esbuild/win32-arm64": "0.16.3",
38
- "@esbuild/win32-ia32": "0.16.3",
39
- "@esbuild/win32-x64": "0.16.3"
18
+ "@esbuild/android-arm": "0.16.5",
19
+ "@esbuild/android-arm64": "0.16.5",
20
+ "@esbuild/android-x64": "0.16.5",
21
+ "@esbuild/darwin-arm64": "0.16.5",
22
+ "@esbuild/darwin-x64": "0.16.5",
23
+ "@esbuild/freebsd-arm64": "0.16.5",
24
+ "@esbuild/freebsd-x64": "0.16.5",
25
+ "@esbuild/linux-arm": "0.16.5",
26
+ "@esbuild/linux-arm64": "0.16.5",
27
+ "@esbuild/linux-ia32": "0.16.5",
28
+ "@esbuild/linux-loong64": "0.16.5",
29
+ "@esbuild/linux-mips64el": "0.16.5",
30
+ "@esbuild/linux-ppc64": "0.16.5",
31
+ "@esbuild/linux-riscv64": "0.16.5",
32
+ "@esbuild/linux-s390x": "0.16.5",
33
+ "@esbuild/linux-x64": "0.16.5",
34
+ "@esbuild/netbsd-x64": "0.16.5",
35
+ "@esbuild/openbsd-x64": "0.16.5",
36
+ "@esbuild/sunos-x64": "0.16.5",
37
+ "@esbuild/win32-arm64": "0.16.5",
38
+ "@esbuild/win32-ia32": "0.16.5",
39
+ "@esbuild/win32-x64": "0.16.5"
40
40
  },
41
41
  "license": "MIT"
42
42
  }