dprint 0.38.3 → 0.39.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.
- package/install_api.js +12 -1
- package/package.json +7 -7
package/install_api.js
CHANGED
|
@@ -149,5 +149,16 @@ function atomicCopyFileSync(sourcePath, destinationPath) {
|
|
|
149
149
|
const rand = crypto.randomBytes(4).toString("hex");
|
|
150
150
|
const tempFilePath = destinationPath + "." + rand;
|
|
151
151
|
fs.copyFileSync(sourcePath, tempFilePath);
|
|
152
|
-
|
|
152
|
+
try {
|
|
153
|
+
fs.renameSync(tempFilePath, destinationPath);
|
|
154
|
+
} catch (err) {
|
|
155
|
+
// will maybe throw when another process had already done this
|
|
156
|
+
// so just ignore and delete the created temporary file
|
|
157
|
+
try {
|
|
158
|
+
fs.unlikSync(tempFilePath);
|
|
159
|
+
} catch (_err2) {
|
|
160
|
+
// ignore
|
|
161
|
+
}
|
|
162
|
+
throw err;
|
|
163
|
+
}
|
|
153
164
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dprint",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.39.0",
|
|
4
4
|
"description": "Pluggable and configurable code formatting platform written in Rust.",
|
|
5
5
|
"bin": "bin.js",
|
|
6
6
|
"repository": {
|
|
@@ -22,11 +22,11 @@
|
|
|
22
22
|
"postinstall": "node ./install.js"
|
|
23
23
|
},
|
|
24
24
|
"optionalDependencies": {
|
|
25
|
-
"@dprint/win32-x64": "0.
|
|
26
|
-
"@dprint/darwin-x64": "0.
|
|
27
|
-
"@dprint/darwin-arm64": "0.
|
|
28
|
-
"@dprint/linux-x64-glibc": "0.
|
|
29
|
-
"@dprint/linux-x64-musl": "0.
|
|
30
|
-
"@dprint/linux-arm64-glibc": "0.
|
|
25
|
+
"@dprint/win32-x64": "0.39.0",
|
|
26
|
+
"@dprint/darwin-x64": "0.39.0",
|
|
27
|
+
"@dprint/darwin-arm64": "0.39.0",
|
|
28
|
+
"@dprint/linux-x64-glibc": "0.39.0",
|
|
29
|
+
"@dprint/linux-x64-musl": "0.39.0",
|
|
30
|
+
"@dprint/linux-arm64-glibc": "0.39.0"
|
|
31
31
|
}
|
|
32
32
|
}
|