cpr
cpr copied to clipboard
Update mkdirp dependency
Hi,
this patch looks enough to update mkdirp dependency to ^1.0.3:
--- a/lib/index.js
+++ b/lib/index.js
@@ -121,12 +121,12 @@
err.errno = 27;
options.errors.push(err);
} else {
- mkdirp(to, stat.mode, stack.add(function(err) {
+ mkdirp(to, stat.mode).catch((err) => {stack.add(function(err) {
/*istanbul ignore next*/
if (err) {
options.errors.push(err);
}
- }));
+ })});
}
}));
}
@@ -139,7 +139,7 @@
var copyFile = function(from, to, options, callback) {
var dir = path.dirname(to);
- mkdirp(dir, function() {
+ mkdirp(dir).then( () => {
fs.stat(to, function(statError) {
var err;
if(!statError && options.overwrite !== true) {
@guimard do you have the chance in providing this code as a pull request? snyk has even already opened a pull request, but without the suggested code changes that you listed here obviously. A pull request might be easier to accept and merge than just an issue.
Hi @mfranzke, done in #68
Cheers, Yadd