Commit 07c7f19
stream: add final method
Adds the ability to for write streams to have an _final method which acts
similarly to the _flush method that transform streams have but is called before
the finish event is emitted and if asynchronous delays the stream from
finishing. The `final` option may also be passed in order to set it.
PR-URL: #12828
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>1 parent 87cef63 commit 07c7f19Copy full SHA for 07c7f19
File tree
Expand file treeCollapse file tree
8 files changed
+317
-32
lines changedOpen diff view settings
Filter options
- doc/api
- lib
- test/parallel
Expand file treeCollapse file tree
8 files changed
+317
-32
lines changedOpen diff view settings
Collapse file
+25-3Lines changed: 25 additions & 3 deletions
- Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
1198 | 1198 | |
1199 | 1199 | |
1200 | 1200 | |
1201 | | - |
| 1201 | + |
| 1202 | + |
1202 | 1203 | |
1203 | 1204 | |
1204 | 1205 | |
| ||
1209 | 1210 | |
1210 | 1211 | |
1211 | 1212 | |
1212 | | - |
| 1213 | + |
| 1214 | + |
1213 | 1215 | |
1214 | 1216 | |
1215 | 1217 | |
| ||
1220 | 1222 | |
1221 | 1223 | |
1222 | 1224 | |
1223 | | - |
| 1225 | + |
| 1226 | + |
1224 | 1227 | |
1225 | 1228 | |
1226 | 1229 | |
| ||
1279 | 1282 | |
1280 | 1283 | |
1281 | 1284 | |
| 1285 | + |
| 1286 | + |
1282 | 1287 | |
1283 | 1288 | |
1284 | 1289 | |
| ||
1398 | 1403 | |
1399 | 1404 | |
1400 | 1405 | |
| 1406 | + |
| 1407 | + |
| 1408 | + |
| 1409 | + |
| 1410 | + |
| 1411 | + |
| 1412 | + |
| 1413 | + |
| 1414 | + |
| 1415 | + |
| 1416 | + |
| 1417 | + |
| 1418 | + |
| 1419 | + |
| 1420 | + |
| 1421 | + |
1401 | 1422 | |
1402 | 1423 | |
1403 | 1424 | |
| ||
2115 | 2136 | |
2116 | 2137 | |
2117 | 2138 | |
| 2139 | + |
2118 | 2140 | |
2119 | 2141 | |
2120 | 2142 | |
|
Collapse file
+29-6Lines changed: 29 additions & 6 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
58 | 58 | |
59 | 59 | |
60 | 60 | |
| 61 | + |
| 62 | + |
| 63 | + |
| 64 | + |
| 65 | + |
| 66 | + |
61 | 67 | |
62 | 68 | |
63 | 69 | |
| ||
199 | 205 | |
200 | 206 | |
201 | 207 | |
| 208 | + |
| 209 | + |
| 210 | + |
202 | 211 | |
203 | 212 | |
204 | 213 | |
| ||
520 | 529 | |
521 | 530 | |
522 | 531 | |
523 | | - |
524 | | - |
525 | | - |
| 532 | + |
| 533 | + |
| 534 | + |
| 535 | + |
| 536 | + |
| 537 | + |
526 | 538 | |
527 | 539 | |
| 540 | + |
| 541 | + |
| 542 | + |
| 543 | + |
| 544 | + |
| 545 | + |
| 546 | + |
| 547 | + |
| 548 | + |
| 549 | + |
| 550 | + |
| 551 | + |
| 552 | + |
528 | 553 | |
529 | 554 | |
530 | 555 | |
531 | 556 | |
532 | 557 | |
533 | 558 | |
| 559 | + |
534 | 560 | |
535 | | - |
536 | 561 | |
537 | 562 | |
538 | | - |
539 | | - |
540 | 563 | |
541 | 564 | |
542 | 565 | |
|
Collapse file
test/parallel/test-stream-readable-constructor-set-methods.js
Copy file name to clipboard+3-11Lines changed: 3 additions & 11 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
1 | 1 | |
2 | | - |
3 | | - |
| 2 | + |
4 | 3 | |
5 | 4 | |
6 | 5 | |
7 | | - |
8 | | - |
9 | | - |
| 6 | + |
10 | 7 | |
11 | | - |
| 8 | + |
12 | 9 | |
13 | 10 | |
14 | 11 | |
15 | | - |
16 | | - |
17 | | - |
18 | | - |
19 | | - |
Collapse file
test/parallel/test-stream-transform-constructor-set-methods.js
Copy file name to clipboard+12-12Lines changed: 12 additions & 12 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
1 | 1 | |
2 | | - |
| 2 | + |
3 | 3 | |
4 | 4 | |
5 | 5 | |
6 | 6 | |
7 | | - |
8 | | - |
9 | | - |
| 7 | + |
10 | 8 | |
11 | | - |
| 9 | + |
12 | 10 | |
13 | | - |
14 | | - |
15 | | - |
| 11 | + |
16 | 12 | |
17 | | - |
| 13 | + |
| 14 | + |
| 15 | + |
| 16 | + |
| 17 | + |
18 | 18 | |
19 | 19 | |
20 | 20 | |
21 | | - |
| 21 | + |
| 22 | + |
22 | 23 | |
23 | 24 | |
24 | 25 | |
| ||
34 | 35 | |
35 | 36 | |
36 | 37 | |
37 | | - |
38 | | - |
| 38 | + |
39 | 39 | |
Collapse file
test/parallel/test-stream-transform-final-sync.js
Copy file name to clipboard+100Lines changed: 100 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
| 1 | + |
| 2 | + |
| 3 | + |
| 4 | + |
| 5 | + |
| 6 | + |
| 7 | + |
| 8 | + |
| 9 | + |
| 10 | + |
| 11 | + |
| 12 | + |
| 13 | + |
| 14 | + |
| 15 | + |
| 16 | + |
| 17 | + |
| 18 | + |
| 19 | + |
| 20 | + |
| 21 | + |
| 22 | + |
| 23 | + |
| 24 | + |
| 25 | + |
| 26 | + |
| 27 | + |
| 28 | + |
| 29 | + |
| 30 | + |
| 31 | + |
| 32 | + |
| 33 | + |
| 34 | + |
| 35 | + |
| 36 | + |
| 37 | + |
| 38 | + |
| 39 | + |
| 40 | + |
| 41 | + |
| 42 | + |
| 43 | + |
| 44 | + |
| 45 | + |
| 46 | + |
| 47 | + |
| 48 | + |
| 49 | + |
| 50 | + |
| 51 | + |
| 52 | + |
| 53 | + |
| 54 | + |
| 55 | + |
| 56 | + |
| 57 | + |
| 58 | + |
| 59 | + |
| 60 | + |
| 61 | + |
| 62 | + |
| 63 | + |
| 64 | + |
| 65 | + |
| 66 | + |
| 67 | + |
| 68 | + |
| 69 | + |
| 70 | + |
| 71 | + |
| 72 | + |
| 73 | + |
| 74 | + |
| 75 | + |
| 76 | + |
| 77 | + |
| 78 | + |
| 79 | + |
| 80 | + |
| 81 | + |
| 82 | + |
| 83 | + |
| 84 | + |
| 85 | + |
| 86 | + |
| 87 | + |
| 88 | + |
| 89 | + |
| 90 | + |
| 91 | + |
| 92 | + |
| 93 | + |
| 94 | + |
| 95 | + |
| 96 | + |
| 97 | + |
| 98 | + |
| 99 | + |
| 100 | + |
0 commit comments