Skip to content

Commit 401ab61

Browse files
ronagBethGriggs
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 <jasnell@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
1 parent 11ea13f commit 401ab61

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
@@ -1503,6 +1503,21 @@ further errors except from `_destroy` may be emitted as `'error'`.
15031503
### `stream.finished(stream[, options], callback)`
15041504
<!-- YAML
15051505
added: v10.0.0
1506+
changes:
1507+
- version: v14.0.0
1508+
pr-url: https://github.com/nodejs/node/pull/32158
1509+
description: The `finished(stream, cb)` will wait for the `'close'` event
1510+
before invoking the callback. The implementation tries to
1511+
detect legacy streams and only apply this behavior to streams
1512+
which are expected to emit `'close'`.
1513+
- version: v14.0.0
1514+
pr-url: https://github.com/nodejs/node/pull/31545
1515+
description: Emitting `'close'` before `'end'` on a `Readable` stream
1516+
will cause an `ERR_STREAM_PREMATURE_CLOSE` error.
1517+
- version: v14.0.0
1518+
pr-url: https://github.com/nodejs/node/pull/31509
1519+
description: Callback will be invoked on streams which have already
1520+
finished before the call to `finished(stream, cb)`.
15061521
-->
15071522

15081523
* `stream` {Stream} A readable and/or writable stream.
@@ -1580,6 +1595,12 @@ changes:
15801595
- version: v13.10.0
15811596
pr-url: https://github.com/nodejs/node/pull/31223
15821597
description: Add support for async generators.
1598+
- version: v14.0.0
1599+
pr-url: https://github.com/nodejs/node/pull/32158
1600+
description: The `pipeline(..., cb)` will wait for the `'close'` event
1601+
before invoking the callback. The implementation tries to
1602+
detect legacy streams and only apply this behavior to streams
1603+
which are expected to emit `'close'`.
15831604
-->
15841605

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

0 commit comments

Comments
 (0)