Comparing version 0.2.0 to 0.3.0
25
index.js
@@ -69,13 +69,18 @@ 'use strict'; | ||
finalize : () => { | ||
return (new Promise((resolve) => { | ||
const newPath = makeBuildPath(data); | ||
fs.rename(tempPath, newPath, (err) => { | ||
if (err) { | ||
throw err; | ||
} | ||
resolve(); | ||
const newPath = makeBuildPath(data); | ||
return fsAtomic.mkdir(path.dirname(newPath)) | ||
.then(() => { | ||
return new Promise((resolve) => { | ||
fs.rename(tempPath, newPath, (err) => { | ||
if (err) { | ||
throw err; | ||
} | ||
resolve(); | ||
}); | ||
}); | ||
}) | ||
.then(() => { | ||
return link(data); | ||
}); | ||
})).then(() => { | ||
return link(data); | ||
}); | ||
} | ||
@@ -82,0 +87,0 @@ }); |
{ | ||
"name": "build-dir", | ||
"version": "0.2.0", | ||
"version": "0.3.0", | ||
"description": "Get a place to put your build.", | ||
@@ -28,3 +28,3 @@ "homepage": "https://github.com/sholladay/build-dir", | ||
"branch-name": "0.1.3", | ||
"fs-atomic": "0.1.0", | ||
"fs-atomic": "0.2.0", | ||
"read-pkg-up": "1.0.1" | ||
@@ -31,0 +31,0 @@ }, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
21463
87
+ Addedfs-atomic@0.2.0(transitive)
- Removedfs-atomic@0.1.0(transitive)
Updatedfs-atomic@0.2.0