robrich / gulp-if

Conditionally run a task
MIT License
655 stars 26 forks source link

gulp 5 compat: stop using merge-stream #80

Open dkseatgeek opened 3 months ago

dkseatgeek commented 3 months ago

This package uses ternary-stream, which uses merge-stream, which isn't supported in gulp 5: https://github.com/gulpjs/gulp/issues/2802

I worked around the issue by switching to a different gulp conditional package, but this package is the most popular by far out of the options I found so wanted to flag it in case someone wanted to update it.

robrich commented 3 months ago

Good find! gulp is more-or-less no longer a thing now that Webpack and Vite are things. Which package should we use instead of ternary-stream?

dkseatgeek commented 3 months ago

So we actually ended up just removing all gulp conditional logic in the end (looking to move away from gulp ultimately), but the linked issue suggests ordered-read-streams as a streaming package that doesn't contain the problematic streaming option. Not familiar enough with streaming APIs to know if it would work for this package as a drop-in replacement though.