dprint 0.20.0 → 0.22.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/LICENSE +1 -1
- package/bin.js +0 -0
- package/info.json +5 -4
- package/install.js +1 -2
- package/install.sh +3 -2
- package/install_verify_checksum.js +7 -3
- package/package.json +1 -1
package/LICENSE
CHANGED
package/bin.js
CHANGED
|
File without changes
|
package/info.json
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.
|
|
2
|
+
"version": "0.22.2",
|
|
3
3
|
"checksums": {
|
|
4
|
-
"windows": "
|
|
5
|
-
"
|
|
6
|
-
"mac": "
|
|
4
|
+
"windows-x86_64": "a8740fa8e131fdc163725f712a9d4d5ef426294c9c5d0b672251e950e9e2b2e5",
|
|
5
|
+
"mac-x86_64": "ab087ad3c89c11f8dbd60b810012a6d3944acef91cfc3eec028607c137868ac8",
|
|
6
|
+
"mac-aarch64": "c93be255a084b552314b011469c8549cdcbf548b147256eb392199cf7e31a611",
|
|
7
|
+
"linux-x86_64": "e57168da7a15efd980bc433afba2815697f51c4708313526fe95a25c83a5ba85"
|
|
7
8
|
}
|
|
8
9
|
}
|
package/install.js
CHANGED
|
@@ -8,7 +8,7 @@ const child_process = require("child_process");
|
|
|
8
8
|
const info = JSON.parse(fs.readFileSync(path.join(__dirname, "info.json"), "utf8"));
|
|
9
9
|
|
|
10
10
|
if (!isM1Mac() && os.arch() !== "x64") {
|
|
11
|
-
throw new Error("Unsupported architecture " + os.arch() + ". Only x64 binaries are available.");
|
|
11
|
+
throw new Error("Unsupported architecture " + os.arch() + ". Only x64 and M1 binaries are available.");
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
if (os.platform() === "win32") {
|
|
@@ -36,6 +36,5 @@ if (os.platform() === "win32") {
|
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
function isM1Mac() {
|
|
39
|
-
// works on mac via rosetta
|
|
40
39
|
return os.arch() === "arm64" && os.platform() === "darwin";
|
|
41
40
|
}
|
package/install.sh
CHANGED
|
@@ -6,8 +6,9 @@ if ! command -v unzip >/dev/null; then
|
|
|
6
6
|
exit 1
|
|
7
7
|
fi
|
|
8
8
|
|
|
9
|
-
case $(uname -
|
|
10
|
-
Darwin) target="x86_64-apple-darwin" ;;
|
|
9
|
+
case $(uname -sm) in
|
|
10
|
+
"Darwin x86_64") target="x86_64-apple-darwin" ;;
|
|
11
|
+
"Darwin arm64") target="aarch64-apple-darwin" ;;
|
|
11
12
|
*) target="x86_64-unknown-linux-gnu" ;;
|
|
12
13
|
esac
|
|
13
14
|
|
|
@@ -25,10 +25,14 @@ if (actualZipChecksum !== expectedZipChecksum) {
|
|
|
25
25
|
function getExpectedZipChecksum() {
|
|
26
26
|
switch (os.platform()) {
|
|
27
27
|
case "win32":
|
|
28
|
-
return info.checksums
|
|
28
|
+
return info.checksums["windows-x86_64"];
|
|
29
29
|
case "darwin":
|
|
30
|
-
|
|
30
|
+
if (os.arch() === "arm64") {
|
|
31
|
+
return info.checksums["mac-aarch64"];
|
|
32
|
+
} else {
|
|
33
|
+
return info.checksums["mac-x86_64"];
|
|
34
|
+
}
|
|
31
35
|
default:
|
|
32
|
-
return info.checksums
|
|
36
|
+
return info.checksums["linux-x86_64"];
|
|
33
37
|
}
|
|
34
38
|
}
|