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

Update split2 to v4.2.0; remove through2 and replace with Node stream.Transform #6

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

kcastellino
Copy link

@kcastellino kcastellino commented Feb 10, 2024

The first commit updates both split2 and through2 to the latest version. Both dependencies were previously at version 2, now they are at version 4. From v4.0.0, split2 has dropped readable-stream pas a dependency, instead relying on Node's built-in streams. Apart from imposing a minimum version requirement of Node 12, this also means split2 uses a different stream implementation to through2 (which uses readable-stream@3).

The second commit removes through2 and replaces it by extending the Transform class from Node's built-in stream module. It's not a big change, but dropping readable-stream significantly lightens the project dependencies. The other way to go about it is passing the transform function to the class constructor (see the simplified construction method), which may be less efficient if serialize is called multiple times, but wouldn't hold the transform function in memory.

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.

1 participant