esbuild 0.20.1 → 0.20.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/esbuild +1 -1
- package/lib/main.d.ts +30 -6
- package/lib/main.js +8 -8
- package/package.json +24 -24
package/bin/esbuild
CHANGED
|
@@ -200,7 +200,7 @@ for your current platform.`);
|
|
|
200
200
|
"node_modules",
|
|
201
201
|
".cache",
|
|
202
202
|
"esbuild",
|
|
203
|
-
`pnpapi-${pkg.replace("/", "-")}-${"0.20.
|
|
203
|
+
`pnpapi-${pkg.replace("/", "-")}-${"0.20.2"}-${path.basename(subpath)}`
|
|
204
204
|
);
|
|
205
205
|
if (!fs.existsSync(binTargetPath)) {
|
|
206
206
|
fs.mkdirSync(path.dirname(binTargetPath), { recursive: true });
|
package/lib/main.d.ts
CHANGED
|
@@ -664,16 +664,40 @@ export let version: string
|
|
|
664
664
|
|
|
665
665
|
// Call this function to terminate esbuild's child process. The child process
|
|
666
666
|
// is not terminated and re-created after each API call because it's more
|
|
667
|
-
// efficient to keep it around when there are multiple API calls.
|
|
668
|
-
// process normally exits automatically when the parent process exits, so you
|
|
669
|
-
// usually don't need to call this function.
|
|
667
|
+
// efficient to keep it around when there are multiple API calls.
|
|
670
668
|
//
|
|
671
|
-
//
|
|
672
|
-
//
|
|
673
|
-
//
|
|
669
|
+
// In node this happens automatically before the parent node process exits. So
|
|
670
|
+
// you only need to call this if you know you will not make any more esbuild
|
|
671
|
+
// API calls and you want to clean up resources.
|
|
672
|
+
//
|
|
673
|
+
// Unlike node, Deno lacks the necessary APIs to clean up child processes
|
|
674
|
+
// automatically. You must manually call stop() in Deno when you're done
|
|
675
|
+
// using esbuild or Deno will continue running forever.
|
|
674
676
|
//
|
|
675
677
|
// Another reason you might want to call this is if you are using esbuild from
|
|
676
678
|
// within a Deno test. Deno fails tests that create a child process without
|
|
677
679
|
// killing it before the test ends, so you have to call this function (and
|
|
678
680
|
// await the returned promise) in every Deno test that uses esbuild.
|
|
679
681
|
export declare function stop(): Promise<void>
|
|
682
|
+
|
|
683
|
+
// Note: These declarations exist to avoid type errors when you omit "dom" from
|
|
684
|
+
// "lib" in your "tsconfig.json" file. TypeScript confusingly declares the
|
|
685
|
+
// global "WebAssembly" type in "lib.dom.d.ts" even though it has nothing to do
|
|
686
|
+
// with the browser DOM and is present in many non-browser JavaScript runtimes
|
|
687
|
+
// (e.g. node and deno). Declaring it here allows esbuild's API to be used in
|
|
688
|
+
// these scenarios.
|
|
689
|
+
//
|
|
690
|
+
// There's an open issue about getting this problem corrected (although these
|
|
691
|
+
// declarations will need to remain even if this is fixed for backward
|
|
692
|
+
// compatibility with older TypeScript versions):
|
|
693
|
+
//
|
|
694
|
+
// https://github.com/microsoft/TypeScript-DOM-lib-generator/issues/826
|
|
695
|
+
//
|
|
696
|
+
declare global {
|
|
697
|
+
namespace WebAssembly {
|
|
698
|
+
interface Module {
|
|
699
|
+
}
|
|
700
|
+
}
|
|
701
|
+
interface URL {
|
|
702
|
+
}
|
|
703
|
+
}
|
package/lib/main.js
CHANGED
|
@@ -747,8 +747,8 @@ function createChannel(streamIn) {
|
|
|
747
747
|
if (isFirstPacket) {
|
|
748
748
|
isFirstPacket = false;
|
|
749
749
|
let binaryVersion = String.fromCharCode(...bytes);
|
|
750
|
-
if (binaryVersion !== "0.20.
|
|
751
|
-
throw new Error(`Cannot start service: Host version "${"0.20.
|
|
750
|
+
if (binaryVersion !== "0.20.2") {
|
|
751
|
+
throw new Error(`Cannot start service: Host version "${"0.20.2"}" does not match binary version ${quote(binaryVersion)}`);
|
|
752
752
|
}
|
|
753
753
|
return;
|
|
754
754
|
}
|
|
@@ -1941,7 +1941,7 @@ for your current platform.`);
|
|
|
1941
1941
|
"node_modules",
|
|
1942
1942
|
".cache",
|
|
1943
1943
|
"esbuild",
|
|
1944
|
-
`pnpapi-${pkg.replace("/", "-")}-${"0.20.
|
|
1944
|
+
`pnpapi-${pkg.replace("/", "-")}-${"0.20.2"}-${path.basename(subpath)}`
|
|
1945
1945
|
);
|
|
1946
1946
|
if (!fs.existsSync(binTargetPath)) {
|
|
1947
1947
|
fs.mkdirSync(path.dirname(binTargetPath), { recursive: true });
|
|
@@ -1976,7 +1976,7 @@ if (process.env.ESBUILD_WORKER_THREADS !== "0") {
|
|
|
1976
1976
|
}
|
|
1977
1977
|
}
|
|
1978
1978
|
var _a;
|
|
1979
|
-
var isInternalWorkerThread = ((_a = worker_threads == null ? void 0 : worker_threads.workerData) == null ? void 0 : _a.esbuildVersion) === "0.20.
|
|
1979
|
+
var isInternalWorkerThread = ((_a = worker_threads == null ? void 0 : worker_threads.workerData) == null ? void 0 : _a.esbuildVersion) === "0.20.2";
|
|
1980
1980
|
var esbuildCommandAndArgs = () => {
|
|
1981
1981
|
if ((!ESBUILD_BINARY_PATH || false) && (path2.basename(__filename) !== "main.js" || path2.basename(__dirname) !== "lib")) {
|
|
1982
1982
|
throw new Error(
|
|
@@ -2043,7 +2043,7 @@ var fsAsync = {
|
|
|
2043
2043
|
}
|
|
2044
2044
|
}
|
|
2045
2045
|
};
|
|
2046
|
-
var version = "0.20.
|
|
2046
|
+
var version = "0.20.2";
|
|
2047
2047
|
var build = (options) => ensureServiceIsRunning().build(options);
|
|
2048
2048
|
var context = (buildOptions) => ensureServiceIsRunning().context(buildOptions);
|
|
2049
2049
|
var transform = (input, options) => ensureServiceIsRunning().transform(input, options);
|
|
@@ -2161,7 +2161,7 @@ var ensureServiceIsRunning = () => {
|
|
|
2161
2161
|
if (longLivedService)
|
|
2162
2162
|
return longLivedService;
|
|
2163
2163
|
let [command, args] = esbuildCommandAndArgs();
|
|
2164
|
-
let child = child_process.spawn(command, args.concat(`--service=${"0.20.
|
|
2164
|
+
let child = child_process.spawn(command, args.concat(`--service=${"0.20.2"}`, "--ping"), {
|
|
2165
2165
|
windowsHide: true,
|
|
2166
2166
|
stdio: ["pipe", "pipe", "inherit"],
|
|
2167
2167
|
cwd: defaultWD
|
|
@@ -2269,7 +2269,7 @@ var runServiceSync = (callback) => {
|
|
|
2269
2269
|
esbuild: node_exports
|
|
2270
2270
|
});
|
|
2271
2271
|
callback(service);
|
|
2272
|
-
let stdout = child_process.execFileSync(command, args.concat(`--service=${"0.20.
|
|
2272
|
+
let stdout = child_process.execFileSync(command, args.concat(`--service=${"0.20.2"}`), {
|
|
2273
2273
|
cwd: defaultWD,
|
|
2274
2274
|
windowsHide: true,
|
|
2275
2275
|
input: stdin,
|
|
@@ -2289,7 +2289,7 @@ var workerThreadService = null;
|
|
|
2289
2289
|
var startWorkerThreadService = (worker_threads2) => {
|
|
2290
2290
|
let { port1: mainPort, port2: workerPort } = new worker_threads2.MessageChannel();
|
|
2291
2291
|
let worker = new worker_threads2.Worker(__filename, {
|
|
2292
|
-
workerData: { workerPort, defaultWD, esbuildVersion: "0.20.
|
|
2292
|
+
workerData: { workerPort, defaultWD, esbuildVersion: "0.20.2" },
|
|
2293
2293
|
transferList: [workerPort],
|
|
2294
2294
|
// From node's documentation: https://nodejs.org/api/worker_threads.html
|
|
2295
2295
|
//
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "esbuild",
|
|
3
|
-
"version": "0.20.
|
|
3
|
+
"version": "0.20.2",
|
|
4
4
|
"description": "An extremely fast JavaScript and CSS bundler and minifier.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -18,29 +18,29 @@
|
|
|
18
18
|
"esbuild": "bin/esbuild"
|
|
19
19
|
},
|
|
20
20
|
"optionalDependencies": {
|
|
21
|
-
"@esbuild/aix-ppc64": "0.20.
|
|
22
|
-
"@esbuild/android-arm": "0.20.
|
|
23
|
-
"@esbuild/android-arm64": "0.20.
|
|
24
|
-
"@esbuild/android-x64": "0.20.
|
|
25
|
-
"@esbuild/darwin-arm64": "0.20.
|
|
26
|
-
"@esbuild/darwin-x64": "0.20.
|
|
27
|
-
"@esbuild/freebsd-arm64": "0.20.
|
|
28
|
-
"@esbuild/freebsd-x64": "0.20.
|
|
29
|
-
"@esbuild/linux-arm": "0.20.
|
|
30
|
-
"@esbuild/linux-arm64": "0.20.
|
|
31
|
-
"@esbuild/linux-ia32": "0.20.
|
|
32
|
-
"@esbuild/linux-loong64": "0.20.
|
|
33
|
-
"@esbuild/linux-mips64el": "0.20.
|
|
34
|
-
"@esbuild/linux-ppc64": "0.20.
|
|
35
|
-
"@esbuild/linux-riscv64": "0.20.
|
|
36
|
-
"@esbuild/linux-s390x": "0.20.
|
|
37
|
-
"@esbuild/linux-x64": "0.20.
|
|
38
|
-
"@esbuild/netbsd-x64": "0.20.
|
|
39
|
-
"@esbuild/openbsd-x64": "0.20.
|
|
40
|
-
"@esbuild/sunos-x64": "0.20.
|
|
41
|
-
"@esbuild/win32-arm64": "0.20.
|
|
42
|
-
"@esbuild/win32-ia32": "0.20.
|
|
43
|
-
"@esbuild/win32-x64": "0.20.
|
|
21
|
+
"@esbuild/aix-ppc64": "0.20.2",
|
|
22
|
+
"@esbuild/android-arm": "0.20.2",
|
|
23
|
+
"@esbuild/android-arm64": "0.20.2",
|
|
24
|
+
"@esbuild/android-x64": "0.20.2",
|
|
25
|
+
"@esbuild/darwin-arm64": "0.20.2",
|
|
26
|
+
"@esbuild/darwin-x64": "0.20.2",
|
|
27
|
+
"@esbuild/freebsd-arm64": "0.20.2",
|
|
28
|
+
"@esbuild/freebsd-x64": "0.20.2",
|
|
29
|
+
"@esbuild/linux-arm": "0.20.2",
|
|
30
|
+
"@esbuild/linux-arm64": "0.20.2",
|
|
31
|
+
"@esbuild/linux-ia32": "0.20.2",
|
|
32
|
+
"@esbuild/linux-loong64": "0.20.2",
|
|
33
|
+
"@esbuild/linux-mips64el": "0.20.2",
|
|
34
|
+
"@esbuild/linux-ppc64": "0.20.2",
|
|
35
|
+
"@esbuild/linux-riscv64": "0.20.2",
|
|
36
|
+
"@esbuild/linux-s390x": "0.20.2",
|
|
37
|
+
"@esbuild/linux-x64": "0.20.2",
|
|
38
|
+
"@esbuild/netbsd-x64": "0.20.2",
|
|
39
|
+
"@esbuild/openbsd-x64": "0.20.2",
|
|
40
|
+
"@esbuild/sunos-x64": "0.20.2",
|
|
41
|
+
"@esbuild/win32-arm64": "0.20.2",
|
|
42
|
+
"@esbuild/win32-ia32": "0.20.2",
|
|
43
|
+
"@esbuild/win32-x64": "0.20.2"
|
|
44
44
|
},
|
|
45
45
|
"license": "MIT"
|
|
46
46
|
}
|