esbuild 0.16.12 → 0.16.13

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.12"}-${path.basename(subpath)}`
193
+ `pnpapi-${pkg.replace("/", "-")}-${"0.16.13"}-${path.basename(subpath)}`
194
194
  );
195
195
  if (!fs.existsSync(binTargetPath)) {
196
196
  fs.mkdirSync(path.dirname(binTargetPath), { recursive: true });
package/install.js CHANGED
@@ -87,11 +87,32 @@ var toPath = path2.join(__dirname, "bin", "esbuild");
87
87
  var isToPathJS = true;
88
88
  function validateBinaryVersion(...command) {
89
89
  command.push("--version");
90
- const stdout = child_process.execFileSync(command.shift(), command, {
91
- stdio: "pipe"
92
- }).toString().trim();
93
- if (stdout !== "0.16.12") {
94
- throw new Error(`Expected ${JSON.stringify("0.16.12")} but got ${JSON.stringify(stdout)}`);
90
+ let stdout;
91
+ try {
92
+ stdout = child_process.execFileSync(command.shift(), command, {
93
+ stdio: "pipe"
94
+ }).toString().trim();
95
+ } catch (err) {
96
+ if (os2.platform() === "darwin" && /_SecTrustEvaluateWithError/.test(err + "")) {
97
+ let os3 = "this version of macOS";
98
+ try {
99
+ os3 = "macOS " + child_process.execFileSync("sw_vers", ["-productVersion"]).toString().trim();
100
+ } catch {
101
+ }
102
+ throw new Error(`The "esbuild" package cannot be installed because ${os3} is too outdated.
103
+
104
+ The Go compiler (which esbuild relies on) no longer supports ${os3},
105
+ which means the "esbuild" binary executable can't be run. You can either:
106
+
107
+ * Update your version of macOS to one that the Go compiler supports
108
+ * Use the "esbuild-wasm" package instead of the "esbuild" package
109
+ * Build esbuild yourself using an older version of the Go compiler
110
+ `);
111
+ }
112
+ throw err;
113
+ }
114
+ if (stdout !== "0.16.13") {
115
+ throw new Error(`Expected ${JSON.stringify("0.16.13")} but got ${JSON.stringify(stdout)}`);
95
116
  }
96
117
  }
97
118
  function isYarn() {
@@ -143,7 +164,7 @@ function installUsingNPM(pkg, subpath, binPath) {
143
164
  try {
144
165
  fs2.writeFileSync(path2.join(installDir, "package.json"), "{}");
145
166
  child_process.execSync(
146
- `npm install --loglevel=error --prefer-offline --no-audit --progress=false ${pkg}@${"0.16.12"}`,
167
+ `npm install --loglevel=error --prefer-offline --no-audit --progress=false ${pkg}@${"0.16.13"}`,
147
168
  { cwd: installDir, stdio: "pipe", env }
148
169
  );
149
170
  const installedBinPath = path2.join(installDir, "node_modules", pkg, subpath);
@@ -194,7 +215,7 @@ function maybeOptimizePackage(binPath) {
194
215
  }
195
216
  }
196
217
  async function downloadDirectlyFromNPM(pkg, subpath, binPath) {
197
- const url = `https://registry.npmjs.org/${pkg}/-/${pkg.replace("@esbuild/", "")}-${"0.16.12"}.tgz`;
218
+ const url = `https://registry.npmjs.org/${pkg}/-/${pkg.replace("@esbuild/", "")}-${"0.16.13"}.tgz`;
198
219
  console.error(`[esbuild] Trying to download ${JSON.stringify(url)}`);
199
220
  try {
200
221
  fs2.writeFileSync(binPath, extractFileFromTarGzip(await fetch(url), subpath));
package/lib/main.d.ts CHANGED
@@ -442,6 +442,7 @@ export interface Metafile {
442
442
  path: string
443
443
  kind: ImportKind
444
444
  external?: boolean
445
+ original?: string
445
446
  }[]
446
447
  }
447
448
  }
package/lib/main.js CHANGED
@@ -735,8 +735,8 @@ function createChannel(streamIn) {
735
735
  if (isFirstPacket) {
736
736
  isFirstPacket = false;
737
737
  let binaryVersion = String.fromCharCode(...bytes);
738
- if (binaryVersion !== "0.16.12") {
739
- throw new Error(`Cannot start service: Host version "${"0.16.12"}" does not match binary version ${quote(binaryVersion)}`);
738
+ if (binaryVersion !== "0.16.13") {
739
+ throw new Error(`Cannot start service: Host version "${"0.16.13"}" does not match binary version ${quote(binaryVersion)}`);
740
740
  }
741
741
  return;
742
742
  }
@@ -1860,7 +1860,7 @@ for your current platform.`);
1860
1860
  "node_modules",
1861
1861
  ".cache",
1862
1862
  "esbuild",
1863
- `pnpapi-${pkg.replace("/", "-")}-${"0.16.12"}-${path.basename(subpath)}`
1863
+ `pnpapi-${pkg.replace("/", "-")}-${"0.16.13"}-${path.basename(subpath)}`
1864
1864
  );
1865
1865
  if (!fs.existsSync(binTargetPath)) {
1866
1866
  fs.mkdirSync(path.dirname(binTargetPath), { recursive: true });
@@ -1892,7 +1892,7 @@ if (process.env.ESBUILD_WORKER_THREADS !== "0") {
1892
1892
  }
1893
1893
  }
1894
1894
  var _a;
1895
- var isInternalWorkerThread = ((_a = worker_threads == null ? void 0 : worker_threads.workerData) == null ? void 0 : _a.esbuildVersion) === "0.16.12";
1895
+ var isInternalWorkerThread = ((_a = worker_threads == null ? void 0 : worker_threads.workerData) == null ? void 0 : _a.esbuildVersion) === "0.16.13";
1896
1896
  var esbuildCommandAndArgs = () => {
1897
1897
  if ((!ESBUILD_BINARY_PATH || false) && (path2.basename(__filename) !== "main.js" || path2.basename(__dirname) !== "lib")) {
1898
1898
  throw new Error(
@@ -1959,7 +1959,7 @@ var fsAsync = {
1959
1959
  }
1960
1960
  }
1961
1961
  };
1962
- var version = "0.16.12";
1962
+ var version = "0.16.13";
1963
1963
  var build = (options) => ensureServiceIsRunning().build(options);
1964
1964
  var serve = (serveOptions, buildOptions) => ensureServiceIsRunning().serve(serveOptions, buildOptions);
1965
1965
  var transform = (input, options) => ensureServiceIsRunning().transform(input, options);
@@ -2070,7 +2070,7 @@ var ensureServiceIsRunning = () => {
2070
2070
  if (longLivedService)
2071
2071
  return longLivedService;
2072
2072
  let [command, args] = esbuildCommandAndArgs();
2073
- let child = child_process.spawn(command, args.concat(`--service=${"0.16.12"}`, "--ping"), {
2073
+ let child = child_process.spawn(command, args.concat(`--service=${"0.16.13"}`, "--ping"), {
2074
2074
  windowsHide: true,
2075
2075
  stdio: ["pipe", "pipe", "inherit"],
2076
2076
  cwd: defaultWD
@@ -2184,7 +2184,7 @@ var runServiceSync = (callback) => {
2184
2184
  esbuild: node_exports
2185
2185
  });
2186
2186
  callback(service);
2187
- let stdout = child_process.execFileSync(command, args.concat(`--service=${"0.16.12"}`), {
2187
+ let stdout = child_process.execFileSync(command, args.concat(`--service=${"0.16.13"}`), {
2188
2188
  cwd: defaultWD,
2189
2189
  windowsHide: true,
2190
2190
  input: stdin,
@@ -2200,7 +2200,7 @@ var workerThreadService = null;
2200
2200
  var startWorkerThreadService = (worker_threads2) => {
2201
2201
  let { port1: mainPort, port2: workerPort } = new worker_threads2.MessageChannel();
2202
2202
  let worker = new worker_threads2.Worker(__filename, {
2203
- workerData: { workerPort, defaultWD, esbuildVersion: "0.16.12" },
2203
+ workerData: { workerPort, defaultWD, esbuildVersion: "0.16.13" },
2204
2204
  transferList: [workerPort],
2205
2205
  execArgv: []
2206
2206
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "esbuild",
3
- "version": "0.16.12",
3
+ "version": "0.16.13",
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.12",
19
- "@esbuild/android-arm64": "0.16.12",
20
- "@esbuild/android-x64": "0.16.12",
21
- "@esbuild/darwin-arm64": "0.16.12",
22
- "@esbuild/darwin-x64": "0.16.12",
23
- "@esbuild/freebsd-arm64": "0.16.12",
24
- "@esbuild/freebsd-x64": "0.16.12",
25
- "@esbuild/linux-arm": "0.16.12",
26
- "@esbuild/linux-arm64": "0.16.12",
27
- "@esbuild/linux-ia32": "0.16.12",
28
- "@esbuild/linux-loong64": "0.16.12",
29
- "@esbuild/linux-mips64el": "0.16.12",
30
- "@esbuild/linux-ppc64": "0.16.12",
31
- "@esbuild/linux-riscv64": "0.16.12",
32
- "@esbuild/linux-s390x": "0.16.12",
33
- "@esbuild/linux-x64": "0.16.12",
34
- "@esbuild/netbsd-x64": "0.16.12",
35
- "@esbuild/openbsd-x64": "0.16.12",
36
- "@esbuild/sunos-x64": "0.16.12",
37
- "@esbuild/win32-arm64": "0.16.12",
38
- "@esbuild/win32-ia32": "0.16.12",
39
- "@esbuild/win32-x64": "0.16.12"
18
+ "@esbuild/android-arm": "0.16.13",
19
+ "@esbuild/android-arm64": "0.16.13",
20
+ "@esbuild/android-x64": "0.16.13",
21
+ "@esbuild/darwin-arm64": "0.16.13",
22
+ "@esbuild/darwin-x64": "0.16.13",
23
+ "@esbuild/freebsd-arm64": "0.16.13",
24
+ "@esbuild/freebsd-x64": "0.16.13",
25
+ "@esbuild/linux-arm": "0.16.13",
26
+ "@esbuild/linux-arm64": "0.16.13",
27
+ "@esbuild/linux-ia32": "0.16.13",
28
+ "@esbuild/linux-loong64": "0.16.13",
29
+ "@esbuild/linux-mips64el": "0.16.13",
30
+ "@esbuild/linux-ppc64": "0.16.13",
31
+ "@esbuild/linux-riscv64": "0.16.13",
32
+ "@esbuild/linux-s390x": "0.16.13",
33
+ "@esbuild/linux-x64": "0.16.13",
34
+ "@esbuild/netbsd-x64": "0.16.13",
35
+ "@esbuild/openbsd-x64": "0.16.13",
36
+ "@esbuild/sunos-x64": "0.16.13",
37
+ "@esbuild/win32-arm64": "0.16.13",
38
+ "@esbuild/win32-ia32": "0.16.13",
39
+ "@esbuild/win32-x64": "0.16.13"
40
40
  },
41
41
  "license": "MIT"
42
42
  }