dprint 0.17.0 → 0.18.0

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.
Files changed (3) hide show
  1. package/info.json +4 -4
  2. package/install.js +6 -1
  3. package/package.json +1 -1
package/info.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
- "version": "0.17.0",
2
+ "version": "0.18.0",
3
3
  "checksums": {
4
- "windows": "7b8d6457421310f673e6f09da6428de4f7bb5431ee06cd7a9d3a2ff42c7eb94a",
5
- "linux": "0369bf22e6bcff3da8ae72b15f7b3b7d44fb9bea91cb989a29c95eb47fe42086",
6
- "mac": "46a503f99ba936d0c346d793d64db74b0cb762843dcaf2ff0a6ec21c81a95158"
4
+ "windows": "cf35c8fad60a08ab282b27b7cd7d33241c81f24b58c4f480774fe3371a72d649",
5
+ "linux": "6f0b460e81ad26cfdb325e8eea01e972d6575ed3a563ffe7fe58f504eacc07b6",
6
+ "mac": "ee5913f242f176f6097269499d42a359a5f47be3ad9a4ec2136c335b9de6d6c9"
7
7
  }
8
8
  }
package/install.js CHANGED
@@ -7,7 +7,7 @@ const path = require("path");
7
7
  const child_process = require("child_process");
8
8
  const info = JSON.parse(fs.readFileSync(path.join(__dirname, "info.json"), "utf8"));
9
9
 
10
- if (os.arch() !== "x64") {
10
+ if (!isM1Mac() && os.arch() !== "x64") {
11
11
  throw new Error("Unsupported architecture " + os.arch() + ". Only x64 binaries are available.");
12
12
  }
13
13
 
@@ -34,3 +34,8 @@ if (os.platform() === "win32") {
34
34
  });
35
35
  }
36
36
  }
37
+
38
+ function isM1Mac() {
39
+ // works on mac via rosetta
40
+ return os.arch() === "arm64" && os.platform() === "darwin";
41
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dprint",
3
- "version": "0.17.0",
3
+ "version": "0.18.0",
4
4
  "description": "Pluggable and configurable code formatting platform written in Rust.",
5
5
  "bin": "bin.js",
6
6
  "scripts": {