summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntoine du Hamel <duhamelantoine1995@gmail.com>2023-02-12 19:26:21 +0100
committerDanielle Adams <adamzdanielle@gmail.com>2023-04-10 22:18:20 -0400
commit0f33bb09615cc1bf1e834b059f8cbfc47084e975 (patch)
tree9638f967440276ec2ea7a0ce99e356b792e069e3
parent17fbfb23bd2fc06e955b089849aa78716367aeef (diff)
downloadnode-new-0f33bb09615cc1bf1e834b059f8cbfc47084e975.tar.gz
lib: add trailing commas to all public core modules
PR-URL: https://github.com/nodejs/node/pull/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>
-rw-r--r--lib/.eslintrc.yaml33
-rw-r--r--lib/assert.js38
-rw-r--r--lib/async_hooks.js8
-rw-r--r--lib/buffer.js52
-rw-r--r--lib/crypto.js36
-rw-r--r--lib/dgram.js26
-rw-r--r--lib/diagnostics_channel.js4
-rw-r--r--lib/dns.js8
-rw-r--r--lib/domain.js20
-rw-r--r--lib/http.js10
-rw-r--r--lib/http2.js4
-rw-r--r--lib/https.js6
-rw-r--r--lib/inspector.js2
-rw-r--r--lib/net.js40
-rw-r--r--lib/os.js20
-rw-r--r--lib/path.js4
-rw-r--r--lib/perf_hooks.js4
-rw-r--r--lib/querystring.js4
-rw-r--r--lib/readline.js44
-rw-r--r--lib/stream.js6
-rw-r--r--lib/string_decoder.js12
-rw-r--r--lib/timers.js16
-rw-r--r--lib/trace_events.js4
-rw-r--r--lib/tty.js6
-rw-r--r--lib/util.js8
-rw-r--r--lib/v8.js10
-rw-r--r--lib/vm.js4
-rw-r--r--lib/wasi.js2
-rw-r--r--lib/worker_threads.js2
-rw-r--r--lib/zlib.js26
30 files changed, 214 insertions, 245 deletions
diff --git a/lib/.eslintrc.yaml b/lib/.eslintrc.yaml
index 3b8f051b4c..274f8dd8a4 100644
--- a/lib/.eslintrc.yaml
+++ b/lib/.eslintrc.yaml
@@ -252,58 +252,27 @@ globals:
overrides:
- files:
- ./*/*.js
- - ./_*.js
- - ./child_process.js
- - ./cluster.js
- - ./console.js
- - ./constants.js
- - ./events.js
- - ./fs.js
- - ./internal/assert.js
- - ./internal/child_process.js
+ - ./*.js
- ./internal/child_process/*.js
- - ./internal/cli_table.js
- ./internal/cluster/*.js
- ./internal/debugger/*.js
- - ./internal/event_target.js
- ./internal/events/*.js
- - ./internal/fixed_queue.js
- - ./internal/freelist.js
- ./internal/fs/*.js
- - ./internal/heap_utils.js
- - ./internal/http.js
- - ./internal/idna.js
- - ./internal/js_stream_socket.js
- - ./internal/mime.js
- ./internal/modules/*.js
- ./internal/per_context/*.js
- ./internal/perf/*.js
- ./internal/policy/*.js
- - ./internal/priority_queue.js
- ./internal/process/*.js
- ./internal/readline/*.js
- ./internal/readme.md
- - ./internal/repl.js
- ./internal/repl/*.js
- ./internal/source_map/*.js
- ./internal/streams/*.js
- - ./internal/structured_clone.js
- ./internal/test/*.js
- ./internal/test_runner/**/*.js
- ./internal/tls/*.js
- ./internal/util/parse_args/*.js
- - ./internal/v8_prof_processor.js
- - ./internal/vm.js
- ./internal/watch_mode/*.js
- - ./internal/webidl.js
- ./internal/webstreams/*.js
- - ./module.js
- - ./process.js
- - ./punycode.js
- - ./repl.js
- - ./sys.js
- - ./test.js
- - ./tls.js
- - ./url.js
rules:
comma-dangle: [error, always-multiline]
diff --git a/lib/assert.js b/lib/assert.js
index a7d44b91e7..04c2dd3bfc 100644
--- a/lib/assert.js
+++ b/lib/assert.js
@@ -163,7 +163,7 @@ function fail(actual, expected, message, operator, stackStartFn) {
expected,
operator: operator === undefined ? 'fail' : operator,
stackStartFn: stackStartFn || fail,
- message
+ message,
};
const err = new AssertionError(errArgs);
if (internalMessage) {
@@ -393,7 +393,7 @@ function innerOk(fn, argLen, value, message) {
expected: true,
message,
operator: '==',
- stackStartFn: fn
+ stackStartFn: fn,
});
err.generatedMessage = generatedMessage;
throw err;
@@ -430,7 +430,7 @@ assert.equal = function equal(actual, expected, message) {
expected,
message,
operator: '==',
- stackStartFn: equal
+ stackStartFn: equal,
});
}
};
@@ -454,7 +454,7 @@ assert.notEqual = function notEqual(actual, expected, message) {
expected,
message,
operator: '!=',
- stackStartFn: notEqual
+ stackStartFn: notEqual,
});
}
};
@@ -477,7 +477,7 @@ assert.deepEqual = function deepEqual(actual, expected, message) {
expected,
message,
operator: 'deepEqual',
- stackStartFn: deepEqual
+ stackStartFn: deepEqual,
});
}
};
@@ -500,7 +500,7 @@ assert.notDeepEqual = function notDeepEqual(actual, expected, message) {
expected,
message,
operator: 'notDeepEqual',
- stackStartFn: notDeepEqual
+ stackStartFn: notDeepEqual,
});
}
};
@@ -525,7 +525,7 @@ assert.deepStrictEqual = function deepStrictEqual(actual, expected, message) {
expected,
message,
operator: 'deepStrictEqual',
- stackStartFn: deepStrictEqual
+ stackStartFn: deepStrictEqual,
});
}
};
@@ -550,7 +550,7 @@ function notDeepStrictEqual(actual, expected, message) {
expected,
message,
operator: 'notDeepStrictEqual',
- stackStartFn: notDeepStrictEqual
+ stackStartFn: notDeepStrictEqual,
});
}
}
@@ -572,7 +572,7 @@ assert.strictEqual = function strictEqual(actual, expected, message) {
expected,
message,
operator: 'strictEqual',
- stackStartFn: strictEqual
+ stackStartFn: strictEqual,
});
}
};
@@ -594,7 +594,7 @@ assert.notStrictEqual = function notStrictEqual(actual, expected, message) {
expected,
message,
operator: 'notStrictEqual',
- stackStartFn: notStrictEqual
+ stackStartFn: notStrictEqual,
});
}
};
@@ -627,7 +627,7 @@ function compareExceptionKey(actual, expected, key, message, keys, fn) {
actual: a,
expected: b,
operator: 'deepStrictEqual',
- stackStartFn: fn
+ stackStartFn: fn,
});
err.actual = actual;
err.expected = expected;
@@ -639,7 +639,7 @@ function compareExceptionKey(actual, expected, key, message, keys, fn) {
expected,
message,
operator: fn.name,
- stackStartFn: fn
+ stackStartFn: fn,
});
}
}
@@ -668,7 +668,7 @@ function expectedException(actual, expected, message, fn) {
expected,
message,
operator: 'deepStrictEqual',
- stackStartFn: fn
+ stackStartFn: fn,
});
err.operator = fn.name;
throw err;
@@ -743,7 +743,7 @@ function expectedException(actual, expected, message, fn) {
expected,
message,
operator: fn.name,
- stackStartFn: fn
+ stackStartFn: fn,
});
err.generatedMessage = generatedMessage;
throw err;
@@ -837,7 +837,7 @@ function expectsError(stackStartFn, actual, error, message) {
expected: error,
operator: stackStartFn.name,
message: `Missing expected ${fnType}${details}`,
- stackStartFn
+ stackStartFn,
});
}
@@ -886,7 +886,7 @@ function expectsNoError(stackStartFn, actual, error, message) {
operator: stackStartFn.name,
message: `Got unwanted ${fnType}${details}\n` +
`Actual message: "${actual && actual.message}"`,
- stackStartFn
+ stackStartFn,
});
}
throw actual;
@@ -955,7 +955,7 @@ assert.ifError = function ifError(err) {
expected: null,
operator: 'ifError',
message,
- stackStartFn: ifError
+ stackStartFn: ifError,
});
// Make sure we actually have a stack trace!
@@ -1020,7 +1020,7 @@ function internalMatch(string, regexp, message, fn) {
expected: regexp,
message,
operator: fn.name,
- stackStartFn: fn
+ stackStartFn: fn,
});
err.generatedMessage = generatedMessage;
throw err;
@@ -1064,7 +1064,7 @@ assert.strict = ObjectAssign(strict, assert, {
equal: assert.strictEqual,
deepEqual: assert.deepStrictEqual,
notEqual: assert.notStrictEqual,
- notDeepEqual: assert.notDeepStrictEqual
+ notDeepEqual: assert.notDeepStrictEqual,
});
assert.strict.strict = assert.strict;
diff --git a/lib/async_hooks.js b/lib/async_hooks.js
index 43fc6ad74d..25306e6a6a 100644
--- a/lib/async_hooks.js
+++ b/lib/async_hooks.js
@@ -18,7 +18,7 @@ const {
const {
ERR_ASYNC_CALLBACK,
ERR_ASYNC_TYPE,
- ERR_INVALID_ASYNC_ID
+ ERR_INVALID_ASYNC_ID,
} = require('internal/errors').codes;
const { kEmptyObject } = require('internal/util');
const {
@@ -58,7 +58,7 @@ const {
const {
async_id_symbol, trigger_async_id_symbol,
init_symbol, before_symbol, after_symbol, destroy_symbol,
- promise_resolve_symbol
+ promise_resolve_symbol,
} = internal_async_hooks.symbols;
// Get constants
@@ -251,7 +251,7 @@ class AsyncResource {
enumerable: true,
value: this,
writable: true,
- }
+ },
});
return bound;
}
@@ -270,7 +270,7 @@ const storageHook = createHook({
for (let i = 0; i < storageList.length; ++i) {
storageList[i]._propagate(resource, currentResource, type);
}
- }
+ },
});
class AsyncLocalStorage {
diff --git a/lib/buffer.js b/lib/buffer.js
index f0ec93a7c0..3c20253d58 100644
--- a/lib/buffer.js
+++ b/lib/buffer.js
@@ -70,7 +70,7 @@ const {
swap32: _swap32,
swap64: _swap64,
kMaxLength,
- kStringMaxLength
+ kStringMaxLength,
} = internalBinding('buffer');
const {
constants: {
@@ -84,7 +84,7 @@ const {
isInsideNodeModules,
lazyDOMException,
normalizeEncoding,
- kIsEncodingSymbol
+ kIsEncodingSymbol,
} = require('internal/util');
const {
isAnyArrayBuffer,
@@ -93,7 +93,7 @@ const {
isTypedArray,
} = require('internal/util/types');
const {
- inspect: utilInspect
+ inspect: utilInspect,
} = require('internal/util/inspect');
const { encodings } = internalBinding('string_decoder');
@@ -105,7 +105,7 @@ const {
ERR_INVALID_BUFFER_SIZE,
ERR_OUT_OF_RANGE,
ERR_MISSING_ARGS,
- ERR_UNKNOWN_ENCODING
+ ERR_UNKNOWN_ENCODING,
},
genericNodeError,
hideStackFrames,
@@ -115,7 +115,7 @@ const {
validateBuffer,
validateNumber,
validateInteger,
- validateString
+ validateString,
} = require('internal/validators');
// Provide validateInteger() but with kMaxLength as the default maximum value.
const validateOffset = (value, name, min = 0, max = kMaxLength) =>
@@ -125,7 +125,7 @@ const {
FastBuffer,
markAsUntransferable,
addBufferPrototypeMethods,
- createUnsafeBuffer
+ createUnsafeBuffer,
} = require('internal/buffer');
const {
@@ -146,14 +146,14 @@ const constants = ObjectDefineProperties({}, {
__proto__: null,
value: kMaxLength,
writable: false,
- enumerable: true
+ enumerable: true,
},
MAX_STRING_LENGTH: {
__proto__: null,
value: kStringMaxLength,
writable: false,
- enumerable: true
- }
+ enumerable: true,
+ },
});
Buffer.poolSize = 8 * 1024;
@@ -298,7 +298,7 @@ ObjectDefineProperty(Buffer, SymbolSpecies, {
__proto__: null,
enumerable: false,
configurable: true,
- get() { return FastBuffer; }
+ get() { return FastBuffer; },
});
/**
@@ -651,7 +651,7 @@ const encodingOps = {
write: (buf, string, offset, len) => buf.utf8Write(string, offset, len),
slice: (buf, start, end) => buf.utf8Slice(start, end),
indexOf: (buf, val, byteOffset, dir) =>
- indexOfString(buf, val, byteOffset, encodingsMap.utf8, dir)
+ indexOfString(buf, val, byteOffset, encodingsMap.utf8, dir),
},
ucs2: {
encoding: 'ucs2',
@@ -660,7 +660,7 @@ const encodingOps = {
write: (buf, string, offset, len) => buf.ucs2Write(string, offset, len),
slice: (buf, start, end) => buf.ucs2Slice(start, end),
indexOf: (buf, val, byteOffset, dir) =>
- indexOfString(buf, val, byteOffset, encodingsMap.utf16le, dir)
+ indexOfString(buf, val, byteOffset, encodingsMap.utf16le, dir),
},
utf16le: {
encoding: 'utf16le',
@@ -669,7 +669,7 @@ const encodingOps = {
write: (buf, string, offset, len) => buf.ucs2Write(string, offset, len),
slice: (buf, start, end) => buf.ucs2Slice(start, end),
indexOf: (buf, val, byteOffset, dir) =>
- indexOfString(buf, val, byteOffset, encodingsMap.utf16le, dir)
+ indexOfString(buf, val, byteOffset, encodingsMap.utf16le, dir),
},
latin1: {
encoding: 'latin1',
@@ -678,7 +678,7 @@ const encodingOps = {
write: (buf, string, offset, len) => buf.latin1Write(string, offset, len),
slice: (buf, start, end) => buf.latin1Slice(start, end),
indexOf: (buf, val, byteOffset, dir) =>
- indexOfString(buf, val, byteOffset, encodingsMap.latin1, dir)
+ indexOfString(buf, val, byteOffset, encodingsMap.latin1, dir),
},
ascii: {
encoding: 'ascii',
@@ -691,7 +691,7 @@ const encodingOps = {
fromStringFast(val, encodingOps.ascii),
byteOffset,
encodingsMap.ascii,
- dir)
+ dir),
},
base64: {
encoding: 'base64',
@@ -704,7 +704,7 @@ const encodingOps = {
fromStringFast(val, encodingOps.base64),
byteOffset,
encodingsMap.base64,
- dir)
+ dir),
},
base64url: {
encoding: 'base64url',
@@ -718,7 +718,7 @@ const encodingOps = {
fromStringFast(val, encodingOps.base64url),
byteOffset,
encodingsMap.base64url,
- dir)
+ dir),
},
hex: {
encoding: 'hex',
@@ -731,8 +731,8 @@ const encodingOps = {
fromStringFast(val, encodingOps.hex),
byteOffset,
encodingsMap.hex,
- dir)
- }
+ dir),
+ },
};
function getEncodingOps(encoding) {
encoding += '';
@@ -818,7 +818,7 @@ ObjectDefineProperty(Buffer.prototype, 'parent', {
if (!(this instanceof Buffer))
return undefined;
return this.buffer;
- }
+ },
});
ObjectDefineProperty(Buffer.prototype, 'offset', {
__proto__: null,
@@ -827,7 +827,7 @@ ObjectDefineProperty(Buffer.prototype, 'offset', {
if (!(this instanceof Buffer))
return undefined;
return this.byteOffset;
- }
+ },
});
Buffer.prototype.copy =
@@ -914,7 +914,7 @@ Buffer.prototype[customInspectSymbol] = function inspect(recurseTimes, ctx) {
str += StringPrototypeSlice(utilInspect(obj, {
...ctx,
breakLength: Infinity,
- compact: true
+ compact: true,
}), 27, -2);
}
}
@@ -1247,7 +1247,7 @@ let transcode;
if (internalBinding('config').hasIntl) {
const {
icuErrName,
- transcode: _transcode
+ transcode: _transcode,
} = internalBinding('icu');
// Transcodes the Buffer from one encoding to another, returning a new
@@ -1409,13 +1409,13 @@ ObjectDefineProperties(module.exports, {
__proto__: null,
configurable: false,
enumerable: true,
- value: constants
+ value: constants,
},
INSPECT_MAX_BYTES: {
__proto__: null,
configurable: true,
enumerable: true,
get() { return INSPECT_MAX_BYTES; },
- set(val) { INSPECT_MAX_BYTES = val; }
- }
+ set(val) { INSPECT_MAX_BYTES = val; },
+ },
});
diff --git a/lib/crypto.js b/lib/crypto.js
index 0a2315563f..1fc0db944e 100644
--- a/lib/crypto.js
+++ b/lib/crypto.js
@@ -31,7 +31,7 @@ const {
const {
assertCrypto,
- deprecate
+ deprecate,
} = require('internal/util');
assertCrypto();
@@ -58,15 +58,15 @@ const {
} = require('internal/crypto/random');
const {
pbkdf2,
- pbkdf2Sync
+ pbkdf2Sync,
} = require('internal/crypto/pbkdf2');
const {
scrypt,
- scryptSync
+ scryptSync,
} = require('internal/crypto/scrypt');
const {
hkdf,
- hkdfSync
+ hkdfSync,
} = require('internal/crypto/hkdf');
const {
generateKeyPair,
@@ -84,7 +84,7 @@ const {
DiffieHellman,
DiffieHellmanGroup,
ECDH,
- diffieHellman
+ diffieHellman,
} = require('internal/crypto/diffiehellman');
const {
Cipher,
@@ -101,14 +101,14 @@ const {
Sign,
signOneShot,
Verify,
- verifyOneShot
+ verifyOneShot,
} = require('internal/crypto/sig');
const {
Hash,
- Hmac
+ Hmac,
} = require('internal/crypto/hash');
const {
- X509Certificate
+ X509Certificate,
} = require('internal/crypto/x509');
const {
getCiphers,
@@ -267,7 +267,7 @@ ObjectDefineProperty(constants, 'defaultCipherList', {
writable: true,
configurable: true,
enumerable: true,
- value
+ value,
});
return value;
},
@@ -277,7 +277,7 @@ ObjectDefineProperty(constants, 'defaultCipherList', {
writable: true,
configurable: true,
enumerable: true,
- value: val
+ value: val,
});
},
configurable: true,
@@ -306,7 +306,7 @@ function getRandomBytesAlias(key) {
enumerable: false,
configurable: true,
writable: true,
- value: value
+ value: value,
},
);
return value;
@@ -320,10 +320,10 @@ function getRandomBytesAlias(key) {
enumerable: true,
configurable: true,
writable: true,
- value
+ value,
},
);
- }
+ },
};
}
@@ -332,13 +332,13 @@ ObjectDefineProperties(module.exports, {
__proto__: null,
enumerable: false,
value: deprecate(createCipher,
- 'crypto.createCipher is deprecated.', 'DEP0106')
+ 'crypto.createCipher is deprecated.', 'DEP0106'),
},
createDecipher: {
__proto__: null,
enumerable: false,
value: deprecate(createDecipher,
- 'crypto.createDecipher is deprecated.', 'DEP0106')
+ 'crypto.createDecipher is deprecated.', 'DEP0106'),
},
// crypto.fips is deprecated. DEP0093. Use crypto.getFips()/crypto.setFips()
fips: {
@@ -353,13 +353,13 @@ ObjectDefineProperties(module.exports, {
get: deprecate(getDefaultEncoding,
'crypto.DEFAULT_ENCODING is deprecated.', 'DEP0091'),
set: deprecate(setDefaultEncoding,
- 'crypto.DEFAULT_ENCODING is deprecated.', 'DEP0091')
+ 'crypto.DEFAULT_ENCODING is deprecated.', 'DEP0091'),
},
constants: {
__proto__: null,
configurable: false,
enumerable: true,
- value: constants
+ value: constants,
},
webcrypto: {
@@ -390,5 +390,5 @@ ObjectDefineProperties(module.exports, {
// The ecosystem needs those to exist for backwards compatibility.
prng: getRandomBytesAlias('prng'),
pseudoRandomBytes: getRandomBytesAlias('pseudoRandomBytes'),
- rng: getRandomBytesAlias('rng')
+ rng: getRandomBytesAlias('rng'),
});
diff --git a/lib/dgram.js b/lib/dgram.js
index 854fc23806..6af6460f4e 100644
--- a/lib/dgram.js
+++ b/lib/dgram.js
@@ -49,7 +49,7 @@ const {
ERR_SOCKET_DGRAM_IS_CONNECTED,
ERR_SOCKET_DGRAM_NOT_CONNECTED,
ERR_SOCKET_DGRAM_NOT_RUNNING,
- ERR_INVALID_FD_TYPE
+ ERR_INVALID_FD_TYPE,
} = errors.codes;
const {
isInt32,
@@ -64,14 +64,14 @@ const { isArrayBufferView } = require('internal/util/types');
const EventEmitter = require('events');
const {
defaultTriggerAsyncIdScope,
- symbols: { async_id_symbol, owner_symbol }
+ symbols: { async_id_symbol, owner_symbol },
} = require('internal/async_hooks');
const { UV_UDP_REUSEADDR } = internalBinding('constants').os;
const {
constants: { UV_UDP_IPV6ONLY },
UDP,
- SendWrap
+ SendWrap,
} = internalBinding('udp_wrap');
const dc = require('diagnostics_channel');
@@ -132,7 +132,7 @@ function Socket(type, listener) {
reuseAddr: options && options.reuseAddr, // Use UV_UDP_REUSEADDR if true.
ipv6Only: options && options.ipv6Only,
recvBufferSize,
- sendBufferSize
+ sendBufferSize,
};
if (options?.signal !== undefined) {
@@ -282,7 +282,7 @@ Socket.prototype.bind = function(port_, address_ /* , callback */) {
port: null,
addressType: this.type,
fd,
- flags: null
+ flags: null,
}, (err) => {
// Callback to handle error.
const ex = errnoException(err, 'open');
@@ -346,7 +346,7 @@ Socket.prototype.bind = function(port_, address_ /* , callback */) {
port: port,
addressType: this.type,
fd: -1,
- flags: flags
+ flags: flags,
}, (err) => {
// Callback to handle error.
const ex = exceptionWithHostPort(err, 'bind', ip, port);
@@ -995,7 +995,7 @@ ObjectDefineProperty(Socket.prototype, '_handle', {
}, 'Socket.prototype._handle is deprecated', 'DEP0112'),
set: deprecate(function(val) {
this[kStateSymbol].handle = val;
- }, 'Socket.prototype._handle is deprecated', 'DEP0112')
+ }, 'Socket.prototype._handle is deprecated', 'DEP0112'),
});
@@ -1006,7 +1006,7 @@ ObjectDefineProperty(Socket.prototype, '_receiving', {
}, 'Socket.prototype._receiving is deprecated', 'DEP0112'),
set: deprecate(function(val) {
this[kStateSymbol].receiving = val;
- }, 'Socket.prototype._receiving is deprecated', 'DEP0112')
+ }, 'Socket.prototype._receiving is deprecated', 'DEP0112'),
});
@@ -1017,7 +1017,7 @@ ObjectDefineProperty(Socket.prototype, '_bindState', {
}, 'Socket.prototype._bindState is deprecated', 'DEP0112'),
set: deprecate(function(val) {
this[kStateSymbol].bindState = val;
- }, 'Socket.prototype._bindState is deprecated', 'DEP0112')
+ }, 'Socket.prototype._bindState is deprecated', 'DEP0112'),
});
@@ -1028,7 +1028,7 @@ ObjectDefineProperty(Socket.prototype, '_queue', {
}, 'Socket.prototype._queue is deprecated', 'DEP0112'),
set: deprecate(function(val) {
this[kStateSymbol].queue = val;
- }, 'Socket.prototype._queue is deprecated', 'DEP0112')
+ }, 'Socket.prototype._queue is deprecated', 'DEP0112'),
});
@@ -1039,7 +1039,7 @@ ObjectDefineProperty(Socket.prototype, '_reuseAddr', {
}, 'Socket.prototype._reuseAddr is deprecated', 'DEP0112'),
set: deprecate(function(val) {
this[kStateSymbol].reuseAddr = val;
- }, 'Socket.prototype._reuseAddr is deprecated', 'DEP0112')
+ }, 'Socket.prototype._reuseAddr is deprecated', 'DEP0112'),
});
@@ -1058,7 +1058,7 @@ Socket.prototype._stopReceiving = deprecate(function() {
ObjectDefineProperty(UDP.prototype, 'owner', {
__proto__: null,
get() { return this[owner_symbol]; },
- set(v) { return this[owner_symbol] = v; }
+ set(v) { return this[owner_symbol] = v; },
});
@@ -1069,5 +1069,5 @@ module.exports = {
'DEP0112',
),
createSocket,
- Socket
+ Socket,
};
diff --git a/lib/diagnostics_channel.js b/lib/diagnostics_channel.js
index 9d2d805bf2..c20a9bffc8 100644
--- a/lib/diagnostics_channel.js
+++ b/lib/diagnostics_channel.js
@@ -13,7 +13,7 @@ const {
const {
codes: {
ERR_INVALID_ARG_TYPE,
- }
+ },
} = require('internal/errors');
const {
validateFunction,
@@ -144,5 +144,5 @@ module.exports = {
hasSubscribers,
subscribe,
unsubscribe,
- Channel
+ Channel,
};
diff --git a/lib/dns.js b/lib/dns.js
index 3489e83d49..c0e6a3332e 100644
--- a/lib/dns.js
+++ b/lib/dns.js
@@ -42,7 +42,7 @@ const {
errorCodes: dnsErrorCodes,
} = require('internal/dns/utils');
const {
- Resolver
+ Resolver,
} = require('internal/dns/callback_resolver');
const {
NODATA,
@@ -123,7 +123,7 @@ function onlookupall(err, addresses) {
const addr = addresses[i];
addresses[i] = {
address: addr,
- family: family || isIP(addr)
+ family: family || isIP(addr),
};
}
@@ -352,6 +352,6 @@ ObjectDefineProperties(module.exports, {
promises = require('internal/dns/promises');
}
return promises;
- }
- }
+ },
+ },
});
diff --git a/lib/domain.js b/lib/domain.js
index 4951c0ae21..51565795d7 100644
--- a/lib/domain.js
+++ b/lib/domain.js
@@ -47,7 +47,7 @@ const EventEmitter = require('events');
const {
ERR_DOMAIN_CALLBACK_NOT_AVAILABLE,
ERR_DOMAIN_CANNOT_SET_UNCAUGHT_EXCEPTION_CAPTURE,
- ERR_UNHANDLED_ERROR
+ ERR_UNHANDLED_ERROR,
} = require('internal/errors').codes;
const { createHook } = require('async_hooks');
const { useDomainTrampoline } = require('internal/async_hooks');
@@ -67,7 +67,7 @@ ObjectDefineProperty(process, 'domain', {
},
set: function(arg) {
return _domain[0] = arg;
- }
+ },
});
const vmPromises = new SafeWeakMap();
@@ -85,7 +85,7 @@ const asyncHook = createHook({
configurable: true,
enumerable: false,
value: process.domain,
- writable: true
+ writable: true,
});
// Because promises from other contexts don't get a domain field,
// the domain needs to be held alive another way. Stuffing it in a
@@ -116,7 +116,7 @@ const asyncHook = createHook({
},
destroy(asyncId) {
pairing.delete(asyncId); // cleaning up
- }
+ },
});
// When domains are in use, they claim full ownership of the
@@ -244,7 +244,7 @@ Domain.prototype._errorHandler = function(er) {
configurable: true,
enumerable: false,
value: this,
- writable: true
+ writable: true,
});
er.domainThrown = true;
}
@@ -370,7 +370,7 @@ Domain.prototype.add = function(ee) {
configurable: true,
enumerable: false,
value: this,
- writable: true
+ writable: true,
});
ArrayPrototypePush(this.members, ee);
};
@@ -403,7 +403,7 @@ function intercepted(_this, self, cb, fnargs) {
configurable: true,
enumerable: false,
value: self,
- writable: true
+ writable: true,
});
self.emit('error', er);
return;
@@ -449,7 +449,7 @@ Domain.prototype.bind = function(cb) {
configurable: true,
enumerable: false,
value: this,
- writable: true
+ writable: true,
});
return runBound;
@@ -465,7 +465,7 @@ EventEmitter.init = function(opts) {
configurable: true,
enumerable: false,
value: null,
- writable: true
+ writable: true,
});
if (exports.active && !(this instanceof exports.Domain)) {
this.domain = exports.active;
@@ -500,7 +500,7 @@ EventEmitter.prototype.emit = function emit(...args) {
configurable: true,
enumerable: false,
value: domain,
- writable: true
+ writable: true,
});
er.domainThrown = false;
}
diff --git a/lib/http.js b/lib/http.js
index a8cc52cd00..028f8b1c4f 100644
--- a/lib/http.js
+++ b/lib/http.js
@@ -35,13 +35,13 @@ const { IncomingMessage } = require('_http_incoming');
const {
validateHeaderName,
validateHeaderValue,
- OutgoingMessage
+ OutgoingMessage,
} = require('_http_outgoing');
const {
_connectionListener,
STATUS_CODES,
Server,
- ServerResponse
+ ServerResponse,
} = require('_http_server');
let maxHeaderSize;
@@ -129,7 +129,7 @@ module.exports = {
setMaxIdleHTTPParsers(max) {
validateInteger(max, 'max', 1);
parsers.max = max;
- }
+ },
};
ObjectDefineProperty(module.exports, 'maxHeaderSize', {
@@ -143,7 +143,7 @@ ObjectDefineProperty(module.exports, 'maxHeaderSize', {
}
return maxHeaderSize;
- }
+ },
});
ObjectDefineProperty(module.exports, 'globalAgent', {
@@ -155,5 +155,5 @@ ObjectDefineProperty(module.exports, 'globalAgent', {
},
set(value) {
httpAgent.globalAgent = value;
- }
+ },
});
diff --git a/lib/http2.js b/lib/http2.js
index 14b4f57acd..8db4d91862 100644
--- a/lib/http2.js
+++ b/lib/http2.js
@@ -10,7 +10,7 @@ const {
getUnpackedSettings,
sensitiveHeaders,
Http2ServerRequest,
- Http2ServerResponse
+ Http2ServerResponse,
} = require('internal/http2/core');
module.exports = {
@@ -23,5 +23,5 @@ module.exports = {
getUnpackedSettings,
sensitiveHeaders,
Http2ServerRequest,
- Http2ServerResponse
+ Http2ServerResponse,
};
diff --git a/lib/https.js b/lib/https.js
index e92c9ecb6e..6aec27235a 100644
--- a/lib/https.js
+++ b/lib/https.js
@@ -142,7 +142,7 @@ function createConnection(port, host, options) {
debug('reuse session for %j', options._agentKey);
options = {
session,
- ...options
+ ...options,
};
}
}
@@ -193,7 +193,7 @@ function Agent(options) {
this._sessionCache = {
map: {},
- list: []
+ list: [],
};
}
ObjectSetPrototypeOf(Agent.prototype, HttpAgent.prototype);
@@ -402,5 +402,5 @@ module.exports = {
Server,
createServer,
get,
- request
+ request,
};
diff --git a/lib/inspector.js b/lib/inspector.js
index 8c2f649411..567d825c4f 100644
--- a/lib/inspector.js
+++ b/lib/inspector.js
@@ -200,5 +200,5 @@ module.exports = {
url,
waitForDebugger: inspectorWaitForDebugger,
console,
- Session
+ Session,
};
diff --git a/lib/net.js b/lib/net.js
index 57e6dca068..a99cfa241d 100644
--- a/lib/net.js
+++ b/lib/net.js
@@ -48,13 +48,13 @@ const {
isIPv4,
isIPv6,
normalizedArgsSymbol,
- makeSyncWrite
+ makeSyncWrite,
} = require('internal/net');
const assert = require('internal/assert');
const {
UV_EADDRINUSE,
UV_EINVAL,
- UV_ENOTCONN
+ UV_ENOTCONN,
} = internalBinding('uv');
const { Buffer } = require('buffer');
@@ -63,17 +63,17 @@ const { ShutdownWrap } = internalBinding('stream_wrap');
const {
TCP,
TCPConnectWrap,
- constants: TCPConstants
+ constants: TCPConstants,
} = internalBinding('tcp_wrap');
const {
Pipe,
PipeConnectWrap,
- constants: PipeConstants
+ constants: PipeConstants,
} = internalBinding('pipe_wrap');
const {
newAsyncId,
defaultTriggerAsyncIdScope,
- symbols: { async_id_symbol, owner_symbol }
+ symbols: { async_id_symbol, owner_symbol },
} = require('internal/async_hooks');
const {
writevGeneric,
@@ -85,7 +85,7 @@ const {
setStreamTimeout,
kBuffer,
kBufferCb,
- kBufferGen
+ kBufferGen,
} = require('internal/stream_base_commons');
const {
codes: {
@@ -117,12 +117,12 @@ const {
validateInt32,
validateNumber,
validatePort,
- validateString
+ validateString,
} = require('internal/validators');
const kLastWriteQueueSize = Symbol('lastWriteQueueSize');
const {
DTRACE_NET_SERVER_CONNECTION,
- DTRACE_NET_STREAM_END
+ DTRACE_NET_STREAM_END,
} = require('internal/dtrace');
// Lazy loaded to improve startup performance.
@@ -428,7 +428,7 @@ function Socket(options) {
// property.
ObjectDefineProperty(this._handle, 'bytesWritten', {
__proto__: null,
- value: 0, writable: true
+ value: 0, writable: true,
});
}
}
@@ -627,7 +627,7 @@ ObjectDefineProperty(Socket.prototype, '_connecting', {
__proto__: null,
get: function() {
return this.connecting;
- }
+ },
});
ObjectDefineProperty(Socket.prototype, 'pending', {
@@ -635,7 +635,7 @@ ObjectDefineProperty(Socket.prototype, 'pending', {
get() {
return !this._handle || this.connecting;
},
- configurable: true
+ configurable: true,
});
@@ -652,7 +652,7 @@ ObjectDefineProperty(Socket.prototype, 'readyState', {
return 'writeOnly';
}
return 'closed';
- }
+ },
});
@@ -662,14 +662,14 @@ ObjectDefineProperty(Socket.prototype, 'bufferSize', {
if (this._handle) {
return this.writableLength;
}
- }
+ },
});
ObjectDefineProperty(Socket.prototype, kUpdateTimer, {
__proto__: null,
get: function() {
return this._unrefTimer;
- }
+ },
});
@@ -846,7 +846,7 @@ function protoGetter(name, callback) {
__proto__: null,
configurable: false,
enumerable: true,
- get: callback
+ get: callback,
});
}
@@ -1262,7 +1262,7 @@ function lookupAndConnect(self, options) {
if (dns === undefined) dns = require('dns');
const dnsopts = {
family: socketToDnsFamily(options.family),
- hints: options.hints || 0
+ hints: options.hints || 0,
};
if (!isWindows &&
@@ -1946,7 +1946,7 @@ ObjectDefineProperty(Server.prototype, 'listening', {
return !!this._handle;
},
configurable: true,
- enumerable: true
+ enumerable: true,
});
Server.prototype.address = function() {
@@ -2004,7 +2004,7 @@ function onconnection(err, clientHandle) {
allowHalfOpen: self.allowHalfOpen,
pauseOnCreate: self.pauseOnConnect,
readable: true,
- writable: true
+ writable: true,
});
if (self.noDelay && clientHandle.setNoDelay) {
@@ -2154,13 +2154,13 @@ Server.prototype[EventEmitter.captureRejectionSymbol] = function(
ObjectDefineProperty(TCP.prototype, 'owner', {
__proto__: null,
get() { return this[owner_symbol]; },
- set(v) { return this[owner_symbol] = v; }
+ set(v) { return this[owner_symbol] = v; },
});
ObjectDefineProperty(Socket.prototype, '_handle', {
__proto__: null,
get() { return this[kHandle]; },
- set(v) { return this[kHandle] = v; }
+ set(v) { return this[kHandle] = v; },
});
Server.prototype._setupWorker = function(socketList) {
diff --git a/lib/os.js b/lib/os.js
index 0049a9af82..ef41688ee4 100644
--- a/lib/os.js
+++ b/lib/os.js
@@ -37,9 +37,9 @@ const isWindows = process.platform === 'win32';
const {
codes: {
- ERR_SYSTEM_ERROR
+ ERR_SYSTEM_ERROR,
},
- hideStackFrames
+ hideStackFrames,
} = require('internal/errors');
const { validateInt32 } = require('internal/validators');
@@ -57,7 +57,7 @@ const {
getUserInfo,
getUptime: _getUptime,
isBigEndian,
- setPriority: _setPriority
+ setPriority: _setPriority,
} = internalBinding('os');
function getCheckedFunction(fn) {
@@ -153,8 +153,8 @@ function cpus() {
nice: data[i++],
sys: data[i++],
idle: data[i++],
- irq: data[i++]
- }
+ irq: data[i++],
+ },
});
}
return result;
@@ -288,7 +288,7 @@ function networkInterfaces() {
family: data[i + 3],
mac: data[i + 4],
internal: data[i + 5],
- cidr: getCIDR(data[i + 1], data[i + 2], data[i + 3])
+ cidr: getCIDR(data[i + 1], data[i + 2], data[i + 3]),
};
const scopeid = data[i + 6];
if (scopeid !== -1)
@@ -401,7 +401,7 @@ ObjectDefineProperties(module.exports, {
__proto__: null,
configurable: false,
enumerable: true,
- value: constants
+ value: constants,
},
EOL: {
@@ -409,7 +409,7 @@ ObjectDefineProperties(module.exports, {
configurable: true,
enumerable: true,
writable: false,
- value: isWindows ? '\r\n' : '\n'
+ value: isWindows ? '\r\n' : '\n',
},
devNull: {
@@ -417,6 +417,6 @@ ObjectDefineProperties(module.exports, {
configurable: true,
enumerable: true,
writable: false,
- value: isWindows ? '\\\\.\\nul' : '/dev/null'
- }
+ value: isWindows ? '\\\\.\\nul' : '/dev/null',
+ },
});
diff --git a/lib/path.js b/lib/path.js
index e662e50d6c..351a3e81a3 100644
--- a/lib/path.js
+++ b/lib/path.js
@@ -1064,7 +1064,7 @@ const win32 = {
sep: '\\',
delimiter: ';',
win32: null,
- posix: null
+ posix: null,
};
const posixCwd = (() => {
@@ -1530,7 +1530,7 @@ const posix = {
sep: '/',
delimiter: ':',
win32: null,
- posix: null
+ posix: null,
};
posix.win32 = win32.win32 = win32;
diff --git a/lib/perf_hooks.js b/lib/perf_hooks.js
index 5ca793b9db..2b9bd92c82 100644
--- a/lib/perf_hooks.js
+++ b/lib/perf_hooks.js
@@ -24,7 +24,7 @@ const {
} = require('internal/perf/performance');
const {
- createHistogram
+ createHistogram,
} = require('internal/histogram');
const monitorEventLoopDelay = require('internal/perf/event_loop_delay');
@@ -46,5 +46,5 @@ ObjectDefineProperty(module.exports, 'constants', {
__proto__: null,
configurable: false,
enumerable: true,
- value: constants
+ value: constants,
});
diff --git a/lib/querystring.js b/lib/querystring.js
index 9bcc9be6cc..323d7544fc 100644
--- a/lib/querystring.js
+++ b/lib/querystring.js
@@ -41,7 +41,7 @@ const { Buffer } = require('buffer');
const {
encodeStr,
hexTable,
- isHexTable
+ isHexTable,
} = require('internal/querystring');
const QueryString = module.exports = {
unescapeBuffer,
@@ -55,7 +55,7 @@ const QueryString = module.exports = {
encode: stringify,
parse,
- decode: parse
+ decode: parse,
};
const unhexTable = new Int8Array([
diff --git a/lib/readline.js b/lib/readline.js
index ea644e1991..739785855f 100644
--- a/lib/readline.js
+++ b/lib/readline.js
@@ -219,133 +219,133 @@ ObjectDefineProperties(Interface.prototype, {
__proto__: null,
get() {
return this._setRawMode;
- }
+ },
},
[kOnLine]: {
__proto__: null,
get() {
return this._onLine;
- }
+ },
},
[kWriteToOutput]: {
__proto__: null,
get() {
return this._writeToOutput;
- }
+ },
},
[kAddHistory]: {
__proto__: null,
get() {
return this._addHistory;
- }
+ },
},
[kRefreshLine]: {
__proto__: null,
get() {
return this._refreshLine;
- }
+ },
},
[kNormalWrite]: {
__proto__: null,
get() {
return this._normalWrite;
- }
+ },
},
[kInsertString]: {
__proto__: null,
get() {
return this._insertString;
- }
+ },
},
[kTabComplete]: {
__proto__: null,
get() {
return this._tabComplete;
- }
+ },
},
[kWordLeft]: {
__proto__: null,
get() {
return this._wordLeft;
- }
+ },
},
[kWordRight]: {
__proto__: null,
get() {
return this._wordRight;
- }
+ },
},
[kDeleteLeft]: {
__proto__: null,
get() {
return this._deleteLeft;
- }
+ },
},
[kDeleteRight]: {
__proto__: null,
get() {
return this._deleteRight;
- }
+ },
},
[kDeleteWordLeft]: {
__proto__: null,
get() {
return this._deleteWordLeft;
- }
+ },
},
[kDeleteWordRight]: {
__proto__: null,
get() {
return this._deleteWordRight;
- }
+ },
},
[kDeleteLineLeft]: {
__proto__: null,
get() {
return this._deleteLineLeft;
- }
+ },
},
[kDeleteLineRight]: {
__proto__: null,
get() {
return this._deleteLineRight;
- }
+ },
},
[kLine]: {
__proto__: null,
get() {
return this._line;
- }
+ },
},
[kHistoryNext]: {
__proto__: null,
get() {
return this._historyNext;
- }
+ },
},
[kHistoryPrev]: {
__proto__: null,
get() {
return this._historyPrev;
- }
+ },
},
[kGetDisplayPos]: {
__proto__: null,
get() {
return this._getDisplayPos;
- }
+ },
},
[kMoveCursor]: {
__proto__: null,
get() {
return this._moveCursor;
- }
+ },
},
[kTtyWrite]: {
__proto__: null,
get() {
return this._ttyWrite;
- }
+ },
},
// Defining proxies for the internal instance properties for backward
diff --git a/lib/stream.js b/lib/stream.js
index e8a38120cb..4c105067ba 100644
--- a/lib/stream.js
+++ b/lib/stream.js
@@ -108,7 +108,7 @@ ObjectDefineProperty(Stream, 'promises', {
enumerable: true,
get() {
return promises;
- }
+ },
});
ObjectDefineProperty(pipeline, customPromisify, {
@@ -116,7 +116,7 @@ ObjectDefineProperty(pipeline, customPromisify, {
enumerable: true,
get() {
return promises.pipeline;
- }
+ },
});
ObjectDefineProperty(eos, customPromisify, {
@@ -124,7 +124,7 @@ ObjectDefineProperty(eos, customPromisify, {
enumerable: true,
get() {
return promises.finished;
- }
+ },
});
// Backwards-compat with node 0.4.x
diff --git a/lib/string_decoder.js b/lib/string_decoder.js
index a22da17f50..475c6adec0 100644
--- a/lib/string_decoder.js
+++ b/lib/string_decoder.js
@@ -38,13 +38,13 @@ const {
kSize,
decode,
flush,
- encodings
+ encodings,
} = internalBinding('string_decoder');
const internalUtil = require('internal/util');
const {
ERR_INVALID_ARG_TYPE,
ERR_INVALID_THIS,
- ERR_UNKNOWN_ENCODING
+ ERR_UNKNOWN_ENCODING,
} = require('internal/errors').codes;
const isEncoding = Buffer[internalUtil.kIsEncodingSymbol];
@@ -147,7 +147,7 @@ ObjectDefineProperties(StringDecoder.prototype, {
return TypedArrayPrototypeSubarray(this[kNativeDecoder],
kIncompleteCharactersStart,
kIncompleteCharactersEnd);
- }
+ },
},
lastNeed: {
__proto__: null,
@@ -155,7 +155,7 @@ ObjectDefineProperties(StringDecoder.prototype, {
enumerable: true,
get() {
return this[kNativeDecoder][kMissingBytes];
- }
+ },
},
lastTotal: {
__proto__: null,
@@ -164,8 +164,8 @@ ObjectDefineProperties(StringDecoder.prototype, {
get() {
return this[kNativeDecoder][kBufferedBytes] +
this[kNativeDecoder][kMissingBytes];
- }
- }
+ },
+ },
});
exports.StringDecoder = StringDecoder;
diff --git a/lib/timers.js b/lib/timers.js
index b2126d9711..7094935c51 100644
--- a/lib/timers.js
+++ b/lib/timers.js
@@ -25,7 +25,7 @@ const {
MathTrunc,
ObjectCreate,
ObjectDefineProperty,
- SymbolToPrimitive
+ SymbolToPrimitive,
} = primordials;
const {
@@ -40,7 +40,7 @@ const {
decRefCount,
immediateInfoFields: {
kCount,
- kRefCount
+ kRefCount,
},
kRefed,
kHasPrimitive,
@@ -50,11 +50,11 @@ const {
immediateQueue,
active,
unrefActive,
- insert
+ insert,
} = require('internal/timers');
const {
promisify: { custom: customPromisify },
- deprecate
+ deprecate,
} = require('internal/util');
let debug = require('internal/util/debuglog').debuglog('timer', (fn) => {
debug = fn;
@@ -66,7 +66,7 @@ let timersPromises;
const {
destroyHooksExist,
// The needed emit*() functions.
- emitDestroy
+ emitDestroy,
} = require('internal/async_hooks');
// This stores all the known timer async ids to allow users to clearTimeout and
@@ -174,7 +174,7 @@ ObjectDefineProperty(setTimeout, customPromisify, {
if (!timersPromises)
timersPromises = require('timers/promises');
return timersPromises.setTimeout;
- }
+ },
});
/**
@@ -309,7 +309,7 @@ ObjectDefineProperty(setImmediate, customPromisify, {
if (!timersPromises)
timersPromises = require('timers/promises');
return timersPromises.setImmediate;
- }
+ },
});
/**
@@ -360,5 +360,5 @@ module.exports = {
enroll: deprecate(
enroll,
'timers.enroll() is deprecated. Please use setTimeout instead.',
- 'DEP0095')
+ 'DEP0095'),
};
diff --git a/lib/trace_events.js b/lib/trace_events.js
index 277f90ba44..860543e30b 100644
--- a/lib/trace_events.js
+++ b/lib/trace_events.js
@@ -75,7 +75,7 @@ class Tracing {
const obj = {
enabled: this.enabled,
- categories: this.categories
+ categories: this.categories,
};
return `Tracing ${format(obj)}`;
}
@@ -93,5 +93,5 @@ function createTracing(options) {
module.exports = {
createTracing,
- getEnabledCategories
+ getEnabledCategories,
};
diff --git a/lib/tty.js b/lib/tty.js
index 3796c99cba..fb0319f93e 100644
--- a/lib/tty.js
+++ b/lib/tty.js
@@ -33,7 +33,7 @@ const errors = require('internal/errors');
const { ERR_INVALID_FD, ERR_TTY_INIT_FAILED } = errors.codes;
const {
getColorDepth,
- hasColors
+ hasColors,
} = require('internal/tty');
// Lazy loaded for startup performance.
@@ -60,7 +60,7 @@ function ReadStream(fd, options) {
readableHighWaterMark: 0,
handle: tty,
manualStart: true,
- ...options
+ ...options,
});
this.isRaw = false;
@@ -96,7 +96,7 @@ function WriteStream(fd) {
net.Socket.call(this, {
readableHighWaterMark: 0,
handle: tty,
- manualStart: true
+ manualStart: true,
});
// Prevents interleaved or dropped stdout/stderr output for terminals.
diff --git a/lib/util.js b/lib/util.js
index b9df8f7885..b00e2b0b1d 100644
--- a/lib/util.js
+++ b/lib/util.js
@@ -49,11 +49,11 @@ const {
codes: {
ERR_FALSY_VALUE_REJECTION,
ERR_INVALID_ARG_TYPE,
- ERR_OUT_OF_RANGE
+ ERR_OUT_OF_RANGE,
},
errnoException,
exceptionWithHostPort,
- hideStackFrames
+ hideStackFrames,
} = require('internal/errors');
const {
format,
@@ -256,7 +256,7 @@ function inherits(ctor, superCtor) {
__proto__: null,
value: superCtor,
writable: true,
- configurable: true
+ configurable: true,
});
ObjectSetPrototypeOf(ctor.prototype, superCtor.prototype);
}
@@ -403,5 +403,5 @@ module.exports = {
get aborted() {
return lazyAbortController().aborted;
},
- types
+ types,
};
diff --git a/lib/v8.js b/lib/v8.js
index bfca704f5e..727f66ad1c 100644
--- a/lib/v8.js
+++ b/lib/v8.js
@@ -36,10 +36,10 @@ const { Buffer } = require('buffer');
const { validateString, validateUint32 } = require('internal/validators');
const {
Serializer,
- Deserializer
+ Deserializer,
} = internalBinding('serdes');
const {
- namespace: startupSnapshot
+ namespace: startupSnapshot,
} = require('internal/v8/startup_snapshot');
let profiler = {};
@@ -55,7 +55,7 @@ const { getValidatedPath } = require('internal/fs/utils');
const { toNamespacedPath } = require('path');
const {
createHeapSnapshotStream,
- triggerHeapSnapshot
+ triggerHeapSnapshot,
} = internalBinding('heap_utils');
const { HeapSnapshotStream } = require('internal/heap_utils');
const promiseHooks = require('internal/promise_hooks');
@@ -175,7 +175,7 @@ function getHeapStatistics() {
number_of_detached_contexts: buffer[kNumberOfDetachedContextsIndex],
total_global_handles_size: buffer[kTotalGlobalHandlesSizeIndex],
used_global_handles_size: buffer[kUsedGlobalHandlesSizeIndex],
- external_memory: buffer[kExternalMemoryIndex]
+ external_memory: buffer[kExternalMemoryIndex],
};
}
@@ -200,7 +200,7 @@ function getHeapSpaceStatistics() {
space_size: buffer[kSpaceSizeIndex],
space_used_size: buffer[kSpaceUsedSizeIndex],
space_available_size: buffer[kSpaceAvailableSizeIndex],
- physical_space_size: buffer[kPhysicalSpaceSizeIndex]
+ physical_space_size: buffer[kPhysicalSpaceSizeIndex],
};
}
diff --git a/lib/vm.js b/lib/vm.js
index 71d4209d83..494e0f9530 100644
--- a/lib/vm.js
+++ b/lib/vm.js
@@ -225,7 +225,7 @@ function createContext(contextObject = {}, options = kEmptyObject) {
name = `VM Context ${defaultContextNameIndex++}`,
origin,
codeGeneration,
- microtaskMode
+ microtaskMode,
} = options;
validateString(name, 'options.name');
@@ -282,7 +282,7 @@ function runInContext(code, contextifiedObject, options) {
if (typeof options === 'string') {
options = {
filename: options,
- [kParsingContext]: contextifiedObject
+ [kParsingContext]: contextifiedObject,
};
} else {
options = { ...options, [kParsingContext]: contextifiedObject };
diff --git a/lib/wasi.js b/lib/wasi.js
index 54786a4eb1..e1c5b32c59 100644
--- a/lib/wasi.js
+++ b/lib/wasi.js
@@ -10,7 +10,7 @@ const {
} = primordials;
const {
- ERR_WASI_ALREADY_STARTED
+ ERR_WASI_ALREADY_STARTED,
} = require('internal/errors').codes;
const {
emitExperimentalWarning,
diff --git a/lib/worker_threads.js b/lib/worker_threads.js
index 9d702fa288..155cc11ecd 100644
--- a/lib/worker_threads.js
+++ b/lib/worker_threads.js
@@ -7,7 +7,7 @@ const {
setEnvironmentData,
getEnvironmentData,
threadId,
- Worker
+ Worker,
} = require('internal/worker');
const {
diff --git a/lib/zlib.js b/lib/zlib.js
index 76cd6386df..2b90c6f91f 100644
--- a/lib/zlib.js
+++ b/lib/zlib.js
@@ -55,7 +55,7 @@ const {
} = require('internal/errors');
const { Transform, finished } = require('stream');
const {
- deprecate
+ deprecate,
} = require('internal/util');
const {
isArrayBufferView,
@@ -66,7 +66,7 @@ const binding = internalBinding('zlib');
const assert = require('internal/assert');
const {
Buffer,
- kMaxLength
+ kMaxLength,
} = require('buffer');
const { owner_symbol } = require('internal/async_hooks').symbols;
const {
@@ -103,7 +103,7 @@ const codes = {
Z_DATA_ERROR: constants.Z_DATA_ERROR,
Z_MEM_ERROR: constants.Z_MEM_ERROR,
Z_BUF_ERROR: constants.Z_BUF_ERROR,
- Z_VERSION_ERROR: constants.Z_VERSION_ERROR
+ Z_VERSION_ERROR: constants.Z_VERSION_ERROR,
};
for (const ckey of ObjectKeys(codes)) {
@@ -313,7 +313,7 @@ ObjectDefineProperty(ZlibBase.prototype, '_closed', {
enumerable: true,
get() {
return !this._handle;
- }
+ },
});
// `bytesRead` made sense as a name when looking from the zlib engine's
@@ -331,7 +331,7 @@ ObjectDefineProperty(ZlibBase.prototype, 'bytesRead', {
set: deprecate(function(value) {
this.bytesWritten = value;
}, 'Setting zlib.bytesRead is deprecated. ' +
- 'This feature will be removed in the future.', 'DEP0108')
+ 'This feature will be removed in the future.', 'DEP0108'),
});
ZlibBase.prototype.reset = function() {
@@ -625,7 +625,7 @@ function _close(engine) {
const zlibDefaultOpts = {
flush: Z_NO_FLUSH,
finishFlush: Z_FINISH,
- fullFlush: Z_FULL_FLUSH
+ fullFlush: Z_FULL_FLUSH,
};
// Base class for all streams actually backed by zlib and using zlib-specific
// parameters.
@@ -813,7 +813,7 @@ const brotliInitParamsArray = new Uint32Array(kMaxBrotliParam + 1);
const brotliDefaultOpts = {
flush: BROTLI_OPERATION_PROCESS,
finishFlush: BROTLI_OPERATION_FINISH,
- fullFlush: BROTLI_OPERATION_FLUSH
+ fullFlush: BROTLI_OPERATION_FLUSH,
};
function Brotli(opts, mode) {
assert(mode === BROTLI_DECODE || mode === BROTLI_ENCODE);
@@ -878,7 +878,7 @@ function createProperty(ctor) {
enumerable: true,
value: function(options) {
return new ctor(options);
- }
+ },
};
}
@@ -887,7 +887,7 @@ function createProperty(ctor) {
ObjectDefineProperty(binding.Zlib.prototype, 'jsref', {
__proto__: null,
get() { return this[owner_symbol]; },
- set(v) { return this[owner_symbol] = v; }
+ set(v) { return this[owner_symbol] = v; },
});
module.exports = {
@@ -937,14 +937,14 @@ ObjectDefineProperties(module.exports, {
__proto__: null,
configurable: false,
enumerable: true,
- value: constants
+ value: constants,
},
codes: {
__proto__: null,
enumerable: true,
writable: false,
- value: ObjectFreeze(codes)
- }
+ value: ObjectFreeze(codes),
+ },
});
// These should be considered deprecated
@@ -953,6 +953,6 @@ for (const bkey of ObjectKeys(constants)) {
if (StringPrototypeStartsWith(bkey, 'BROTLI')) continue;
ObjectDefineProperty(module.exports, bkey, {
__proto__: null,
- enumerable: false, value: constants[bkey], writable: false
+ enumerable: false, value: constants[bkey], writable: false,
});
}