-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
fix: Ensure Duplex streams
are returned unwrapped in stream operators
#55394
base: main
Are you sure you want to change the base?
Conversation
Review requested:
|
Please add a test |
01ed513
to
90ac00d
Compare
@RedYetiDev test added |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #55394 +/- ##
==========================================
- Coverage 88.41% 88.35% -0.07%
==========================================
Files 652 652
Lines 186878 186897 +19
Branches 36061 36024 -37
==========================================
- Hits 165226 165126 -100
- Misses 14902 15017 +115
- Partials 6750 6754 +4
|
@mcollina why the test cases are failing ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ronag I see your point regarding the stream semantics. If performance impact is minimal, then returning an explicit Readable does make sense to clarify the intended use. |
Well if consider my concern. Then we should just leave this as is? We might ned update docs/typings to clarify that if the first param (this) to |
Alternatively returning a new |
After considering both options, would it be preferable to return a new Duplex with I’m inclined to go with whichever approach aligns best with the project’s consistency and performance considerations ! |
I'm happy with the |
Yeah , sure It sounds great. |
It's worth mentioning that this is already what's returned by the internal Indeed, if the desired behaviour of |
Updated the implementation of the
readable.compose()
method to ensure that it correctly returns a Duplex stream when applicable, avoiding unintended conversion to Readable streams.fixes: #55203