esbuild 0.16.1 → 0.16.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 +2 -2
- package/install.js +5 -5
- package/lib/main.js +9 -9
- package/package.json +23 -23
package/bin/esbuild
CHANGED
|
@@ -99,7 +99,7 @@ function pkgForSomeOtherPlatform() {
|
|
|
99
99
|
}
|
|
100
100
|
function downloadedBinPath(pkg, subpath) {
|
|
101
101
|
const esbuildLibDir = path.dirname(require.resolve("esbuild"));
|
|
102
|
-
return path.join(esbuildLibDir, `downloaded-${pkg}-${path.basename(subpath)}`);
|
|
102
|
+
return path.join(esbuildLibDir, `downloaded-${pkg.replace("/", "-")}-${path.basename(subpath)}`);
|
|
103
103
|
}
|
|
104
104
|
function generateBinPath() {
|
|
105
105
|
if (ESBUILD_BINARY_PATH) {
|
|
@@ -190,7 +190,7 @@ for your current platform.`);
|
|
|
190
190
|
"node_modules",
|
|
191
191
|
".cache",
|
|
192
192
|
"esbuild",
|
|
193
|
-
`pnpapi-${pkg}-${"0.16.
|
|
193
|
+
`pnpapi-${pkg.replace("/", "-")}-${"0.16.2"}-${path.basename(subpath)}`
|
|
194
194
|
);
|
|
195
195
|
if (!fs.existsSync(binTargetPath)) {
|
|
196
196
|
fs.mkdirSync(path.dirname(binTargetPath), { recursive: true });
|
package/install.js
CHANGED
|
@@ -73,7 +73,7 @@ function pkgAndSubpathForCurrentPlatform() {
|
|
|
73
73
|
}
|
|
74
74
|
function downloadedBinPath(pkg, subpath) {
|
|
75
75
|
const esbuildLibDir = path.dirname(require.resolve("esbuild"));
|
|
76
|
-
return path.join(esbuildLibDir, `downloaded-${pkg}-${path.basename(subpath)}`);
|
|
76
|
+
return path.join(esbuildLibDir, `downloaded-${pkg.replace("/", "-")}-${path.basename(subpath)}`);
|
|
77
77
|
}
|
|
78
78
|
|
|
79
79
|
// lib/npm/node-install.ts
|
|
@@ -90,8 +90,8 @@ function validateBinaryVersion(...command) {
|
|
|
90
90
|
const stdout = child_process.execFileSync(command.shift(), command, {
|
|
91
91
|
stdio: "pipe"
|
|
92
92
|
}).toString().trim();
|
|
93
|
-
if (stdout !== "0.16.
|
|
94
|
-
throw new Error(`Expected ${JSON.stringify("0.16.
|
|
93
|
+
if (stdout !== "0.16.2") {
|
|
94
|
+
throw new Error(`Expected ${JSON.stringify("0.16.2")} but got ${JSON.stringify(stdout)}`);
|
|
95
95
|
}
|
|
96
96
|
}
|
|
97
97
|
function isYarn() {
|
|
@@ -143,7 +143,7 @@ function installUsingNPM(pkg, subpath, binPath) {
|
|
|
143
143
|
try {
|
|
144
144
|
fs2.writeFileSync(path2.join(installDir, "package.json"), "{}");
|
|
145
145
|
child_process.execSync(
|
|
146
|
-
`npm install --loglevel=error --prefer-offline --no-audit --progress=false ${pkg}@${"0.16.
|
|
146
|
+
`npm install --loglevel=error --prefer-offline --no-audit --progress=false ${pkg}@${"0.16.2"}`,
|
|
147
147
|
{ cwd: installDir, stdio: "pipe", env }
|
|
148
148
|
);
|
|
149
149
|
const installedBinPath = path2.join(installDir, "node_modules", pkg, subpath);
|
|
@@ -194,7 +194,7 @@ function maybeOptimizePackage(binPath) {
|
|
|
194
194
|
}
|
|
195
195
|
}
|
|
196
196
|
async function downloadDirectlyFromNPM(pkg, subpath, binPath) {
|
|
197
|
-
const url = `https://registry.npmjs.org/${pkg}/-/${pkg}-${"0.16.
|
|
197
|
+
const url = `https://registry.npmjs.org/${pkg}/-/${pkg.replace("@esbuild/", "")}-${"0.16.2"}.tgz`;
|
|
198
198
|
console.error(`[esbuild] Trying to download ${JSON.stringify(url)}`);
|
|
199
199
|
try {
|
|
200
200
|
fs2.writeFileSync(binPath, extractFileFromTarGzip(await fetch(url), subpath));
|
package/lib/main.js
CHANGED
|
@@ -732,8 +732,8 @@ function createChannel(streamIn) {
|
|
|
732
732
|
if (isFirstPacket) {
|
|
733
733
|
isFirstPacket = false;
|
|
734
734
|
let binaryVersion = String.fromCharCode(...bytes);
|
|
735
|
-
if (binaryVersion !== "0.16.
|
|
736
|
-
throw new Error(`Cannot start service: Host version "${"0.16.
|
|
735
|
+
if (binaryVersion !== "0.16.2") {
|
|
736
|
+
throw new Error(`Cannot start service: Host version "${"0.16.2"}" does not match binary version ${quote(binaryVersion)}`);
|
|
737
737
|
}
|
|
738
738
|
return;
|
|
739
739
|
}
|
|
@@ -1764,7 +1764,7 @@ function pkgForSomeOtherPlatform() {
|
|
|
1764
1764
|
}
|
|
1765
1765
|
function downloadedBinPath(pkg, subpath) {
|
|
1766
1766
|
const esbuildLibDir = path.dirname(require.resolve("esbuild"));
|
|
1767
|
-
return path.join(esbuildLibDir, `downloaded-${pkg}-${path.basename(subpath)}`);
|
|
1767
|
+
return path.join(esbuildLibDir, `downloaded-${pkg.replace("/", "-")}-${path.basename(subpath)}`);
|
|
1768
1768
|
}
|
|
1769
1769
|
function generateBinPath() {
|
|
1770
1770
|
if (ESBUILD_BINARY_PATH) {
|
|
@@ -1855,7 +1855,7 @@ for your current platform.`);
|
|
|
1855
1855
|
"node_modules",
|
|
1856
1856
|
".cache",
|
|
1857
1857
|
"esbuild",
|
|
1858
|
-
`pnpapi-${pkg}-${"0.16.
|
|
1858
|
+
`pnpapi-${pkg.replace("/", "-")}-${"0.16.2"}-${path.basename(subpath)}`
|
|
1859
1859
|
);
|
|
1860
1860
|
if (!fs.existsSync(binTargetPath)) {
|
|
1861
1861
|
fs.mkdirSync(path.dirname(binTargetPath), { recursive: true });
|
|
@@ -1887,7 +1887,7 @@ if (process.env.ESBUILD_WORKER_THREADS !== "0") {
|
|
|
1887
1887
|
}
|
|
1888
1888
|
}
|
|
1889
1889
|
var _a;
|
|
1890
|
-
var isInternalWorkerThread = ((_a = worker_threads == null ? void 0 : worker_threads.workerData) == null ? void 0 : _a.esbuildVersion) === "0.16.
|
|
1890
|
+
var isInternalWorkerThread = ((_a = worker_threads == null ? void 0 : worker_threads.workerData) == null ? void 0 : _a.esbuildVersion) === "0.16.2";
|
|
1891
1891
|
var esbuildCommandAndArgs = () => {
|
|
1892
1892
|
if ((!ESBUILD_BINARY_PATH || false) && (path2.basename(__filename) !== "main.js" || path2.basename(__dirname) !== "lib")) {
|
|
1893
1893
|
throw new Error(
|
|
@@ -1954,7 +1954,7 @@ var fsAsync = {
|
|
|
1954
1954
|
}
|
|
1955
1955
|
}
|
|
1956
1956
|
};
|
|
1957
|
-
var version = "0.16.
|
|
1957
|
+
var version = "0.16.2";
|
|
1958
1958
|
var build = (options) => ensureServiceIsRunning().build(options);
|
|
1959
1959
|
var serve = (serveOptions, buildOptions) => ensureServiceIsRunning().serve(serveOptions, buildOptions);
|
|
1960
1960
|
var transform = (input, options) => ensureServiceIsRunning().transform(input, options);
|
|
@@ -2065,7 +2065,7 @@ var ensureServiceIsRunning = () => {
|
|
|
2065
2065
|
if (longLivedService)
|
|
2066
2066
|
return longLivedService;
|
|
2067
2067
|
let [command, args] = esbuildCommandAndArgs();
|
|
2068
|
-
let child = child_process.spawn(command, args.concat(`--service=${"0.16.
|
|
2068
|
+
let child = child_process.spawn(command, args.concat(`--service=${"0.16.2"}`, "--ping"), {
|
|
2069
2069
|
windowsHide: true,
|
|
2070
2070
|
stdio: ["pipe", "pipe", "inherit"],
|
|
2071
2071
|
cwd: defaultWD
|
|
@@ -2179,7 +2179,7 @@ var runServiceSync = (callback) => {
|
|
|
2179
2179
|
esbuild: node_exports
|
|
2180
2180
|
});
|
|
2181
2181
|
callback(service);
|
|
2182
|
-
let stdout = child_process.execFileSync(command, args.concat(`--service=${"0.16.
|
|
2182
|
+
let stdout = child_process.execFileSync(command, args.concat(`--service=${"0.16.2"}`), {
|
|
2183
2183
|
cwd: defaultWD,
|
|
2184
2184
|
windowsHide: true,
|
|
2185
2185
|
input: stdin,
|
|
@@ -2195,7 +2195,7 @@ var workerThreadService = null;
|
|
|
2195
2195
|
var startWorkerThreadService = (worker_threads2) => {
|
|
2196
2196
|
let { port1: mainPort, port2: workerPort } = new worker_threads2.MessageChannel();
|
|
2197
2197
|
let worker = new worker_threads2.Worker(__filename, {
|
|
2198
|
-
workerData: { workerPort, defaultWD, esbuildVersion: "0.16.
|
|
2198
|
+
workerData: { workerPort, defaultWD, esbuildVersion: "0.16.2" },
|
|
2199
2199
|
transferList: [workerPort],
|
|
2200
2200
|
execArgv: []
|
|
2201
2201
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "esbuild",
|
|
3
|
-
"version": "0.16.
|
|
3
|
+
"version": "0.16.2",
|
|
4
4
|
"description": "An extremely fast JavaScript and CSS bundler and minifier.",
|
|
5
5
|
"repository": "https://github.com/evanw/esbuild",
|
|
6
6
|
"scripts": {
|
|
@@ -15,28 +15,28 @@
|
|
|
15
15
|
"esbuild": "bin/esbuild"
|
|
16
16
|
},
|
|
17
17
|
"optionalDependencies": {
|
|
18
|
-
"@esbuild/android-arm": "0.16.
|
|
19
|
-
"@esbuild/android-arm64": "0.16.
|
|
20
|
-
"@esbuild/android-x64": "0.16.
|
|
21
|
-
"@esbuild/darwin-arm64": "0.16.
|
|
22
|
-
"@esbuild/darwin-x64": "0.16.
|
|
23
|
-
"@esbuild/freebsd-arm64": "0.16.
|
|
24
|
-
"@esbuild/freebsd-x64": "0.16.
|
|
25
|
-
"@esbuild/linux-arm": "0.16.
|
|
26
|
-
"@esbuild/linux-arm64": "0.16.
|
|
27
|
-
"@esbuild/linux-ia32": "0.16.
|
|
28
|
-
"@esbuild/linux-loong64": "0.16.
|
|
29
|
-
"@esbuild/linux-mips64el": "0.16.
|
|
30
|
-
"@esbuild/linux-ppc64": "0.16.
|
|
31
|
-
"@esbuild/linux-riscv64": "0.16.
|
|
32
|
-
"@esbuild/linux-s390x": "0.16.
|
|
33
|
-
"@esbuild/linux-x64": "0.16.
|
|
34
|
-
"@esbuild/netbsd-x64": "0.16.
|
|
35
|
-
"@esbuild/openbsd-x64": "0.16.
|
|
36
|
-
"@esbuild/sunos-x64": "0.16.
|
|
37
|
-
"@esbuild/win32-arm64": "0.16.
|
|
38
|
-
"@esbuild/win32-ia32": "0.16.
|
|
39
|
-
"@esbuild/win32-x64": "0.16.
|
|
18
|
+
"@esbuild/android-arm": "0.16.2",
|
|
19
|
+
"@esbuild/android-arm64": "0.16.2",
|
|
20
|
+
"@esbuild/android-x64": "0.16.2",
|
|
21
|
+
"@esbuild/darwin-arm64": "0.16.2",
|
|
22
|
+
"@esbuild/darwin-x64": "0.16.2",
|
|
23
|
+
"@esbuild/freebsd-arm64": "0.16.2",
|
|
24
|
+
"@esbuild/freebsd-x64": "0.16.2",
|
|
25
|
+
"@esbuild/linux-arm": "0.16.2",
|
|
26
|
+
"@esbuild/linux-arm64": "0.16.2",
|
|
27
|
+
"@esbuild/linux-ia32": "0.16.2",
|
|
28
|
+
"@esbuild/linux-loong64": "0.16.2",
|
|
29
|
+
"@esbuild/linux-mips64el": "0.16.2",
|
|
30
|
+
"@esbuild/linux-ppc64": "0.16.2",
|
|
31
|
+
"@esbuild/linux-riscv64": "0.16.2",
|
|
32
|
+
"@esbuild/linux-s390x": "0.16.2",
|
|
33
|
+
"@esbuild/linux-x64": "0.16.2",
|
|
34
|
+
"@esbuild/netbsd-x64": "0.16.2",
|
|
35
|
+
"@esbuild/openbsd-x64": "0.16.2",
|
|
36
|
+
"@esbuild/sunos-x64": "0.16.2",
|
|
37
|
+
"@esbuild/win32-arm64": "0.16.2",
|
|
38
|
+
"@esbuild/win32-ia32": "0.16.2",
|
|
39
|
+
"@esbuild/win32-x64": "0.16.2"
|
|
40
40
|
},
|
|
41
41
|
"license": "MIT"
|
|
42
42
|
}
|