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

Add more replacements: make-dir, object-keys, object-assign, readable-stream #91

Merged
merged 4 commits into from
Jul 6, 2024

Conversation

onigoetz
Copy link
Contributor

@onigoetz onigoetz commented Jul 4, 2024

  • make-dir ( Fixes make-dir #62 ) ( Fixes mkdirp #37 is already fixed )
  • object.keys with Object.keys (this is identical to the object-keys package
  • object-assign with Object.assign (this is identical to the object.assign package
  • readable-stream that can be replaced by node:stream


## NodeJS (since v0.9.4)

If your NodeJS version is recent it is better to directly use [`stream`](https://nodejs.org/api/stream.html).
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe makes sense to mention streams from web standards, like https://developer.mozilla.org/en-US/docs/Web/API/Streams_API ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It could, but they aren't a direct alternative to NodeJS streams, they need to be converted from one to the other, no?

Still, I can add another alternative

Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe. I just don't know is readable-stream NodeJS-only package or not. If yes - it's not required, if not - I think that it should be mentioned.

Copy link
Contributor

Choose a reason for hiding this comment

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

v4.x.x of readable-stream is a cut from Node 18. This version supports Node 12, 14, 16 and 18, as well as evergreen browsers

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ah yes indeed, I added an alternative for Streams API

@43081j 43081j merged commit 023a1fe into es-tooling:main Jul 6, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

make-dir mkdirp
3 participants