Skip to content
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

doc: document major finished changes in v14 #33065

Closed
wants to merge 5 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions doc/api/stream.md
Original file line number Diff line number Diff line change
Expand Up @@ -1503,6 +1503,21 @@ further errors except from `_destroy` may be emitted as `'error'`.
### `stream.finished(stream[, options], callback)`
<!-- YAML
added: v10.0.0
changes:
- version: v14.0.0
pr-url: https://github.com/nodejs/node/pull/32158
description: The `finished(stream, cb)` will wait for the `'close'` event
before invoking the callback. The implementation tries to
detect legacy streams and only apply this behavior to streams
which are expected to emit `'close'`.
- version: v14.0.0
pr-url: https://github.com/nodejs/node/pull/31545
description: Emitting `'close'` before `'end'` on a `Readable` stream
will cause an `ERR_STREAM_PREMATURE_CLOSE` error.
- version: v14.0.0
pr-url: https://github.com/nodejs/node/pull/31509
description: Callback will be invoked on streams which have already
finished before the call to `finished(stream, cb)`.
-->

* `stream` {Stream} A readable and/or writable stream.
Expand Down Expand Up @@ -1580,6 +1595,12 @@ changes:
- version: v13.10.0
pr-url: https://github.com/nodejs/node/pull/31223
description: Add support for async generators.
- version: v14.0.0
pr-url: https://github.com/nodejs/node/pull/32158
description: The `pipeline(..., cb)` will wait for the `'close'` event
before invoking the callback. The implementation tries to
detect legacy streams and only apply this behavior to streams
which are expected to emit `'close'`.
ronag marked this conversation as resolved.
Show resolved Hide resolved
-->

* `source` {Stream|Iterable|AsyncIterable|Function}
Expand Down