GeezerVison is showing github.com — stream: export namespace object from internal end-of-stream module · nodejs/node@d4cf423
File treeExpand file treeCollapse file tree Open diff view settings Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: lib/internal/streams/add-abort-signal.js +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -17,7 +17,7 @@ const { | 17 | 17 | kControllerErrorFunction, | 18 | 18 | } = require('internal/streams/utils'); | 19 | 19 |
| 20 | | -const eos = require('internal/streams/end-of-stream'); | | 20 | +const { eos } = require('internal/streams/end-of-stream'); | 21 | 21 | let addAbortListener; | 22 | 22 |
| 23 | 23 | // This method is inlined here for readable-stream | |
Collapse file Copy file name to clipboardExpand all lines: lib/internal/streams/compose.js +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -23,7 +23,7 @@ const { | 23 | 23 | ERR_MISSING_ARGS, | 24 | 24 | }, | 25 | 25 | } = require('internal/errors'); | 26 | | -const eos = require('internal/streams/end-of-stream'); | | 26 | +const { eos } = require('internal/streams/end-of-stream'); | 27 | 27 |
| 28 | 28 | module.exports = function compose(...streams) { | 29 | 29 | if (streams.length === 0) { | |
Collapse file Copy file name to clipboardExpand all lines: lib/internal/streams/duplexify.js +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -16,7 +16,7 @@ const { | 16 | 16 | isReadableStream, | 17 | 17 | isWritableStream, | 18 | 18 | } = require('internal/streams/utils'); | 19 | | -const eos = require('internal/streams/end-of-stream'); | | 19 | +const { eos } = require('internal/streams/end-of-stream'); | 20 | 20 | const { | 21 | 21 | AbortError, | 22 | 22 | codes: { | |
Collapse file Copy file name to clipboardExpand all lines: lib/internal/streams/end-of-stream.js +4-2Lines changed: 4 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -337,5 +337,7 @@ function finished(stream, opts) { | 337 | 337 | }); | 338 | 338 | } | 339 | 339 |
| 340 | | -module.exports = eos; | 341 | | -module.exports.finished = finished; | | 340 | +module.exports = { | | 341 | + eos, | | 342 | + finished, | | 343 | +}; |
Collapse file Copy file name to clipboardExpand all lines: lib/internal/streams/pipeline.js +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -10,7 +10,7 @@ const { | 10 | 10 | SymbolDispose, | 11 | 11 | } = primordials; | 12 | 12 |
| 13 | | -const eos = require('internal/streams/end-of-stream'); | | 13 | +const { eos } = require('internal/streams/end-of-stream'); | 14 | 14 | const { once } = require('internal/util'); | 15 | 15 | const destroyImpl = require('internal/streams/destroy'); | 16 | 16 | const Duplex = require('internal/streams/duplex'); | |
Collapse file Copy file name to clipboardExpand all lines: lib/internal/streams/readable.js +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -50,7 +50,7 @@ const { | 50 | 50 | addAbortSignal, | 51 | 51 | addAbortSignalNoValidate, | 52 | 52 | } = require('internal/streams/add-abort-signal'); | 53 | | -const eos = require('internal/streams/end-of-stream'); | | 53 | +const { eos } = require('internal/streams/end-of-stream'); | 54 | 54 |
| 55 | 55 | let debug = require('internal/util/debuglog').debuglog('stream', (fn) => { | 56 | 56 | debug = fn; | |
Collapse file Copy file name to clipboardExpand all lines: lib/internal/streams/writable.js +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -46,7 +46,7 @@ const EE = require('events'); | 46 | 46 | const Stream = require('internal/streams/legacy').Stream; | 47 | 47 | const { Buffer } = require('buffer'); | 48 | 48 | const destroyImpl = require('internal/streams/destroy'); | 49 | | -const eos = require('internal/streams/end-of-stream'); | | 49 | +const { eos } = require('internal/streams/end-of-stream'); | 50 | 50 |
| 51 | 51 | const { | 52 | 52 | addAbortSignal, | |
Collapse file Copy file name to clipboardExpand all lines: lib/internal/webstreams/adapters.js +3-3Lines changed: 3 additions & 3 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -84,7 +84,7 @@ const { | 84 | 84 | streamBaseState, | 85 | 85 | } = internalBinding('stream_wrap'); | 86 | 86 |
| 87 | | -const finished = require('internal/streams/end-of-stream'); | | 87 | +const { eos } = require('internal/streams/end-of-stream'); | 88 | 88 |
| 89 | 89 | const { UV_EOF } = internalBinding('uv'); | 90 | 90 |
| @@ -176,7 +176,7 @@ function newWritableStreamFromStreamWritable(streamWritable) { | 176 | 176 | backpressurePromise.resolve(); | 177 | 177 | } | 178 | 178 |
| 179 | | - const cleanup = finished(streamWritable, (error) => { | | 179 | + const cleanup = eos(streamWritable, (error) => { | 180 | 180 | error = handleKnownInternalErrors(error); | 181 | 181 |
| 182 | 182 | cleanup(); | @@ -483,7 +483,7 @@ function newReadableStreamFromStreamReadable(streamReadable, options = kEmptyObj | 483 | 483 |
| 484 | 484 | streamReadable.pause(); | 485 | 485 |
| 486 | | - const cleanup = finished(streamReadable, (error) => { | | 486 | + const cleanup = eos(streamReadable, (error) => { | 487 | 487 | error = handleKnownInternalErrors(error); | 488 | 488 |
| 489 | 489 | cleanup(); | |
Collapse file Copy file name to clipboardExpand all lines: lib/stream.js +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -45,7 +45,7 @@ const compose = require('internal/streams/compose'); | 45 | 45 | const { setDefaultHighWaterMark, getDefaultHighWaterMark } = require('internal/streams/state'); | 46 | 46 | const { pipeline } = require('internal/streams/pipeline'); | 47 | 47 | const { destroyer } = require('internal/streams/destroy'); | 48 | | -const eos = require('internal/streams/end-of-stream'); | | 48 | +const { eos } = require('internal/streams/end-of-stream'); | 49 | 49 | const internalBuffer = require('internal/buffer'); | 50 | 50 |
| 51 | 51 | const promises = require('stream/promises'); | |
|