Skip to content

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