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 CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
- "version": "0.34.1",
2
+ "version": "0.34.4",
3
3
  "checksums": {
4
- "windows-x86_64": "a3a06a8d1a6a2801db11c605b603401c0e5ba8dbc0e65a55c666bdd89fbecddc",
5
- "darwin-x86_64": "b7d1a456d34cffcf010820e3986b3ebd5d22614556a532dc57f4a25ed8bab6a1",
6
- "darwin-aarch64": "1aae5c10fcdf4e554b8e75a0e2992eac731e15b8de0d9a2f6ed77d26524e5d5f",
7
- "linux-x86_64-gnu": "43dd4bab71f3a70738670ef51f1e54c84b89405d9dfe5bec6ae5199ca20c93fe",
8
- "linux-x86_64-musl": "dd5833178a7986acaeea8abbac687754f3ee7ce39371ac55c3e17113938027c9",
9
- "linux-aarch64": "105c982071ae43c1e207231cd1516f714d29efd79d050f4415e3707d3baecd54"
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
- switch (os.platform()) {
169
- case "win32":
170
- return info.checksums["windows-x86_64"];
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
  }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dprint",
3
- "version": "0.34.1",
3
+ "version": "0.34.4",
4
4
  "description": "Pluggable and configurable code formatting platform written in Rust.",
5
5
  "bin": "bin.js",
6
6
  "scripts": {