Update ESBuild to 0.15.16
A reland of my failed CL yesterday that caused issues; these were caused
by me updating the DEPS version but not the node_modules version, which
I have now updated in this CL.
DISABLE_THIRD_PARTY_CHECK=purposeful update of ESBuild in two places.
Bug: none
Change-Id: I0a59296d7ad7a276e7f807d8154eb68a05d75451
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4061716
Reviewed-by: Wolfgang Beyer <[email protected]>
Reviewed-by: Liviu Rau <[email protected]>
Commit-Queue: Jack Franklin <[email protected]>
diff --git a/DEPS b/DEPS
index e71208e..c7742cb 100644
--- a/DEPS
+++ b/DEPS
@@ -94,7 +94,7 @@
'packages': [
{
'package': 'infra/3pp/tools/esbuild/${{platform}}',
- 'version': 'version:[email protected]',
+ 'version': 'version:[email protected]',
}
],
'dep_type': 'cipd',
diff --git a/node_modules/.package-lock.json b/node_modules/.package-lock.json
index b32d17d..7721245 100644
--- a/node_modules/.package-lock.json
+++ b/node_modules/.package-lock.json
@@ -2442,33 +2442,40 @@
}
},
"node_modules/esbuild": {
- "version": "0.14.13",
- "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.14.13.tgz",
- "integrity": "sha512-FIxvAdj3i2oHA6ex+E67bG7zlSTO+slt8kU2ogHDgGtrQLy2HNChv3PYjiFTYkt8hZbEAniZCXVeHn+FrHt7dA==",
+ "version": "0.15.16",
+ "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.15.16.tgz",
+ "integrity": "sha512-o6iS9zxdHrrojjlj6pNGC2NAg86ECZqIETswTM5KmJitq+R1YmahhWtMumeQp9lHqJaROGnsBi2RLawGnfo5ZQ==",
"dev": true,
"hasInstallScript": true,
"bin": {
"esbuild": "bin/esbuild"
},
+ "engines": {
+ "node": ">=12"
+ },
"optionalDependencies": {
- "esbuild-android-arm64": "0.14.13",
- "esbuild-darwin-64": "0.14.13",
- "esbuild-darwin-arm64": "0.14.13",
- "esbuild-freebsd-64": "0.14.13",
- "esbuild-freebsd-arm64": "0.14.13",
- "esbuild-linux-32": "0.14.13",
- "esbuild-linux-64": "0.14.13",
- "esbuild-linux-arm": "0.14.13",
- "esbuild-linux-arm64": "0.14.13",
- "esbuild-linux-mips64le": "0.14.13",
- "esbuild-linux-ppc64le": "0.14.13",
- "esbuild-linux-s390x": "0.14.13",
- "esbuild-netbsd-64": "0.14.13",
- "esbuild-openbsd-64": "0.14.13",
- "esbuild-sunos-64": "0.14.13",
- "esbuild-windows-32": "0.14.13",
- "esbuild-windows-64": "0.14.13",
- "esbuild-windows-arm64": "0.14.13"
+ "@esbuild/android-arm": "0.15.16",
+ "@esbuild/linux-loong64": "0.15.16",
+ "esbuild-android-64": "0.15.16",
+ "esbuild-android-arm64": "0.15.16",
+ "esbuild-darwin-64": "0.15.16",
+ "esbuild-darwin-arm64": "0.15.16",
+ "esbuild-freebsd-64": "0.15.16",
+ "esbuild-freebsd-arm64": "0.15.16",
+ "esbuild-linux-32": "0.15.16",
+ "esbuild-linux-64": "0.15.16",
+ "esbuild-linux-arm": "0.15.16",
+ "esbuild-linux-arm64": "0.15.16",
+ "esbuild-linux-mips64le": "0.15.16",
+ "esbuild-linux-ppc64le": "0.15.16",
+ "esbuild-linux-riscv64": "0.15.16",
+ "esbuild-linux-s390x": "0.15.16",
+ "esbuild-netbsd-64": "0.15.16",
+ "esbuild-openbsd-64": "0.15.16",
+ "esbuild-sunos-64": "0.15.16",
+ "esbuild-windows-32": "0.15.16",
+ "esbuild-windows-64": "0.15.16",
+ "esbuild-windows-arm64": "0.15.16"
}
},
"node_modules/escalade": {
diff --git a/node_modules/esbuild/LICENSE.md b/node_modules/esbuild/LICENSE.md
new file mode 100644
index 0000000..2027e8d
--- /dev/null
+++ b/node_modules/esbuild/LICENSE.md
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2020 Evan Wallace
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/node_modules/esbuild/bin/esbuild b/node_modules/esbuild/bin/esbuild
index e43f477..45b3d6b 100755
--- a/node_modules/esbuild/bin/esbuild
+++ b/node_modules/esbuild/bin/esbuild
@@ -1,28 +1,31 @@
#!/usr/bin/env node
+"use strict";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
-var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
-var __reExport = (target, module2, copyDefault, desc) => {
- if (module2 && typeof module2 === "object" || typeof module2 === "function") {
- for (let key of __getOwnPropNames(module2))
- if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
- __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
+var __copyProps = (to, from, except, desc) => {
+ if (from && typeof from === "object" || typeof from === "function") {
+ for (let key of __getOwnPropNames(from))
+ if (!__hasOwnProp.call(to, key) && key !== except)
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
- return target;
+ return to;
};
-var __toESM = (module2, isNodeMode) => {
- return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
-};
+var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
+ mod
+));
// lib/npm/node-platform.ts
var fs = require("fs");
var os = require("os");
var path = require("path");
var ESBUILD_BINARY_PATH = process.env.ESBUILD_BINARY_PATH || ESBUILD_BINARY_PATH;
+var packageDarwin_arm64 = "esbuild-darwin-arm64";
+var packageDarwin_x64 = "esbuild-darwin-64";
var knownWindowsPackages = {
"win32 arm64 LE": "esbuild-windows-arm64",
"win32 ia32 LE": "esbuild-windows-32",
@@ -39,15 +42,22 @@
"linux ia32 LE": "esbuild-linux-32",
"linux mips64el LE": "esbuild-linux-mips64le",
"linux ppc64 LE": "esbuild-linux-ppc64le",
+ "linux riscv64 LE": "esbuild-linux-riscv64",
"linux s390x BE": "esbuild-linux-s390x",
"linux x64 LE": "esbuild-linux-64",
+ "linux loong64 LE": "@esbuild/linux-loong64",
"netbsd x64 LE": "esbuild-netbsd-64",
"openbsd x64 LE": "esbuild-openbsd-64",
"sunos x64 LE": "esbuild-sunos-64"
};
+var knownWebAssemblyFallbackPackages = {
+ "android arm LE": "@esbuild/android-arm",
+ "android x64 LE": "esbuild-android-64"
+};
function pkgAndSubpathForCurrentPlatform() {
let pkg;
let subpath;
+ let isWASM2 = false;
let platformKey = `${process.platform} ${os.arch()} ${os.endianness()}`;
if (platformKey in knownWindowsPackages) {
pkg = knownWindowsPackages[platformKey];
@@ -55,10 +65,14 @@
} else if (platformKey in knownUnixlikePackages) {
pkg = knownUnixlikePackages[platformKey];
subpath = "bin/esbuild";
+ } else if (platformKey in knownWebAssemblyFallbackPackages) {
+ pkg = knownWebAssemblyFallbackPackages[platformKey];
+ subpath = "bin/esbuild";
+ isWASM2 = true;
} else {
throw new Error(`Unsupported platform: ${platformKey}`);
}
- return { pkg, subpath };
+ return { pkg, subpath, isWASM: isWASM2 };
}
function pkgForSomeOtherPlatform() {
const libMainJS = require.resolve("esbuild");
@@ -89,25 +103,21 @@
}
function generateBinPath() {
if (ESBUILD_BINARY_PATH) {
- return ESBUILD_BINARY_PATH;
+ return { binPath: ESBUILD_BINARY_PATH, isWASM: false };
}
- const { pkg, subpath } = pkgAndSubpathForCurrentPlatform();
- let binPath;
+ const { pkg, subpath, isWASM: isWASM2 } = pkgAndSubpathForCurrentPlatform();
+ let binPath2;
try {
- binPath = require.resolve(`${pkg}/${subpath}`);
+ binPath2 = require.resolve(`${pkg}/${subpath}`);
} catch (e) {
- binPath = downloadedBinPath(pkg, subpath);
- if (!fs.existsSync(binPath)) {
+ binPath2 = downloadedBinPath(pkg, subpath);
+ if (!fs.existsSync(binPath2)) {
try {
require.resolve(pkg);
} catch {
const otherPkg = pkgForSomeOtherPlatform();
if (otherPkg) {
- throw new Error(`
-You installed esbuild on another platform than the one you're currently using.
-This won't work because esbuild is written with native code and needs to
-install a platform-specific binary executable.
-
+ let suggestions = `
Specifically the "${otherPkg}" package is present but this platform
needs the "${pkg}" package instead. People often get into this
situation by installing esbuild on Windows or macOS and copying "node_modules"
@@ -117,14 +127,40 @@
If you are installing with npm, you can try not copying the "node_modules"
directory when you copy the files over, and running "npm ci" or "npm install"
on the destination platform after the copy. Or you could consider using yarn
-instead which has built-in support for installing a package on multiple
+instead of npm which has built-in support for installing a package on multiple
platforms simultaneously.
If you are installing with yarn, you can try listing both this platform and the
other platform in your ".yarnrc.yml" file using the "supportedArchitectures"
feature: https://yarnpkg.com/configuration/yarnrc/#supportedArchitectures
Keep in mind that this means multiple copies of esbuild will be present.
+`;
+ if (pkg === packageDarwin_x64 && otherPkg === packageDarwin_arm64 || pkg === packageDarwin_arm64 && otherPkg === packageDarwin_x64) {
+ suggestions = `
+Specifically the "${otherPkg}" package is present but this platform
+needs the "${pkg}" package instead. People often get into this
+situation by installing esbuild with npm running inside of Rosetta 2 and then
+trying to use it with node running outside of Rosetta 2, or vice versa (Rosetta
+2 is Apple's on-the-fly x86_64-to-arm64 translation service).
+If you are installing with npm, you can try ensuring that both npm and node are
+not running under Rosetta 2 and then reinstalling esbuild. This likely involves
+changing how you installed npm and/or node. For example, installing node with
+the universal installer here should work: https://nodejs.org/en/download/. Or
+you could consider using yarn instead of npm which has built-in support for
+installing a package on multiple platforms simultaneously.
+
+If you are installing with yarn, you can try listing both "arm64" and "x64"
+in your ".yarnrc.yml" file using the "supportedArchitectures" feature:
+https://yarnpkg.com/configuration/yarnrc/#supportedArchitectures
+Keep in mind that this means multiple copies of esbuild will be present.
+`;
+ }
+ throw new Error(`
+You installed esbuild for another platform than the one you're currently using.
+This won't work because esbuild is written with native code and needs to
+install a platform-specific binary executable.
+${suggestions}
Another alternative is to use the "esbuild-wasm" package instead, which works
the same way on all platforms. But it comes with a heavy performance cost and
can sometimes be 10x slower than the "esbuild" package, so you may also not
@@ -134,29 +170,43 @@
throw new Error(`The package "${pkg}" could not be found, and is needed by esbuild.
If you are installing esbuild with npm, make sure that you don't specify the
-"--no-optional" flag. The "optionalDependencies" package.json feature is used
-by esbuild to install the correct binary executable for your current platform.`);
+"--no-optional" or "--omit=optional" flags. The "optionalDependencies" feature
+of "package.json" is used by esbuild to install the correct binary executable
+for your current platform.`);
}
throw e;
}
}
- let isYarnPnP = false;
- try {
- require("pnpapi");
- isYarnPnP = true;
- } catch (e) {
- }
- if (isYarnPnP) {
- const esbuildLibDir = path.dirname(require.resolve("esbuild"));
- const binTargetPath = path.join(esbuildLibDir, `pnpapi-${pkg}-${path.basename(subpath)}`);
- if (!fs.existsSync(binTargetPath)) {
- fs.copyFileSync(binPath, binTargetPath);
- fs.chmodSync(binTargetPath, 493);
+ if (/\.zip\//.test(binPath2)) {
+ let pnpapi;
+ try {
+ pnpapi = require("pnpapi");
+ } catch (e) {
}
- return binTargetPath;
+ if (pnpapi) {
+ const root = pnpapi.getPackageInformation(pnpapi.topLevel).packageLocation;
+ const binTargetPath = path.join(
+ root,
+ "node_modules",
+ ".cache",
+ "esbuild",
+ `pnpapi-${pkg}-${"0.15.16"}-${path.basename(subpath)}`
+ );
+ if (!fs.existsSync(binTargetPath)) {
+ fs.mkdirSync(path.dirname(binTargetPath), { recursive: true });
+ fs.copyFileSync(binPath2, binTargetPath);
+ fs.chmodSync(binTargetPath, 493);
+ }
+ return { binPath: binTargetPath, isWASM: isWASM2 };
+ }
}
- return binPath;
+ return { binPath: binPath2, isWASM: isWASM2 };
}
// lib/npm/node-shim.ts
-require("child_process").execFileSync(generateBinPath(), process.argv.slice(2), { stdio: "inherit" });
+var { binPath, isWASM } = generateBinPath();
+if (isWASM) {
+ require("child_process").execFileSync("node", [binPath].concat(process.argv.slice(2)), { stdio: "inherit" });
+} else {
+ require("child_process").execFileSync(binPath, process.argv.slice(2), { stdio: "inherit" });
+}
diff --git a/node_modules/esbuild/install.js b/node_modules/esbuild/install.js
index df5450c..10fbf6c 100644
--- a/node_modules/esbuild/install.js
+++ b/node_modules/esbuild/install.js
@@ -1,38 +1,22 @@
+"use strict";
var __create = Object.create;
var __defProp = Object.defineProperty;
-var __defProps = Object.defineProperties;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
-var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
var __getOwnPropNames = Object.getOwnPropertyNames;
-var __getOwnPropSymbols = Object.getOwnPropertySymbols;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
-var __propIsEnum = Object.prototype.propertyIsEnumerable;
-var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
-var __spreadValues = (a, b) => {
- for (var prop in b || (b = {}))
- if (__hasOwnProp.call(b, prop))
- __defNormalProp(a, prop, b[prop]);
- if (__getOwnPropSymbols)
- for (var prop of __getOwnPropSymbols(b)) {
- if (__propIsEnum.call(b, prop))
- __defNormalProp(a, prop, b[prop]);
- }
- return a;
-};
-var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
-var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
-var __reExport = (target, module2, copyDefault, desc) => {
- if (module2 && typeof module2 === "object" || typeof module2 === "function") {
- for (let key of __getOwnPropNames(module2))
- if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
- __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
+var __copyProps = (to, from, except, desc) => {
+ if (from && typeof from === "object" || typeof from === "function") {
+ for (let key of __getOwnPropNames(from))
+ if (!__hasOwnProp.call(to, key) && key !== except)
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
- return target;
+ return to;
};
-var __toESM = (module2, isNodeMode) => {
- return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
-};
+var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
+ mod
+));
// lib/npm/node-platform.ts
var fs = require("fs");
@@ -55,15 +39,22 @@
"linux ia32 LE": "esbuild-linux-32",
"linux mips64el LE": "esbuild-linux-mips64le",
"linux ppc64 LE": "esbuild-linux-ppc64le",
+ "linux riscv64 LE": "esbuild-linux-riscv64",
"linux s390x BE": "esbuild-linux-s390x",
"linux x64 LE": "esbuild-linux-64",
+ "linux loong64 LE": "@esbuild/linux-loong64",
"netbsd x64 LE": "esbuild-netbsd-64",
"openbsd x64 LE": "esbuild-openbsd-64",
"sunos x64 LE": "esbuild-sunos-64"
};
+var knownWebAssemblyFallbackPackages = {
+ "android arm LE": "@esbuild/android-arm",
+ "android x64 LE": "esbuild-android-64"
+};
function pkgAndSubpathForCurrentPlatform() {
let pkg;
let subpath;
+ let isWASM = false;
let platformKey = `${process.platform} ${os.arch()} ${os.endianness()}`;
if (platformKey in knownWindowsPackages) {
pkg = knownWindowsPackages[platformKey];
@@ -71,10 +62,14 @@
} else if (platformKey in knownUnixlikePackages) {
pkg = knownUnixlikePackages[platformKey];
subpath = "bin/esbuild";
+ } else if (platformKey in knownWebAssemblyFallbackPackages) {
+ pkg = knownWebAssemblyFallbackPackages[platformKey];
+ subpath = "bin/esbuild";
+ isWASM = true;
} else {
throw new Error(`Unsupported platform: ${platformKey}`);
}
- return { pkg, subpath };
+ return { pkg, subpath, isWASM };
}
function downloadedBinPath(pkg, subpath) {
const esbuildLibDir = path.dirname(require.resolve("esbuild"));
@@ -92,9 +87,11 @@
var isToPathJS = true;
function validateBinaryVersion(...command) {
command.push("--version");
- const stdout = child_process.execFileSync(command.shift(), command).toString().trim();
- if (stdout !== "0.14.13") {
- throw new Error(`Expected ${JSON.stringify("0.14.13")} but got ${JSON.stringify(stdout)}`);
+ const stdout = child_process.execFileSync(command.shift(), command, {
+ stdio: "pipe"
+ }).toString().trim();
+ if (stdout !== "0.15.16") {
+ throw new Error(`Expected ${JSON.stringify("0.15.16")} but got ${JSON.stringify(stdout)}`);
}
}
function isYarn() {
@@ -139,13 +136,16 @@
throw new Error(`Could not find ${JSON.stringify(subpath)} in archive`);
}
function installUsingNPM(pkg, subpath, binPath) {
- const env = __spreadProps(__spreadValues({}, process.env), { npm_config_global: void 0 });
+ const env = { ...process.env, npm_config_global: void 0 };
const esbuildLibDir = path2.dirname(require.resolve("esbuild"));
const installDir = path2.join(esbuildLibDir, "npm-install");
fs2.mkdirSync(installDir);
try {
fs2.writeFileSync(path2.join(installDir, "package.json"), "{}");
- child_process.execSync(`npm install --loglevel=error --prefer-offline --no-audit --progress=false ${pkg}@${"0.14.13"}`, { cwd: installDir, stdio: "pipe", env });
+ child_process.execSync(
+ `npm install --loglevel=error --prefer-offline --no-audit --progress=false ${pkg}@${"0.15.16"}`,
+ { cwd: installDir, stdio: "pipe", env }
+ );
const installedBinPath = path2.join(installDir, "node_modules", pkg, subpath);
fs2.renameSync(installedBinPath, binPath);
} finally {
@@ -194,7 +194,7 @@
}
}
async function downloadDirectlyFromNPM(pkg, subpath, binPath) {
- const url = `https://registry.npmjs.org/${pkg}/-/${pkg}-${"0.14.13"}.tgz`;
+ const url = `https://registry.npmjs.org/${pkg}/-/${pkg}-${"0.15.16"}.tgz`;
console.error(`[esbuild] Trying to download ${JSON.stringify(url)}`);
try {
fs2.writeFileSync(binPath, extractFileFromTarGzip(await fetch(url), subpath));
@@ -238,7 +238,7 @@
}
checkAndPreparePackage().then(() => {
if (isToPathJS) {
- validateBinaryVersion("node", toPath);
+ validateBinaryVersion(process.execPath, toPath);
} else {
validateBinaryVersion(toPath);
}
diff --git a/node_modules/esbuild/lib/main.d.ts b/node_modules/esbuild/lib/main.d.ts
index 0f1796a..0304463 100644
--- a/node_modules/esbuild/lib/main.d.ts
+++ b/node_modules/esbuild/lib/main.d.ts
@@ -1,13 +1,13 @@
export type Platform = 'browser' | 'node' | 'neutral';
export type Format = 'iife' | 'cjs' | 'esm';
-export type Loader = 'js' | 'jsx' | 'ts' | 'tsx' | 'css' | 'json' | 'text' | 'base64' | 'file' | 'dataurl' | 'binary' | 'default';
+export type Loader = 'js' | 'jsx' | 'ts' | 'tsx' | 'css' | 'json' | 'text' | 'base64' | 'file' | 'dataurl' | 'binary' | 'copy' | 'default';
export type LogLevel = 'verbose' | 'debug' | 'info' | 'warning' | 'error' | 'silent';
export type Charset = 'ascii' | 'utf8';
export type Drop = 'console' | 'debugger';
interface CommonOptions {
/** Documentation: https://esbuild.github.io/api/#sourcemap */
- sourcemap?: boolean | 'inline' | 'external' | 'both';
+ sourcemap?: boolean | 'linked' | 'inline' | 'external' | 'both';
/** Documentation: https://esbuild.github.io/api/#legal-comments */
legalComments?: 'none' | 'inline' | 'eof' | 'linked' | 'external';
/** Documentation: https://esbuild.github.io/api/#source-root */
@@ -17,11 +17,24 @@
/** Documentation: https://esbuild.github.io/api/#format */
format?: Format;
- /** Documentation: https://esbuild.github.io/api/#globalName */
+ /** Documentation: https://esbuild.github.io/api/#global-name */
globalName?: string;
/** Documentation: https://esbuild.github.io/api/#target */
target?: string | string[];
+ /** Documentation: https://esbuild.github.io/api/#supported */
+ supported?: Record<string, boolean>;
+ /** Documentation: https://esbuild.github.io/api/#platform */
+ platform?: Platform;
+ /** Documentation: https://esbuild.github.io/api/#mangle-props */
+ mangleProps?: RegExp;
+ /** Documentation: https://esbuild.github.io/api/#mangle-props */
+ reserveProps?: RegExp;
+ /** Documentation: https://esbuild.github.io/api/#mangle-props */
+ mangleQuoted?: boolean;
+ /** Documentation: https://esbuild.github.io/api/#mangle-props */
+ mangleCache?: Record<string, string | false>;
+ /** Documentation: https://esbuild.github.io/api/#drop */
drop?: Drop[];
/** Documentation: https://esbuild.github.io/api/#minify */
minify?: boolean;
@@ -39,11 +52,17 @@
ignoreAnnotations?: boolean;
/** Documentation: https://esbuild.github.io/api/#jsx */
- jsx?: 'transform' | 'preserve';
+ jsx?: 'transform' | 'preserve' | 'automatic';
/** Documentation: https://esbuild.github.io/api/#jsx-factory */
jsxFactory?: string;
/** Documentation: https://esbuild.github.io/api/#jsx-fragment */
jsxFragment?: string;
+ /** Documentation: https://esbuild.github.io/api/#jsx-import-source */
+ jsxImportSource?: string;
+ /** Documentation: https://esbuild.github.io/api/#jsx-development */
+ jsxDev?: boolean;
+ /** Documentation: https://esbuild.github.io/api/#jsx-side-effects */
+ jsxSideEffects?: boolean;
/** Documentation: https://esbuild.github.io/api/#define */
define?: { [key: string]: string };
@@ -58,6 +77,8 @@
logLevel?: LogLevel;
/** Documentation: https://esbuild.github.io/api/#log-limit */
logLimit?: number;
+ /** Documentation: https://esbuild.github.io/api/#log-override */
+ logOverride?: Record<string, LogLevel>;
}
export interface BuildOptions extends CommonOptions {
@@ -75,15 +96,15 @@
outdir?: string;
/** Documentation: https://esbuild.github.io/api/#outbase */
outbase?: string;
- /** Documentation: https://esbuild.github.io/api/#platform */
- platform?: Platform;
/** Documentation: https://esbuild.github.io/api/#external */
external?: string[];
+ /** Documentation: https://esbuild.github.io/api/#alias */
+ alias?: Record<string, string>;
/** Documentation: https://esbuild.github.io/api/#loader */
loader?: { [ext: string]: Loader };
/** Documentation: https://esbuild.github.io/api/#resolve-extensions */
resolveExtensions?: string[];
- /** Documentation: https://esbuild.github.io/api/#mainFields */
+ /** Documentation: https://esbuild.github.io/api/#main-fields */
mainFields?: string[];
/** Documentation: https://esbuild.github.io/api/#conditions */
conditions?: string[];
@@ -130,13 +151,14 @@
}
export interface StdinOptions {
- contents: string;
+ contents: string | Uint8Array;
resolveDir?: string;
sourcefile?: string;
loader?: Loader;
}
export interface Message {
+ id: string;
pluginName: string;
text: string;
location: Location | null;
@@ -195,6 +217,8 @@
stop?: () => void;
/** Only when "metafile: true" */
metafile?: Metafile;
+ /** Only when "mangleCache" is present */
+ mangleCache?: Record<string, string | false>;
}
export interface BuildFailure extends Error {
@@ -230,11 +254,15 @@
export interface TransformOptions extends CommonOptions {
tsconfigRaw?: string | {
compilerOptions?: {
+ alwaysStrict?: boolean,
+ importsNotUsedAsValues?: 'remove' | 'preserve' | 'error',
+ jsx?: 'react' | 'react-jsx' | 'react-jsxdev' | 'preserve',
jsxFactory?: string,
jsxFragmentFactory?: string,
- useDefineForClassFields?: boolean,
- importsNotUsedAsValues?: 'remove' | 'preserve' | 'error',
+ jsxImportSource?: string,
preserveValueImports?: boolean,
+ target?: string,
+ useDefineForClassFields?: boolean,
},
};
@@ -248,6 +276,8 @@
code: string;
map: string;
warnings: Message[];
+ /** Only when "mangleCache" is present */
+ mangleCache?: Record<string, string | false>;
}
export interface TransformFailure extends Error {
@@ -387,6 +417,7 @@
}
export interface PartialMessage {
+ id?: string;
pluginName?: string;
text?: string;
location?: Partial<Location> | null;
@@ -423,6 +454,7 @@
}[]
exports: string[]
entryPoint?: string
+ cssBundle?: string
}
}
}
@@ -476,7 +508,7 @@
*
* Documentation: https://esbuild.github.io/api/#transform-api
*/
-export declare function transform(input: string, options?: TransformOptions): Promise<TransformResult>;
+export declare function transform(input: string | Uint8Array, options?: TransformOptions): Promise<TransformResult>;
/**
* Converts log messages to formatted message strings suitable for printing in
@@ -559,6 +591,16 @@
wasmURL?: string
/**
+ * The result of calling "new WebAssembly.Module(buffer)" where "buffer"
+ * is a typed array or ArrayBuffer containing the binary code of the
+ * "esbuild.wasm" file.
+ *
+ * You can use this as an alternative to "wasmURL" for environments where it's
+ * not possible to download the WebAssembly module.
+ */
+ wasmModule?: WebAssembly.Module
+
+ /**
* By default esbuild runs the WebAssembly-based browser API in a web worker
* to avoid blocking the UI thread. This can be disabled by setting "worker"
* to false.
diff --git a/node_modules/esbuild/lib/main.js b/node_modules/esbuild/lib/main.js
index c0f1a99..16df54b 100644
--- a/node_modules/esbuild/lib/main.js
+++ b/node_modules/esbuild/lib/main.js
@@ -1,47 +1,27 @@
+"use strict";
var __create = Object.create;
var __defProp = Object.defineProperty;
-var __defProps = Object.defineProperties;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
-var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
var __getOwnPropNames = Object.getOwnPropertyNames;
-var __getOwnPropSymbols = Object.getOwnPropertySymbols;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
-var __propIsEnum = Object.prototype.propertyIsEnumerable;
-var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
-var __spreadValues = (a, b) => {
- for (var prop in b || (b = {}))
- if (__hasOwnProp.call(b, prop))
- __defNormalProp(a, prop, b[prop]);
- if (__getOwnPropSymbols)
- for (var prop of __getOwnPropSymbols(b)) {
- if (__propIsEnum.call(b, prop))
- __defNormalProp(a, prop, b[prop]);
- }
- return a;
-};
-var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
-var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
-var __reExport = (target, module2, copyDefault, desc) => {
- if (module2 && typeof module2 === "object" || typeof module2 === "function") {
- for (let key of __getOwnPropNames(module2))
- if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
- __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
+var __copyProps = (to, from, except, desc) => {
+ if (from && typeof from === "object" || typeof from === "function") {
+ for (let key of __getOwnPropNames(from))
+ if (!__hasOwnProp.call(to, key) && key !== except)
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
- return target;
+ return to;
};
-var __toESM = (module2, isNodeMode) => {
- return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
-};
-var __toCommonJS = /* @__PURE__ */ ((cache) => {
- return (module2, temp) => {
- return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
- };
-})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
+var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
+ mod
+));
+var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// lib/npm/node.ts
var node_exports = {};
@@ -50,6 +30,7 @@
analyzeMetafileSync: () => analyzeMetafileSync,
build: () => build,
buildSync: () => buildSync,
+ default: () => node_default,
formatMessages: () => formatMessages,
formatMessagesSync: () => formatMessagesSync,
initialize: () => initialize,
@@ -58,6 +39,7 @@
transformSync: () => transformSync,
version: () => version
});
+module.exports = __toCommonJS(node_exports);
// lib/shared/stdio_protocol.ts
function encodePacket(packet) {
@@ -224,6 +206,8 @@
}
// lib/shared/common.ts
+var buildLogLevelDefault = "warning";
+var transformLogLevelDefault = "silent";
function validateTarget(target) {
target += "";
if (target.indexOf(",") >= 0)
@@ -239,6 +223,7 @@
var mustBeFunction = (value) => typeof value === "function" ? null : "a function";
var mustBeArray = (value) => Array.isArray(value) ? null : "an array";
var mustBeObject = (value) => typeof value === "object" && value !== null && !Array.isArray(value) ? null : "an object";
+var mustBeWebAssemblyModule = (value) => value instanceof WebAssembly.Module ? null : "a WebAssembly.Module";
var mustBeArrayOrRecord = (value) => typeof value === "object" && value !== null ? null : "an array or an object";
var mustBeObjectOrNull = (value) => typeof value === "object" && !Array.isArray(value) ? null : "an object or null";
var mustBeStringOrBoolean = (value) => typeof value === "string" || typeof value === "boolean" ? null : "a string or a boolean";
@@ -265,13 +250,30 @@
function validateInitializeOptions(options) {
let keys = /* @__PURE__ */ Object.create(null);
let wasmURL = getFlag(options, keys, "wasmURL", mustBeString);
+ let wasmModule = getFlag(options, keys, "wasmModule", mustBeWebAssemblyModule);
let worker = getFlag(options, keys, "worker", mustBeBoolean);
- checkForInvalidFlags(options, keys, "in startService() call");
+ checkForInvalidFlags(options, keys, "in initialize() call");
return {
wasmURL,
+ wasmModule,
worker
};
}
+function validateMangleCache(mangleCache) {
+ let validated;
+ if (mangleCache !== void 0) {
+ validated = /* @__PURE__ */ Object.create(null);
+ for (let key of Object.keys(mangleCache)) {
+ let value = mangleCache[key];
+ if (typeof value === "string" || value === false) {
+ validated[key] = value;
+ } else {
+ throw new Error(`Expected ${JSON.stringify(key)} in mangle cache to map to either a string or false`);
+ }
+ }
+ }
+ return validated;
+}
function pushLogFlags(flags, options, keys, isTTY2, logLevelDefault) {
let color = getFlag(options, keys, "color", mustBeBoolean);
let logLevel = getFlag(options, keys, "logLevel", mustBeString);
@@ -290,6 +292,9 @@
let target = getFlag(options, keys, "target", mustBeStringOrArray);
let format = getFlag(options, keys, "format", mustBeString);
let globalName = getFlag(options, keys, "globalName", mustBeString);
+ let mangleProps = getFlag(options, keys, "mangleProps", mustBeRegExp);
+ let reserveProps = getFlag(options, keys, "reserveProps", mustBeRegExp);
+ let mangleQuoted = getFlag(options, keys, "mangleQuoted", mustBeBoolean);
let minify = getFlag(options, keys, "minify", mustBeBoolean);
let minifySyntax = getFlag(options, keys, "minifySyntax", mustBeBoolean);
let minifyWhitespace = getFlag(options, keys, "minifyWhitespace", mustBeBoolean);
@@ -301,9 +306,15 @@
let jsx = getFlag(options, keys, "jsx", mustBeString);
let jsxFactory = getFlag(options, keys, "jsxFactory", mustBeString);
let jsxFragment = getFlag(options, keys, "jsxFragment", mustBeString);
+ let jsxImportSource = getFlag(options, keys, "jsxImportSource", mustBeString);
+ let jsxDev = getFlag(options, keys, "jsxDev", mustBeBoolean);
+ let jsxSideEffects = getFlag(options, keys, "jsxSideEffects", mustBeBoolean);
let define = getFlag(options, keys, "define", mustBeObject);
+ let logOverride = getFlag(options, keys, "logOverride", mustBeObject);
+ let supported = getFlag(options, keys, "supported", mustBeObject);
let pure = getFlag(options, keys, "pure", mustBeArray);
let keepNames = getFlag(options, keys, "keepNames", mustBeBoolean);
+ let platform = getFlag(options, keys, "platform", mustBeString);
if (legalComments)
flags.push(`--legal-comments=${legalComments}`);
if (sourceRoot !== void 0)
@@ -320,6 +331,8 @@
flags.push(`--format=${format}`);
if (globalName)
flags.push(`--global-name=${globalName}`);
+ if (platform)
+ flags.push(`--platform=${platform}`);
if (minify)
flags.push("--minify");
if (minifySyntax)
@@ -337,12 +350,24 @@
if (drop)
for (let what of drop)
flags.push(`--drop:${what}`);
+ if (mangleProps)
+ flags.push(`--mangle-props=${mangleProps.source}`);
+ if (reserveProps)
+ flags.push(`--reserve-props=${reserveProps.source}`);
+ if (mangleQuoted !== void 0)
+ flags.push(`--mangle-quoted=${mangleQuoted}`);
if (jsx)
flags.push(`--jsx=${jsx}`);
if (jsxFactory)
flags.push(`--jsx-factory=${jsxFactory}`);
if (jsxFragment)
flags.push(`--jsx-fragment=${jsxFragment}`);
+ if (jsxImportSource)
+ flags.push(`--jsx-import-source=${jsxImportSource}`);
+ if (jsxDev)
+ flags.push(`--jsx-dev`);
+ if (jsxSideEffects)
+ flags.push(`--jsx-side-effects`);
if (define) {
for (let key in define) {
if (key.indexOf("=") >= 0)
@@ -350,6 +375,20 @@
flags.push(`--define:${key}=${define[key]}`);
}
}
+ if (logOverride) {
+ for (let key in logOverride) {
+ if (key.indexOf("=") >= 0)
+ throw new Error(`Invalid log override: ${key}`);
+ flags.push(`--log-override:${key}=${logOverride[key]}`);
+ }
+ }
+ if (supported) {
+ for (let key in supported) {
+ if (key.indexOf("=") >= 0)
+ throw new Error(`Invalid supported: ${key}`);
+ flags.push(`--supported:${key}=${supported[key]}`);
+ }
+ }
if (pure)
for (let fn of pure)
flags.push(`--pure:${fn}`);
@@ -375,13 +414,13 @@
let outfile = getFlag(options, keys, "outfile", mustBeString);
let outdir = getFlag(options, keys, "outdir", mustBeString);
let outbase = getFlag(options, keys, "outbase", mustBeString);
- let platform = getFlag(options, keys, "platform", mustBeString);
let tsconfig = getFlag(options, keys, "tsconfig", mustBeString);
let resolveExtensions = getFlag(options, keys, "resolveExtensions", mustBeArray);
let nodePathsInput = getFlag(options, keys, "nodePaths", mustBeArray);
let mainFields = getFlag(options, keys, "mainFields", mustBeArray);
let conditions = getFlag(options, keys, "conditions", mustBeArray);
let external = getFlag(options, keys, "external", mustBeArray);
+ let alias = getFlag(options, keys, "alias", mustBeObject);
let loader = getFlag(options, keys, "loader", mustBeObject);
let outExtension = getFlag(options, keys, "outExtension", mustBeObject);
let publicPath = getFlag(options, keys, "publicPath", mustBeString);
@@ -397,6 +436,7 @@
let write = (_a2 = getFlag(options, keys, "write", mustBeBoolean)) != null ? _a2 : writeDefault;
let allowOverwrite = getFlag(options, keys, "allowOverwrite", mustBeBoolean);
let incremental = getFlag(options, keys, "incremental", mustBeBoolean) === true;
+ let mangleCache = getFlag(options, keys, "mangleCache", mustBeObject);
keys.plugins = true;
checkForInvalidFlags(options, keys, `in ${callName}() call`);
if (sourcemap)
@@ -428,8 +468,6 @@
flags.push(`--outdir=${outdir}`);
if (outbase)
flags.push(`--outbase=${outbase}`);
- if (platform)
- flags.push(`--platform=${platform}`);
if (tsconfig)
flags.push(`--tsconfig=${tsconfig}`);
if (resolveExtensions) {
@@ -473,6 +511,13 @@
if (external)
for (let name of external)
flags.push(`--external:${name}`);
+ if (alias) {
+ for (let old in alias) {
+ if (old.indexOf("=") >= 0)
+ throw new Error(`Invalid package name in alias: ${old}`);
+ flags.push(`--alias:${old}=${alias[old]}`);
+ }
+ }
if (banner) {
for (let type in banner) {
if (type.indexOf("=") >= 0)
@@ -517,7 +562,7 @@
}
if (stdin) {
let stdinKeys = /* @__PURE__ */ Object.create(null);
- let contents = getFlag(stdin, stdinKeys, "contents", mustBeString);
+ let contents = getFlag(stdin, stdinKeys, "contents", mustBeStringOrUint8Array);
let resolveDir = getFlag(stdin, stdinKeys, "resolveDir", mustBeString);
let sourcefile = getFlag(stdin, stdinKeys, "sourcefile", mustBeString);
let loader2 = getFlag(stdin, stdinKeys, "loader", mustBeString);
@@ -528,7 +573,10 @@
flags.push(`--loader=${loader2}`);
if (resolveDir)
stdinResolveDir = resolveDir + "";
- stdinContents = contents ? contents + "" : "";
+ if (typeof contents === "string")
+ stdinContents = encodeUTF8(contents);
+ else if (contents instanceof Uint8Array)
+ stdinContents = contents;
}
let nodePaths = [];
if (nodePathsInput) {
@@ -546,7 +594,8 @@
absWorkingDir,
incremental,
nodePaths,
- watch: watchMode
+ watch: watchMode,
+ mangleCache: validateMangleCache(mangleCache)
};
}
function flagsForTransformOptions(callName, options, isTTY2, logLevelDefault) {
@@ -560,6 +609,7 @@
let loader = getFlag(options, keys, "loader", mustBeString);
let banner = getFlag(options, keys, "banner", mustBeString);
let footer = getFlag(options, keys, "footer", mustBeString);
+ let mangleCache = getFlag(options, keys, "mangleCache", mustBeObject);
checkForInvalidFlags(options, keys, `in ${callName}() call`);
if (sourcemap)
flags.push(`--sourcemap=${sourcemap === true ? "external" : sourcemap}`);
@@ -573,14 +623,15 @@
flags.push(`--banner=${banner}`);
if (footer)
flags.push(`--footer=${footer}`);
- return flags;
+ return {
+ flags,
+ mangleCache: validateMangleCache(mangleCache)
+ };
}
function createChannel(streamIn) {
- let responseCallbacks = /* @__PURE__ */ new Map();
- let pluginCallbacks = /* @__PURE__ */ new Map();
- let watchCallbacks = /* @__PURE__ */ new Map();
- let serveCallbacks = /* @__PURE__ */ new Map();
- let isClosed = false;
+ const requestCallbacksByKey = {};
+ const closeData = { didClose: false, reason: "" };
+ let responseCallbacks = {};
let nextRequestID = 0;
let nextBuildKey = 0;
let stdout = new Uint8Array(16 * 1024);
@@ -609,105 +660,54 @@
stdoutUsed -= offset;
}
};
- let afterClose = () => {
- isClosed = true;
- for (let callback of responseCallbacks.values()) {
- callback("The service was stopped", null);
+ let afterClose = (error) => {
+ closeData.didClose = true;
+ if (error)
+ closeData.reason = ": " + (error.message || error);
+ const text = "The service was stopped" + closeData.reason;
+ for (let id in responseCallbacks) {
+ responseCallbacks[id](text, null);
}
- responseCallbacks.clear();
- for (let callbacks of serveCallbacks.values()) {
- callbacks.onWait("The service was stopped");
- }
- serveCallbacks.clear();
- for (let callback of watchCallbacks.values()) {
- try {
- callback(new Error("The service was stopped"), null);
- } catch (e) {
- console.error(e);
- }
- }
- watchCallbacks.clear();
+ responseCallbacks = {};
};
let sendRequest = (refs, value, callback) => {
- if (isClosed)
- return callback("The service is no longer running", null);
+ if (closeData.didClose)
+ return callback("The service is no longer running" + closeData.reason, null);
let id = nextRequestID++;
- responseCallbacks.set(id, (error, response) => {
+ responseCallbacks[id] = (error, response) => {
try {
callback(error, response);
} finally {
if (refs)
refs.unref();
}
- });
+ };
if (refs)
refs.ref();
streamIn.writeToStdin(encodePacket({ id, isRequest: true, value }));
};
let sendResponse = (id, value) => {
- if (isClosed)
- throw new Error("The service is no longer running");
+ if (closeData.didClose)
+ throw new Error("The service is no longer running" + closeData.reason);
streamIn.writeToStdin(encodePacket({ id, isRequest: false, value }));
};
let handleRequest = async (id, request) => {
try {
- switch (request.command) {
- case "ping": {
- sendResponse(id, {});
- break;
- }
- case "on-start": {
- let callback = pluginCallbacks.get(request.key);
- if (!callback)
- sendResponse(id, {});
- else
- sendResponse(id, await callback(request));
- break;
- }
- case "on-resolve": {
- let callback = pluginCallbacks.get(request.key);
- if (!callback)
- sendResponse(id, {});
- else
- sendResponse(id, await callback(request));
- break;
- }
- case "on-load": {
- let callback = pluginCallbacks.get(request.key);
- if (!callback)
- sendResponse(id, {});
- else
- sendResponse(id, await callback(request));
- break;
- }
- case "serve-request": {
- let callbacks = serveCallbacks.get(request.key);
- if (callbacks && callbacks.onRequest)
- callbacks.onRequest(request.args);
- sendResponse(id, {});
- break;
- }
- case "serve-wait": {
- let callbacks = serveCallbacks.get(request.key);
- if (callbacks)
- callbacks.onWait(request.error);
- sendResponse(id, {});
- break;
- }
- case "watch-rebuild": {
- let callback = watchCallbacks.get(request.key);
- try {
- if (callback)
- callback(null, request.args);
- } catch (err) {
- console.error(err);
- }
- sendResponse(id, {});
- break;
- }
- default:
- throw new Error(`Invalid command: ` + request.command);
+ if (request.command === "ping") {
+ sendResponse(id, {});
+ return;
}
+ if (typeof request.key === "number") {
+ const requestCallbacks = requestCallbacksByKey[request.key];
+ if (requestCallbacks) {
+ const callback = requestCallbacks[request.command];
+ if (callback) {
+ await callback(id, request);
+ return;
+ }
+ }
+ }
+ throw new Error(`Invalid command: ` + request.command);
} catch (e) {
sendResponse(id, { errors: [extractErrorMessageV8(e, streamIn, null, void 0, "")] });
}
@@ -717,8 +717,8 @@
if (isFirstPacket) {
isFirstPacket = false;
let binaryVersion = String.fromCharCode(...bytes);
- if (binaryVersion !== "0.14.13") {
- throw new Error(`Cannot start service: Host version "${"0.14.13"}" does not match binary version ${JSON.stringify(binaryVersion)}`);
+ if (binaryVersion !== "0.15.16") {
+ throw new Error(`Cannot start service: Host version "${"0.15.16"}" does not match binary version ${JSON.stringify(binaryVersion)}`);
}
return;
}
@@ -726,622 +726,89 @@
if (packet.isRequest) {
handleRequest(packet.id, packet.value);
} else {
- let callback = responseCallbacks.get(packet.id);
- responseCallbacks.delete(packet.id);
+ let callback = responseCallbacks[packet.id];
+ delete responseCallbacks[packet.id];
if (packet.value.error)
callback(packet.value.error, {});
else
callback(null, packet.value);
}
};
- let handlePlugins = async (initialOptions, plugins, buildKey, stash, refs) => {
- let onStartCallbacks = [];
- let onEndCallbacks = [];
- let onResolveCallbacks = {};
- let onLoadCallbacks = {};
- let nextCallbackID = 0;
- let i = 0;
- let requestPlugins = [];
- let isSetupDone = false;
- plugins = [...plugins];
- for (let item of plugins) {
- let keys = {};
- if (typeof item !== "object")
- throw new Error(`Plugin at index ${i} must be an object`);
- const name = getFlag(item, keys, "name", mustBeString);
- if (typeof name !== "string" || name === "")
- throw new Error(`Plugin at index ${i} is missing a name`);
- try {
- let setup = getFlag(item, keys, "setup", mustBeFunction);
- if (typeof setup !== "function")
- throw new Error(`Plugin is missing a setup function`);
- checkForInvalidFlags(item, keys, `on plugin ${JSON.stringify(name)}`);
- let plugin = {
- name,
- onResolve: [],
- onLoad: []
- };
- i++;
- let resolve = (path3, options = {}) => {
- if (!isSetupDone)
- throw new Error('Cannot call "resolve" before plugin setup has completed');
- if (typeof path3 !== "string")
- throw new Error(`The path to resolve must be a string`);
- let keys2 = /* @__PURE__ */ Object.create(null);
- let pluginName = getFlag(options, keys2, "pluginName", mustBeString);
- let importer = getFlag(options, keys2, "importer", mustBeString);
- let namespace = getFlag(options, keys2, "namespace", mustBeString);
- let resolveDir = getFlag(options, keys2, "resolveDir", mustBeString);
- let kind = getFlag(options, keys2, "kind", mustBeString);
- let pluginData = getFlag(options, keys2, "pluginData", canBeAnything);
- checkForInvalidFlags(options, keys2, "in resolve() call");
- return new Promise((resolve2, reject) => {
- const request = {
- command: "resolve",
- path: path3,
- key: buildKey,
- pluginName: name
- };
- if (pluginName != null)
- request.pluginName = pluginName;
- if (importer != null)
- request.importer = importer;
- if (namespace != null)
- request.namespace = namespace;
- if (resolveDir != null)
- request.resolveDir = resolveDir;
- if (kind != null)
- request.kind = kind;
- if (pluginData != null)
- request.pluginData = stash.store(pluginData);
- sendRequest(refs, request, (error, response) => {
- if (error !== null)
- reject(new Error(error));
- else
- resolve2({
- errors: replaceDetailsInMessages(response.errors, stash),
- warnings: replaceDetailsInMessages(response.warnings, stash),
- path: response.path,
- external: response.external,
- sideEffects: response.sideEffects,
- namespace: response.namespace,
- suffix: response.suffix,
- pluginData: stash.load(response.pluginData)
- });
- });
- });
- };
- let promise = setup({
- initialOptions,
- resolve,
- onStart(callback2) {
- let registeredText = `This error came from the "onStart" callback registered here:`;
- let registeredNote = extractCallerV8(new Error(registeredText), streamIn, "onStart");
- onStartCallbacks.push({ name, callback: callback2, note: registeredNote });
- },
- onEnd(callback2) {
- let registeredText = `This error came from the "onEnd" callback registered here:`;
- let registeredNote = extractCallerV8(new Error(registeredText), streamIn, "onEnd");
- onEndCallbacks.push({ name, callback: callback2, note: registeredNote });
- },
- onResolve(options, callback2) {
- let registeredText = `This error came from the "onResolve" callback registered here:`;
- let registeredNote = extractCallerV8(new Error(registeredText), streamIn, "onResolve");
- let keys2 = {};
- let filter = getFlag(options, keys2, "filter", mustBeRegExp);
- let namespace = getFlag(options, keys2, "namespace", mustBeString);
- checkForInvalidFlags(options, keys2, `in onResolve() call for plugin ${JSON.stringify(name)}`);
- if (filter == null)
- throw new Error(`onResolve() call is missing a filter`);
- let id = nextCallbackID++;
- onResolveCallbacks[id] = { name, callback: callback2, note: registeredNote };
- plugin.onResolve.push({ id, filter: filter.source, namespace: namespace || "" });
- },
- onLoad(options, callback2) {
- let registeredText = `This error came from the "onLoad" callback registered here:`;
- let registeredNote = extractCallerV8(new Error(registeredText), streamIn, "onLoad");
- let keys2 = {};
- let filter = getFlag(options, keys2, "filter", mustBeRegExp);
- let namespace = getFlag(options, keys2, "namespace", mustBeString);
- checkForInvalidFlags(options, keys2, `in onLoad() call for plugin ${JSON.stringify(name)}`);
- if (filter == null)
- throw new Error(`onLoad() call is missing a filter`);
- let id = nextCallbackID++;
- onLoadCallbacks[id] = { name, callback: callback2, note: registeredNote };
- plugin.onLoad.push({ id, filter: filter.source, namespace: namespace || "" });
- },
- esbuild: streamIn.esbuild
- });
- if (promise)
- await promise;
- requestPlugins.push(plugin);
- } catch (e) {
- return { ok: false, error: e, pluginName: name };
- }
- }
- const callback = async (request) => {
- switch (request.command) {
- case "on-start": {
- let response = { errors: [], warnings: [] };
- await Promise.all(onStartCallbacks.map(async ({ name, callback: callback2, note }) => {
- try {
- let result = await callback2();
- if (result != null) {
- if (typeof result !== "object")
- throw new Error(`Expected onStart() callback in plugin ${JSON.stringify(name)} to return an object`);
- let keys = {};
- let errors = getFlag(result, keys, "errors", mustBeArray);
- let warnings = getFlag(result, keys, "warnings", mustBeArray);
- checkForInvalidFlags(result, keys, `from onStart() callback in plugin ${JSON.stringify(name)}`);
- if (errors != null)
- response.errors.push(...sanitizeMessages(errors, "errors", stash, name));
- if (warnings != null)
- response.warnings.push(...sanitizeMessages(warnings, "warnings", stash, name));
- }
- } catch (e) {
- response.errors.push(extractErrorMessageV8(e, streamIn, stash, note && note(), name));
- }
- }));
- return response;
- }
- case "on-resolve": {
- let response = {}, name = "", callback2, note;
- for (let id of request.ids) {
- try {
- ({ name, callback: callback2, note } = onResolveCallbacks[id]);
- let result = await callback2({
- path: request.path,
- importer: request.importer,
- namespace: request.namespace,
- resolveDir: request.resolveDir,
- kind: request.kind,
- pluginData: stash.load(request.pluginData)
- });
- if (result != null) {
- if (typeof result !== "object")
- throw new Error(`Expected onResolve() callback in plugin ${JSON.stringify(name)} to return an object`);
- let keys = {};
- let pluginName = getFlag(result, keys, "pluginName", mustBeString);
- let path3 = getFlag(result, keys, "path", mustBeString);
- let namespace = getFlag(result, keys, "namespace", mustBeString);
- let suffix = getFlag(result, keys, "suffix", mustBeString);
- let external = getFlag(result, keys, "external", mustBeBoolean);
- let sideEffects = getFlag(result, keys, "sideEffects", mustBeBoolean);
- let pluginData = getFlag(result, keys, "pluginData", canBeAnything);
- let errors = getFlag(result, keys, "errors", mustBeArray);
- let warnings = getFlag(result, keys, "warnings", mustBeArray);
- let watchFiles = getFlag(result, keys, "watchFiles", mustBeArray);
- let watchDirs = getFlag(result, keys, "watchDirs", mustBeArray);
- checkForInvalidFlags(result, keys, `from onResolve() callback in plugin ${JSON.stringify(name)}`);
- response.id = id;
- if (pluginName != null)
- response.pluginName = pluginName;
- if (path3 != null)
- response.path = path3;
- if (namespace != null)
- response.namespace = namespace;
- if (suffix != null)
- response.suffix = suffix;
- if (external != null)
- response.external = external;
- if (sideEffects != null)
- response.sideEffects = sideEffects;
- if (pluginData != null)
- response.pluginData = stash.store(pluginData);
- if (errors != null)
- response.errors = sanitizeMessages(errors, "errors", stash, name);
- if (warnings != null)
- response.warnings = sanitizeMessages(warnings, "warnings", stash, name);
- if (watchFiles != null)
- response.watchFiles = sanitizeStringArray(watchFiles, "watchFiles");
- if (watchDirs != null)
- response.watchDirs = sanitizeStringArray(watchDirs, "watchDirs");
- break;
- }
- } catch (e) {
- return { id, errors: [extractErrorMessageV8(e, streamIn, stash, note && note(), name)] };
- }
- }
- return response;
- }
- case "on-load": {
- let response = {}, name = "", callback2, note;
- for (let id of request.ids) {
- try {
- ({ name, callback: callback2, note } = onLoadCallbacks[id]);
- let result = await callback2({
- path: request.path,
- namespace: request.namespace,
- suffix: request.suffix,
- pluginData: stash.load(request.pluginData)
- });
- if (result != null) {
- if (typeof result !== "object")
- throw new Error(`Expected onLoad() callback in plugin ${JSON.stringify(name)} to return an object`);
- let keys = {};
- let pluginName = getFlag(result, keys, "pluginName", mustBeString);
- let contents = getFlag(result, keys, "contents", mustBeStringOrUint8Array);
- let resolveDir = getFlag(result, keys, "resolveDir", mustBeString);
- let pluginData = getFlag(result, keys, "pluginData", canBeAnything);
- let loader = getFlag(result, keys, "loader", mustBeString);
- let errors = getFlag(result, keys, "errors", mustBeArray);
- let warnings = getFlag(result, keys, "warnings", mustBeArray);
- let watchFiles = getFlag(result, keys, "watchFiles", mustBeArray);
- let watchDirs = getFlag(result, keys, "watchDirs", mustBeArray);
- checkForInvalidFlags(result, keys, `from onLoad() callback in plugin ${JSON.stringify(name)}`);
- response.id = id;
- if (pluginName != null)
- response.pluginName = pluginName;
- if (contents instanceof Uint8Array)
- response.contents = contents;
- else if (contents != null)
- response.contents = encodeUTF8(contents);
- if (resolveDir != null)
- response.resolveDir = resolveDir;
- if (pluginData != null)
- response.pluginData = stash.store(pluginData);
- if (loader != null)
- response.loader = loader;
- if (errors != null)
- response.errors = sanitizeMessages(errors, "errors", stash, name);
- if (warnings != null)
- response.warnings = sanitizeMessages(warnings, "warnings", stash, name);
- if (watchFiles != null)
- response.watchFiles = sanitizeStringArray(watchFiles, "watchFiles");
- if (watchDirs != null)
- response.watchDirs = sanitizeStringArray(watchDirs, "watchDirs");
- break;
- }
- } catch (e) {
- return { id, errors: [extractErrorMessageV8(e, streamIn, stash, note && note(), name)] };
- }
- }
- return response;
- }
- default:
- throw new Error(`Invalid command: ` + request.command);
- }
- };
- let runOnEndCallbacks = (result, logPluginError, done) => done();
- if (onEndCallbacks.length > 0) {
- runOnEndCallbacks = (result, logPluginError, done) => {
- (async () => {
- for (const { name, callback: callback2, note } of onEndCallbacks) {
- try {
- await callback2(result);
- } catch (e) {
- result.errors.push(await new Promise((resolve) => logPluginError(e, name, note && note(), resolve)));
- }
- }
- })().then(done);
- };
- }
- isSetupDone = true;
+ let buildOrServe = ({ callName, refs, serveOptions, options, isTTY: isTTY2, defaultWD: defaultWD2, callback }) => {
let refCount = 0;
- return {
- ok: true,
- requestPlugins,
- runOnEndCallbacks,
- pluginRefs: {
- ref() {
- if (++refCount === 1)
- pluginCallbacks.set(buildKey, callback);
- },
- unref() {
- if (--refCount === 0)
- pluginCallbacks.delete(buildKey);
- }
- }
- };
- };
- let buildServeData = (refs, options, request, key) => {
- let keys = {};
- let port = getFlag(options, keys, "port", mustBeInteger);
- let host = getFlag(options, keys, "host", mustBeString);
- let servedir = getFlag(options, keys, "servedir", mustBeString);
- let onRequest = getFlag(options, keys, "onRequest", mustBeFunction);
- let onWait;
- let wait = new Promise((resolve, reject) => {
- onWait = (error) => {
- serveCallbacks.delete(key);
- if (error !== null)
- reject(new Error(error));
- else
- resolve();
- };
- });
- request.serve = {};
- checkForInvalidFlags(options, keys, `in serve() call`);
- if (port !== void 0)
- request.serve.port = port;
- if (host !== void 0)
- request.serve.host = host;
- if (servedir !== void 0)
- request.serve.servedir = servedir;
- serveCallbacks.set(key, {
- onRequest,
- onWait
- });
- return {
- wait,
- stop() {
- sendRequest(refs, { command: "serve-stop", key }, () => {
- });
- }
- };
- };
- const buildLogLevelDefault = "warning";
- const transformLogLevelDefault = "silent";
- let buildOrServe = (args) => {
- let key = nextBuildKey++;
- const details = createObjectStash();
- let plugins;
- let { refs, options, isTTY: isTTY2, callback } = args;
- if (typeof options === "object") {
- let value = options.plugins;
- if (value !== void 0) {
- if (!Array.isArray(value))
- throw new Error(`"plugins" must be an array`);
- plugins = value;
- }
- }
- let logPluginError = (e, pluginName, note, done) => {
- let flags = [];
- try {
- pushLogFlags(flags, options, {}, isTTY2, buildLogLevelDefault);
- } catch {
- }
- const message = extractErrorMessageV8(e, streamIn, details, note, pluginName);
- sendRequest(refs, { command: "error", flags, error: message }, () => {
- message.detail = details.load(message.detail);
- done(message);
- });
- };
- let handleError = (e, pluginName) => {
- logPluginError(e, pluginName, void 0, (error) => {
- callback(failureErrorWithLog("Build failed", [error], []), null);
- });
- };
- if (plugins && plugins.length > 0) {
- if (streamIn.isSync)
- return handleError(new Error("Cannot use plugins in synchronous API calls"), "");
- handlePlugins(options, plugins, key, details, refs).then((result) => {
- if (!result.ok) {
- handleError(result.error, result.pluginName);
- } else {
- try {
- buildOrServeContinue(__spreadProps(__spreadValues({}, args), {
- key,
- details,
- logPluginError,
- requestPlugins: result.requestPlugins,
- runOnEndCallbacks: result.runOnEndCallbacks,
- pluginRefs: result.pluginRefs
- }));
- } catch (e) {
- handleError(e, "");
- }
- }
- }, (e) => handleError(e, ""));
- } else {
- try {
- buildOrServeContinue(__spreadProps(__spreadValues({}, args), {
- key,
- details,
- logPluginError,
- requestPlugins: null,
- runOnEndCallbacks: (result, logPluginError2, done) => done(),
- pluginRefs: null
- }));
- } catch (e) {
- handleError(e, "");
- }
- }
- };
- let buildOrServeContinue = ({
- callName,
- refs: callerRefs,
- serveOptions,
- options,
- isTTY: isTTY2,
- defaultWD: defaultWD2,
- callback,
- key,
- details,
- logPluginError,
- requestPlugins,
- runOnEndCallbacks,
- pluginRefs
- }) => {
- const refs = {
+ const buildKey = nextBuildKey++;
+ const requestCallbacks = {};
+ const buildRefs = {
ref() {
- if (pluginRefs)
- pluginRefs.ref();
- if (callerRefs)
- callerRefs.ref();
+ if (++refCount === 1) {
+ if (refs)
+ refs.ref();
+ }
},
unref() {
- if (pluginRefs)
- pluginRefs.unref();
- if (callerRefs)
- callerRefs.unref();
- }
- };
- let writeDefault = !streamIn.isBrowser;
- let {
- entries,
- flags,
- write,
- stdinContents,
- stdinResolveDir,
- absWorkingDir,
- incremental,
- nodePaths,
- watch
- } = flagsForBuildOptions(callName, options, isTTY2, buildLogLevelDefault, writeDefault);
- let request = {
- command: "build",
- key,
- entries,
- flags,
- write,
- stdinContents,
- stdinResolveDir,
- absWorkingDir: absWorkingDir || defaultWD2,
- incremental,
- nodePaths
- };
- if (requestPlugins)
- request.plugins = requestPlugins;
- let serve2 = serveOptions && buildServeData(refs, serveOptions, request, key);
- let rebuild;
- let stop;
- let copyResponseToResult = (response, result) => {
- if (response.outputFiles)
- result.outputFiles = response.outputFiles.map(convertOutputFiles);
- if (response.metafile)
- result.metafile = JSON.parse(response.metafile);
- if (response.writeToStdout !== void 0)
- console.log(decodeUTF8(response.writeToStdout).replace(/\n$/, ""));
- };
- let buildResponseToResult = (response, callback2) => {
- let result = {
- errors: replaceDetailsInMessages(response.errors, details),
- warnings: replaceDetailsInMessages(response.warnings, details)
- };
- copyResponseToResult(response, result);
- runOnEndCallbacks(result, logPluginError, () => {
- if (result.errors.length > 0) {
- return callback2(failureErrorWithLog("Build failed", result.errors, result.warnings), null);
- }
- if (response.rebuild) {
- if (!rebuild) {
- let isDisposed = false;
- rebuild = () => new Promise((resolve, reject) => {
- if (isDisposed || isClosed)
- throw new Error("Cannot rebuild");
- sendRequest(refs, { command: "rebuild", key }, (error2, response2) => {
- if (error2) {
- const message = { pluginName: "", text: error2, location: null, notes: [], detail: void 0 };
- return callback2(failureErrorWithLog("Build failed", [message], []), null);
- }
- buildResponseToResult(response2, (error3, result3) => {
- if (error3)
- reject(error3);
- else
- resolve(result3);
- });
- });
- });
- refs.ref();
- rebuild.dispose = () => {
- if (isDisposed)
- return;
- isDisposed = true;
- sendRequest(refs, { command: "rebuild-dispose", key }, () => {
- });
- refs.unref();
- };
- }
- result.rebuild = rebuild;
- }
- if (response.watch) {
- if (!stop) {
- let isStopped = false;
- refs.ref();
- stop = () => {
- if (isStopped)
- return;
- isStopped = true;
- watchCallbacks.delete(key);
- sendRequest(refs, { command: "watch-stop", key }, () => {
- });
- refs.unref();
- };
- if (watch) {
- watchCallbacks.set(key, (serviceStopError, watchResponse) => {
- if (serviceStopError) {
- if (watch.onRebuild)
- watch.onRebuild(serviceStopError, null);
- return;
- }
- let result2 = {
- errors: replaceDetailsInMessages(watchResponse.errors, details),
- warnings: replaceDetailsInMessages(watchResponse.warnings, details)
- };
- copyResponseToResult(watchResponse, result2);
- runOnEndCallbacks(result2, logPluginError, () => {
- if (result2.errors.length > 0) {
- if (watch.onRebuild)
- watch.onRebuild(failureErrorWithLog("Build failed", result2.errors, result2.warnings), null);
- return;
- }
- if (watchResponse.rebuildID !== void 0)
- result2.rebuild = rebuild;
- result2.stop = stop;
- if (watch.onRebuild)
- watch.onRebuild(null, result2);
- });
- });
- }
- }
- result.stop = stop;
- }
- callback2(null, result);
- });
- };
- if (write && streamIn.isBrowser)
- throw new Error(`Cannot enable "write" in the browser`);
- if (incremental && streamIn.isSync)
- throw new Error(`Cannot use "incremental" with a synchronous build`);
- if (watch && streamIn.isSync)
- throw new Error(`Cannot use "watch" with a synchronous build`);
- sendRequest(refs, request, (error, response) => {
- if (error)
- return callback(new Error(error), null);
- if (serve2) {
- let serveResponse = response;
- let isStopped = false;
- refs.ref();
- let result = {
- port: serveResponse.port,
- host: serveResponse.host,
- wait: serve2.wait,
- stop() {
- if (isStopped)
- return;
- isStopped = true;
- serve2.stop();
+ if (--refCount === 0) {
+ delete requestCallbacksByKey[buildKey];
+ if (refs)
refs.unref();
- }
- };
- refs.ref();
- serve2.wait.then(refs.unref, refs.unref);
- return callback(null, result);
+ }
}
- return buildResponseToResult(response, callback);
- });
+ };
+ requestCallbacksByKey[buildKey] = requestCallbacks;
+ buildRefs.ref();
+ buildOrServeImpl(
+ callName,
+ buildKey,
+ sendRequest,
+ sendResponse,
+ buildRefs,
+ streamIn,
+ requestCallbacks,
+ options,
+ serveOptions,
+ isTTY2,
+ defaultWD2,
+ closeData,
+ (err, res) => {
+ try {
+ callback(err, res);
+ } finally {
+ buildRefs.unref();
+ }
+ }
+ );
};
let transform2 = ({ callName, refs, input, options, isTTY: isTTY2, fs: fs3, callback }) => {
const details = createObjectStash();
let start = (inputPath) => {
try {
- if (typeof input !== "string")
- throw new Error('The input to "transform" must be a string');
- let flags = flagsForTransformOptions(callName, options, isTTY2, transformLogLevelDefault);
+ if (typeof input !== "string" && !(input instanceof Uint8Array))
+ throw new Error('The input to "transform" must be a string or a Uint8Array');
+ let {
+ flags,
+ mangleCache
+ } = flagsForTransformOptions(callName, options, isTTY2, transformLogLevelDefault);
let request = {
command: "transform",
flags,
inputFS: inputPath !== null,
- input: inputPath !== null ? inputPath : input
+ input: inputPath !== null ? encodeUTF8(inputPath) : typeof input === "string" ? encodeUTF8(input) : input
};
+ if (mangleCache)
+ request.mangleCache = mangleCache;
sendRequest(refs, request, (error, response) => {
if (error)
return callback(new Error(error), null);
let errors = replaceDetailsInMessages(response.errors, details);
let warnings = replaceDetailsInMessages(response.warnings, details);
let outstanding = 1;
- let next = () => --outstanding === 0 && callback(null, { warnings, code: response.code, map: response.map });
+ let next = () => {
+ if (--outstanding === 0) {
+ let result = { warnings, code: response.code, map: response.map };
+ if (response.mangleCache)
+ result.mangleCache = response == null ? void 0 : response.mangleCache;
+ callback(null, result);
+ }
+ };
if (errors.length > 0)
return callback(failureErrorWithLog("Transform failed", errors, warnings), null);
if (response.codeFS) {
@@ -1381,7 +848,7 @@
});
}
};
- if (typeof input === "string" && input.length > 1024 * 1024) {
+ if ((typeof input === "string" || input instanceof Uint8Array) && input.length > 1024 * 1024) {
let next = start;
start = () => fs3.writeFile(input, next);
}
@@ -1447,6 +914,556 @@
}
};
}
+function buildOrServeImpl(callName, buildKey, sendRequest, sendResponse, refs, streamIn, requestCallbacks, options, serveOptions, isTTY2, defaultWD2, closeData, callback) {
+ const details = createObjectStash();
+ const logPluginError = (e, pluginName, note, done) => {
+ const flags = [];
+ try {
+ pushLogFlags(flags, options, {}, isTTY2, buildLogLevelDefault);
+ } catch {
+ }
+ const message = extractErrorMessageV8(e, streamIn, details, note, pluginName);
+ sendRequest(refs, { command: "error", flags, error: message }, () => {
+ message.detail = details.load(message.detail);
+ done(message);
+ });
+ };
+ const handleError = (e, pluginName) => {
+ logPluginError(e, pluginName, void 0, (error) => {
+ callback(failureErrorWithLog("Build failed", [error], []), null);
+ });
+ };
+ let plugins;
+ if (typeof options === "object") {
+ const value = options.plugins;
+ if (value !== void 0) {
+ if (!Array.isArray(value))
+ throw new Error(`"plugins" must be an array`);
+ plugins = value;
+ }
+ }
+ if (plugins && plugins.length > 0) {
+ if (streamIn.isSync) {
+ handleError(new Error("Cannot use plugins in synchronous API calls"), "");
+ return;
+ }
+ handlePlugins(
+ buildKey,
+ sendRequest,
+ sendResponse,
+ refs,
+ streamIn,
+ requestCallbacks,
+ options,
+ plugins,
+ details
+ ).then(
+ (result) => {
+ if (!result.ok) {
+ handleError(result.error, result.pluginName);
+ return;
+ }
+ try {
+ buildOrServeContinue(result.requestPlugins, result.runOnEndCallbacks);
+ } catch (e) {
+ handleError(e, "");
+ }
+ },
+ (e) => handleError(e, "")
+ );
+ return;
+ }
+ try {
+ buildOrServeContinue(null, (result, logPluginError2, done) => done());
+ } catch (e) {
+ handleError(e, "");
+ }
+ function buildOrServeContinue(requestPlugins, runOnEndCallbacks) {
+ let writeDefault = !streamIn.isWriteUnavailable;
+ let {
+ entries,
+ flags,
+ write,
+ stdinContents,
+ stdinResolveDir,
+ absWorkingDir,
+ incremental,
+ nodePaths,
+ watch,
+ mangleCache
+ } = flagsForBuildOptions(callName, options, isTTY2, buildLogLevelDefault, writeDefault);
+ let request = {
+ command: "build",
+ key: buildKey,
+ entries,
+ flags,
+ write,
+ stdinContents,
+ stdinResolveDir,
+ absWorkingDir: absWorkingDir || defaultWD2,
+ incremental,
+ nodePaths
+ };
+ if (requestPlugins)
+ request.plugins = requestPlugins;
+ if (mangleCache)
+ request.mangleCache = mangleCache;
+ let serve2 = serveOptions && buildServeData(buildKey, sendRequest, sendResponse, refs, requestCallbacks, serveOptions, request);
+ let rebuild;
+ let stop;
+ let copyResponseToResult = (response, result) => {
+ if (response.outputFiles)
+ result.outputFiles = response.outputFiles.map(convertOutputFiles);
+ if (response.metafile)
+ result.metafile = JSON.parse(response.metafile);
+ if (response.mangleCache)
+ result.mangleCache = response.mangleCache;
+ if (response.writeToStdout !== void 0)
+ console.log(decodeUTF8(response.writeToStdout).replace(/\n$/, ""));
+ };
+ let buildResponseToResult = (response, callback2) => {
+ let result = {
+ errors: replaceDetailsInMessages(response.errors, details),
+ warnings: replaceDetailsInMessages(response.warnings, details)
+ };
+ copyResponseToResult(response, result);
+ runOnEndCallbacks(result, logPluginError, () => {
+ if (result.errors.length > 0) {
+ return callback2(failureErrorWithLog("Build failed", result.errors, result.warnings), null);
+ }
+ if (response.rebuild) {
+ if (!rebuild) {
+ let isDisposed = false;
+ rebuild = () => new Promise((resolve, reject) => {
+ if (isDisposed || closeData.didClose)
+ throw new Error("Cannot rebuild");
+ sendRequest(
+ refs,
+ { command: "rebuild", key: buildKey },
+ (error2, response2) => {
+ if (error2) {
+ const message = { id: "", pluginName: "", text: error2, location: null, notes: [], detail: void 0 };
+ return callback2(failureErrorWithLog("Build failed", [message], []), null);
+ }
+ buildResponseToResult(response2, (error3, result3) => {
+ if (error3)
+ reject(error3);
+ else
+ resolve(result3);
+ });
+ }
+ );
+ });
+ refs.ref();
+ rebuild.dispose = () => {
+ if (isDisposed)
+ return;
+ isDisposed = true;
+ sendRequest(refs, { command: "rebuild-dispose", key: buildKey }, () => {
+ });
+ refs.unref();
+ };
+ }
+ result.rebuild = rebuild;
+ }
+ if (response.watch) {
+ if (!stop) {
+ let isStopped = false;
+ refs.ref();
+ stop = () => {
+ if (isStopped)
+ return;
+ isStopped = true;
+ delete requestCallbacks["watch-rebuild"];
+ sendRequest(refs, { command: "watch-stop", key: buildKey }, () => {
+ });
+ refs.unref();
+ };
+ if (watch) {
+ requestCallbacks["watch-rebuild"] = (id, request2) => {
+ try {
+ let watchResponse = request2.args;
+ let result2 = {
+ errors: replaceDetailsInMessages(watchResponse.errors, details),
+ warnings: replaceDetailsInMessages(watchResponse.warnings, details)
+ };
+ copyResponseToResult(watchResponse, result2);
+ runOnEndCallbacks(result2, logPluginError, () => {
+ if (result2.errors.length > 0) {
+ if (watch.onRebuild)
+ watch.onRebuild(failureErrorWithLog("Build failed", result2.errors, result2.warnings), null);
+ return;
+ }
+ result2.stop = stop;
+ if (watch.onRebuild)
+ watch.onRebuild(null, result2);
+ });
+ } catch (err) {
+ console.error(err);
+ }
+ sendResponse(id, {});
+ };
+ }
+ }
+ result.stop = stop;
+ }
+ callback2(null, result);
+ });
+ };
+ if (write && streamIn.isWriteUnavailable)
+ throw new Error(`The "write" option is unavailable in this environment`);
+ if (incremental && streamIn.isSync)
+ throw new Error(`Cannot use "incremental" with a synchronous build`);
+ if (watch && streamIn.isSync)
+ throw new Error(`Cannot use "watch" with a synchronous build`);
+ sendRequest(refs, request, (error, response) => {
+ if (error)
+ return callback(new Error(error), null);
+ if (serve2) {
+ let serveResponse = response;
+ let isStopped = false;
+ refs.ref();
+ let result = {
+ port: serveResponse.port,
+ host: serveResponse.host,
+ wait: serve2.wait,
+ stop() {
+ if (isStopped)
+ return;
+ isStopped = true;
+ serve2.stop();
+ refs.unref();
+ }
+ };
+ refs.ref();
+ serve2.wait.then(refs.unref, refs.unref);
+ return callback(null, result);
+ }
+ return buildResponseToResult(response, callback);
+ });
+ }
+}
+var buildServeData = (buildKey, sendRequest, sendResponse, refs, requestCallbacks, options, request) => {
+ let keys = {};
+ let port = getFlag(options, keys, "port", mustBeInteger);
+ let host = getFlag(options, keys, "host", mustBeString);
+ let servedir = getFlag(options, keys, "servedir", mustBeString);
+ let onRequest = getFlag(options, keys, "onRequest", mustBeFunction);
+ let wait = new Promise((resolve, reject) => {
+ requestCallbacks["serve-wait"] = (id, request2) => {
+ if (request2.error !== null)
+ reject(new Error(request2.error));
+ else
+ resolve();
+ sendResponse(id, {});
+ };
+ });
+ request.serve = {};
+ checkForInvalidFlags(options, keys, `in serve() call`);
+ if (port !== void 0)
+ request.serve.port = port;
+ if (host !== void 0)
+ request.serve.host = host;
+ if (servedir !== void 0)
+ request.serve.servedir = servedir;
+ requestCallbacks["serve-request"] = (id, request2) => {
+ if (onRequest)
+ onRequest(request2.args);
+ sendResponse(id, {});
+ };
+ return {
+ wait,
+ stop() {
+ sendRequest(refs, { command: "serve-stop", key: buildKey }, () => {
+ });
+ }
+ };
+};
+var handlePlugins = async (buildKey, sendRequest, sendResponse, refs, streamIn, requestCallbacks, initialOptions, plugins, details) => {
+ let onStartCallbacks = [];
+ let onEndCallbacks = [];
+ let onResolveCallbacks = {};
+ let onLoadCallbacks = {};
+ let nextCallbackID = 0;
+ let i = 0;
+ let requestPlugins = [];
+ let isSetupDone = false;
+ plugins = [...plugins];
+ for (let item of plugins) {
+ let keys = {};
+ if (typeof item !== "object")
+ throw new Error(`Plugin at index ${i} must be an object`);
+ const name = getFlag(item, keys, "name", mustBeString);
+ if (typeof name !== "string" || name === "")
+ throw new Error(`Plugin at index ${i} is missing a name`);
+ try {
+ let setup = getFlag(item, keys, "setup", mustBeFunction);
+ if (typeof setup !== "function")
+ throw new Error(`Plugin is missing a setup function`);
+ checkForInvalidFlags(item, keys, `on plugin ${JSON.stringify(name)}`);
+ let plugin = {
+ name,
+ onResolve: [],
+ onLoad: []
+ };
+ i++;
+ let resolve = (path3, options = {}) => {
+ if (!isSetupDone)
+ throw new Error('Cannot call "resolve" before plugin setup has completed');
+ if (typeof path3 !== "string")
+ throw new Error(`The path to resolve must be a string`);
+ let keys2 = /* @__PURE__ */ Object.create(null);
+ let pluginName = getFlag(options, keys2, "pluginName", mustBeString);
+ let importer = getFlag(options, keys2, "importer", mustBeString);
+ let namespace = getFlag(options, keys2, "namespace", mustBeString);
+ let resolveDir = getFlag(options, keys2, "resolveDir", mustBeString);
+ let kind = getFlag(options, keys2, "kind", mustBeString);
+ let pluginData = getFlag(options, keys2, "pluginData", canBeAnything);
+ checkForInvalidFlags(options, keys2, "in resolve() call");
+ return new Promise((resolve2, reject) => {
+ const request = {
+ command: "resolve",
+ path: path3,
+ key: buildKey,
+ pluginName: name
+ };
+ if (pluginName != null)
+ request.pluginName = pluginName;
+ if (importer != null)
+ request.importer = importer;
+ if (namespace != null)
+ request.namespace = namespace;
+ if (resolveDir != null)
+ request.resolveDir = resolveDir;
+ if (kind != null)
+ request.kind = kind;
+ if (pluginData != null)
+ request.pluginData = details.store(pluginData);
+ sendRequest(refs, request, (error, response) => {
+ if (error !== null)
+ reject(new Error(error));
+ else
+ resolve2({
+ errors: replaceDetailsInMessages(response.errors, details),
+ warnings: replaceDetailsInMessages(response.warnings, details),
+ path: response.path,
+ external: response.external,
+ sideEffects: response.sideEffects,
+ namespace: response.namespace,
+ suffix: response.suffix,
+ pluginData: details.load(response.pluginData)
+ });
+ });
+ });
+ };
+ let promise = setup({
+ initialOptions,
+ resolve,
+ onStart(callback) {
+ let registeredText = `This error came from the "onStart" callback registered here:`;
+ let registeredNote = extractCallerV8(new Error(registeredText), streamIn, "onStart");
+ onStartCallbacks.push({ name, callback, note: registeredNote });
+ },
+ onEnd(callback) {
+ let registeredText = `This error came from the "onEnd" callback registered here:`;
+ let registeredNote = extractCallerV8(new Error(registeredText), streamIn, "onEnd");
+ onEndCallbacks.push({ name, callback, note: registeredNote });
+ },
+ onResolve(options, callback) {
+ let registeredText = `This error came from the "onResolve" callback registered here:`;
+ let registeredNote = extractCallerV8(new Error(registeredText), streamIn, "onResolve");
+ let keys2 = {};
+ let filter = getFlag(options, keys2, "filter", mustBeRegExp);
+ let namespace = getFlag(options, keys2, "namespace", mustBeString);
+ checkForInvalidFlags(options, keys2, `in onResolve() call for plugin ${JSON.stringify(name)}`);
+ if (filter == null)
+ throw new Error(`onResolve() call is missing a filter`);
+ let id = nextCallbackID++;
+ onResolveCallbacks[id] = { name, callback, note: registeredNote };
+ plugin.onResolve.push({ id, filter: filter.source, namespace: namespace || "" });
+ },
+ onLoad(options, callback) {
+ let registeredText = `This error came from the "onLoad" callback registered here:`;
+ let registeredNote = extractCallerV8(new Error(registeredText), streamIn, "onLoad");
+ let keys2 = {};
+ let filter = getFlag(options, keys2, "filter", mustBeRegExp);
+ let namespace = getFlag(options, keys2, "namespace", mustBeString);
+ checkForInvalidFlags(options, keys2, `in onLoad() call for plugin ${JSON.stringify(name)}`);
+ if (filter == null)
+ throw new Error(`onLoad() call is missing a filter`);
+ let id = nextCallbackID++;
+ onLoadCallbacks[id] = { name, callback, note: registeredNote };
+ plugin.onLoad.push({ id, filter: filter.source, namespace: namespace || "" });
+ },
+ esbuild: streamIn.esbuild
+ });
+ if (promise)
+ await promise;
+ requestPlugins.push(plugin);
+ } catch (e) {
+ return { ok: false, error: e, pluginName: name };
+ }
+ }
+ requestCallbacks["on-start"] = async (id, request) => {
+ let response = { errors: [], warnings: [] };
+ await Promise.all(onStartCallbacks.map(async ({ name, callback, note }) => {
+ try {
+ let result = await callback();
+ if (result != null) {
+ if (typeof result !== "object")
+ throw new Error(`Expected onStart() callback in plugin ${JSON.stringify(name)} to return an object`);
+ let keys = {};
+ let errors = getFlag(result, keys, "errors", mustBeArray);
+ let warnings = getFlag(result, keys, "warnings", mustBeArray);
+ checkForInvalidFlags(result, keys, `from onStart() callback in plugin ${JSON.stringify(name)}`);
+ if (errors != null)
+ response.errors.push(...sanitizeMessages(errors, "errors", details, name));
+ if (warnings != null)
+ response.warnings.push(...sanitizeMessages(warnings, "warnings", details, name));
+ }
+ } catch (e) {
+ response.errors.push(extractErrorMessageV8(e, streamIn, details, note && note(), name));
+ }
+ }));
+ sendResponse(id, response);
+ };
+ requestCallbacks["on-resolve"] = async (id, request) => {
+ let response = {}, name = "", callback, note;
+ for (let id2 of request.ids) {
+ try {
+ ({ name, callback, note } = onResolveCallbacks[id2]);
+ let result = await callback({
+ path: request.path,
+ importer: request.importer,
+ namespace: request.namespace,
+ resolveDir: request.resolveDir,
+ kind: request.kind,
+ pluginData: details.load(request.pluginData)
+ });
+ if (result != null) {
+ if (typeof result !== "object")
+ throw new Error(`Expected onResolve() callback in plugin ${JSON.stringify(name)} to return an object`);
+ let keys = {};
+ let pluginName = getFlag(result, keys, "pluginName", mustBeString);
+ let path3 = getFlag(result, keys, "path", mustBeString);
+ let namespace = getFlag(result, keys, "namespace", mustBeString);
+ let suffix = getFlag(result, keys, "suffix", mustBeString);
+ let external = getFlag(result, keys, "external", mustBeBoolean);
+ let sideEffects = getFlag(result, keys, "sideEffects", mustBeBoolean);
+ let pluginData = getFlag(result, keys, "pluginData", canBeAnything);
+ let errors = getFlag(result, keys, "errors", mustBeArray);
+ let warnings = getFlag(result, keys, "warnings", mustBeArray);
+ let watchFiles = getFlag(result, keys, "watchFiles", mustBeArray);
+ let watchDirs = getFlag(result, keys, "watchDirs", mustBeArray);
+ checkForInvalidFlags(result, keys, `from onResolve() callback in plugin ${JSON.stringify(name)}`);
+ response.id = id2;
+ if (pluginName != null)
+ response.pluginName = pluginName;
+ if (path3 != null)
+ response.path = path3;
+ if (namespace != null)
+ response.namespace = namespace;
+ if (suffix != null)
+ response.suffix = suffix;
+ if (external != null)
+ response.external = external;
+ if (sideEffects != null)
+ response.sideEffects = sideEffects;
+ if (pluginData != null)
+ response.pluginData = details.store(pluginData);
+ if (errors != null)
+ response.errors = sanitizeMessages(errors, "errors", details, name);
+ if (warnings != null)
+ response.warnings = sanitizeMessages(warnings, "warnings", details, name);
+ if (watchFiles != null)
+ response.watchFiles = sanitizeStringArray(watchFiles, "watchFiles");
+ if (watchDirs != null)
+ response.watchDirs = sanitizeStringArray(watchDirs, "watchDirs");
+ break;
+ }
+ } catch (e) {
+ response = { id: id2, errors: [extractErrorMessageV8(e, streamIn, details, note && note(), name)] };
+ break;
+ }
+ }
+ sendResponse(id, response);
+ };
+ requestCallbacks["on-load"] = async (id, request) => {
+ let response = {}, name = "", callback, note;
+ for (let id2 of request.ids) {
+ try {
+ ({ name, callback, note } = onLoadCallbacks[id2]);
+ let result = await callback({
+ path: request.path,
+ namespace: request.namespace,
+ suffix: request.suffix,
+ pluginData: details.load(request.pluginData)
+ });
+ if (result != null) {
+ if (typeof result !== "object")
+ throw new Error(`Expected onLoad() callback in plugin ${JSON.stringify(name)} to return an object`);
+ let keys = {};
+ let pluginName = getFlag(result, keys, "pluginName", mustBeString);
+ let contents = getFlag(result, keys, "contents", mustBeStringOrUint8Array);
+ let resolveDir = getFlag(result, keys, "resolveDir", mustBeString);
+ let pluginData = getFlag(result, keys, "pluginData", canBeAnything);
+ let loader = getFlag(result, keys, "loader", mustBeString);
+ let errors = getFlag(result, keys, "errors", mustBeArray);
+ let warnings = getFlag(result, keys, "warnings", mustBeArray);
+ let watchFiles = getFlag(result, keys, "watchFiles", mustBeArray);
+ let watchDirs = getFlag(result, keys, "watchDirs", mustBeArray);
+ checkForInvalidFlags(result, keys, `from onLoad() callback in plugin ${JSON.stringify(name)}`);
+ response.id = id2;
+ if (pluginName != null)
+ response.pluginName = pluginName;
+ if (contents instanceof Uint8Array)
+ response.contents = contents;
+ else if (contents != null)
+ response.contents = encodeUTF8(contents);
+ if (resolveDir != null)
+ response.resolveDir = resolveDir;
+ if (pluginData != null)
+ response.pluginData = details.store(pluginData);
+ if (loader != null)
+ response.loader = loader;
+ if (errors != null)
+ response.errors = sanitizeMessages(errors, "errors", details, name);
+ if (warnings != null)
+ response.warnings = sanitizeMessages(warnings, "warnings", details, name);
+ if (watchFiles != null)
+ response.watchFiles = sanitizeStringArray(watchFiles, "watchFiles");
+ if (watchDirs != null)
+ response.watchDirs = sanitizeStringArray(watchDirs, "watchDirs");
+ break;
+ }
+ } catch (e) {
+ response = { id: id2, errors: [extractErrorMessageV8(e, streamIn, details, note && note(), name)] };
+ break;
+ }
+ }
+ sendResponse(id, response);
+ };
+ let runOnEndCallbacks = (result, logPluginError, done) => done();
+ if (onEndCallbacks.length > 0) {
+ runOnEndCallbacks = (result, logPluginError, done) => {
+ (async () => {
+ for (const { name, callback, note } of onEndCallbacks) {
+ try {
+ await callback(result);
+ } catch (e) {
+ result.errors.push(await new Promise((resolve) => logPluginError(e, name, note && note(), resolve)));
+ }
+ }
+ })().then(done);
+ };
+ }
+ isSetupDone = true;
+ return {
+ ok: true,
+ requestPlugins,
+ runOnEndCallbacks
+ };
+};
function createObjectStash() {
const map = /* @__PURE__ */ new Map();
let nextID = 0;
@@ -1493,7 +1510,7 @@
location = parseStackLinesV8(streamIn, (e.stack + "").split("\n"), "");
} catch {
}
- return { pluginName, text, location, notes: note ? [note] : [], detail: stash ? stash.store(e) : -1 };
+ return { id: "", pluginName, text, location, notes: note ? [note] : [], detail: stash ? stash.store(e) : -1 };
}
function parseStackLinesV8(streamIn, lines, ident) {
let at = " at ";
@@ -1592,6 +1609,7 @@
let index = 0;
for (const message of messages) {
let keys = {};
+ let id = getFlag(message, keys, "id", mustBeString);
let pluginName = getFlag(message, keys, "pluginName", mustBeString);
let text = getFlag(message, keys, "text", mustBeString);
let location = getFlag(message, keys, "location", mustBeObjectOrNull);
@@ -1613,6 +1631,7 @@
}
}
messagesClone.push({
+ id: id || "",
pluginName: pluginName || fallbackPluginName,
text: text || "",
location: sanitizeLocation(location, where),
@@ -1638,8 +1657,11 @@
path: path3,
contents,
get text() {
- if (text === null)
- text = decodeUTF8(contents);
+ const binary = this.contents;
+ if (text === null || binary !== contents) {
+ contents = binary;
+ text = decodeUTF8(binary);
+ }
return text;
}
};
@@ -1650,6 +1672,8 @@
var os = require("os");
var path = require("path");
var ESBUILD_BINARY_PATH = process.env.ESBUILD_BINARY_PATH || ESBUILD_BINARY_PATH;
+var packageDarwin_arm64 = "esbuild-darwin-arm64";
+var packageDarwin_x64 = "esbuild-darwin-64";
var knownWindowsPackages = {
"win32 arm64 LE": "esbuild-windows-arm64",
"win32 ia32 LE": "esbuild-windows-32",
@@ -1666,15 +1690,22 @@
"linux ia32 LE": "esbuild-linux-32",
"linux mips64el LE": "esbuild-linux-mips64le",
"linux ppc64 LE": "esbuild-linux-ppc64le",
+ "linux riscv64 LE": "esbuild-linux-riscv64",
"linux s390x BE": "esbuild-linux-s390x",
"linux x64 LE": "esbuild-linux-64",
+ "linux loong64 LE": "@esbuild/linux-loong64",
"netbsd x64 LE": "esbuild-netbsd-64",
"openbsd x64 LE": "esbuild-openbsd-64",
"sunos x64 LE": "esbuild-sunos-64"
};
+var knownWebAssemblyFallbackPackages = {
+ "android arm LE": "@esbuild/android-arm",
+ "android x64 LE": "esbuild-android-64"
+};
function pkgAndSubpathForCurrentPlatform() {
let pkg;
let subpath;
+ let isWASM = false;
let platformKey = `${process.platform} ${os.arch()} ${os.endianness()}`;
if (platformKey in knownWindowsPackages) {
pkg = knownWindowsPackages[platformKey];
@@ -1682,10 +1713,14 @@
} else if (platformKey in knownUnixlikePackages) {
pkg = knownUnixlikePackages[platformKey];
subpath = "bin/esbuild";
+ } else if (platformKey in knownWebAssemblyFallbackPackages) {
+ pkg = knownWebAssemblyFallbackPackages[platformKey];
+ subpath = "bin/esbuild";
+ isWASM = true;
} else {
throw new Error(`Unsupported platform: ${platformKey}`);
}
- return { pkg, subpath };
+ return { pkg, subpath, isWASM };
}
function pkgForSomeOtherPlatform() {
const libMainJS = require.resolve("esbuild");
@@ -1716,9 +1751,9 @@
}
function generateBinPath() {
if (ESBUILD_BINARY_PATH) {
- return ESBUILD_BINARY_PATH;
+ return { binPath: ESBUILD_BINARY_PATH, isWASM: false };
}
- const { pkg, subpath } = pkgAndSubpathForCurrentPlatform();
+ const { pkg, subpath, isWASM } = pkgAndSubpathForCurrentPlatform();
let binPath;
try {
binPath = require.resolve(`${pkg}/${subpath}`);
@@ -1730,11 +1765,7 @@
} catch {
const otherPkg = pkgForSomeOtherPlatform();
if (otherPkg) {
- throw new Error(`
-You installed esbuild on another platform than the one you're currently using.
-This won't work because esbuild is written with native code and needs to
-install a platform-specific binary executable.
-
+ let suggestions = `
Specifically the "${otherPkg}" package is present but this platform
needs the "${pkg}" package instead. People often get into this
situation by installing esbuild on Windows or macOS and copying "node_modules"
@@ -1744,14 +1775,40 @@
If you are installing with npm, you can try not copying the "node_modules"
directory when you copy the files over, and running "npm ci" or "npm install"
on the destination platform after the copy. Or you could consider using yarn
-instead which has built-in support for installing a package on multiple
+instead of npm which has built-in support for installing a package on multiple
platforms simultaneously.
If you are installing with yarn, you can try listing both this platform and the
other platform in your ".yarnrc.yml" file using the "supportedArchitectures"
feature: https://yarnpkg.com/configuration/yarnrc/#supportedArchitectures
Keep in mind that this means multiple copies of esbuild will be present.
+`;
+ if (pkg === packageDarwin_x64 && otherPkg === packageDarwin_arm64 || pkg === packageDarwin_arm64 && otherPkg === packageDarwin_x64) {
+ suggestions = `
+Specifically the "${otherPkg}" package is present but this platform
+needs the "${pkg}" package instead. People often get into this
+situation by installing esbuild with npm running inside of Rosetta 2 and then
+trying to use it with node running outside of Rosetta 2, or vice versa (Rosetta
+2 is Apple's on-the-fly x86_64-to-arm64 translation service).
+If you are installing with npm, you can try ensuring that both npm and node are
+not running under Rosetta 2 and then reinstalling esbuild. This likely involves
+changing how you installed npm and/or node. For example, installing node with
+the universal installer here should work: https://nodejs.org/en/download/. Or
+you could consider using yarn instead of npm which has built-in support for
+installing a package on multiple platforms simultaneously.
+
+If you are installing with yarn, you can try listing both "arm64" and "x64"
+in your ".yarnrc.yml" file using the "supportedArchitectures" feature:
+https://yarnpkg.com/configuration/yarnrc/#supportedArchitectures
+Keep in mind that this means multiple copies of esbuild will be present.
+`;
+ }
+ throw new Error(`
+You installed esbuild for another platform than the one you're currently using.
+This won't work because esbuild is written with native code and needs to
+install a platform-specific binary executable.
+${suggestions}
Another alternative is to use the "esbuild-wasm" package instead, which works
the same way on all platforms. But it comes with a heavy performance cost and
can sometimes be 10x slower than the "esbuild" package, so you may also not
@@ -1761,28 +1818,37 @@
throw new Error(`The package "${pkg}" could not be found, and is needed by esbuild.
If you are installing esbuild with npm, make sure that you don't specify the
-"--no-optional" flag. The "optionalDependencies" package.json feature is used
-by esbuild to install the correct binary executable for your current platform.`);
+"--no-optional" or "--omit=optional" flags. The "optionalDependencies" feature
+of "package.json" is used by esbuild to install the correct binary executable
+for your current platform.`);
}
throw e;
}
}
- let isYarnPnP = false;
- try {
- require("pnpapi");
- isYarnPnP = true;
- } catch (e) {
- }
- if (isYarnPnP) {
- const esbuildLibDir = path.dirname(require.resolve("esbuild"));
- const binTargetPath = path.join(esbuildLibDir, `pnpapi-${pkg}-${path.basename(subpath)}`);
- if (!fs.existsSync(binTargetPath)) {
- fs.copyFileSync(binPath, binTargetPath);
- fs.chmodSync(binTargetPath, 493);
+ if (/\.zip\//.test(binPath)) {
+ let pnpapi;
+ try {
+ pnpapi = require("pnpapi");
+ } catch (e) {
}
- return binTargetPath;
+ if (pnpapi) {
+ const root = pnpapi.getPackageInformation(pnpapi.topLevel).packageLocation;
+ const binTargetPath = path.join(
+ root,
+ "node_modules",
+ ".cache",
+ "esbuild",
+ `pnpapi-${pkg}-${"0.15.16"}-${path.basename(subpath)}`
+ );
+ if (!fs.existsSync(binTargetPath)) {
+ fs.mkdirSync(path.dirname(binTargetPath), { recursive: true });
+ fs.copyFileSync(binPath, binTargetPath);
+ fs.chmodSync(binTargetPath, 493);
+ }
+ return { binPath: binTargetPath, isWASM };
+ }
}
- return binPath;
+ return { binPath, isWASM };
}
// lib/npm/node.ts
@@ -1804,17 +1870,25 @@
}
}
var _a;
-var isInternalWorkerThread = ((_a = worker_threads == null ? void 0 : worker_threads.workerData) == null ? void 0 : _a.esbuildVersion) === "0.14.13";
+var isInternalWorkerThread = ((_a = worker_threads == null ? void 0 : worker_threads.workerData) == null ? void 0 : _a.esbuildVersion) === "0.15.16";
var esbuildCommandAndArgs = () => {
if ((!ESBUILD_BINARY_PATH || false) && (path2.basename(__filename) !== "main.js" || path2.basename(__dirname) !== "lib")) {
- 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.
+ 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.
-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.`);
+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.`
+ );
}
if (false) {
return ["node", [path2.join(__dirname, "..", "bin", "esbuild")]];
+ } else {
+ const { binPath, isWASM } = generateBinPath();
+ if (isWASM) {
+ return ["node", [binPath]];
+ } else {
+ return [binPath, []];
+ }
}
- return [generateBinPath(), []];
};
var isTTY = () => tty.isatty(2);
var fsSync = {
@@ -1863,7 +1937,7 @@
}
}
};
-var version = "0.14.13";
+var version = "0.15.16";
var build = (options) => ensureServiceIsRunning().build(options);
var serve = (serveOptions, buildOptions) => ensureServiceIsRunning().serve(serveOptions, buildOptions);
var transform = (input, options) => ensureServiceIsRunning().transform(input, options);
@@ -1958,6 +2032,8 @@
options = validateInitializeOptions(options || {});
if (options.wasmURL)
throw new Error(`The "wasmURL" option only works in the browser`);
+ if (options.wasmModule)
+ throw new Error(`The "wasmModule" option only works in the browser`);
if (options.worker)
throw new Error(`The "worker" option only works in the browser`);
if (initializeWasCalled)
@@ -1972,20 +2048,25 @@
if (longLivedService)
return longLivedService;
let [command, args] = esbuildCommandAndArgs();
- let child = child_process.spawn(command, args.concat(`--service=${"0.14.13"}`, "--ping"), {
+ let child = child_process.spawn(command, args.concat(`--service=${"0.15.16"}`, "--ping"), {
windowsHide: true,
stdio: ["pipe", "pipe", "inherit"],
cwd: defaultWD
});
let { readFromStdout, afterClose, service } = createChannel({
writeToStdin(bytes) {
- child.stdin.write(bytes);
+ child.stdin.write(bytes, (err) => {
+ if (err)
+ afterClose(err);
+ });
},
readFileSync: fs2.readFileSync,
isSync: false,
- isBrowser: false,
+ isWriteUnavailable: false,
esbuild: node_exports
});
+ child.stdin.on("error", afterClose);
+ child.on("error", afterClose);
const stdin = child.stdin;
const stdout = child.stdout;
stdout.on("data", readFromStdout);
@@ -2077,18 +2158,18 @@
stdin = bytes;
},
isSync: true,
- isBrowser: false,
+ isWriteUnavailable: false,
esbuild: node_exports
});
callback(service);
- let stdout = child_process.execFileSync(command, args.concat(`--service=${"0.14.13"}`), {
+ let stdout = child_process.execFileSync(command, args.concat(`--service=${"0.15.16"}`), {
cwd: defaultWD,
windowsHide: true,
input: stdin,
maxBuffer: +process.env.ESBUILD_MAX_BUFFER || 16 * 1024 * 1024
});
readFromStdout(stdout);
- afterClose();
+ afterClose(null);
};
var randomFileName = () => {
return path2.join(os2.tmpdir(), `esbuild-${crypto.randomBytes(32).toString("hex")}`);
@@ -2097,16 +2178,15 @@
var startWorkerThreadService = (worker_threads2) => {
let { port1: mainPort, port2: workerPort } = new worker_threads2.MessageChannel();
let worker = new worker_threads2.Worker(__filename, {
- workerData: { workerPort, defaultWD, esbuildVersion: "0.14.13" },
+ workerData: { workerPort, defaultWD, esbuildVersion: "0.15.16" },
transferList: [workerPort],
execArgv: []
});
let nextID = 0;
- let wasStopped = false;
let fakeBuildError = (text) => {
let error = new Error(`Build failed with 1 error:
error: ${text}`);
- let errors = [{ pluginName: "", text, location: null, notes: [], detail: void 0 }];
+ let errors = [{ id: "", pluginName: "", text, location: null, notes: [], detail: void 0 }];
error.errors = errors;
error.warnings = [];
return error;
@@ -2130,8 +2210,6 @@
}
};
let runCallSync = (command, args) => {
- if (wasStopped)
- throw new Error("The service was stopped");
let id = nextID++;
let sharedBuffer = new SharedArrayBuffer(8);
let sharedBufferView = new Int32Array(sharedBuffer);
@@ -2169,8 +2247,6 @@
var startSyncServiceWorker = () => {
let workerPort = worker_threads.workerData.workerPort;
let parentPort = worker_threads.parentPort;
- let service = ensureServiceIsRunning();
- defaultWD = worker_threads.workerData.defaultWD;
let extractProperties = (object) => {
let properties = {};
if (object && typeof object === "object") {
@@ -2180,39 +2256,51 @@
}
return properties;
};
- parentPort.on("message", (msg) => {
- (async () => {
- let { sharedBuffer, id, command, args } = msg;
- let sharedBufferView = new Int32Array(sharedBuffer);
- try {
- switch (command) {
- case "build":
- workerPort.postMessage({ id, resolve: await service.build(args[0]) });
- break;
- case "transform":
- workerPort.postMessage({ id, resolve: await service.transform(args[0], args[1]) });
- break;
- case "formatMessages":
- workerPort.postMessage({ id, resolve: await service.formatMessages(args[0], args[1]) });
- break;
- case "analyzeMetafile":
- workerPort.postMessage({ id, resolve: await service.analyzeMetafile(args[0], args[1]) });
- break;
- default:
- throw new Error(`Invalid command: ${command}`);
+ try {
+ let service = ensureServiceIsRunning();
+ defaultWD = worker_threads.workerData.defaultWD;
+ parentPort.on("message", (msg) => {
+ (async () => {
+ let { sharedBuffer, id, command, args } = msg;
+ let sharedBufferView = new Int32Array(sharedBuffer);
+ try {
+ switch (command) {
+ case "build":
+ workerPort.postMessage({ id, resolve: await service.build(args[0]) });
+ break;
+ case "transform":
+ workerPort.postMessage({ id, resolve: await service.transform(args[0], args[1]) });
+ break;
+ case "formatMessages":
+ workerPort.postMessage({ id, resolve: await service.formatMessages(args[0], args[1]) });
+ break;
+ case "analyzeMetafile":
+ workerPort.postMessage({ id, resolve: await service.analyzeMetafile(args[0], args[1]) });
+ break;
+ default:
+ throw new Error(`Invalid command: ${command}`);
+ }
+ } catch (reject) {
+ workerPort.postMessage({ id, reject, properties: extractProperties(reject) });
}
- } catch (reject) {
- workerPort.postMessage({ id, reject, properties: extractProperties(reject) });
- }
+ Atomics.add(sharedBufferView, 0, 1);
+ Atomics.notify(sharedBufferView, 0, Infinity);
+ })();
+ });
+ } catch (reject) {
+ parentPort.on("message", (msg) => {
+ let { sharedBuffer, id } = msg;
+ let sharedBufferView = new Int32Array(sharedBuffer);
+ workerPort.postMessage({ id, reject, properties: extractProperties(reject) });
Atomics.add(sharedBufferView, 0, 1);
Atomics.notify(sharedBufferView, 0, Infinity);
- })();
- });
+ });
+ }
};
if (isInternalWorkerThread) {
startSyncServiceWorker();
}
-module.exports = __toCommonJS(node_exports);
+var node_default = node_exports;
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
analyzeMetafile,
diff --git a/node_modules/esbuild/package.json b/node_modules/esbuild/package.json
index 5b53450..7fc4168 100644
--- a/node_modules/esbuild/package.json
+++ b/node_modules/esbuild/package.json
@@ -1,6 +1,6 @@
{
"name": "esbuild",
- "version": "0.14.13",
+ "version": "0.15.16",
"description": "An extremely fast JavaScript and CSS bundler and minifier.",
"repository": "https://github.com/evanw/esbuild",
"scripts": {
@@ -8,28 +8,35 @@
},
"main": "lib/main.js",
"types": "lib/main.d.ts",
+ "engines": {
+ "node": ">=12"
+ },
"bin": {
"esbuild": "bin/esbuild"
},
"optionalDependencies": {
- "esbuild-android-arm64": "0.14.13",
- "esbuild-darwin-64": "0.14.13",
- "esbuild-darwin-arm64": "0.14.13",
- "esbuild-freebsd-64": "0.14.13",
- "esbuild-freebsd-arm64": "0.14.13",
- "esbuild-linux-32": "0.14.13",
- "esbuild-linux-64": "0.14.13",
- "esbuild-linux-arm": "0.14.13",
- "esbuild-linux-arm64": "0.14.13",
- "esbuild-linux-mips64le": "0.14.13",
- "esbuild-linux-ppc64le": "0.14.13",
- "esbuild-linux-s390x": "0.14.13",
- "esbuild-netbsd-64": "0.14.13",
- "esbuild-openbsd-64": "0.14.13",
- "esbuild-sunos-64": "0.14.13",
- "esbuild-windows-32": "0.14.13",
- "esbuild-windows-64": "0.14.13",
- "esbuild-windows-arm64": "0.14.13"
+ "@esbuild/android-arm": "0.15.16",
+ "@esbuild/linux-loong64": "0.15.16",
+ "esbuild-android-64": "0.15.16",
+ "esbuild-android-arm64": "0.15.16",
+ "esbuild-darwin-64": "0.15.16",
+ "esbuild-darwin-arm64": "0.15.16",
+ "esbuild-freebsd-64": "0.15.16",
+ "esbuild-freebsd-arm64": "0.15.16",
+ "esbuild-linux-32": "0.15.16",
+ "esbuild-linux-64": "0.15.16",
+ "esbuild-linux-arm": "0.15.16",
+ "esbuild-linux-arm64": "0.15.16",
+ "esbuild-linux-mips64le": "0.15.16",
+ "esbuild-linux-ppc64le": "0.15.16",
+ "esbuild-linux-riscv64": "0.15.16",
+ "esbuild-linux-s390x": "0.15.16",
+ "esbuild-netbsd-64": "0.15.16",
+ "esbuild-openbsd-64": "0.15.16",
+ "esbuild-sunos-64": "0.15.16",
+ "esbuild-windows-32": "0.15.16",
+ "esbuild-windows-64": "0.15.16",
+ "esbuild-windows-arm64": "0.15.16"
},
"license": "MIT"
}
diff --git a/package-lock.json b/package-lock.json
index acfdbed..7e1326c 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -32,7 +32,7 @@
"chokidar": "3.5.2",
"clean-css": "5.2.2",
"convert-source-map": "1.8.0",
- "esbuild": "0.14.13",
+ "esbuild": "^0.15.16",
"escodegen": "2.0.0",
"eslint": "8.19.0",
"eslint-plugin-import": "2.25.4",
@@ -456,6 +456,38 @@
"node": ">=0.1.90"
}
},
+ "node_modules/@esbuild/android-arm": {
+ "version": "0.15.16",
+ "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.15.16.tgz",
+ "integrity": "sha512-nyB6CH++2mSgx3GbnrJsZSxzne5K0HMyNIWafDHqYy7IwxFc4fd/CgHVZXr8Eh+Q3KbIAcAe3vGyqIPhGblvMQ==",
+ "cpu": [
+ "arm"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "android"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@esbuild/linux-loong64": {
+ "version": "0.15.16",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.15.16.tgz",
+ "integrity": "sha512-SDLfP1uoB0HZ14CdVYgagllgrG7Mdxhkt4jDJOKl/MldKrkQ6vDJMZKl2+5XsEY/Lzz37fjgLQoJBGuAw/x8kQ==",
+ "cpu": [
+ "loong64"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
"node_modules/@eslint/eslintrc": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.0.tgz",
@@ -2521,39 +2553,62 @@
}
},
"node_modules/esbuild": {
- "version": "0.14.13",
- "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.14.13.tgz",
- "integrity": "sha512-FIxvAdj3i2oHA6ex+E67bG7zlSTO+slt8kU2ogHDgGtrQLy2HNChv3PYjiFTYkt8hZbEAniZCXVeHn+FrHt7dA==",
+ "version": "0.15.16",
+ "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.15.16.tgz",
+ "integrity": "sha512-o6iS9zxdHrrojjlj6pNGC2NAg86ECZqIETswTM5KmJitq+R1YmahhWtMumeQp9lHqJaROGnsBi2RLawGnfo5ZQ==",
"dev": true,
"hasInstallScript": true,
"bin": {
"esbuild": "bin/esbuild"
},
+ "engines": {
+ "node": ">=12"
+ },
"optionalDependencies": {
- "esbuild-android-arm64": "0.14.13",
- "esbuild-darwin-64": "0.14.13",
- "esbuild-darwin-arm64": "0.14.13",
- "esbuild-freebsd-64": "0.14.13",
- "esbuild-freebsd-arm64": "0.14.13",
- "esbuild-linux-32": "0.14.13",
- "esbuild-linux-64": "0.14.13",
- "esbuild-linux-arm": "0.14.13",
- "esbuild-linux-arm64": "0.14.13",
- "esbuild-linux-mips64le": "0.14.13",
- "esbuild-linux-ppc64le": "0.14.13",
- "esbuild-linux-s390x": "0.14.13",
- "esbuild-netbsd-64": "0.14.13",
- "esbuild-openbsd-64": "0.14.13",
- "esbuild-sunos-64": "0.14.13",
- "esbuild-windows-32": "0.14.13",
- "esbuild-windows-64": "0.14.13",
- "esbuild-windows-arm64": "0.14.13"
+ "@esbuild/android-arm": "0.15.16",
+ "@esbuild/linux-loong64": "0.15.16",
+ "esbuild-android-64": "0.15.16",
+ "esbuild-android-arm64": "0.15.16",
+ "esbuild-darwin-64": "0.15.16",
+ "esbuild-darwin-arm64": "0.15.16",
+ "esbuild-freebsd-64": "0.15.16",
+ "esbuild-freebsd-arm64": "0.15.16",
+ "esbuild-linux-32": "0.15.16",
+ "esbuild-linux-64": "0.15.16",
+ "esbuild-linux-arm": "0.15.16",
+ "esbuild-linux-arm64": "0.15.16",
+ "esbuild-linux-mips64le": "0.15.16",
+ "esbuild-linux-ppc64le": "0.15.16",
+ "esbuild-linux-riscv64": "0.15.16",
+ "esbuild-linux-s390x": "0.15.16",
+ "esbuild-netbsd-64": "0.15.16",
+ "esbuild-openbsd-64": "0.15.16",
+ "esbuild-sunos-64": "0.15.16",
+ "esbuild-windows-32": "0.15.16",
+ "esbuild-windows-64": "0.15.16",
+ "esbuild-windows-arm64": "0.15.16"
+ }
+ },
+ "node_modules/esbuild-android-64": {
+ "version": "0.15.16",
+ "resolved": "https://registry.npmjs.org/esbuild-android-64/-/esbuild-android-64-0.15.16.tgz",
+ "integrity": "sha512-Vwkv/sT0zMSgPSVO3Jlt1pUbnZuOgtOQJkJkyyJFAlLe7BiT8e9ESzo0zQSx4c3wW4T6kGChmKDPMbWTgtliQA==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "android"
+ ],
+ "engines": {
+ "node": ">=12"
}
},
"node_modules/esbuild-android-arm64": {
- "version": "0.14.13",
- "resolved": "https://registry.npmjs.org/esbuild-android-arm64/-/esbuild-android-arm64-0.14.13.tgz",
- "integrity": "sha512-rhtwl+KJ3BzzXkK09N3/YbEF1i5WhriysJEStoeWNBzchx9hlmzyWmDGQQhu56HF78ua3JrVPyLOsdLGvtMvxQ==",
+ "version": "0.15.16",
+ "resolved": "https://registry.npmjs.org/esbuild-android-arm64/-/esbuild-android-arm64-0.15.16.tgz",
+ "integrity": "sha512-lqfKuofMExL5niNV3gnhMUYacSXfsvzTa/58sDlBET/hCOG99Zmeh+lz6kvdgvGOsImeo6J9SW21rFCogNPLxg==",
"cpu": [
"arm64"
],
@@ -2561,12 +2616,15 @@
"optional": true,
"os": [
"android"
- ]
+ ],
+ "engines": {
+ "node": ">=12"
+ }
},
"node_modules/esbuild-darwin-64": {
- "version": "0.14.13",
- "resolved": "https://registry.npmjs.org/esbuild-darwin-64/-/esbuild-darwin-64-0.14.13.tgz",
- "integrity": "sha512-Fl47xIt5RMu50WIgMU93kwmUUJb+BPuL8R895n/aBNQqavS+KUMpLPoqKGABBV4myfx/fnAD/97X8Gt1C1YW6w==",
+ "version": "0.15.16",
+ "resolved": "https://registry.npmjs.org/esbuild-darwin-64/-/esbuild-darwin-64-0.15.16.tgz",
+ "integrity": "sha512-wo2VWk/n/9V2TmqUZ/KpzRjCEcr00n7yahEdmtzlrfQ3lfMCf3Wa+0sqHAbjk3C6CKkR3WKK/whkMq5Gj4Da9g==",
"cpu": [
"x64"
],
@@ -2574,12 +2632,15 @@
"optional": true,
"os": [
"darwin"
- ]
+ ],
+ "engines": {
+ "node": ">=12"
+ }
},
"node_modules/esbuild-darwin-arm64": {
- "version": "0.14.13",
- "resolved": "https://registry.npmjs.org/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.14.13.tgz",
- "integrity": "sha512-UttqKRFXsWvuivcyAbFmo54vdkC9Me1ZYQNuoz/uBYDbkb2MgqKYG2+xoVKPBhLvhT0CKM5QGKD81flMH5BE6A==",
+ "version": "0.15.16",
+ "resolved": "https://registry.npmjs.org/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.15.16.tgz",
+ "integrity": "sha512-fMXaUr5ou0M4WnewBKsspMtX++C1yIa3nJ5R2LSbLCfJT3uFdcRoU/NZjoM4kOMKyOD9Sa/2vlgN8G07K3SJnw==",
"cpu": [
"arm64"
],
@@ -2587,12 +2648,15 @@
"optional": true,
"os": [
"darwin"
- ]
+ ],
+ "engines": {
+ "node": ">=12"
+ }
},
"node_modules/esbuild-freebsd-64": {
- "version": "0.14.13",
- "resolved": "https://registry.npmjs.org/esbuild-freebsd-64/-/esbuild-freebsd-64-0.14.13.tgz",
- "integrity": "sha512-dlIhPFSp29Yq2TPh7Cm3/4M0uKjlfvOylHVNCRvRNiOvDbBol6/NZ3kLisczms+Yra0rxVapBPN1oMbSMuts9g==",
+ "version": "0.15.16",
+ "resolved": "https://registry.npmjs.org/esbuild-freebsd-64/-/esbuild-freebsd-64-0.15.16.tgz",
+ "integrity": "sha512-UzIc0xlRx5x9kRuMr+E3+hlSOxa/aRqfuMfiYBXu2jJ8Mzej4lGL7+o6F5hzhLqWfWm1GWHNakIdlqg1ayaTNQ==",
"cpu": [
"x64"
],
@@ -2600,12 +2664,15 @@
"optional": true,
"os": [
"freebsd"
- ]
+ ],
+ "engines": {
+ "node": ">=12"
+ }
},
"node_modules/esbuild-freebsd-arm64": {
- "version": "0.14.13",
- "resolved": "https://registry.npmjs.org/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.14.13.tgz",
- "integrity": "sha512-bNOHLu7Oq6RwaAMnwPbJ40DVGPl9GlAOnfH/dFZ792f8hFEbopkbtVzo1SU1jjfY3TGLWOgqHNWxPxx1N7Au+g==",
+ "version": "0.15.16",
+ "resolved": "https://registry.npmjs.org/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.15.16.tgz",
+ "integrity": "sha512-8xyiYuGc0DLZphFQIiYaLHlfoP+hAN9RHbE+Ibh8EUcDNHAqbQgUrQg7pE7Bo00rXmQ5Ap6KFgcR0b4ALZls1g==",
"cpu": [
"arm64"
],
@@ -2613,12 +2680,15 @@
"optional": true,
"os": [
"freebsd"
- ]
+ ],
+ "engines": {
+ "node": ">=12"
+ }
},
"node_modules/esbuild-linux-32": {
- "version": "0.14.13",
- "resolved": "https://registry.npmjs.org/esbuild-linux-32/-/esbuild-linux-32-0.14.13.tgz",
- "integrity": "sha512-WzXyBx6zx16adGi7wPBvH2lRCBzYMcqnBRrJ8ciLIqYyruGvprZocX1nFWfiexjLcFxIElWnMNPX6LG7ULqyXA==",
+ "version": "0.15.16",
+ "resolved": "https://registry.npmjs.org/esbuild-linux-32/-/esbuild-linux-32-0.15.16.tgz",
+ "integrity": "sha512-iGijUTV+0kIMyUVoynK0v+32Oi8yyp0xwMzX69GX+5+AniNy/C/AL1MjFTsozRp/3xQPl7jVux/PLe2ds10/2w==",
"cpu": [
"ia32"
],
@@ -2626,12 +2696,15 @@
"optional": true,
"os": [
"linux"
- ]
+ ],
+ "engines": {
+ "node": ">=12"
+ }
},
"node_modules/esbuild-linux-64": {
- "version": "0.14.13",
- "resolved": "https://registry.npmjs.org/esbuild-linux-64/-/esbuild-linux-64-0.14.13.tgz",
- "integrity": "sha512-P6OFAfcoUvE7g9h/0UKm3qagvTovwqpCF1wbFLWe/BcCY8BS1bR/+SxUjCeKX2BcpIsg4/43ezHDE/ntg/iOpw==",
+ "version": "0.15.16",
+ "resolved": "https://registry.npmjs.org/esbuild-linux-64/-/esbuild-linux-64-0.15.16.tgz",
+ "integrity": "sha512-tuSOjXdLw7VzaUj89fIdAaQT7zFGbKBcz4YxbWrOiXkwscYgE7HtTxUavreBbnRkGxKwr9iT/gmeJWNm4djy/g==",
"cpu": [
"x64"
],
@@ -2639,12 +2712,15 @@
"optional": true,
"os": [
"linux"
- ]
+ ],
+ "engines": {
+ "node": ">=12"
+ }
},
"node_modules/esbuild-linux-arm": {
- "version": "0.14.13",
- "resolved": "https://registry.npmjs.org/esbuild-linux-arm/-/esbuild-linux-arm-0.14.13.tgz",
- "integrity": "sha512-4jmm0UySCg3Wi6FEBS7jpiPb1IyckI5um5kzYRwulHxPzkiokd6cgpcsTakR4/Y84UEicS8LnFAghHhXHZhbFg==",
+ "version": "0.15.16",
+ "resolved": "https://registry.npmjs.org/esbuild-linux-arm/-/esbuild-linux-arm-0.15.16.tgz",
+ "integrity": "sha512-XKcrxCEXDTOuoRj5l12tJnkvuxXBMKwEC5j0JISw3ziLf0j4zIwXbKbTmUrKFWbo6ZgvNpa7Y5dnbsjVvH39bQ==",
"cpu": [
"arm"
],
@@ -2652,12 +2728,15 @@
"optional": true,
"os": [
"linux"
- ]
+ ],
+ "engines": {
+ "node": ">=12"
+ }
},
"node_modules/esbuild-linux-arm64": {
- "version": "0.14.13",
- "resolved": "https://registry.npmjs.org/esbuild-linux-arm64/-/esbuild-linux-arm64-0.14.13.tgz",
- "integrity": "sha512-k/uIvmkm4mc7vyMvJVwILgGxi2F+FuvLdmESIIWoHrnxEfEekC5AWpI/R6GQ2OMfp8snebSQLs8KL05QPnt1zA==",
+ "version": "0.15.16",
+ "resolved": "https://registry.npmjs.org/esbuild-linux-arm64/-/esbuild-linux-arm64-0.15.16.tgz",
+ "integrity": "sha512-mPYksnfHnemNrvjrDhZyixL/AfbJN0Xn9S34ZOHYdh6/jJcNd8iTsv3JwJoEvTJqjMggjMhGUPJAdjnFBHoH8A==",
"cpu": [
"arm64"
],
@@ -2665,12 +2744,15 @@
"optional": true,
"os": [
"linux"
- ]
+ ],
+ "engines": {
+ "node": ">=12"
+ }
},
"node_modules/esbuild-linux-mips64le": {
- "version": "0.14.13",
- "resolved": "https://registry.npmjs.org/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.14.13.tgz",
- "integrity": "sha512-vwYtgjQ1TRlUGL88km9wH9TjXsdZyZ/Xht1ASptg5XGRlqGquVjLGH11PfLLunoMdkQ0YTXR68b4l5gRfjVbyg==",
+ "version": "0.15.16",
+ "resolved": "https://registry.npmjs.org/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.15.16.tgz",
+ "integrity": "sha512-kSJO2PXaxfm0pWY39+YX+QtpFqyyrcp0ZeI8QPTrcFVQoWEPiPVtOfTZeS3ZKedfH+Ga38c4DSzmKMQJocQv6A==",
"cpu": [
"mips64el"
],
@@ -2678,12 +2760,15 @@
"optional": true,
"os": [
"linux"
- ]
+ ],
+ "engines": {
+ "node": ">=12"
+ }
},
"node_modules/esbuild-linux-ppc64le": {
- "version": "0.14.13",
- "resolved": "https://registry.npmjs.org/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.14.13.tgz",
- "integrity": "sha512-0KqDSIkZaYugtcdpFCd3eQ38Fg6TzhxmOpkhDIKNTwD/W2RoXeiS+Z4y5yQ3oysb/ySDOxWkwNqTdXS4sz2LdQ==",
+ "version": "0.15.16",
+ "resolved": "https://registry.npmjs.org/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.15.16.tgz",
+ "integrity": "sha512-NimPikwkBY0yGABw6SlhKrtT35sU4O23xkhlrTT/O6lSxv3Pm5iSc6OYaqVAHWkLdVf31bF4UDVFO+D990WpAA==",
"cpu": [
"ppc64"
],
@@ -2691,12 +2776,31 @@
"optional": true,
"os": [
"linux"
- ]
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/esbuild-linux-riscv64": {
+ "version": "0.15.16",
+ "resolved": "https://registry.npmjs.org/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.15.16.tgz",
+ "integrity": "sha512-ty2YUHZlwFOwp7pR+J87M4CVrXJIf5ZZtU/umpxgVJBXvWjhziSLEQxvl30SYfUPq0nzeWKBGw5i/DieiHeKfw==",
+ "cpu": [
+ "riscv64"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
},
"node_modules/esbuild-linux-s390x": {
- "version": "0.14.13",
- "resolved": "https://registry.npmjs.org/esbuild-linux-s390x/-/esbuild-linux-s390x-0.14.13.tgz",
- "integrity": "sha512-bG20i7d0CN97fwPN9LaLe64E2IrI0fPZWEcoiff9hzzsvo/fQCx0YjMbPC2T3gqQ48QZRltdU9hQilTjHk3geQ==",
+ "version": "0.15.16",
+ "resolved": "https://registry.npmjs.org/esbuild-linux-s390x/-/esbuild-linux-s390x-0.15.16.tgz",
+ "integrity": "sha512-VkZaGssvPDQtx4fvVdZ9czezmyWyzpQhEbSNsHZZN0BHvxRLOYAQ7sjay8nMQwYswP6O2KlZluRMNPYefFRs+w==",
"cpu": [
"s390x"
],
@@ -2704,12 +2808,15 @@
"optional": true,
"os": [
"linux"
- ]
+ ],
+ "engines": {
+ "node": ">=12"
+ }
},
"node_modules/esbuild-netbsd-64": {
- "version": "0.14.13",
- "resolved": "https://registry.npmjs.org/esbuild-netbsd-64/-/esbuild-netbsd-64-0.14.13.tgz",
- "integrity": "sha512-jz96PQb0ltqyqLggPpcRbWxzLvWHvrZBHZQyjcOzKRDqg1fR/R1y10b1Cuv84xoIbdAf+ceNUJkMN21FfR9G2g==",
+ "version": "0.15.16",
+ "resolved": "https://registry.npmjs.org/esbuild-netbsd-64/-/esbuild-netbsd-64-0.15.16.tgz",
+ "integrity": "sha512-ElQ9rhdY51et6MJTWrCPbqOd/YuPowD7Cxx3ee8wlmXQQVW7UvQI6nSprJ9uVFQISqSF5e5EWpwWqXZsECLvXg==",
"cpu": [
"x64"
],
@@ -2717,12 +2824,15 @@
"optional": true,
"os": [
"netbsd"
- ]
+ ],
+ "engines": {
+ "node": ">=12"
+ }
},
"node_modules/esbuild-openbsd-64": {
- "version": "0.14.13",
- "resolved": "https://registry.npmjs.org/esbuild-openbsd-64/-/esbuild-openbsd-64-0.14.13.tgz",
- "integrity": "sha512-bp6zSo3kDCXKPM5MmVUg6DEpt+yXDx37iDGzNTn3Kf9xh6d0cdITxUC4Bx6S3Di79GVYubWs+wNjSRVFIJpryw==",
+ "version": "0.15.16",
+ "resolved": "https://registry.npmjs.org/esbuild-openbsd-64/-/esbuild-openbsd-64-0.15.16.tgz",
+ "integrity": "sha512-KgxMHyxMCT+NdLQE1zVJEsLSt2QQBAvJfmUGDmgEq8Fvjrf6vSKB00dVHUEDKcJwMID6CdgCpvYNt999tIYhqA==",
"cpu": [
"x64"
],
@@ -2730,12 +2840,15 @@
"optional": true,
"os": [
"openbsd"
- ]
+ ],
+ "engines": {
+ "node": ">=12"
+ }
},
"node_modules/esbuild-sunos-64": {
- "version": "0.14.13",
- "resolved": "https://registry.npmjs.org/esbuild-sunos-64/-/esbuild-sunos-64-0.14.13.tgz",
- "integrity": "sha512-08Fne1T9QHYxUnu55sV9V4i/yECADOaI1zMGET2YUa8SRkib10i80hc89U7U/G02DxpN/KUJMWEGq2wKTn0QFQ==",
+ "version": "0.15.16",
+ "resolved": "https://registry.npmjs.org/esbuild-sunos-64/-/esbuild-sunos-64-0.15.16.tgz",
+ "integrity": "sha512-exSAx8Phj7QylXHlMfIyEfNrmqnLxFqLxdQF6MBHPdHAjT7fsKaX6XIJn+aQEFiOcE4X8e7VvdMCJ+WDZxjSRQ==",
"cpu": [
"x64"
],
@@ -2743,12 +2856,15 @@
"optional": true,
"os": [
"sunos"
- ]
+ ],
+ "engines": {
+ "node": ">=12"
+ }
},
"node_modules/esbuild-windows-32": {
- "version": "0.14.13",
- "resolved": "https://registry.npmjs.org/esbuild-windows-32/-/esbuild-windows-32-0.14.13.tgz",
- "integrity": "sha512-MW3BMIi9+fzTyDdljH0ftfT/qlD3t+aVzle1O+zZ2MgHRMQD20JwWgyqoJXhe6uDVyunrAUbcjH3qTIEZN3isg==",
+ "version": "0.15.16",
+ "resolved": "https://registry.npmjs.org/esbuild-windows-32/-/esbuild-windows-32-0.15.16.tgz",
+ "integrity": "sha512-zQgWpY5pUCSTOwqKQ6/vOCJfRssTvxFuEkpB4f2VUGPBpdddZfdj8hbZuFRdZRPIVHvN7juGcpgCA/XCF37mAQ==",
"cpu": [
"ia32"
],
@@ -2756,12 +2872,15 @@
"optional": true,
"os": [
"win32"
- ]
+ ],
+ "engines": {
+ "node": ">=12"
+ }
},
"node_modules/esbuild-windows-64": {
- "version": "0.14.13",
- "resolved": "https://registry.npmjs.org/esbuild-windows-64/-/esbuild-windows-64-0.14.13.tgz",
- "integrity": "sha512-d7+0N+EOgBKdi/nMxlQ8QA5xHBlpcLtSrYnHsA+Xp4yZk28dYfRw1+embsHf5uN5/1iPvrJwPrcpgDH1xyy4JA==",
+ "version": "0.15.16",
+ "resolved": "https://registry.npmjs.org/esbuild-windows-64/-/esbuild-windows-64-0.15.16.tgz",
+ "integrity": "sha512-HjW1hHRLSncnM3MBCP7iquatHVJq9l0S2xxsHHj4yzf4nm9TU4Z7k4NkeMlD/dHQ4jPlQQhwcMvwbJiOefSuZw==",
"cpu": [
"x64"
],
@@ -2769,12 +2888,15 @@
"optional": true,
"os": [
"win32"
- ]
+ ],
+ "engines": {
+ "node": ">=12"
+ }
},
"node_modules/esbuild-windows-arm64": {
- "version": "0.14.13",
- "resolved": "https://registry.npmjs.org/esbuild-windows-arm64/-/esbuild-windows-arm64-0.14.13.tgz",
- "integrity": "sha512-oX5hmgXk9yNKbb5AxThzRQm/E9kiHyDll7JJeyeT1fuGENTifv33f0INCpjBQ+Ty5ChKc84++ZQTEBwLCA12Kw==",
+ "version": "0.15.16",
+ "resolved": "https://registry.npmjs.org/esbuild-windows-arm64/-/esbuild-windows-arm64-0.15.16.tgz",
+ "integrity": "sha512-oCcUKrJaMn04Vxy9Ekd8x23O8LoU01+4NOkQ2iBToKgnGj5eo1vU9i27NQZ9qC8NFZgnQQZg5oZWAejmbsppNA==",
"cpu": [
"arm64"
],
@@ -2782,7 +2904,10 @@
"optional": true,
"os": [
"win32"
- ]
+ ],
+ "engines": {
+ "node": ">=12"
+ }
},
"node_modules/escalade": {
"version": "3.1.1",
@@ -8329,6 +8454,20 @@
"integrity": "sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==",
"dev": true
},
+ "@esbuild/android-arm": {
+ "version": "0.15.16",
+ "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.15.16.tgz",
+ "integrity": "sha512-nyB6CH++2mSgx3GbnrJsZSxzne5K0HMyNIWafDHqYy7IwxFc4fd/CgHVZXr8Eh+Q3KbIAcAe3vGyqIPhGblvMQ==",
+ "dev": true,
+ "optional": true
+ },
+ "@esbuild/linux-loong64": {
+ "version": "0.15.16",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.15.16.tgz",
+ "integrity": "sha512-SDLfP1uoB0HZ14CdVYgagllgrG7Mdxhkt4jDJOKl/MldKrkQ6vDJMZKl2+5XsEY/Lzz37fjgLQoJBGuAw/x8kQ==",
+ "dev": true,
+ "optional": true
+ },
"@eslint/eslintrc": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.0.tgz",
@@ -9935,154 +10074,172 @@
}
},
"esbuild": {
- "version": "0.14.13",
- "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.14.13.tgz",
- "integrity": "sha512-FIxvAdj3i2oHA6ex+E67bG7zlSTO+slt8kU2ogHDgGtrQLy2HNChv3PYjiFTYkt8hZbEAniZCXVeHn+FrHt7dA==",
+ "version": "0.15.16",
+ "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.15.16.tgz",
+ "integrity": "sha512-o6iS9zxdHrrojjlj6pNGC2NAg86ECZqIETswTM5KmJitq+R1YmahhWtMumeQp9lHqJaROGnsBi2RLawGnfo5ZQ==",
"dev": true,
"requires": {
- "esbuild-android-arm64": "0.14.13",
- "esbuild-darwin-64": "0.14.13",
- "esbuild-darwin-arm64": "0.14.13",
- "esbuild-freebsd-64": "0.14.13",
- "esbuild-freebsd-arm64": "0.14.13",
- "esbuild-linux-32": "0.14.13",
- "esbuild-linux-64": "0.14.13",
- "esbuild-linux-arm": "0.14.13",
- "esbuild-linux-arm64": "0.14.13",
- "esbuild-linux-mips64le": "0.14.13",
- "esbuild-linux-ppc64le": "0.14.13",
- "esbuild-linux-s390x": "0.14.13",
- "esbuild-netbsd-64": "0.14.13",
- "esbuild-openbsd-64": "0.14.13",
- "esbuild-sunos-64": "0.14.13",
- "esbuild-windows-32": "0.14.13",
- "esbuild-windows-64": "0.14.13",
- "esbuild-windows-arm64": "0.14.13"
+ "@esbuild/android-arm": "0.15.16",
+ "@esbuild/linux-loong64": "0.15.16",
+ "esbuild-android-64": "0.15.16",
+ "esbuild-android-arm64": "0.15.16",
+ "esbuild-darwin-64": "0.15.16",
+ "esbuild-darwin-arm64": "0.15.16",
+ "esbuild-freebsd-64": "0.15.16",
+ "esbuild-freebsd-arm64": "0.15.16",
+ "esbuild-linux-32": "0.15.16",
+ "esbuild-linux-64": "0.15.16",
+ "esbuild-linux-arm": "0.15.16",
+ "esbuild-linux-arm64": "0.15.16",
+ "esbuild-linux-mips64le": "0.15.16",
+ "esbuild-linux-ppc64le": "0.15.16",
+ "esbuild-linux-riscv64": "0.15.16",
+ "esbuild-linux-s390x": "0.15.16",
+ "esbuild-netbsd-64": "0.15.16",
+ "esbuild-openbsd-64": "0.15.16",
+ "esbuild-sunos-64": "0.15.16",
+ "esbuild-windows-32": "0.15.16",
+ "esbuild-windows-64": "0.15.16",
+ "esbuild-windows-arm64": "0.15.16"
}
},
+ "esbuild-android-64": {
+ "version": "0.15.16",
+ "resolved": "https://registry.npmjs.org/esbuild-android-64/-/esbuild-android-64-0.15.16.tgz",
+ "integrity": "sha512-Vwkv/sT0zMSgPSVO3Jlt1pUbnZuOgtOQJkJkyyJFAlLe7BiT8e9ESzo0zQSx4c3wW4T6kGChmKDPMbWTgtliQA==",
+ "dev": true,
+ "optional": true
+ },
"esbuild-android-arm64": {
- "version": "0.14.13",
- "resolved": "https://registry.npmjs.org/esbuild-android-arm64/-/esbuild-android-arm64-0.14.13.tgz",
- "integrity": "sha512-rhtwl+KJ3BzzXkK09N3/YbEF1i5WhriysJEStoeWNBzchx9hlmzyWmDGQQhu56HF78ua3JrVPyLOsdLGvtMvxQ==",
+ "version": "0.15.16",
+ "resolved": "https://registry.npmjs.org/esbuild-android-arm64/-/esbuild-android-arm64-0.15.16.tgz",
+ "integrity": "sha512-lqfKuofMExL5niNV3gnhMUYacSXfsvzTa/58sDlBET/hCOG99Zmeh+lz6kvdgvGOsImeo6J9SW21rFCogNPLxg==",
"dev": true,
"optional": true
},
"esbuild-darwin-64": {
- "version": "0.14.13",
- "resolved": "https://registry.npmjs.org/esbuild-darwin-64/-/esbuild-darwin-64-0.14.13.tgz",
- "integrity": "sha512-Fl47xIt5RMu50WIgMU93kwmUUJb+BPuL8R895n/aBNQqavS+KUMpLPoqKGABBV4myfx/fnAD/97X8Gt1C1YW6w==",
+ "version": "0.15.16",
+ "resolved": "https://registry.npmjs.org/esbuild-darwin-64/-/esbuild-darwin-64-0.15.16.tgz",
+ "integrity": "sha512-wo2VWk/n/9V2TmqUZ/KpzRjCEcr00n7yahEdmtzlrfQ3lfMCf3Wa+0sqHAbjk3C6CKkR3WKK/whkMq5Gj4Da9g==",
"dev": true,
"optional": true
},
"esbuild-darwin-arm64": {
- "version": "0.14.13",
- "resolved": "https://registry.npmjs.org/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.14.13.tgz",
- "integrity": "sha512-UttqKRFXsWvuivcyAbFmo54vdkC9Me1ZYQNuoz/uBYDbkb2MgqKYG2+xoVKPBhLvhT0CKM5QGKD81flMH5BE6A==",
+ "version": "0.15.16",
+ "resolved": "https://registry.npmjs.org/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.15.16.tgz",
+ "integrity": "sha512-fMXaUr5ou0M4WnewBKsspMtX++C1yIa3nJ5R2LSbLCfJT3uFdcRoU/NZjoM4kOMKyOD9Sa/2vlgN8G07K3SJnw==",
"dev": true,
"optional": true
},
"esbuild-freebsd-64": {
- "version": "0.14.13",
- "resolved": "https://registry.npmjs.org/esbuild-freebsd-64/-/esbuild-freebsd-64-0.14.13.tgz",
- "integrity": "sha512-dlIhPFSp29Yq2TPh7Cm3/4M0uKjlfvOylHVNCRvRNiOvDbBol6/NZ3kLisczms+Yra0rxVapBPN1oMbSMuts9g==",
+ "version": "0.15.16",
+ "resolved": "https://registry.npmjs.org/esbuild-freebsd-64/-/esbuild-freebsd-64-0.15.16.tgz",
+ "integrity": "sha512-UzIc0xlRx5x9kRuMr+E3+hlSOxa/aRqfuMfiYBXu2jJ8Mzej4lGL7+o6F5hzhLqWfWm1GWHNakIdlqg1ayaTNQ==",
"dev": true,
"optional": true
},
"esbuild-freebsd-arm64": {
- "version": "0.14.13",
- "resolved": "https://registry.npmjs.org/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.14.13.tgz",
- "integrity": "sha512-bNOHLu7Oq6RwaAMnwPbJ40DVGPl9GlAOnfH/dFZ792f8hFEbopkbtVzo1SU1jjfY3TGLWOgqHNWxPxx1N7Au+g==",
+ "version": "0.15.16",
+ "resolved": "https://registry.npmjs.org/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.15.16.tgz",
+ "integrity": "sha512-8xyiYuGc0DLZphFQIiYaLHlfoP+hAN9RHbE+Ibh8EUcDNHAqbQgUrQg7pE7Bo00rXmQ5Ap6KFgcR0b4ALZls1g==",
"dev": true,
"optional": true
},
"esbuild-linux-32": {
- "version": "0.14.13",
- "resolved": "https://registry.npmjs.org/esbuild-linux-32/-/esbuild-linux-32-0.14.13.tgz",
- "integrity": "sha512-WzXyBx6zx16adGi7wPBvH2lRCBzYMcqnBRrJ8ciLIqYyruGvprZocX1nFWfiexjLcFxIElWnMNPX6LG7ULqyXA==",
+ "version": "0.15.16",
+ "resolved": "https://registry.npmjs.org/esbuild-linux-32/-/esbuild-linux-32-0.15.16.tgz",
+ "integrity": "sha512-iGijUTV+0kIMyUVoynK0v+32Oi8yyp0xwMzX69GX+5+AniNy/C/AL1MjFTsozRp/3xQPl7jVux/PLe2ds10/2w==",
"dev": true,
"optional": true
},
"esbuild-linux-64": {
- "version": "0.14.13",
- "resolved": "https://registry.npmjs.org/esbuild-linux-64/-/esbuild-linux-64-0.14.13.tgz",
- "integrity": "sha512-P6OFAfcoUvE7g9h/0UKm3qagvTovwqpCF1wbFLWe/BcCY8BS1bR/+SxUjCeKX2BcpIsg4/43ezHDE/ntg/iOpw==",
+ "version": "0.15.16",
+ "resolved": "https://registry.npmjs.org/esbuild-linux-64/-/esbuild-linux-64-0.15.16.tgz",
+ "integrity": "sha512-tuSOjXdLw7VzaUj89fIdAaQT7zFGbKBcz4YxbWrOiXkwscYgE7HtTxUavreBbnRkGxKwr9iT/gmeJWNm4djy/g==",
"dev": true,
"optional": true
},
"esbuild-linux-arm": {
- "version": "0.14.13",
- "resolved": "https://registry.npmjs.org/esbuild-linux-arm/-/esbuild-linux-arm-0.14.13.tgz",
- "integrity": "sha512-4jmm0UySCg3Wi6FEBS7jpiPb1IyckI5um5kzYRwulHxPzkiokd6cgpcsTakR4/Y84UEicS8LnFAghHhXHZhbFg==",
+ "version": "0.15.16",
+ "resolved": "https://registry.npmjs.org/esbuild-linux-arm/-/esbuild-linux-arm-0.15.16.tgz",
+ "integrity": "sha512-XKcrxCEXDTOuoRj5l12tJnkvuxXBMKwEC5j0JISw3ziLf0j4zIwXbKbTmUrKFWbo6ZgvNpa7Y5dnbsjVvH39bQ==",
"dev": true,
"optional": true
},
"esbuild-linux-arm64": {
- "version": "0.14.13",
- "resolved": "https://registry.npmjs.org/esbuild-linux-arm64/-/esbuild-linux-arm64-0.14.13.tgz",
- "integrity": "sha512-k/uIvmkm4mc7vyMvJVwILgGxi2F+FuvLdmESIIWoHrnxEfEekC5AWpI/R6GQ2OMfp8snebSQLs8KL05QPnt1zA==",
+ "version": "0.15.16",
+ "resolved": "https://registry.npmjs.org/esbuild-linux-arm64/-/esbuild-linux-arm64-0.15.16.tgz",
+ "integrity": "sha512-mPYksnfHnemNrvjrDhZyixL/AfbJN0Xn9S34ZOHYdh6/jJcNd8iTsv3JwJoEvTJqjMggjMhGUPJAdjnFBHoH8A==",
"dev": true,
"optional": true
},
"esbuild-linux-mips64le": {
- "version": "0.14.13",
- "resolved": "https://registry.npmjs.org/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.14.13.tgz",
- "integrity": "sha512-vwYtgjQ1TRlUGL88km9wH9TjXsdZyZ/Xht1ASptg5XGRlqGquVjLGH11PfLLunoMdkQ0YTXR68b4l5gRfjVbyg==",
+ "version": "0.15.16",
+ "resolved": "https://registry.npmjs.org/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.15.16.tgz",
+ "integrity": "sha512-kSJO2PXaxfm0pWY39+YX+QtpFqyyrcp0ZeI8QPTrcFVQoWEPiPVtOfTZeS3ZKedfH+Ga38c4DSzmKMQJocQv6A==",
"dev": true,
"optional": true
},
"esbuild-linux-ppc64le": {
- "version": "0.14.13",
- "resolved": "https://registry.npmjs.org/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.14.13.tgz",
- "integrity": "sha512-0KqDSIkZaYugtcdpFCd3eQ38Fg6TzhxmOpkhDIKNTwD/W2RoXeiS+Z4y5yQ3oysb/ySDOxWkwNqTdXS4sz2LdQ==",
+ "version": "0.15.16",
+ "resolved": "https://registry.npmjs.org/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.15.16.tgz",
+ "integrity": "sha512-NimPikwkBY0yGABw6SlhKrtT35sU4O23xkhlrTT/O6lSxv3Pm5iSc6OYaqVAHWkLdVf31bF4UDVFO+D990WpAA==",
+ "dev": true,
+ "optional": true
+ },
+ "esbuild-linux-riscv64": {
+ "version": "0.15.16",
+ "resolved": "https://registry.npmjs.org/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.15.16.tgz",
+ "integrity": "sha512-ty2YUHZlwFOwp7pR+J87M4CVrXJIf5ZZtU/umpxgVJBXvWjhziSLEQxvl30SYfUPq0nzeWKBGw5i/DieiHeKfw==",
"dev": true,
"optional": true
},
"esbuild-linux-s390x": {
- "version": "0.14.13",
- "resolved": "https://registry.npmjs.org/esbuild-linux-s390x/-/esbuild-linux-s390x-0.14.13.tgz",
- "integrity": "sha512-bG20i7d0CN97fwPN9LaLe64E2IrI0fPZWEcoiff9hzzsvo/fQCx0YjMbPC2T3gqQ48QZRltdU9hQilTjHk3geQ==",
+ "version": "0.15.16",
+ "resolved": "https://registry.npmjs.org/esbuild-linux-s390x/-/esbuild-linux-s390x-0.15.16.tgz",
+ "integrity": "sha512-VkZaGssvPDQtx4fvVdZ9czezmyWyzpQhEbSNsHZZN0BHvxRLOYAQ7sjay8nMQwYswP6O2KlZluRMNPYefFRs+w==",
"dev": true,
"optional": true
},
"esbuild-netbsd-64": {
- "version": "0.14.13",
- "resolved": "https://registry.npmjs.org/esbuild-netbsd-64/-/esbuild-netbsd-64-0.14.13.tgz",
- "integrity": "sha512-jz96PQb0ltqyqLggPpcRbWxzLvWHvrZBHZQyjcOzKRDqg1fR/R1y10b1Cuv84xoIbdAf+ceNUJkMN21FfR9G2g==",
+ "version": "0.15.16",
+ "resolved": "https://registry.npmjs.org/esbuild-netbsd-64/-/esbuild-netbsd-64-0.15.16.tgz",
+ "integrity": "sha512-ElQ9rhdY51et6MJTWrCPbqOd/YuPowD7Cxx3ee8wlmXQQVW7UvQI6nSprJ9uVFQISqSF5e5EWpwWqXZsECLvXg==",
"dev": true,
"optional": true
},
"esbuild-openbsd-64": {
- "version": "0.14.13",
- "resolved": "https://registry.npmjs.org/esbuild-openbsd-64/-/esbuild-openbsd-64-0.14.13.tgz",
- "integrity": "sha512-bp6zSo3kDCXKPM5MmVUg6DEpt+yXDx37iDGzNTn3Kf9xh6d0cdITxUC4Bx6S3Di79GVYubWs+wNjSRVFIJpryw==",
+ "version": "0.15.16",
+ "resolved": "https://registry.npmjs.org/esbuild-openbsd-64/-/esbuild-openbsd-64-0.15.16.tgz",
+ "integrity": "sha512-KgxMHyxMCT+NdLQE1zVJEsLSt2QQBAvJfmUGDmgEq8Fvjrf6vSKB00dVHUEDKcJwMID6CdgCpvYNt999tIYhqA==",
"dev": true,
"optional": true
},
"esbuild-sunos-64": {
- "version": "0.14.13",
- "resolved": "https://registry.npmjs.org/esbuild-sunos-64/-/esbuild-sunos-64-0.14.13.tgz",
- "integrity": "sha512-08Fne1T9QHYxUnu55sV9V4i/yECADOaI1zMGET2YUa8SRkib10i80hc89U7U/G02DxpN/KUJMWEGq2wKTn0QFQ==",
+ "version": "0.15.16",
+ "resolved": "https://registry.npmjs.org/esbuild-sunos-64/-/esbuild-sunos-64-0.15.16.tgz",
+ "integrity": "sha512-exSAx8Phj7QylXHlMfIyEfNrmqnLxFqLxdQF6MBHPdHAjT7fsKaX6XIJn+aQEFiOcE4X8e7VvdMCJ+WDZxjSRQ==",
"dev": true,
"optional": true
},
"esbuild-windows-32": {
- "version": "0.14.13",
- "resolved": "https://registry.npmjs.org/esbuild-windows-32/-/esbuild-windows-32-0.14.13.tgz",
- "integrity": "sha512-MW3BMIi9+fzTyDdljH0ftfT/qlD3t+aVzle1O+zZ2MgHRMQD20JwWgyqoJXhe6uDVyunrAUbcjH3qTIEZN3isg==",
+ "version": "0.15.16",
+ "resolved": "https://registry.npmjs.org/esbuild-windows-32/-/esbuild-windows-32-0.15.16.tgz",
+ "integrity": "sha512-zQgWpY5pUCSTOwqKQ6/vOCJfRssTvxFuEkpB4f2VUGPBpdddZfdj8hbZuFRdZRPIVHvN7juGcpgCA/XCF37mAQ==",
"dev": true,
"optional": true
},
"esbuild-windows-64": {
- "version": "0.14.13",
- "resolved": "https://registry.npmjs.org/esbuild-windows-64/-/esbuild-windows-64-0.14.13.tgz",
- "integrity": "sha512-d7+0N+EOgBKdi/nMxlQ8QA5xHBlpcLtSrYnHsA+Xp4yZk28dYfRw1+embsHf5uN5/1iPvrJwPrcpgDH1xyy4JA==",
+ "version": "0.15.16",
+ "resolved": "https://registry.npmjs.org/esbuild-windows-64/-/esbuild-windows-64-0.15.16.tgz",
+ "integrity": "sha512-HjW1hHRLSncnM3MBCP7iquatHVJq9l0S2xxsHHj4yzf4nm9TU4Z7k4NkeMlD/dHQ4jPlQQhwcMvwbJiOefSuZw==",
"dev": true,
"optional": true
},
"esbuild-windows-arm64": {
- "version": "0.14.13",
- "resolved": "https://registry.npmjs.org/esbuild-windows-arm64/-/esbuild-windows-arm64-0.14.13.tgz",
- "integrity": "sha512-oX5hmgXk9yNKbb5AxThzRQm/E9kiHyDll7JJeyeT1fuGENTifv33f0INCpjBQ+Ty5ChKc84++ZQTEBwLCA12Kw==",
+ "version": "0.15.16",
+ "resolved": "https://registry.npmjs.org/esbuild-windows-arm64/-/esbuild-windows-arm64-0.15.16.tgz",
+ "integrity": "sha512-oCcUKrJaMn04Vxy9Ekd8x23O8LoU01+4NOkQ2iBToKgnGj5eo1vU9i27NQZ9qC8NFZgnQQZg5oZWAejmbsppNA==",
"dev": true,
"optional": true
},
diff --git a/scripts/deps/manage_node_deps.py b/scripts/deps/manage_node_deps.py
index ca45f86..443cd48 100755
--- a/scripts/deps/manage_node_deps.py
+++ b/scripts/deps/manage_node_deps.py
@@ -66,7 +66,7 @@
"convert-source-map": "1.8.0",
# This should be match with esbuild in DEPS.
- "esbuild": "0.14.13",
+ "esbuild": "0.15.16",
"escodegen": "2.0.0",
"eslint": "8.19.0",
"eslint-plugin-import": "2.25.4",