Skip to content

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.

1 participant