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

streams: Rework stream merging to use ordered-read-streams #373

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

phated
Copy link

@phated phated commented Oct 18, 2022

streams: Rework stream tests to be more stream compliant

What is the purpose of this pull request?

I'm investigating fast-glob for usage in gulp via glob-stream and I noticed that you were using merge2, which does some really unconventional things. This swaps the dependency for ordered-read-streams which has recently been overhauled to be stream/streamx-compliant.

What changes did you make? (Give an overview)

I swapped the merge2 dependency for ordered-read-streams and removed a lot of the event rebinding that was done for merge2. I then updated the tests to show better stream compliance—using things like destroy and Readables that provide data instead of trying to propagate events and rely on specific listeners being bound.

streams: Rework stream tests to be more stream compliant
Comment on lines +3 to +4
// @ts-expect-error
import * as ordered from 'ordered-read-streams';
Copy link
Author

Choose a reason for hiding this comment

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

If this PR ends up being desirable to merge, I can work on getting some sort of .d.ts output for ordered-read-streams

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.

None yet

1 participant