mafintosh / mafintosh/streamx

Handling pipe option to keep writer open

Open
#86 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
239
Forks
27
Avg merge
27m
Merged PRs (30d)
1

Description

The `streamx` implementation for the `pipe()` method takes a callback as the 2nd parameter, whereas the [native Node `pipe()`](https://nodejs.org/api/stream.html#readablepipedestination-options) takes an options object. Currently the only option is to possibly keep the destination writer open.

I got burned on the upgrade from Gulp v4 to v5 (which now uses `streamx`) because `streamx` seems to simply silently ignore the parameter if `{ end: false }` is passed.

As a fix, it would be helpful if `streamx` threw an error unless a proper callback was passed as the 2nd parameter to avoid such issues.

And as a feature, it would be nice if `streamx` supported an option to keep the destination open.

Contributor guide

No contributing guide indexed for this repository

Research direction

Read streamx's pipe() implementation and compare its second-argument behavior with the native Node pipe() options documented in the issue. Define and test validation for unsupported arguments and an option that keeps the destination writer open; done means these cases are handled explicitly rather than silently ignored.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
backend-api-design
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.