Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Update mkdirp dev dep

Open
#85 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
1-3 hours
Newbie friendliness
35/100
Issue type
Refactor
Clarity
Clearly specified
Activity status
Stale
Tech stack
javascript, node.js
Domain
testing, tooling

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.

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;
             });
         });
     });
Dominant language
C++
Stars
101
Forks
42
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from mapbox/node-zipfile

All issues in mapbox/node-zipfile

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.