Update mkdirp dev dep
Open
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 101
- Forks
- 42
- PR merge metrics
- No merged PRs in 30d
Description
This simple patch seems enough:
--- a/test/write.test.js
+++ b/test/write.test.js
@@ -25,8 +25,7 @@
var dest2 = path.join(__dirname,'tmp', 'aync-copy',name);
mkdirp.sync(path.dirname(dest));
mkdirp.sync(path.dirname(dest2));
- mkdirp(path.dirname(dest), function(err) {
- if (err) throw err;
+ mkdirp(path.dirname(dest)).then(() => {
if (path.extname(name)) {
zf.readFile(name, function(err, buffer) {
if (err) throw err;
@@ -48,6 +47,8 @@
});
});
}
+ }).catch( err => {
+ throw err;
});
});
});
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Read test/write.test.js and compare its mkdirp calls with the proposed promise-based patch. Verify the write tests pass with the updated mkdirp development dependency and that errors still surface as expected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- testing, tooling
- Issue type
- Refactor
- Difficulty
- 1/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100