dprint 0.34.1 → 0.34.4
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/info.json +7 -7
- package/install_api.js +8 -11
- package/package.json +1 -1
package/info.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.34.
|
|
2
|
+
"version": "0.34.4",
|
|
3
3
|
"checksums": {
|
|
4
|
-
"windows-
|
|
5
|
-
"darwin
|
|
6
|
-
"darwin
|
|
7
|
-
"linux-
|
|
8
|
-
"linux-
|
|
9
|
-
"linux-
|
|
4
|
+
"x86_64-pc-windows-msvc": "209e751b693f1c076fbd3d204af01bcb5c10be3f9dd99106bd14145e98de01fc",
|
|
5
|
+
"x86_64-apple-darwin": "74a1751e335ffde8385fb415365290b81d26f3509007a0cead1f62f8bb6d0e37",
|
|
6
|
+
"aarch64-apple-darwin": "bb052fa8f0cc995c09563adb07fb554a5386c2ed1152ba97a76734ed6ac55c4e",
|
|
7
|
+
"x86_64-unknown-linux-gnu": "3019e6bb9f1d97b1529e37808556715b38d43753bffeb12396fa06ea72156d9f",
|
|
8
|
+
"x86_64-unknown-linux-musl": "088d41a1b13b4623148119af9a3c2f618794170484294c210d5acd64f94a5cc6",
|
|
9
|
+
"aarch64-unknown-linux-gnu": "80607da90a920448d4361ad4993f7c5e770f3e8b6062d492ac00dd2eb558f256"
|
|
10
10
|
}
|
|
11
11
|
}
|
package/install_api.js
CHANGED
|
@@ -94,7 +94,7 @@ function install() {
|
|
|
94
94
|
}
|
|
95
95
|
|
|
96
96
|
https.get(url, options, function(response) {
|
|
97
|
-
if (response.statusCode >= 200 && response.statusCode <= 299) {
|
|
97
|
+
if (response.statusCode != null && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
98
98
|
downloadResponse(response).then(resolve).catch(reject);
|
|
99
99
|
} else if (response.headers.location) {
|
|
100
100
|
downloadZipFile(response.headers.location).then(resolve).catch(reject);
|
|
@@ -121,7 +121,7 @@ function install() {
|
|
|
121
121
|
if (err) {
|
|
122
122
|
reject(err);
|
|
123
123
|
} else {
|
|
124
|
-
resolve();
|
|
124
|
+
resolve(undefined);
|
|
125
125
|
}
|
|
126
126
|
});
|
|
127
127
|
});
|
|
@@ -138,7 +138,7 @@ function install() {
|
|
|
138
138
|
if (typeof process.env.NO_PROXY === "string") {
|
|
139
139
|
const noProxyAddresses = process.env.NO_PROXY.split(",");
|
|
140
140
|
const host = url.parse(requestUrl).host;
|
|
141
|
-
if (noProxyAddresses.indexOf(host) >= 0) {
|
|
141
|
+
if (host == null || noProxyAddresses.indexOf(host) >= 0) {
|
|
142
142
|
return undefined;
|
|
143
143
|
}
|
|
144
144
|
}
|
|
@@ -165,14 +165,11 @@ function install() {
|
|
|
165
165
|
}
|
|
166
166
|
|
|
167
167
|
function getExpectedZipChecksum() {
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
case "darwin":
|
|
172
|
-
return info.checksums[`darwin-${getArch()}`];
|
|
173
|
-
default:
|
|
174
|
-
return info.checksums[`linux-${getArch()}-${getLinuxFamily()}`];
|
|
168
|
+
const checksum = info.checksums[getTarget()];
|
|
169
|
+
if (checksum == null) {
|
|
170
|
+
throw new Error("Could not find checksum for target: " + checksum);
|
|
175
171
|
}
|
|
172
|
+
return checksum;
|
|
176
173
|
}
|
|
177
174
|
}
|
|
178
175
|
|
|
@@ -207,7 +204,7 @@ function install() {
|
|
|
207
204
|
reject(err);
|
|
208
205
|
});
|
|
209
206
|
writeStream.on("finish", () => {
|
|
210
|
-
resolve();
|
|
207
|
+
resolve(undefined);
|
|
211
208
|
});
|
|
212
209
|
});
|
|
213
210
|
}),
|