Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit d4cf423

Browse filesBrowse files
Renegade334aduh95
authored andcommitted
stream: export namespace object from internal end-of-stream module
PR-URL: #61455 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Mattias Buelens <mattias@buelens.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ethan Arrowood <ethan@arrowood.dev>
1 parent 0729fb6 commit d4cf423
Copy full SHA for d4cf423

9 files changed

+14-12Lines changed: 14 additions & 12 deletions

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎lib/internal/streams/add-abort-signal.js‎

Copy file name to clipboardExpand all lines: lib/internal/streams/add-abort-signal.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const {
1717
kControllerErrorFunction,
1818
} = require('internal/streams/utils');
1919

20-
const eos = require('internal/streams/end-of-stream');
20+
const { eos } = require('internal/streams/end-of-stream');
2121
let addAbortListener;
2222

2323
// This method is inlined here for readable-stream
Collapse file

‎lib/internal/streams/compose.js‎

Copy file name to clipboardExpand all lines: lib/internal/streams/compose.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const {
2323
ERR_MISSING_ARGS,
2424
},
2525
} = require('internal/errors');
26-
const eos = require('internal/streams/end-of-stream');
26+
const { eos } = require('internal/streams/end-of-stream');
2727

2828
module.exports = function compose(...streams) {
2929
if (streams.length === 0) {
Collapse file

‎lib/internal/streams/duplexify.js‎

Copy file name to clipboardExpand all lines: lib/internal/streams/duplexify.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const {
1616
isReadableStream,
1717
isWritableStream,
1818
} = require('internal/streams/utils');
19-
const eos = require('internal/streams/end-of-stream');
19+
const { eos } = require('internal/streams/end-of-stream');
2020
const {
2121
AbortError,
2222
codes: {
Collapse file

‎lib/internal/streams/end-of-stream.js‎

Copy file name to clipboardExpand all lines: lib/internal/streams/end-of-stream.js
+4-2Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -337,5 +337,7 @@ function finished(stream, opts) {
337337
});
338338
}
339339

340-
module.exports = eos;
341-
module.exports.finished = finished;
340+
module.exports = {
341+
eos,
342+
finished,
343+
};
Collapse file

‎lib/internal/streams/pipeline.js‎

Copy file name to clipboardExpand all lines: lib/internal/streams/pipeline.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const {
1010
SymbolDispose,
1111
} = primordials;
1212

13-
const eos = require('internal/streams/end-of-stream');
13+
const { eos } = require('internal/streams/end-of-stream');
1414
const { once } = require('internal/util');
1515
const destroyImpl = require('internal/streams/destroy');
1616
const Duplex = require('internal/streams/duplex');
Collapse file

‎lib/internal/streams/readable.js‎

Copy file name to clipboardExpand all lines: lib/internal/streams/readable.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ const {
5050
addAbortSignal,
5151
addAbortSignalNoValidate,
5252
} = require('internal/streams/add-abort-signal');
53-
const eos = require('internal/streams/end-of-stream');
53+
const { eos } = require('internal/streams/end-of-stream');
5454

5555
let debug = require('internal/util/debuglog').debuglog('stream', (fn) => {
5656
debug = fn;
Collapse file

‎lib/internal/streams/writable.js‎

Copy file name to clipboardExpand all lines: lib/internal/streams/writable.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ const EE = require('events');
4646
const Stream = require('internal/streams/legacy').Stream;
4747
const { Buffer } = require('buffer');
4848
const destroyImpl = require('internal/streams/destroy');
49-
const eos = require('internal/streams/end-of-stream');
49+
const { eos } = require('internal/streams/end-of-stream');
5050

5151
const {
5252
addAbortSignal,
Collapse file

‎lib/internal/webstreams/adapters.js‎

Copy file name to clipboardExpand all lines: lib/internal/webstreams/adapters.js
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ const {
8484
streamBaseState,
8585
} = internalBinding('stream_wrap');
8686

87-
const finished = require('internal/streams/end-of-stream');
87+
const { eos } = require('internal/streams/end-of-stream');
8888

8989
const { UV_EOF } = internalBinding('uv');
9090

@@ -176,7 +176,7 @@ function newWritableStreamFromStreamWritable(streamWritable) {
176176
backpressurePromise.resolve();
177177
}
178178

179-
const cleanup = finished(streamWritable, (error) => {
179+
const cleanup = eos(streamWritable, (error) => {
180180
error = handleKnownInternalErrors(error);
181181

182182
cleanup();
@@ -483,7 +483,7 @@ function newReadableStreamFromStreamReadable(streamReadable, options = kEmptyObj
483483

484484
streamReadable.pause();
485485

486-
const cleanup = finished(streamReadable, (error) => {
486+
const cleanup = eos(streamReadable, (error) => {
487487
error = handleKnownInternalErrors(error);
488488

489489
cleanup();
Collapse file

‎lib/stream.js‎

Copy file name to clipboardExpand all lines: lib/stream.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ const compose = require('internal/streams/compose');
4545
const { setDefaultHighWaterMark, getDefaultHighWaterMark } = require('internal/streams/state');
4646
const { pipeline } = require('internal/streams/pipeline');
4747
const { destroyer } = require('internal/streams/destroy');
48-
const eos = require('internal/streams/end-of-stream');
48+
const { eos } = require('internal/streams/end-of-stream');
4949
const internalBuffer = require('internal/buffer');
5050

5151
const promises = require('stream/promises');

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.