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

Implement filter as a Transform stream to fix piping #77

Merged
merged 2 commits into from
Jan 2, 2022

Conversation

marnusw
Copy link
Contributor

@marnusw marnusw commented Dec 1, 2021

On Node 14.16.0, and presumably later, the filter implementation never completes when piped to a subsequent stream such as stringify. I have added a test for this in the first commit.

Changing the filter implementation from a Duplex stream to a Transform stream fixes this issue.

I'm not sure whether this used to work in older versions of Node.js. Based on this issue it looks like something might have changed in the internal streams implementation in Node 14.1.0.

@gsantiago gsantiago merged commit 65318e9 into gsantiago:master Jan 2, 2022
@gsantiago
Copy link
Owner

Published as 4.1.2. Thanks!

@marnusw marnusw deleted the filterTransform branch May 2, 2023 16:28
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.

2 participants