-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use make-dir instead of mkdirp #826
Conversation
* Write test for checking if dir is created when destination is passed as string
Aww heck, I didn't realize this uses |
Yeah, unfortunately this would be a breaking change, and thus we cannot add it to 1.x 😬 If you any other library we could use I'd be happy to consider it, but we cannot break compatibility with Node.js 0.10.0. |
I tweeted at the maintainers of mkdirp to see if they'd consider a new release to fix this. Likely won't go anywhere, but figured I'd ask nicely. I could publish something that fixes this, or we could roll our own, but I don't really think it's worth it. |
@isaacs do you think you could take a look at this? Looks like this is the result of https://github.com/substack/node-mkdirp/issues/70 not being resolved. Is there something we could do on this? |
I think using |
For context, it looks like @isaacs forked mkdirp and published a new major to npm. That version supports >= 8.x same as |
I opened a PR w/ the fix for the issue this PR was attempting to circumvent on the newly maintained branch for the 0.x line of So there's hope yet! |
This PR is meant to fix #139
This PR replaces
mkdirp
which doesn't seem to be maintained anymore withmake-dir
.I realize that v2 of multer likely won't use storage engines at all, but maybe this can make it into v1.x.
All tests pass, and I don't believe this should be breaking for anyone, as it should function exactly the same as
mkdirp
did previously.make-dir
was created to replacemkdirp
.I also added a test to make sure that a path is created when
diskStorage
is given a string fordestination
, as per the docs.