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 f3b6084

Browse filesBrowse files
aduh95MylesBorins
authored andcommitted
stream: add trailing commas in stream source files
PR-URL: #46686 Reviewed-By: Robert Nagy <ronagy@icloud.com> Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com>
1 parent 673f76a commit f3b6084
Copy full SHA for f3b6084

File tree

Expand file treeCollapse file tree

13 files changed

+63
-62
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

13 files changed

+63
-62
lines changed
Open diff view settings
Collapse file

‎lib/.eslintrc.yaml‎

Copy file name to clipboardExpand all lines: lib/.eslintrc.yaml
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,7 @@ overrides:
290290
- ./internal/readme.md
291291
- ./internal/repl/history.js
292292
- ./internal/source_map/prepare_stack_trace.js
293+
- ./internal/streams/*.js
293294
- ./internal/structured_clone.js
294295
- ./internal/test/*.js
295296
- ./internal/test_runner/**/*.js
Collapse file

‎lib/internal/streams/buffer_list.js‎

Copy file name to clipboardExpand all lines: lib/internal/streams/buffer_list.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ module.exports = class BufferList {
175175
// Only inspect one level.
176176
depth: 0,
177177
// It should not recurse.
178-
customInspect: false
178+
customInspect: false,
179179
});
180180
}
181181
};
Collapse file

‎lib/internal/streams/destroy.js‎

Copy file name to clipboardExpand all lines: lib/internal/streams/destroy.js
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const {
1414
kDestroyed,
1515
isDestroyed,
1616
isFinished,
17-
isServerRequest
17+
isServerRequest,
1818
} = require('internal/streams/utils');
1919

2020
const kDestroy = Symbol('kDestroy');
@@ -334,5 +334,5 @@ module.exports = {
334334
destroyer,
335335
destroy,
336336
undestroy,
337-
errorOrDestroy
337+
errorOrDestroy,
338338
};
Collapse file

‎lib/internal/streams/duplex.js‎

Copy file name to clipboardExpand all lines: lib/internal/streams/duplex.js
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,8 @@ ObjectDefineProperties(Duplex.prototype, {
114114
this._readableState.destroyed = value;
115115
this._writableState.destroyed = value;
116116
}
117-
}
118-
}
117+
},
118+
},
119119
});
120120

121121
let webStreamsAdapters;
Collapse file

‎lib/internal/streams/duplexify.js‎

Copy file name to clipboardExpand all lines: lib/internal/streams/duplexify.js
+6-6Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ const {
3232
const { AbortController } = require('internal/abort_controller');
3333

3434
const {
35-
FunctionPrototypeCall
35+
FunctionPrototypeCall,
3636
} = primordials;
3737

3838
// This is needed for pre node 17.
@@ -91,7 +91,7 @@ module.exports = function duplexify(body, name) {
9191
objectMode: true,
9292
write,
9393
final,
94-
destroy
94+
destroy,
9595
});
9696
}
9797

@@ -127,7 +127,7 @@ module.exports = function duplexify(body, name) {
127127
}
128128
});
129129
},
130-
destroy
130+
destroy,
131131
});
132132
}
133133

@@ -143,7 +143,7 @@ module.exports = function duplexify(body, name) {
143143
return from(Duplexify, body, {
144144
// TODO (ronag): highWaterMark?
145145
objectMode: true,
146-
writable: false
146+
writable: false,
147147
});
148148
}
149149

@@ -192,7 +192,7 @@ module.exports = function duplexify(body, name) {
192192
return d = new Duplexify({
193193
objectMode: true,
194194
writable: false,
195-
read() {}
195+
read() {},
196196
});
197197
}
198198

@@ -236,7 +236,7 @@ function fromAsyncGen(fn) {
236236
destroy(err, cb) {
237237
ac.abort();
238238
cb(err);
239-
}
239+
},
240240
};
241241
}
242242

Collapse file

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

Copy file name to clipboardExpand all lines: lib/internal/streams/end-of-stream.js
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const {
99
} = require('internal/errors');
1010
const {
1111
ERR_INVALID_ARG_TYPE,
12-
ERR_STREAM_PREMATURE_CLOSE
12+
ERR_STREAM_PREMATURE_CLOSE,
1313
} = codes;
1414
const {
1515
kEmptyObject,
@@ -19,7 +19,7 @@ const {
1919
validateAbortSignal,
2020
validateFunction,
2121
validateObject,
22-
validateBoolean
22+
validateBoolean,
2323
} = require('internal/validators');
2424

2525
const { Promise, PromisePrototypeThen } = primordials;
Collapse file

‎lib/internal/streams/from.js‎

Copy file name to clipboardExpand all lines: lib/internal/streams/from.js
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const { Buffer } = require('buffer');
99

1010
const {
1111
ERR_INVALID_ARG_TYPE,
12-
ERR_STREAM_NULL_VALUES
12+
ERR_STREAM_NULL_VALUES,
1313
} = require('internal/errors').codes;
1414

1515
function from(Readable, iterable, opts) {
@@ -21,7 +21,7 @@ function from(Readable, iterable, opts) {
2121
read() {
2222
this.push(iterable);
2323
this.push(null);
24-
}
24+
},
2525
});
2626
}
2727

Collapse file

‎lib/internal/streams/lazy_transform.js‎

Copy file name to clipboardExpand all lines: lib/internal/streams/lazy_transform.js
+5-5Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const {
1212
const stream = require('stream');
1313

1414
const {
15-
getDefaultEncoding
15+
getDefaultEncoding,
1616
} = require('internal/crypto/util');
1717

1818
module.exports = LazyTransform;
@@ -43,7 +43,7 @@ function makeSetter(name) {
4343
value: val,
4444
enumerable: true,
4545
configurable: true,
46-
writable: true
46+
writable: true,
4747
});
4848
};
4949
}
@@ -54,13 +54,13 @@ ObjectDefineProperties(LazyTransform.prototype, {
5454
get: makeGetter('_readableState'),
5555
set: makeSetter('_readableState'),
5656
configurable: true,
57-
enumerable: true
57+
enumerable: true,
5858
},
5959
_writableState: {
6060
__proto__: null,
6161
get: makeGetter('_writableState'),
6262
set: makeSetter('_writableState'),
6363
configurable: true,
64-
enumerable: true
65-
}
64+
enumerable: true,
65+
},
6666
});
Collapse file

‎lib/internal/streams/pipeline.js‎

Copy file name to clipboardExpand all lines: lib/internal/streams/pipeline.js
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ const {
2727

2828
const {
2929
validateFunction,
30-
validateAbortSignal
30+
validateAbortSignal,
3131
} = require('internal/validators');
3232

3333
const {
@@ -60,7 +60,7 @@ function destroyer(stream, reading, writing) {
6060
finished = true;
6161
destroyImpl.destroyer(stream, err || new ERR_STREAM_DESTROYED('pipe'));
6262
},
63-
cleanup
63+
cleanup,
6464
};
6565
}
6666

@@ -314,7 +314,7 @@ function pipelineImpl(streams, callback, opts) {
314314
// composed through `.pipe(stream)`.
315315

316316
const pt = new PassThrough({
317-
objectMode: true
317+
objectMode: true,
318318
});
319319

320320
// Handle Promises/A+ spec, `then` could be a getter that throws on
Collapse file

‎lib/internal/streams/readable.js‎

Copy file name to clipboardExpand all lines: lib/internal/streams/readable.js
+20-20Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ const {
3232
Promise,
3333
SafeSet,
3434
SymbolAsyncIterator,
35-
Symbol
35+
Symbol,
3636
} = primordials;
3737

3838
module.exports = Readable;
@@ -54,7 +54,7 @@ const BufferList = require('internal/streams/buffer_list');
5454
const destroyImpl = require('internal/streams/destroy');
5555
const {
5656
getHighWaterMark,
57-
getDefaultHighWaterMark
57+
getDefaultHighWaterMark,
5858
} = require('internal/streams/state');
5959

6060
const {
@@ -65,7 +65,7 @@ const {
6565
ERR_OUT_OF_RANGE,
6666
ERR_STREAM_PUSH_AFTER_EOF,
6767
ERR_STREAM_UNSHIFT_AFTER_END_EVENT,
68-
}
68+
},
6969
} = require('internal/errors');
7070
const { validateObject } = require('internal/validators');
7171

@@ -1166,15 +1166,15 @@ ObjectDefineProperties(Readable.prototype, {
11661166
if (this._readableState) {
11671167
this._readableState.readable = !!val;
11681168
}
1169-
}
1169+
},
11701170
},
11711171

11721172
readableDidRead: {
11731173
__proto__: null,
11741174
enumerable: false,
11751175
get: function() {
11761176
return this._readableState.dataEmitted;
1177-
}
1177+
},
11781178
},
11791179

11801180
readableAborted: {
@@ -1186,23 +1186,23 @@ ObjectDefineProperties(Readable.prototype, {
11861186
(this._readableState.destroyed || this._readableState.errored) &&
11871187
!this._readableState.endEmitted
11881188
);
1189-
}
1189+
},
11901190
},
11911191

11921192
readableHighWaterMark: {
11931193
__proto__: null,
11941194
enumerable: false,
11951195
get: function() {
11961196
return this._readableState.highWaterMark;
1197-
}
1197+
},
11981198
},
11991199

12001200
readableBuffer: {
12011201
__proto__: null,
12021202
enumerable: false,
12031203
get: function() {
12041204
return this._readableState && this._readableState.buffer;
1205-
}
1205+
},
12061206
},
12071207

12081208
readableFlowing: {
@@ -1215,46 +1215,46 @@ ObjectDefineProperties(Readable.prototype, {
12151215
if (this._readableState) {
12161216
this._readableState.flowing = state;
12171217
}
1218-
}
1218+
},
12191219
},
12201220

12211221
readableLength: {
12221222
__proto__: null,
12231223
enumerable: false,
12241224
get() {
12251225
return this._readableState.length;
1226-
}
1226+
},
12271227
},
12281228

12291229
readableObjectMode: {
12301230
__proto__: null,
12311231
enumerable: false,
12321232
get() {
12331233
return this._readableState ? this._readableState.objectMode : false;
1234-
}
1234+
},
12351235
},
12361236

12371237
readableEncoding: {
12381238
__proto__: null,
12391239
enumerable: false,
12401240
get() {
12411241
return this._readableState ? this._readableState.encoding : null;
1242-
}
1242+
},
12431243
},
12441244

12451245
errored: {
12461246
__proto__: null,
12471247
enumerable: false,
12481248
get() {
12491249
return this._readableState ? this._readableState.errored : null;
1250-
}
1250+
},
12511251
},
12521252

12531253
closed: {
12541254
__proto__: null,
12551255
get() {
12561256
return this._readableState ? this._readableState.closed : false;
1257-
}
1257+
},
12581258
},
12591259

12601260
destroyed: {
@@ -1273,15 +1273,15 @@ ObjectDefineProperties(Readable.prototype, {
12731273
// Backward compatibility, the user is explicitly
12741274
// managing destroyed.
12751275
this._readableState.destroyed = value;
1276-
}
1276+
},
12771277
},
12781278

12791279
readableEnded: {
12801280
__proto__: null,
12811281
enumerable: false,
12821282
get() {
12831283
return this._readableState ? this._readableState.endEmitted : false;
1284-
}
1284+
},
12851285
},
12861286

12871287
});
@@ -1292,7 +1292,7 @@ ObjectDefineProperties(ReadableState.prototype, {
12921292
__proto__: null,
12931293
get() {
12941294
return this.pipes.length;
1295-
}
1295+
},
12961296
},
12971297

12981298
// Legacy property for `paused`.
@@ -1303,8 +1303,8 @@ ObjectDefineProperties(ReadableState.prototype, {
13031303
},
13041304
set(value) {
13051305
this[kPaused] = !!value;
1306-
}
1307-
}
1306+
},
1307+
},
13081308
});
13091309

13101310
// Exposed for testing purposes only.
@@ -1418,6 +1418,6 @@ Readable.wrap = function(src, options) {
14181418
destroy(err, callback) {
14191419
destroyImpl.destroyer(src, err);
14201420
callback(err);
1421-
}
1421+
},
14221422
}).wrap(src);
14231423
};

0 commit comments

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