Skip to content

Commit 16bd300

Browse files
ronagBridgeAR
authored andcommitted
doc: document major finished changes in v14
Added description of semver-major changes to finished in v14. PR-URL: #33065 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Juan José Arboleda <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
1 parent 780c0ef commit 16bd300

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

doc/api/stream.md

+21
Original file line numberDiff line numberDiff line change
@@ -1486,6 +1486,21 @@ unless `emitClose` is set in false.
14861486
### `stream.finished(stream[, options], callback)`
14871487
<!-- YAML
14881488
added: v10.0.0
1489+
changes:
1490+
- version: v14.0.0
1491+
pr-url: https://github.com/nodejs/node/pull/32158
1492+
description: The `finished(stream, cb)` will wait for the `'close'` event
1493+
before invoking the callback. The implementation tries to
1494+
detect legacy streams and only apply this behavior to streams
1495+
which are expected to emit `'close'`.
1496+
- version: v14.0.0
1497+
pr-url: https://github.com/nodejs/node/pull/31545
1498+
description: Emitting `'close'` before `'end'` on a `Readable` stream
1499+
will cause an `ERR_STREAM_PREMATURE_CLOSE` error.
1500+
- version: v14.0.0
1501+
pr-url: https://github.com/nodejs/node/pull/31509
1502+
description: Callback will be invoked on streams which have already
1503+
finished before the call to `finished(stream, cb)`.
14891504
-->
14901505

14911506
* `stream` {Stream} A readable and/or writable stream.
@@ -1563,6 +1578,12 @@ changes:
15631578
- version: v13.10.0
15641579
pr-url: https://github.com/nodejs/node/pull/31223
15651580
description: Add support for async generators.
1581+
- version: v14.0.0
1582+
pr-url: https://github.com/nodejs/node/pull/32158
1583+
description: The `pipeline(..., cb)` will wait for the `'close'` event
1584+
before invoking the callback. The implementation tries to
1585+
detect legacy streams and only apply this behavior to streams
1586+
which are expected to emit `'close'`.
15661587
-->
15671588

15681589
* `source` {Stream|Iterable|AsyncIterable|Function}

0 commit comments

Comments
 (0)