fast-glob icon indicating copy to clipboard operation
fast-glob copied to clipboard

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

Open phated opened this issue 1 year ago • 0 comments

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.

phated avatar Oct 18 '22 21:10 phated