Skip to content
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

BREAKING: Use internal fork of make-dir for mkdirs implementation #756

Merged
merged 7 commits into from
Feb 18, 2020

Conversation

RyanZim
Copy link
Collaborator

@RyanZim RyanZim commented Feb 6, 2020

Resolves #619

Everything should work similarly to how it did before; except that we no longer return a file path on success (to match fs.mkdir). Also, errors may be different

Breaking Changes:

  • We no longer return a file path on success (to match fs.mkdir)
  • We do not allow creating root on Windows (matches fs.mkdir)
  • Error codes are a bit different

https://github.com/sindresorhus/make-dir

@coveralls
Copy link

coveralls commented Feb 6, 2020

Coverage Status

Coverage decreased (-3.8%) to 81.85% when pulling b0d3a82 on ryan/make-dir into cdc7745 on master.

lib/mkdirs/make-dir.js Show resolved Hide resolved
lib/mkdirs/make-dir.js Outdated Show resolved Hide resolved
Copy link
Owner

@jprichardson jprichardson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Concept ACK

Copy link

@brodycj brodycj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would strongly favor keeping the fork of the mkdirs implementation in its own package somewhere. It should be possible to swap this kind of implementation without too much extra junk in the git history.

I did discover an existing mkdirs package that has not been updated for 5 years or so. Maybe time for someone to update or renew it?

@RyanZim
Copy link
Collaborator Author

RyanZim commented Feb 13, 2020

@brodybits Our previous code was a fork of an old version of https://www.npmjs.com/package/mkdirp. That package is well-maintained, our fork is much less-so.

@brodycj

This comment has been minimized.

@RyanZim

This comment has been minimized.

Resolves #619

Everything should work similarly to how it did before; except that
we no longer return a file path on success (to match fs.mkdir).
Also, errors may be different.
- Error codes are different
- Match fs.mkdir behavior on Windows when creating root
@RyanZim
Copy link
Collaborator Author

RyanZim commented Feb 14, 2020

Rebased and added new commits fixing issues above.

@RyanZim
Copy link
Collaborator Author

RyanZim commented Feb 17, 2020

@jprichardson @manidlou @JPeer264 Ready for final review

Copy link
Collaborator

@JPeer264 JPeer264 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Recursive mkdir coming to Node core
6 participants