Skip to content

Commit d669f22

Browse files
aduh95danielleadams
authored andcommitted
stream: add trailing commas in stream source files
PR-URL: #46686 Reviewed-By: Robert Nagy <[email protected]> Reviewed-By: Moshe Atlow <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Darshan Sen <[email protected]>
1 parent 320a8ad commit d669f22

File tree

13 files changed

+63
-62
lines changed

13 files changed

+63
-62
lines changed

‎lib/.eslintrc.yaml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,7 @@ overrides:
278278
- ./internal/readme.md
279279
- ./internal/repl/history.js
280280
- ./internal/source_map/prepare_stack_trace.js
281+
- ./internal/streams/*.js
281282
- ./internal/structured_clone.js
282283
- ./internal/test/*.js
283284
- ./internal/test_runner/**/*.js

‎lib/internal/streams/buffer_list.js‎

Lines 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
};

‎lib/internal/streams/destroy.js‎

Lines 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
constkDestroy=Symbol('kDestroy');
@@ -334,5 +334,5 @@ module.exports ={
334334
destroyer,
335335
destroy,
336336
undestroy,
337-
errorOrDestroy
337+
errorOrDestroy,
338338
};

‎lib/internal/streams/duplex.js‎

Lines 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
letwebStreamsAdapters;

‎lib/internal/streams/duplexify.js‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ const{
2929
const{ AbortController }=require('internal/abort_controller');
3030

3131
const{
32-
FunctionPrototypeCall
32+
FunctionPrototypeCall,
3333
}=primordials;
3434

3535
// This is needed for pre node 17.
@@ -90,7 +90,7 @@ module.exports = function duplexify(body, name){
9090
objectMode: true,
9191
write,
9292
final,
93-
destroy
93+
destroy,
9494
});
9595
}
9696

@@ -126,7 +126,7 @@ module.exports = function duplexify(body, name){
126126
}
127127
});
128128
},
129-
destroy
129+
destroy,
130130
});
131131
}
132132

@@ -142,7 +142,7 @@ module.exports = function duplexify(body, name){
142142
returnfrom(Duplexify,body,{
143143
// TODO (ronag): highWaterMark?
144144
objectMode: true,
145-
writable: false
145+
writable: false,
146146
});
147147
}
148148

@@ -192,7 +192,7 @@ module.exports = function duplexify(body, name){
192192
returnd=newDuplexify({
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

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

Lines 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;

‎lib/internal/streams/from.js‎

Lines 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
functionfrom(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

‎lib/internal/streams/lazy_transform.js‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const{
1212
conststream=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
});

‎lib/internal/streams/pipeline.js‎

Lines 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||newERR_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
constpt=newPassThrough({
317-
objectMode: true
317+
objectMode: true,
318318
});
319319

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

‎lib/internal/streams/readable.js‎

Lines 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
constdestroyImpl=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
returnthis._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
returnthis._readableState.highWaterMark;
1197-
}
1197+
},
11981198
},
11991199

12001200
readableBuffer: {
12011201
__proto__: null,
12021202
enumerable: false,
12031203
get: function(){
12041204
returnthis._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
returnthis._readableState.length;
1226-
}
1226+
},
12271227
},
12281228

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

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

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

12531253
closed: {
12541254
__proto__: null,
12551255
get(){
12561256
returnthis._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
returnthis._readableState ? this._readableState.endEmitted : false;
1284-
}
1284+
},
12851285
},
12861286

12871287
});
@@ -1292,7 +1292,7 @@ ObjectDefineProperties(ReadableState.prototype,{
12921292
__proto__: null,
12931293
get(){
12941294
returnthis.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)