Title: stream: do not pass `readable.compose()` output via `Readable.from()` by Renegade334 · Pull Request #60907 · nodejs/node · GitHub
Open Graph Title: stream: do not pass `readable.compose()` output via `Readable.from()` by Renegade334 · Pull Request #60907 · nodejs/node
X Title: stream: do not pass `readable.compose()` output via `Readable.from()` by Renegade334 · Pull Request #60907 · nodejs/node
Description: readable.compose() was intended to return the Duplex constructed by stream.compose(), and is documented as such. However, because it was added as a "stream-returning operator", its output is being passed via Readable.from(), which constructs a new object-mode Readable by wrapping the async iterator of the composed Duplex. This is inefficient in the best case, but causes breakage in a load of others: if the destination stream is writable-only, then the composed stream would be a non-readable Duplex, but gets returned as a readable Readable. if the source stream is a readable/writable Duplex, then the composed stream gets returned as a non-writable Readable, which misses the point of stream composition – the composed stream should be able to write to the head of the pipeline if it's writable, and read from the end if it's readable. the returned stream is always in object mode, clobbering the object mode detection of stream.compose(). This change gets rid of the "operator" semantics for readable.compose(), and makes it a standalone method which returns the unaltered composed Duplex stream from stream.compose(). Fixes: #55203
Open Graph Description: readable.compose() was intended to return the Duplex constructed by stream.compose(), and is documented as such. However, because it was added as a "stream-returning operator", its output...
X Description: readable.compose() was intended to return the Duplex constructed by stream.compose(), and is documented as such. However, because it was added as a "stream-returning operator", it...
Opengraph URL: https://github.com/nodejs/node/pull/60907
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:f0014c15-11d6-e630-f505-5c3397c1779d |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 89A2:B5247:214289:2C37C9:6A4C2651 |
| html-safe-nonce | 95aa120bb090c1c356a64a6414f3ef1c0686b50f7c78e76bed754bb44e1448b9 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4OUEyOkI1MjQ3OjIxNDI4OToyQzM3Qzk6NkE0QzI2NTEiLCJ2aXNpdG9yX2lkIjoiODc0MDIyNjQ5MDI5MTcyNTkwNSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | f4d93f33e259bbfe79424db5bc69c109420da51232cd0ba3e03f47c882383d58 |
| hovercard-subject-tag | pull_request:3056735994 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/nodejs/node/pull/60907/files |
| twitter:image | https://avatars.githubusercontent.com/u/9092381?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/9092381?s=400&v=4 |
| og:image:alt | readable.compose() was intended to return the Duplex constructed by stream.compose(), and is documented as such. However, because it was added as a "stream-returning operator", its output... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 1b6b16d04026f131a36d57e3b01d0f4d26a51800edf48bf5ed0256e0ac905511 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/nodejs/node git https://github.com/nodejs/node.git |
| octolytics-dimension-user_id | 9950313 |
| octolytics-dimension-user_login | nodejs |
| octolytics-dimension-repository_id | 27193779 |
| octolytics-dimension-repository_nwo | nodejs/node |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 27193779 |
| octolytics-dimension-repository_network_root_nwo | nodejs/node |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 9ee13484b32cf23e15fde191da4c9aa47d41201c |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width