Skip to content

Commit 0f33bb0

Browse files
aduh95danielleadams
authored andcommittedApr 11, 2023
lib: add trailing commas to all public core modules
PR-URL: #46848 Reviewed-By: Debadree Chatterjee <debadree333@gmail.com> Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
1 parent 17fbfb2 commit 0f33bb0

30 files changed

+214
-245
lines changed
 

Diff for: ‎lib/.eslintrc.yaml

+1-32
Original file line numberDiff line numberDiff line change
@@ -252,58 +252,27 @@ globals:
252252
overrides:
253253
- files:
254254
- ./*/*.js
255-
- ./_*.js
256-
- ./child_process.js
257-
- ./cluster.js
258-
- ./console.js
259-
- ./constants.js
260-
- ./events.js
261-
- ./fs.js
262-
- ./internal/assert.js
263-
- ./internal/child_process.js
255+
- ./*.js
264256
- ./internal/child_process/*.js
265-
- ./internal/cli_table.js
266257
- ./internal/cluster/*.js
267258
- ./internal/debugger/*.js
268-
- ./internal/event_target.js
269259
- ./internal/events/*.js
270-
- ./internal/fixed_queue.js
271-
- ./internal/freelist.js
272260
- ./internal/fs/*.js
273-
- ./internal/heap_utils.js
274-
- ./internal/http.js
275-
- ./internal/idna.js
276-
- ./internal/js_stream_socket.js
277-
- ./internal/mime.js
278261
- ./internal/modules/*.js
279262
- ./internal/per_context/*.js
280263
- ./internal/perf/*.js
281264
- ./internal/policy/*.js
282-
- ./internal/priority_queue.js
283265
- ./internal/process/*.js
284266
- ./internal/readline/*.js
285267
- ./internal/readme.md
286-
- ./internal/repl.js
287268
- ./internal/repl/*.js
288269
- ./internal/source_map/*.js
289270
- ./internal/streams/*.js
290-
- ./internal/structured_clone.js
291271
- ./internal/test/*.js
292272
- ./internal/test_runner/**/*.js
293273
- ./internal/tls/*.js
294274
- ./internal/util/parse_args/*.js
295-
- ./internal/v8_prof_processor.js
296-
- ./internal/vm.js
297275
- ./internal/watch_mode/*.js
298-
- ./internal/webidl.js
299276
- ./internal/webstreams/*.js
300-
- ./module.js
301-
- ./process.js
302-
- ./punycode.js
303-
- ./repl.js
304-
- ./sys.js
305-
- ./test.js
306-
- ./tls.js
307-
- ./url.js
308277
rules:
309278
comma-dangle: [error, always-multiline]

Diff for: ‎lib/assert.js

+19-19
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ function fail(actual, expected, message, operator, stackStartFn) {
163163
expected,
164164
operator: operator === undefined ? 'fail' : operator,
165165
stackStartFn: stackStartFn || fail,
166-
message
166+
message,
167167
};
168168
const err = new AssertionError(errArgs);
169169
if (internalMessage) {
@@ -393,7 +393,7 @@ function innerOk(fn, argLen, value, message) {
393393
expected: true,
394394
message,
395395
operator: '==',
396-
stackStartFn: fn
396+
stackStartFn: fn,
397397
});
398398
err.generatedMessage = generatedMessage;
399399
throw err;
@@ -430,7 +430,7 @@ assert.equal = function equal(actual, expected, message) {
430430
expected,
431431
message,
432432
operator: '==',
433-
stackStartFn: equal
433+
stackStartFn: equal,
434434
});
435435
}
436436
};
@@ -454,7 +454,7 @@ assert.notEqual = function notEqual(actual, expected, message) {
454454
expected,
455455
message,
456456
operator: '!=',
457-
stackStartFn: notEqual
457+
stackStartFn: notEqual,
458458
});
459459
}
460460
};
@@ -477,7 +477,7 @@ assert.deepEqual = function deepEqual(actual, expected, message) {
477477
expected,
478478
message,
479479
operator: 'deepEqual',
480-
stackStartFn: deepEqual
480+
stackStartFn: deepEqual,
481481
});
482482
}
483483
};
@@ -500,7 +500,7 @@ assert.notDeepEqual = function notDeepEqual(actual, expected, message) {
500500
expected,
501501
message,
502502
operator: 'notDeepEqual',
503-
stackStartFn: notDeepEqual
503+
stackStartFn: notDeepEqual,
504504
});
505505
}
506506
};
@@ -525,7 +525,7 @@ assert.deepStrictEqual = function deepStrictEqual(actual, expected, message) {
525525
expected,
526526
message,
527527
operator: 'deepStrictEqual',
528-
stackStartFn: deepStrictEqual
528+
stackStartFn: deepStrictEqual,
529529
});
530530
}
531531
};
@@ -550,7 +550,7 @@ function notDeepStrictEqual(actual, expected, message) {
550550
expected,
551551
message,
552552
operator: 'notDeepStrictEqual',
553-
stackStartFn: notDeepStrictEqual
553+
stackStartFn: notDeepStrictEqual,
554554
});
555555
}
556556
}
@@ -572,7 +572,7 @@ assert.strictEqual = function strictEqual(actual, expected, message) {
572572
expected,
573573
message,
574574
operator: 'strictEqual',
575-
stackStartFn: strictEqual
575+
stackStartFn: strictEqual,
576576
});
577577
}
578578
};
@@ -594,7 +594,7 @@ assert.notStrictEqual = function notStrictEqual(actual, expected, message) {
594594
expected,
595595
message,
596596
operator: 'notStrictEqual',
597-
stackStartFn: notStrictEqual
597+
stackStartFn: notStrictEqual,
598598
});
599599
}
600600
};
@@ -627,7 +627,7 @@ function compareExceptionKey(actual, expected, key, message, keys, fn) {
627627
actual: a,
628628
expected: b,
629629
operator: 'deepStrictEqual',
630-
stackStartFn: fn
630+
stackStartFn: fn,
631631
});
632632
err.actual = actual;
633633
err.expected = expected;
@@ -639,7 +639,7 @@ function compareExceptionKey(actual, expected, key, message, keys, fn) {
639639
expected,
640640
message,
641641
operator: fn.name,
642-
stackStartFn: fn
642+
stackStartFn: fn,
643643
});
644644
}
645645
}
@@ -668,7 +668,7 @@ function expectedException(actual, expected, message, fn) {
668668
expected,
669669
message,
670670
operator: 'deepStrictEqual',
671-
stackStartFn: fn
671+
stackStartFn: fn,
672672
});
673673
err.operator = fn.name;
674674
throw err;
@@ -743,7 +743,7 @@ function expectedException(actual, expected, message, fn) {
743743
expected,
744744
message,
745745
operator: fn.name,
746-
stackStartFn: fn
746+
stackStartFn: fn,
747747
});
748748
err.generatedMessage = generatedMessage;
749749
throw err;
@@ -837,7 +837,7 @@ function expectsError(stackStartFn, actual, error, message) {
837837
expected: error,
838838
operator: stackStartFn.name,
839839
message: `Missing expected ${fnType}${details}`,
840-
stackStartFn
840+
stackStartFn,
841841
});
842842
}
843843

@@ -886,7 +886,7 @@ function expectsNoError(stackStartFn, actual, error, message) {
886886
operator: stackStartFn.name,
887887
message: `Got unwanted ${fnType}${details}\n` +
888888
`Actual message: "${actual && actual.message}"`,
889-
stackStartFn
889+
stackStartFn,
890890
});
891891
}
892892
throw actual;
@@ -955,7 +955,7 @@ assert.ifError = function ifError(err) {
955955
expected: null,
956956
operator: 'ifError',
957957
message,
958-
stackStartFn: ifError
958+
stackStartFn: ifError,
959959
});
960960

961961
// Make sure we actually have a stack trace!
@@ -1020,7 +1020,7 @@ function internalMatch(string, regexp, message, fn) {
10201020
expected: regexp,
10211021
message,
10221022
operator: fn.name,
1023-
stackStartFn: fn
1023+
stackStartFn: fn,
10241024
});
10251025
err.generatedMessage = generatedMessage;
10261026
throw err;
@@ -1064,7 +1064,7 @@ assert.strict = ObjectAssign(strict, assert, {
10641064
equal: assert.strictEqual,
10651065
deepEqual: assert.deepStrictEqual,
10661066
notEqual: assert.notStrictEqual,
1067-
notDeepEqual: assert.notDeepStrictEqual
1067+
notDeepEqual: assert.notDeepStrictEqual,
10681068
});
10691069

10701070
assert.strict.strict = assert.strict;

Diff for: ‎lib/async_hooks.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const {
1818
const {
1919
ERR_ASYNC_CALLBACK,
2020
ERR_ASYNC_TYPE,
21-
ERR_INVALID_ASYNC_ID
21+
ERR_INVALID_ASYNC_ID,
2222
} = require('internal/errors').codes;
2323
const { kEmptyObject } = require('internal/util');
2424
const {
@@ -58,7 +58,7 @@ const {
5858
const {
5959
async_id_symbol, trigger_async_id_symbol,
6060
init_symbol, before_symbol, after_symbol, destroy_symbol,
61-
promise_resolve_symbol
61+
promise_resolve_symbol,
6262
} = internal_async_hooks.symbols;
6363

6464
// Get constants
@@ -251,7 +251,7 @@ class AsyncResource {
251251
enumerable: true,
252252
value: this,
253253
writable: true,
254-
}
254+
},
255255
});
256256
return bound;
257257
}
@@ -270,7 +270,7 @@ const storageHook = createHook({
270270
for (let i = 0; i < storageList.length; ++i) {
271271
storageList[i]._propagate(resource, currentResource, type);
272272
}
273-
}
273+
},
274274
});
275275

276276
class AsyncLocalStorage {

Diff for: ‎lib/buffer.js

+26-26
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ const {
7070
swap32: _swap32,
7171
swap64: _swap64,
7272
kMaxLength,
73-
kStringMaxLength
73+
kStringMaxLength,
7474
} = internalBinding('buffer');
7575
const {
7676
constants: {
@@ -84,7 +84,7 @@ const {
8484
isInsideNodeModules,
8585
lazyDOMException,
8686
normalizeEncoding,
87-
kIsEncodingSymbol
87+
kIsEncodingSymbol,
8888
} = require('internal/util');
8989
const {
9090
isAnyArrayBuffer,
@@ -93,7 +93,7 @@ const {
9393
isTypedArray,
9494
} = require('internal/util/types');
9595
const {
96-
inspect: utilInspect
96+
inspect: utilInspect,
9797
} = require('internal/util/inspect');
9898
const { encodings } = internalBinding('string_decoder');
9999

@@ -105,7 +105,7 @@ const {
105105
ERR_INVALID_BUFFER_SIZE,
106106
ERR_OUT_OF_RANGE,
107107
ERR_MISSING_ARGS,
108-
ERR_UNKNOWN_ENCODING
108+
ERR_UNKNOWN_ENCODING,
109109
},
110110
genericNodeError,
111111
hideStackFrames,
@@ -115,7 +115,7 @@ const {
115115
validateBuffer,
116116
validateNumber,
117117
validateInteger,
118-
validateString
118+
validateString,
119119
} = require('internal/validators');
120120
// Provide validateInteger() but with kMaxLength as the default maximum value.
121121
const validateOffset = (value, name, min = 0, max = kMaxLength) =>
@@ -125,7 +125,7 @@ const {
125125
FastBuffer,
126126
markAsUntransferable,
127127
addBufferPrototypeMethods,
128-
createUnsafeBuffer
128+
createUnsafeBuffer,
129129
} = require('internal/buffer');
130130

131131
const {
@@ -146,14 +146,14 @@ const constants = ObjectDefineProperties({}, {
146146
__proto__: null,
147147
value: kMaxLength,
148148
writable: false,
149-
enumerable: true
149+
enumerable: true,
150150
},
151151
MAX_STRING_LENGTH: {
152152
__proto__: null,
153153
value: kStringMaxLength,
154154
writable: false,
155-
enumerable: true
156-
}
155+
enumerable: true,
156+
},
157157
});
158158

159159
Buffer.poolSize = 8 * 1024;
@@ -298,7 +298,7 @@ ObjectDefineProperty(Buffer, SymbolSpecies, {
298298
__proto__: null,
299299
enumerable: false,
300300
configurable: true,
301-
get() { return FastBuffer; }
301+
get() { return FastBuffer; },
302302
});
303303

304304
/**
@@ -651,7 +651,7 @@ const encodingOps = {
651651
write: (buf, string, offset, len) => buf.utf8Write(string, offset, len),
652652
slice: (buf, start, end) => buf.utf8Slice(start, end),
653653
indexOf: (buf, val, byteOffset, dir) =>
654-
indexOfString(buf, val, byteOffset, encodingsMap.utf8, dir)
654+
indexOfString(buf, val, byteOffset, encodingsMap.utf8, dir),
655655
},
656656
ucs2: {
657657
encoding: 'ucs2',
@@ -660,7 +660,7 @@ const encodingOps = {
660660
write: (buf, string, offset, len) => buf.ucs2Write(string, offset, len),
661661
slice: (buf, start, end) => buf.ucs2Slice(start, end),
662662
indexOf: (buf, val, byteOffset, dir) =>
663-
indexOfString(buf, val, byteOffset, encodingsMap.utf16le, dir)
663+
indexOfString(buf, val, byteOffset, encodingsMap.utf16le, dir),
664664
},
665665
utf16le: {
666666
encoding: 'utf16le',
@@ -669,7 +669,7 @@ const encodingOps = {
669669
write: (buf, string, offset, len) => buf.ucs2Write(string, offset, len),
670670
slice: (buf, start, end) => buf.ucs2Slice(start, end),
671671
indexOf: (buf, val, byteOffset, dir) =>
672-
indexOfString(buf, val, byteOffset, encodingsMap.utf16le, dir)
672+
indexOfString(buf, val, byteOffset, encodingsMap.utf16le, dir),
673673
},
674674
latin1: {
675675
encoding: 'latin1',
@@ -678,7 +678,7 @@ const encodingOps = {
678678
write: (buf, string, offset, len) => buf.latin1Write(string, offset, len),
679679
slice: (buf, start, end) => buf.latin1Slice(start, end),
680680
indexOf: (buf, val, byteOffset, dir) =>
681-
indexOfString(buf, val, byteOffset, encodingsMap.latin1, dir)
681+
indexOfString(buf, val, byteOffset, encodingsMap.latin1, dir),
682682
},
683683
ascii: {
684684
encoding: 'ascii',
@@ -691,7 +691,7 @@ const encodingOps = {
691691
fromStringFast(val, encodingOps.ascii),
692692
byteOffset,
693693
encodingsMap.ascii,
694-
dir)
694+
dir),
695695
},
696696
base64: {
697697
encoding: 'base64',
@@ -704,7 +704,7 @@ const encodingOps = {
704704
fromStringFast(val, encodingOps.base64),
705705
byteOffset,
706706
encodingsMap.base64,
707-
dir)
707+
dir),
708708
},
709709
base64url: {
710710
encoding: 'base64url',
@@ -718,7 +718,7 @@ const encodingOps = {
718718
fromStringFast(val, encodingOps.base64url),
719719
byteOffset,
720720
encodingsMap.base64url,
721-
dir)
721+
dir),
722722
},
723723
hex: {
724724
encoding: 'hex',
@@ -731,8 +731,8 @@ const encodingOps = {
731731
fromStringFast(val, encodingOps.hex),
732732
byteOffset,
733733
encodingsMap.hex,
734-
dir)
735-
}
734+
dir),
735+
},
736736
};
737737
function getEncodingOps(encoding) {
738738
encoding += '';
@@ -818,7 +818,7 @@ ObjectDefineProperty(Buffer.prototype, 'parent', {
818818
if (!(this instanceof Buffer))
819819
return undefined;
820820
return this.buffer;
821-
}
821+
},
822822
});
823823
ObjectDefineProperty(Buffer.prototype, 'offset', {
824824
__proto__: null,
@@ -827,7 +827,7 @@ ObjectDefineProperty(Buffer.prototype, 'offset', {
827827
if (!(this instanceof Buffer))
828828
return undefined;
829829
return this.byteOffset;
830-
}
830+
},
831831
});
832832

833833
Buffer.prototype.copy =
@@ -914,7 +914,7 @@ Buffer.prototype[customInspectSymbol] = function inspect(recurseTimes, ctx) {
914914
str += StringPrototypeSlice(utilInspect(obj, {
915915
...ctx,
916916
breakLength: Infinity,
917-
compact: true
917+
compact: true,
918918
}), 27, -2);
919919
}
920920
}
@@ -1247,7 +1247,7 @@ let transcode;
12471247
if (internalBinding('config').hasIntl) {
12481248
const {
12491249
icuErrName,
1250-
transcode: _transcode
1250+
transcode: _transcode,
12511251
} = internalBinding('icu');
12521252

12531253
// Transcodes the Buffer from one encoding to another, returning a new
@@ -1409,13 +1409,13 @@ ObjectDefineProperties(module.exports, {
14091409
__proto__: null,
14101410
configurable: false,
14111411
enumerable: true,
1412-
value: constants
1412+
value: constants,
14131413
},
14141414
INSPECT_MAX_BYTES: {
14151415
__proto__: null,
14161416
configurable: true,
14171417
enumerable: true,
14181418
get() { return INSPECT_MAX_BYTES; },
1419-
set(val) { INSPECT_MAX_BYTES = val; }
1420-
}
1419+
set(val) { INSPECT_MAX_BYTES = val; },
1420+
},
14211421
});

Diff for: ‎lib/crypto.js

+18-18
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ const {
3131

3232
const {
3333
assertCrypto,
34-
deprecate
34+
deprecate,
3535
} = require('internal/util');
3636
assertCrypto();
3737

@@ -58,15 +58,15 @@ const {
5858
} = require('internal/crypto/random');
5959
const {
6060
pbkdf2,
61-
pbkdf2Sync
61+
pbkdf2Sync,
6262
} = require('internal/crypto/pbkdf2');
6363
const {
6464
scrypt,
65-
scryptSync
65+
scryptSync,
6666
} = require('internal/crypto/scrypt');
6767
const {
6868
hkdf,
69-
hkdfSync
69+
hkdfSync,
7070
} = require('internal/crypto/hkdf');
7171
const {
7272
generateKeyPair,
@@ -84,7 +84,7 @@ const {
8484
DiffieHellman,
8585
DiffieHellmanGroup,
8686
ECDH,
87-
diffieHellman
87+
diffieHellman,
8888
} = require('internal/crypto/diffiehellman');
8989
const {
9090
Cipher,
@@ -101,14 +101,14 @@ const {
101101
Sign,
102102
signOneShot,
103103
Verify,
104-
verifyOneShot
104+
verifyOneShot,
105105
} = require('internal/crypto/sig');
106106
const {
107107
Hash,
108-
Hmac
108+
Hmac,
109109
} = require('internal/crypto/hash');
110110
const {
111-
X509Certificate
111+
X509Certificate,
112112
} = require('internal/crypto/x509');
113113
const {
114114
getCiphers,
@@ -267,7 +267,7 @@ ObjectDefineProperty(constants, 'defaultCipherList', {
267267
writable: true,
268268
configurable: true,
269269
enumerable: true,
270-
value
270+
value,
271271
});
272272
return value;
273273
},
@@ -277,7 +277,7 @@ ObjectDefineProperty(constants, 'defaultCipherList', {
277277
writable: true,
278278
configurable: true,
279279
enumerable: true,
280-
value: val
280+
value: val,
281281
});
282282
},
283283
configurable: true,
@@ -306,7 +306,7 @@ function getRandomBytesAlias(key) {
306306
enumerable: false,
307307
configurable: true,
308308
writable: true,
309-
value: value
309+
value: value,
310310
},
311311
);
312312
return value;
@@ -320,10 +320,10 @@ function getRandomBytesAlias(key) {
320320
enumerable: true,
321321
configurable: true,
322322
writable: true,
323-
value
323+
value,
324324
},
325325
);
326-
}
326+
},
327327
};
328328
}
329329

@@ -332,13 +332,13 @@ ObjectDefineProperties(module.exports, {
332332
__proto__: null,
333333
enumerable: false,
334334
value: deprecate(createCipher,
335-
'crypto.createCipher is deprecated.', 'DEP0106')
335+
'crypto.createCipher is deprecated.', 'DEP0106'),
336336
},
337337
createDecipher: {
338338
__proto__: null,
339339
enumerable: false,
340340
value: deprecate(createDecipher,
341-
'crypto.createDecipher is deprecated.', 'DEP0106')
341+
'crypto.createDecipher is deprecated.', 'DEP0106'),
342342
},
343343
// crypto.fips is deprecated. DEP0093. Use crypto.getFips()/crypto.setFips()
344344
fips: {
@@ -353,13 +353,13 @@ ObjectDefineProperties(module.exports, {
353353
get: deprecate(getDefaultEncoding,
354354
'crypto.DEFAULT_ENCODING is deprecated.', 'DEP0091'),
355355
set: deprecate(setDefaultEncoding,
356-
'crypto.DEFAULT_ENCODING is deprecated.', 'DEP0091')
356+
'crypto.DEFAULT_ENCODING is deprecated.', 'DEP0091'),
357357
},
358358
constants: {
359359
__proto__: null,
360360
configurable: false,
361361
enumerable: true,
362-
value: constants
362+
value: constants,
363363
},
364364

365365
webcrypto: {
@@ -390,5 +390,5 @@ ObjectDefineProperties(module.exports, {
390390
// The ecosystem needs those to exist for backwards compatibility.
391391
prng: getRandomBytesAlias('prng'),
392392
pseudoRandomBytes: getRandomBytesAlias('pseudoRandomBytes'),
393-
rng: getRandomBytesAlias('rng')
393+
rng: getRandomBytesAlias('rng'),
394394
});

Diff for: ‎lib/dgram.js

+13-13
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ const {
4949
ERR_SOCKET_DGRAM_IS_CONNECTED,
5050
ERR_SOCKET_DGRAM_NOT_CONNECTED,
5151
ERR_SOCKET_DGRAM_NOT_RUNNING,
52-
ERR_INVALID_FD_TYPE
52+
ERR_INVALID_FD_TYPE,
5353
} = errors.codes;
5454
const {
5555
isInt32,
@@ -64,14 +64,14 @@ const { isArrayBufferView } = require('internal/util/types');
6464
const EventEmitter = require('events');
6565
const {
6666
defaultTriggerAsyncIdScope,
67-
symbols: { async_id_symbol, owner_symbol }
67+
symbols: { async_id_symbol, owner_symbol },
6868
} = require('internal/async_hooks');
6969
const { UV_UDP_REUSEADDR } = internalBinding('constants').os;
7070

7171
const {
7272
constants: { UV_UDP_IPV6ONLY },
7373
UDP,
74-
SendWrap
74+
SendWrap,
7575
} = internalBinding('udp_wrap');
7676

7777
const dc = require('diagnostics_channel');
@@ -132,7 +132,7 @@ function Socket(type, listener) {
132132
reuseAddr: options && options.reuseAddr, // Use UV_UDP_REUSEADDR if true.
133133
ipv6Only: options && options.ipv6Only,
134134
recvBufferSize,
135-
sendBufferSize
135+
sendBufferSize,
136136
};
137137

138138
if (options?.signal !== undefined) {
@@ -282,7 +282,7 @@ Socket.prototype.bind = function(port_, address_ /* , callback */) {
282282
port: null,
283283
addressType: this.type,
284284
fd,
285-
flags: null
285+
flags: null,
286286
}, (err) => {
287287
// Callback to handle error.
288288
const ex = errnoException(err, 'open');
@@ -346,7 +346,7 @@ Socket.prototype.bind = function(port_, address_ /* , callback */) {
346346
port: port,
347347
addressType: this.type,
348348
fd: -1,
349-
flags: flags
349+
flags: flags,
350350
}, (err) => {
351351
// Callback to handle error.
352352
const ex = exceptionWithHostPort(err, 'bind', ip, port);
@@ -995,7 +995,7 @@ ObjectDefineProperty(Socket.prototype, '_handle', {
995995
}, 'Socket.prototype._handle is deprecated', 'DEP0112'),
996996
set: deprecate(function(val) {
997997
this[kStateSymbol].handle = val;
998-
}, 'Socket.prototype._handle is deprecated', 'DEP0112')
998+
}, 'Socket.prototype._handle is deprecated', 'DEP0112'),
999999
});
10001000

10011001

@@ -1006,7 +1006,7 @@ ObjectDefineProperty(Socket.prototype, '_receiving', {
10061006
}, 'Socket.prototype._receiving is deprecated', 'DEP0112'),
10071007
set: deprecate(function(val) {
10081008
this[kStateSymbol].receiving = val;
1009-
}, 'Socket.prototype._receiving is deprecated', 'DEP0112')
1009+
}, 'Socket.prototype._receiving is deprecated', 'DEP0112'),
10101010
});
10111011

10121012

@@ -1017,7 +1017,7 @@ ObjectDefineProperty(Socket.prototype, '_bindState', {
10171017
}, 'Socket.prototype._bindState is deprecated', 'DEP0112'),
10181018
set: deprecate(function(val) {
10191019
this[kStateSymbol].bindState = val;
1020-
}, 'Socket.prototype._bindState is deprecated', 'DEP0112')
1020+
}, 'Socket.prototype._bindState is deprecated', 'DEP0112'),
10211021
});
10221022

10231023

@@ -1028,7 +1028,7 @@ ObjectDefineProperty(Socket.prototype, '_queue', {
10281028
}, 'Socket.prototype._queue is deprecated', 'DEP0112'),
10291029
set: deprecate(function(val) {
10301030
this[kStateSymbol].queue = val;
1031-
}, 'Socket.prototype._queue is deprecated', 'DEP0112')
1031+
}, 'Socket.prototype._queue is deprecated', 'DEP0112'),
10321032
});
10331033

10341034

@@ -1039,7 +1039,7 @@ ObjectDefineProperty(Socket.prototype, '_reuseAddr', {
10391039
}, 'Socket.prototype._reuseAddr is deprecated', 'DEP0112'),
10401040
set: deprecate(function(val) {
10411041
this[kStateSymbol].reuseAddr = val;
1042-
}, 'Socket.prototype._reuseAddr is deprecated', 'DEP0112')
1042+
}, 'Socket.prototype._reuseAddr is deprecated', 'DEP0112'),
10431043
});
10441044

10451045

@@ -1058,7 +1058,7 @@ Socket.prototype._stopReceiving = deprecate(function() {
10581058
ObjectDefineProperty(UDP.prototype, 'owner', {
10591059
__proto__: null,
10601060
get() { return this[owner_symbol]; },
1061-
set(v) { return this[owner_symbol] = v; }
1061+
set(v) { return this[owner_symbol] = v; },
10621062
});
10631063

10641064

@@ -1069,5 +1069,5 @@ module.exports = {
10691069
'DEP0112',
10701070
),
10711071
createSocket,
1072-
Socket
1072+
Socket,
10731073
};

Diff for: ‎lib/diagnostics_channel.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const {
1313
const {
1414
codes: {
1515
ERR_INVALID_ARG_TYPE,
16-
}
16+
},
1717
} = require('internal/errors');
1818
const {
1919
validateFunction,
@@ -144,5 +144,5 @@ module.exports = {
144144
hasSubscribers,
145145
subscribe,
146146
unsubscribe,
147-
Channel
147+
Channel,
148148
};

Diff for: ‎lib/dns.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ const {
4242
errorCodes: dnsErrorCodes,
4343
} = require('internal/dns/utils');
4444
const {
45-
Resolver
45+
Resolver,
4646
} = require('internal/dns/callback_resolver');
4747
const {
4848
NODATA,
@@ -123,7 +123,7 @@ function onlookupall(err, addresses) {
123123
const addr = addresses[i];
124124
addresses[i] = {
125125
address: addr,
126-
family: family || isIP(addr)
126+
family: family || isIP(addr),
127127
};
128128
}
129129

@@ -352,6 +352,6 @@ ObjectDefineProperties(module.exports, {
352352
promises = require('internal/dns/promises');
353353
}
354354
return promises;
355-
}
356-
}
355+
},
356+
},
357357
});

Diff for: ‎lib/domain.js

+10-10
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ const EventEmitter = require('events');
4747
const {
4848
ERR_DOMAIN_CALLBACK_NOT_AVAILABLE,
4949
ERR_DOMAIN_CANNOT_SET_UNCAUGHT_EXCEPTION_CAPTURE,
50-
ERR_UNHANDLED_ERROR
50+
ERR_UNHANDLED_ERROR,
5151
} = require('internal/errors').codes;
5252
const { createHook } = require('async_hooks');
5353
const { useDomainTrampoline } = require('internal/async_hooks');
@@ -67,7 +67,7 @@ ObjectDefineProperty(process, 'domain', {
6767
},
6868
set: function(arg) {
6969
return _domain[0] = arg;
70-
}
70+
},
7171
});
7272

7373
const vmPromises = new SafeWeakMap();
@@ -85,7 +85,7 @@ const asyncHook = createHook({
8585
configurable: true,
8686
enumerable: false,
8787
value: process.domain,
88-
writable: true
88+
writable: true,
8989
});
9090
// Because promises from other contexts don't get a domain field,
9191
// the domain needs to be held alive another way. Stuffing it in a
@@ -116,7 +116,7 @@ const asyncHook = createHook({
116116
},
117117
destroy(asyncId) {
118118
pairing.delete(asyncId); // cleaning up
119-
}
119+
},
120120
});
121121

122122
// When domains are in use, they claim full ownership of the
@@ -244,7 +244,7 @@ Domain.prototype._errorHandler = function(er) {
244244
configurable: true,
245245
enumerable: false,
246246
value: this,
247-
writable: true
247+
writable: true,
248248
});
249249
er.domainThrown = true;
250250
}
@@ -370,7 +370,7 @@ Domain.prototype.add = function(ee) {
370370
configurable: true,
371371
enumerable: false,
372372
value: this,
373-
writable: true
373+
writable: true,
374374
});
375375
ArrayPrototypePush(this.members, ee);
376376
};
@@ -403,7 +403,7 @@ function intercepted(_this, self, cb, fnargs) {
403403
configurable: true,
404404
enumerable: false,
405405
value: self,
406-
writable: true
406+
writable: true,
407407
});
408408
self.emit('error', er);
409409
return;
@@ -449,7 +449,7 @@ Domain.prototype.bind = function(cb) {
449449
configurable: true,
450450
enumerable: false,
451451
value: this,
452-
writable: true
452+
writable: true,
453453
});
454454

455455
return runBound;
@@ -465,7 +465,7 @@ EventEmitter.init = function(opts) {
465465
configurable: true,
466466
enumerable: false,
467467
value: null,
468-
writable: true
468+
writable: true,
469469
});
470470
if (exports.active && !(this instanceof exports.Domain)) {
471471
this.domain = exports.active;
@@ -500,7 +500,7 @@ EventEmitter.prototype.emit = function emit(...args) {
500500
configurable: true,
501501
enumerable: false,
502502
value: domain,
503-
writable: true
503+
writable: true,
504504
});
505505
er.domainThrown = false;
506506
}

Diff for: ‎lib/http.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,13 @@ const { IncomingMessage } = require('_http_incoming');
3535
const {
3636
validateHeaderName,
3737
validateHeaderValue,
38-
OutgoingMessage
38+
OutgoingMessage,
3939
} = require('_http_outgoing');
4040
const {
4141
_connectionListener,
4242
STATUS_CODES,
4343
Server,
44-
ServerResponse
44+
ServerResponse,
4545
} = require('_http_server');
4646
let maxHeaderSize;
4747

@@ -129,7 +129,7 @@ module.exports = {
129129
setMaxIdleHTTPParsers(max) {
130130
validateInteger(max, 'max', 1);
131131
parsers.max = max;
132-
}
132+
},
133133
};
134134

135135
ObjectDefineProperty(module.exports, 'maxHeaderSize', {
@@ -143,7 +143,7 @@ ObjectDefineProperty(module.exports, 'maxHeaderSize', {
143143
}
144144

145145
return maxHeaderSize;
146-
}
146+
},
147147
});
148148

149149
ObjectDefineProperty(module.exports, 'globalAgent', {
@@ -155,5 +155,5 @@ ObjectDefineProperty(module.exports, 'globalAgent', {
155155
},
156156
set(value) {
157157
httpAgent.globalAgent = value;
158-
}
158+
},
159159
});

Diff for: ‎lib/http2.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const {
1010
getUnpackedSettings,
1111
sensitiveHeaders,
1212
Http2ServerRequest,
13-
Http2ServerResponse
13+
Http2ServerResponse,
1414
} = require('internal/http2/core');
1515

1616
module.exports = {
@@ -23,5 +23,5 @@ module.exports = {
2323
getUnpackedSettings,
2424
sensitiveHeaders,
2525
Http2ServerRequest,
26-
Http2ServerResponse
26+
Http2ServerResponse,
2727
};

Diff for: ‎lib/https.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ function createConnection(port, host, options) {
142142
debug('reuse session for %j', options._agentKey);
143143
options = {
144144
session,
145-
...options
145+
...options,
146146
};
147147
}
148148
}
@@ -193,7 +193,7 @@ function Agent(options) {
193193

194194
this._sessionCache = {
195195
map: {},
196-
list: []
196+
list: [],
197197
};
198198
}
199199
ObjectSetPrototypeOf(Agent.prototype, HttpAgent.prototype);
@@ -402,5 +402,5 @@ module.exports = {
402402
Server,
403403
createServer,
404404
get,
405-
request
405+
request,
406406
};

Diff for: ‎lib/inspector.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -200,5 +200,5 @@ module.exports = {
200200
url,
201201
waitForDebugger: inspectorWaitForDebugger,
202202
console,
203-
Session
203+
Session,
204204
};

Diff for: ‎lib/net.js

+20-20
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,13 @@ const {
4848
isIPv4,
4949
isIPv6,
5050
normalizedArgsSymbol,
51-
makeSyncWrite
51+
makeSyncWrite,
5252
} = require('internal/net');
5353
const assert = require('internal/assert');
5454
const {
5555
UV_EADDRINUSE,
5656
UV_EINVAL,
57-
UV_ENOTCONN
57+
UV_ENOTCONN,
5858
} = internalBinding('uv');
5959

6060
const { Buffer } = require('buffer');
@@ -63,17 +63,17 @@ const { ShutdownWrap } = internalBinding('stream_wrap');
6363
const {
6464
TCP,
6565
TCPConnectWrap,
66-
constants: TCPConstants
66+
constants: TCPConstants,
6767
} = internalBinding('tcp_wrap');
6868
const {
6969
Pipe,
7070
PipeConnectWrap,
71-
constants: PipeConstants
71+
constants: PipeConstants,
7272
} = internalBinding('pipe_wrap');
7373
const {
7474
newAsyncId,
7575
defaultTriggerAsyncIdScope,
76-
symbols: { async_id_symbol, owner_symbol }
76+
symbols: { async_id_symbol, owner_symbol },
7777
} = require('internal/async_hooks');
7878
const {
7979
writevGeneric,
@@ -85,7 +85,7 @@ const {
8585
setStreamTimeout,
8686
kBuffer,
8787
kBufferCb,
88-
kBufferGen
88+
kBufferGen,
8989
} = require('internal/stream_base_commons');
9090
const {
9191
codes: {
@@ -117,12 +117,12 @@ const {
117117
validateInt32,
118118
validateNumber,
119119
validatePort,
120-
validateString
120+
validateString,
121121
} = require('internal/validators');
122122
const kLastWriteQueueSize = Symbol('lastWriteQueueSize');
123123
const {
124124
DTRACE_NET_SERVER_CONNECTION,
125-
DTRACE_NET_STREAM_END
125+
DTRACE_NET_STREAM_END,
126126
} = require('internal/dtrace');
127127

128128
// Lazy loaded to improve startup performance.
@@ -428,7 +428,7 @@ function Socket(options) {
428428
// property.
429429
ObjectDefineProperty(this._handle, 'bytesWritten', {
430430
__proto__: null,
431-
value: 0, writable: true
431+
value: 0, writable: true,
432432
});
433433
}
434434
}
@@ -627,15 +627,15 @@ ObjectDefineProperty(Socket.prototype, '_connecting', {
627627
__proto__: null,
628628
get: function() {
629629
return this.connecting;
630-
}
630+
},
631631
});
632632

633633
ObjectDefineProperty(Socket.prototype, 'pending', {
634634
__proto__: null,
635635
get() {
636636
return !this._handle || this.connecting;
637637
},
638-
configurable: true
638+
configurable: true,
639639
});
640640

641641

@@ -652,7 +652,7 @@ ObjectDefineProperty(Socket.prototype, 'readyState', {
652652
return 'writeOnly';
653653
}
654654
return 'closed';
655-
}
655+
},
656656
});
657657

658658

@@ -662,14 +662,14 @@ ObjectDefineProperty(Socket.prototype, 'bufferSize', {
662662
if (this._handle) {
663663
return this.writableLength;
664664
}
665-
}
665+
},
666666
});
667667

668668
ObjectDefineProperty(Socket.prototype, kUpdateTimer, {
669669
__proto__: null,
670670
get: function() {
671671
return this._unrefTimer;
672-
}
672+
},
673673
});
674674

675675

@@ -846,7 +846,7 @@ function protoGetter(name, callback) {
846846
__proto__: null,
847847
configurable: false,
848848
enumerable: true,
849-
get: callback
849+
get: callback,
850850
});
851851
}
852852

@@ -1262,7 +1262,7 @@ function lookupAndConnect(self, options) {
12621262
if (dns === undefined) dns = require('dns');
12631263
const dnsopts = {
12641264
family: socketToDnsFamily(options.family),
1265-
hints: options.hints || 0
1265+
hints: options.hints || 0,
12661266
};
12671267

12681268
if (!isWindows &&
@@ -1946,7 +1946,7 @@ ObjectDefineProperty(Server.prototype, 'listening', {
19461946
return !!this._handle;
19471947
},
19481948
configurable: true,
1949-
enumerable: true
1949+
enumerable: true,
19501950
});
19511951

19521952
Server.prototype.address = function() {
@@ -2004,7 +2004,7 @@ function onconnection(err, clientHandle) {
20042004
allowHalfOpen: self.allowHalfOpen,
20052005
pauseOnCreate: self.pauseOnConnect,
20062006
readable: true,
2007-
writable: true
2007+
writable: true,
20082008
});
20092009

20102010
if (self.noDelay && clientHandle.setNoDelay) {
@@ -2154,13 +2154,13 @@ Server.prototype[EventEmitter.captureRejectionSymbol] = function(
21542154
ObjectDefineProperty(TCP.prototype, 'owner', {
21552155
__proto__: null,
21562156
get() { return this[owner_symbol]; },
2157-
set(v) { return this[owner_symbol] = v; }
2157+
set(v) { return this[owner_symbol] = v; },
21582158
});
21592159

21602160
ObjectDefineProperty(Socket.prototype, '_handle', {
21612161
__proto__: null,
21622162
get() { return this[kHandle]; },
2163-
set(v) { return this[kHandle] = v; }
2163+
set(v) { return this[kHandle] = v; },
21642164
});
21652165

21662166
Server.prototype._setupWorker = function(socketList) {

Diff for: ‎lib/os.js

+10-10
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ const isWindows = process.platform === 'win32';
3737

3838
const {
3939
codes: {
40-
ERR_SYSTEM_ERROR
40+
ERR_SYSTEM_ERROR,
4141
},
42-
hideStackFrames
42+
hideStackFrames,
4343
} = require('internal/errors');
4444
const { validateInt32 } = require('internal/validators');
4545

@@ -57,7 +57,7 @@ const {
5757
getUserInfo,
5858
getUptime: _getUptime,
5959
isBigEndian,
60-
setPriority: _setPriority
60+
setPriority: _setPriority,
6161
} = internalBinding('os');
6262

6363
function getCheckedFunction(fn) {
@@ -153,8 +153,8 @@ function cpus() {
153153
nice: data[i++],
154154
sys: data[i++],
155155
idle: data[i++],
156-
irq: data[i++]
157-
}
156+
irq: data[i++],
157+
},
158158
});
159159
}
160160
return result;
@@ -288,7 +288,7 @@ function networkInterfaces() {
288288
family: data[i + 3],
289289
mac: data[i + 4],
290290
internal: data[i + 5],
291-
cidr: getCIDR(data[i + 1], data[i + 2], data[i + 3])
291+
cidr: getCIDR(data[i + 1], data[i + 2], data[i + 3]),
292292
};
293293
const scopeid = data[i + 6];
294294
if (scopeid !== -1)
@@ -401,22 +401,22 @@ ObjectDefineProperties(module.exports, {
401401
__proto__: null,
402402
configurable: false,
403403
enumerable: true,
404-
value: constants
404+
value: constants,
405405
},
406406

407407
EOL: {
408408
__proto__: null,
409409
configurable: true,
410410
enumerable: true,
411411
writable: false,
412-
value: isWindows ? '\r\n' : '\n'
412+
value: isWindows ? '\r\n' : '\n',
413413
},
414414

415415
devNull: {
416416
__proto__: null,
417417
configurable: true,
418418
enumerable: true,
419419
writable: false,
420-
value: isWindows ? '\\\\.\\nul' : '/dev/null'
421-
}
420+
value: isWindows ? '\\\\.\\nul' : '/dev/null',
421+
},
422422
});

Diff for: ‎lib/path.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1064,7 +1064,7 @@ const win32 = {
10641064
sep: '\\',
10651065
delimiter: ';',
10661066
win32: null,
1067-
posix: null
1067+
posix: null,
10681068
};
10691069

10701070
const posixCwd = (() => {
@@ -1530,7 +1530,7 @@ const posix = {
15301530
sep: '/',
15311531
delimiter: ':',
15321532
win32: null,
1533-
posix: null
1533+
posix: null,
15341534
};
15351535

15361536
posix.win32 = win32.win32 = win32;

Diff for: ‎lib/perf_hooks.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ const {
2424
} = require('internal/perf/performance');
2525

2626
const {
27-
createHistogram
27+
createHistogram,
2828
} = require('internal/histogram');
2929

3030
const monitorEventLoopDelay = require('internal/perf/event_loop_delay');
@@ -46,5 +46,5 @@ ObjectDefineProperty(module.exports, 'constants', {
4646
__proto__: null,
4747
configurable: false,
4848
enumerable: true,
49-
value: constants
49+
value: constants,
5050
});

Diff for: ‎lib/querystring.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ const { Buffer } = require('buffer');
4141
const {
4242
encodeStr,
4343
hexTable,
44-
isHexTable
44+
isHexTable,
4545
} = require('internal/querystring');
4646
const QueryString = module.exports = {
4747
unescapeBuffer,
@@ -55,7 +55,7 @@ const QueryString = module.exports = {
5555
encode: stringify,
5656

5757
parse,
58-
decode: parse
58+
decode: parse,
5959
};
6060

6161
const unhexTable = new Int8Array([

Diff for: ‎lib/readline.js

+22-22
Original file line numberDiff line numberDiff line change
@@ -219,133 +219,133 @@ ObjectDefineProperties(Interface.prototype, {
219219
__proto__: null,
220220
get() {
221221
return this._setRawMode;
222-
}
222+
},
223223
},
224224
[kOnLine]: {
225225
__proto__: null,
226226
get() {
227227
return this._onLine;
228-
}
228+
},
229229
},
230230
[kWriteToOutput]: {
231231
__proto__: null,
232232
get() {
233233
return this._writeToOutput;
234-
}
234+
},
235235
},
236236
[kAddHistory]: {
237237
__proto__: null,
238238
get() {
239239
return this._addHistory;
240-
}
240+
},
241241
},
242242
[kRefreshLine]: {
243243
__proto__: null,
244244
get() {
245245
return this._refreshLine;
246-
}
246+
},
247247
},
248248
[kNormalWrite]: {
249249
__proto__: null,
250250
get() {
251251
return this._normalWrite;
252-
}
252+
},
253253
},
254254
[kInsertString]: {
255255
__proto__: null,
256256
get() {
257257
return this._insertString;
258-
}
258+
},
259259
},
260260
[kTabComplete]: {
261261
__proto__: null,
262262
get() {
263263
return this._tabComplete;
264-
}
264+
},
265265
},
266266
[kWordLeft]: {
267267
__proto__: null,
268268
get() {
269269
return this._wordLeft;
270-
}
270+
},
271271
},
272272
[kWordRight]: {
273273
__proto__: null,
274274
get() {
275275
return this._wordRight;
276-
}
276+
},
277277
},
278278
[kDeleteLeft]: {
279279
__proto__: null,
280280
get() {
281281
return this._deleteLeft;
282-
}
282+
},
283283
},
284284
[kDeleteRight]: {
285285
__proto__: null,
286286
get() {
287287
return this._deleteRight;
288-
}
288+
},
289289
},
290290
[kDeleteWordLeft]: {
291291
__proto__: null,
292292
get() {
293293
return this._deleteWordLeft;
294-
}
294+
},
295295
},
296296
[kDeleteWordRight]: {
297297
__proto__: null,
298298
get() {
299299
return this._deleteWordRight;
300-
}
300+
},
301301
},
302302
[kDeleteLineLeft]: {
303303
__proto__: null,
304304
get() {
305305
return this._deleteLineLeft;
306-
}
306+
},
307307
},
308308
[kDeleteLineRight]: {
309309
__proto__: null,
310310
get() {
311311
return this._deleteLineRight;
312-
}
312+
},
313313
},
314314
[kLine]: {
315315
__proto__: null,
316316
get() {
317317
return this._line;
318-
}
318+
},
319319
},
320320
[kHistoryNext]: {
321321
__proto__: null,
322322
get() {
323323
return this._historyNext;
324-
}
324+
},
325325
},
326326
[kHistoryPrev]: {
327327
__proto__: null,
328328
get() {
329329
return this._historyPrev;
330-
}
330+
},
331331
},
332332
[kGetDisplayPos]: {
333333
__proto__: null,
334334
get() {
335335
return this._getDisplayPos;
336-
}
336+
},
337337
},
338338
[kMoveCursor]: {
339339
__proto__: null,
340340
get() {
341341
return this._moveCursor;
342-
}
342+
},
343343
},
344344
[kTtyWrite]: {
345345
__proto__: null,
346346
get() {
347347
return this._ttyWrite;
348-
}
348+
},
349349
},
350350

351351
// Defining proxies for the internal instance properties for backward

Diff for: ‎lib/stream.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -108,23 +108,23 @@ ObjectDefineProperty(Stream, 'promises', {
108108
enumerable: true,
109109
get() {
110110
return promises;
111-
}
111+
},
112112
});
113113

114114
ObjectDefineProperty(pipeline, customPromisify, {
115115
__proto__: null,
116116
enumerable: true,
117117
get() {
118118
return promises.pipeline;
119-
}
119+
},
120120
});
121121

122122
ObjectDefineProperty(eos, customPromisify, {
123123
__proto__: null,
124124
enumerable: true,
125125
get() {
126126
return promises.finished;
127-
}
127+
},
128128
});
129129

130130
// Backwards-compat with node 0.4.x

Diff for: ‎lib/string_decoder.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,13 @@ const {
3838
kSize,
3939
decode,
4040
flush,
41-
encodings
41+
encodings,
4242
} = internalBinding('string_decoder');
4343
const internalUtil = require('internal/util');
4444
const {
4545
ERR_INVALID_ARG_TYPE,
4646
ERR_INVALID_THIS,
47-
ERR_UNKNOWN_ENCODING
47+
ERR_UNKNOWN_ENCODING,
4848
} = require('internal/errors').codes;
4949
const isEncoding = Buffer[internalUtil.kIsEncodingSymbol];
5050

@@ -147,15 +147,15 @@ ObjectDefineProperties(StringDecoder.prototype, {
147147
return TypedArrayPrototypeSubarray(this[kNativeDecoder],
148148
kIncompleteCharactersStart,
149149
kIncompleteCharactersEnd);
150-
}
150+
},
151151
},
152152
lastNeed: {
153153
__proto__: null,
154154
configurable: true,
155155
enumerable: true,
156156
get() {
157157
return this[kNativeDecoder][kMissingBytes];
158-
}
158+
},
159159
},
160160
lastTotal: {
161161
__proto__: null,
@@ -164,8 +164,8 @@ ObjectDefineProperties(StringDecoder.prototype, {
164164
get() {
165165
return this[kNativeDecoder][kBufferedBytes] +
166166
this[kNativeDecoder][kMissingBytes];
167-
}
168-
}
167+
},
168+
},
169169
});
170170

171171
exports.StringDecoder = StringDecoder;

Diff for: ‎lib/timers.js

+8-8
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ const {
2525
MathTrunc,
2626
ObjectCreate,
2727
ObjectDefineProperty,
28-
SymbolToPrimitive
28+
SymbolToPrimitive,
2929
} = primordials;
3030

3131
const {
@@ -40,7 +40,7 @@ const {
4040
decRefCount,
4141
immediateInfoFields: {
4242
kCount,
43-
kRefCount
43+
kRefCount,
4444
},
4545
kRefed,
4646
kHasPrimitive,
@@ -50,11 +50,11 @@ const {
5050
immediateQueue,
5151
active,
5252
unrefActive,
53-
insert
53+
insert,
5454
} = require('internal/timers');
5555
const {
5656
promisify: { custom: customPromisify },
57-
deprecate
57+
deprecate,
5858
} = require('internal/util');
5959
let debug = require('internal/util/debuglog').debuglog('timer', (fn) => {
6060
debug = fn;
@@ -66,7 +66,7 @@ let timersPromises;
6666
const {
6767
destroyHooksExist,
6868
// The needed emit*() functions.
69-
emitDestroy
69+
emitDestroy,
7070
} = require('internal/async_hooks');
7171

7272
// This stores all the known timer async ids to allow users to clearTimeout and
@@ -174,7 +174,7 @@ ObjectDefineProperty(setTimeout, customPromisify, {
174174
if (!timersPromises)
175175
timersPromises = require('timers/promises');
176176
return timersPromises.setTimeout;
177-
}
177+
},
178178
});
179179

180180
/**
@@ -309,7 +309,7 @@ ObjectDefineProperty(setImmediate, customPromisify, {
309309
if (!timersPromises)
310310
timersPromises = require('timers/promises');
311311
return timersPromises.setImmediate;
312-
}
312+
},
313313
});
314314

315315
/**
@@ -360,5 +360,5 @@ module.exports = {
360360
enroll: deprecate(
361361
enroll,
362362
'timers.enroll() is deprecated. Please use setTimeout instead.',
363-
'DEP0095')
363+
'DEP0095'),
364364
};

Diff for: ‎lib/trace_events.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ class Tracing {
7575

7676
const obj = {
7777
enabled: this.enabled,
78-
categories: this.categories
78+
categories: this.categories,
7979
};
8080
return `Tracing ${format(obj)}`;
8181
}
@@ -93,5 +93,5 @@ function createTracing(options) {
9393

9494
module.exports = {
9595
createTracing,
96-
getEnabledCategories
96+
getEnabledCategories,
9797
};

Diff for: ‎lib/tty.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ const errors = require('internal/errors');
3333
const { ERR_INVALID_FD, ERR_TTY_INIT_FAILED } = errors.codes;
3434
const {
3535
getColorDepth,
36-
hasColors
36+
hasColors,
3737
} = require('internal/tty');
3838

3939
// Lazy loaded for startup performance.
@@ -60,7 +60,7 @@ function ReadStream(fd, options) {
6060
readableHighWaterMark: 0,
6161
handle: tty,
6262
manualStart: true,
63-
...options
63+
...options,
6464
});
6565

6666
this.isRaw = false;
@@ -96,7 +96,7 @@ function WriteStream(fd) {
9696
net.Socket.call(this, {
9797
readableHighWaterMark: 0,
9898
handle: tty,
99-
manualStart: true
99+
manualStart: true,
100100
});
101101

102102
// Prevents interleaved or dropped stdout/stderr output for terminals.

Diff for: ‎lib/util.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,11 @@ const {
4949
codes: {
5050
ERR_FALSY_VALUE_REJECTION,
5151
ERR_INVALID_ARG_TYPE,
52-
ERR_OUT_OF_RANGE
52+
ERR_OUT_OF_RANGE,
5353
},
5454
errnoException,
5555
exceptionWithHostPort,
56-
hideStackFrames
56+
hideStackFrames,
5757
} = require('internal/errors');
5858
const {
5959
format,
@@ -256,7 +256,7 @@ function inherits(ctor, superCtor) {
256256
__proto__: null,
257257
value: superCtor,
258258
writable: true,
259-
configurable: true
259+
configurable: true,
260260
});
261261
ObjectSetPrototypeOf(ctor.prototype, superCtor.prototype);
262262
}
@@ -403,5 +403,5 @@ module.exports = {
403403
get aborted() {
404404
return lazyAbortController().aborted;
405405
},
406-
types
406+
types,
407407
};

Diff for: ‎lib/v8.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,10 @@ const { Buffer } = require('buffer');
3636
const { validateString, validateUint32 } = require('internal/validators');
3737
const {
3838
Serializer,
39-
Deserializer
39+
Deserializer,
4040
} = internalBinding('serdes');
4141
const {
42-
namespace: startupSnapshot
42+
namespace: startupSnapshot,
4343
} = require('internal/v8/startup_snapshot');
4444

4545
let profiler = {};
@@ -55,7 +55,7 @@ const { getValidatedPath } = require('internal/fs/utils');
5555
const { toNamespacedPath } = require('path');
5656
const {
5757
createHeapSnapshotStream,
58-
triggerHeapSnapshot
58+
triggerHeapSnapshot,
5959
} = internalBinding('heap_utils');
6060
const { HeapSnapshotStream } = require('internal/heap_utils');
6161
const promiseHooks = require('internal/promise_hooks');
@@ -175,7 +175,7 @@ function getHeapStatistics() {
175175
number_of_detached_contexts: buffer[kNumberOfDetachedContextsIndex],
176176
total_global_handles_size: buffer[kTotalGlobalHandlesSizeIndex],
177177
used_global_handles_size: buffer[kUsedGlobalHandlesSizeIndex],
178-
external_memory: buffer[kExternalMemoryIndex]
178+
external_memory: buffer[kExternalMemoryIndex],
179179
};
180180
}
181181

@@ -200,7 +200,7 @@ function getHeapSpaceStatistics() {
200200
space_size: buffer[kSpaceSizeIndex],
201201
space_used_size: buffer[kSpaceUsedSizeIndex],
202202
space_available_size: buffer[kSpaceAvailableSizeIndex],
203-
physical_space_size: buffer[kPhysicalSpaceSizeIndex]
203+
physical_space_size: buffer[kPhysicalSpaceSizeIndex],
204204
};
205205
}
206206

Diff for: ‎lib/vm.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ function createContext(contextObject = {}, options = kEmptyObject) {
225225
name = `VM Context ${defaultContextNameIndex++}`,
226226
origin,
227227
codeGeneration,
228-
microtaskMode
228+
microtaskMode,
229229
} = options;
230230

231231
validateString(name, 'options.name');
@@ -282,7 +282,7 @@ function runInContext(code, contextifiedObject, options) {
282282
if (typeof options === 'string') {
283283
options = {
284284
filename: options,
285-
[kParsingContext]: contextifiedObject
285+
[kParsingContext]: contextifiedObject,
286286
};
287287
} else {
288288
options = { ...options, [kParsingContext]: contextifiedObject };

Diff for: ‎lib/wasi.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const {
1010
} = primordials;
1111

1212
const {
13-
ERR_WASI_ALREADY_STARTED
13+
ERR_WASI_ALREADY_STARTED,
1414
} = require('internal/errors').codes;
1515
const {
1616
emitExperimentalWarning,

Diff for: ‎lib/worker_threads.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const {
77
setEnvironmentData,
88
getEnvironmentData,
99
threadId,
10-
Worker
10+
Worker,
1111
} = require('internal/worker');
1212

1313
const {

Diff for: ‎lib/zlib.js

+13-13
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ const {
5555
} = require('internal/errors');
5656
const { Transform, finished } = require('stream');
5757
const {
58-
deprecate
58+
deprecate,
5959
} = require('internal/util');
6060
const {
6161
isArrayBufferView,
@@ -66,7 +66,7 @@ const binding = internalBinding('zlib');
6666
const assert = require('internal/assert');
6767
const {
6868
Buffer,
69-
kMaxLength
69+
kMaxLength,
7070
} = require('buffer');
7171
const { owner_symbol } = require('internal/async_hooks').symbols;
7272
const {
@@ -103,7 +103,7 @@ const codes = {
103103
Z_DATA_ERROR: constants.Z_DATA_ERROR,
104104
Z_MEM_ERROR: constants.Z_MEM_ERROR,
105105
Z_BUF_ERROR: constants.Z_BUF_ERROR,
106-
Z_VERSION_ERROR: constants.Z_VERSION_ERROR
106+
Z_VERSION_ERROR: constants.Z_VERSION_ERROR,
107107
};
108108

109109
for (const ckey of ObjectKeys(codes)) {
@@ -313,7 +313,7 @@ ObjectDefineProperty(ZlibBase.prototype, '_closed', {
313313
enumerable: true,
314314
get() {
315315
return !this._handle;
316-
}
316+
},
317317
});
318318

319319
// `bytesRead` made sense as a name when looking from the zlib engine's
@@ -331,7 +331,7 @@ ObjectDefineProperty(ZlibBase.prototype, 'bytesRead', {
331331
set: deprecate(function(value) {
332332
this.bytesWritten = value;
333333
}, 'Setting zlib.bytesRead is deprecated. ' +
334-
'This feature will be removed in the future.', 'DEP0108')
334+
'This feature will be removed in the future.', 'DEP0108'),
335335
});
336336

337337
ZlibBase.prototype.reset = function() {
@@ -625,7 +625,7 @@ function _close(engine) {
625625
const zlibDefaultOpts = {
626626
flush: Z_NO_FLUSH,
627627
finishFlush: Z_FINISH,
628-
fullFlush: Z_FULL_FLUSH
628+
fullFlush: Z_FULL_FLUSH,
629629
};
630630
// Base class for all streams actually backed by zlib and using zlib-specific
631631
// parameters.
@@ -813,7 +813,7 @@ const brotliInitParamsArray = new Uint32Array(kMaxBrotliParam + 1);
813813
const brotliDefaultOpts = {
814814
flush: BROTLI_OPERATION_PROCESS,
815815
finishFlush: BROTLI_OPERATION_FINISH,
816-
fullFlush: BROTLI_OPERATION_FLUSH
816+
fullFlush: BROTLI_OPERATION_FLUSH,
817817
};
818818
function Brotli(opts, mode) {
819819
assert(mode === BROTLI_DECODE || mode === BROTLI_ENCODE);
@@ -878,7 +878,7 @@ function createProperty(ctor) {
878878
enumerable: true,
879879
value: function(options) {
880880
return new ctor(options);
881-
}
881+
},
882882
};
883883
}
884884

@@ -887,7 +887,7 @@ function createProperty(ctor) {
887887
ObjectDefineProperty(binding.Zlib.prototype, 'jsref', {
888888
__proto__: null,
889889
get() { return this[owner_symbol]; },
890-
set(v) { return this[owner_symbol] = v; }
890+
set(v) { return this[owner_symbol] = v; },
891891
});
892892

893893
module.exports = {
@@ -937,14 +937,14 @@ ObjectDefineProperties(module.exports, {
937937
__proto__: null,
938938
configurable: false,
939939
enumerable: true,
940-
value: constants
940+
value: constants,
941941
},
942942
codes: {
943943
__proto__: null,
944944
enumerable: true,
945945
writable: false,
946-
value: ObjectFreeze(codes)
947-
}
946+
value: ObjectFreeze(codes),
947+
},
948948
});
949949

950950
// These should be considered deprecated
@@ -953,6 +953,6 @@ for (const bkey of ObjectKeys(constants)) {
953953
if (StringPrototypeStartsWith(bkey, 'BROTLI')) continue;
954954
ObjectDefineProperty(module.exports, bkey, {
955955
__proto__: null,
956-
enumerable: false, value: constants[bkey], writable: false
956+
enumerable: false, value: constants[bkey], writable: false,
957957
});
958958
}

0 commit comments

Comments
 (0)
Please sign in to comment.