From 9852ebca8d5b8c3edac671fa82efe3533601668c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= Date: Sun, 6 Dec 2020 15:37:02 +0100 Subject: [PATCH 001/108] http: do not loop over prototype in Agent MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes: https://github.com/nodejs/node/issues/36364 PR-URL: https://github.com/nodejs/node/pull/36410 Reviewed-By: Gerhard Stöbich Reviewed-By: Ricky Zhou <0x19951125@gmail.com> --- lib/_http_agent.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/_http_agent.js b/lib/_http_agent.js index 6f6a0920fd8c04..686d561b283d89 100644 --- a/lib/_http_agent.js +++ b/lib/_http_agent.js @@ -435,7 +435,7 @@ Agent.prototype.removeSocket = function removeSocket(s, options) { // There might be older requests in a different origin, but // if the origin which releases the socket has pending requests // that will be prioritized. - for (const prop in this.requests) { + for (const prop of ObjectKeys(this.requests)) { // Check whether this specific origin is already at maxSockets if (this.sockets[prop] && this.sockets[prop].length) break; debug('removeSocket, have a request with different origin,' + From 040b39f076d8169fc51c14282b95d2a1b4ec57a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= Date: Tue, 24 Nov 2020 14:11:20 +0100 Subject: [PATCH 002/108] tools: enable no-unused-expressions lint rule Fixes: https://github.com/nodejs/node/issues/36246 PR-URL: https://github.com/nodejs/node/pull/36248 Reviewed-By: Antoine du Hamel Reviewed-By: Colin Ihrig Reviewed-By: Joyee Cheung Reviewed-By: Luigi Pinca Reviewed-By: Yongsheng Zhang Reviewed-By: Rich Trott Reviewed-By: James M Snell --- .eslintrc.js | 1 + benchmark/_benchmark_progress.js | 1 - benchmark/es/destructuring-bench.js | 6 +++-- benchmark/perf_hooks/bench-eventlooputil.js | 2 +- benchmark/process/bench-env.js | 4 ++-- .../string_decoder/string-decoder-create.js | 3 +-- doc/.eslintrc.yaml | 1 + lib/internal/assert/assertion_error.js | 2 +- lib/internal/buffer.js | 24 +++++++++---------- lib/internal/errors.js | 8 +++---- lib/internal/streams/destroy.js | 6 ++--- lib/internal/streams/writable.js | 2 +- test/common/index.js | 2 +- .../test_general/testEnvCleanup.js | 2 +- test/message/nexttick_throw.js | 2 +- test/message/timeout_throw.js | 2 +- test/parallel/test-accessor-properties.js | 5 ++-- .../test-buffer-backing-arraybuffer.js | 2 +- ...st-buffer-constructor-deprecation-error.js | 2 +- test/parallel/test-buffer-fakes.js | 2 +- test/parallel/test-child-process-stdin-ipc.js | 2 +- test/parallel/test-dgram-deprecation-error.js | 2 +- test/parallel/test-disable-proto-throw.js | 2 +- .../test-error-prepare-stack-trace.js | 2 +- test/parallel/test-fs-readv-promises.js | 2 +- test/parallel/test-fs-readv-sync.js | 2 +- test/parallel/test-fs-readv.js | 2 +- ...tp-outgoing-internal-headernames-getter.js | 2 +- .../test-http-outgoing-internal-headers.js | 2 +- test/parallel/test-http-same-map.js | 7 +++--- .../test-http2-unbound-socket-proxy.js | 3 ++- .../parallel/test-inspector-tracing-domain.js | 2 +- ...spector-vm-global-accessors-sideeffects.js | 3 +-- .../test-internal-iterable-weak-map.js | 2 +- test/parallel/test-net-after-close.js | 2 ++ test/parallel/test-net-during-close.js | 2 ++ .../test-process-env-windows-error-reset.js | 4 ++-- test/parallel/test-repl-options.js | 2 +- test/parallel/test-repl-tab-complete.js | 2 +- test/parallel/test-source-map-api.js | 1 + test/parallel/test-stdin-hang.js | 2 +- test/parallel/test-stdio-closed.js | 2 ++ test/parallel/test-stdio-pipe-access.js | 2 +- .../parallel/test-stream-pipeline-uncaught.js | 4 +--- test/parallel/test-stream-pipeline.js | 10 ++------ .../test-stream-readable-async-iterators.js | 19 +++++---------- test/parallel/test-tls-external-accessor.js | 4 ++-- test/parallel/test-trace-events-bootstrap.js | 2 +- .../parallel/test-trace-events-environment.js | 2 ++ test/parallel/test-vm-module-errors.js | 6 ++--- .../test-worker-unsupported-things.js | 2 +- 51 files changed, 90 insertions(+), 92 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 7f37fc19d5a543..edb2b6c1ee3419 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -234,6 +234,7 @@ module.exports = { 'no-unreachable': 'error', 'no-unsafe-finally': 'error', 'no-unsafe-negation': 'error', + 'no-unused-expressions': ['error', { allowShortCircuit: true }], 'no-unused-labels': 'error', 'no-unused-vars': ['error', { args: 'none', caughtErrors: 'all' }], 'no-use-before-define': ['error', { diff --git a/benchmark/_benchmark_progress.js b/benchmark/_benchmark_progress.js index 1b7ac738f6de0d..6c925f34e68202 100644 --- a/benchmark/_benchmark_progress.js +++ b/benchmark/_benchmark_progress.js @@ -39,7 +39,6 @@ class BenchmarkProgress { this.completedConfig = 0; // Total number of configurations for the current file this.scheduledConfig = 0; - this.interval; // Updates the elapsed time. } startQueue(index) { diff --git a/benchmark/es/destructuring-bench.js b/benchmark/es/destructuring-bench.js index c07c0383da91ac..d412b82757f083 100644 --- a/benchmark/es/destructuring-bench.js +++ b/benchmark/es/destructuring-bench.js @@ -12,7 +12,8 @@ function runSwapManual(n) { let x, y, r; bench.start(); for (let i = 0; i < n; i++) { - x = 1, y = 2; + x = 1; + y = 2; r = x; x = y; y = r; @@ -26,7 +27,8 @@ function runSwapDestructured(n) { let x, y; bench.start(); for (let i = 0; i < n; i++) { - x = 1, y = 2; + x = 1; + y = 2; [x, y] = [y, x]; assert.strictEqual(x, 2); assert.strictEqual(y, 1); diff --git a/benchmark/perf_hooks/bench-eventlooputil.js b/benchmark/perf_hooks/bench-eventlooputil.js index 984b2b66aecbcf..1fd452afa91300 100644 --- a/benchmark/perf_hooks/bench-eventlooputil.js +++ b/benchmark/perf_hooks/bench-eventlooputil.js @@ -33,7 +33,7 @@ function main({ method, n }) { function benchIdleTime(n) { bench.start(); for (let i = 0; i < n; i++) - nodeTiming.idleTime; + nodeTiming.idleTime; // eslint-disable-line no-unused-expressions bench.end(n); } diff --git a/benchmark/process/bench-env.js b/benchmark/process/bench-env.js index 5df521cc958389..e96c1d02507214 100644 --- a/benchmark/process/bench-env.js +++ b/benchmark/process/bench-env.js @@ -13,7 +13,7 @@ function main({ n, operation }) { case 'get': bench.start(); for (let i = 0; i < n; i++) { - process.env.PATH; + process.env.PATH; // eslint-disable-line no-unused-expressions } bench.end(n); break; @@ -42,7 +42,7 @@ function main({ n, operation }) { case 'query': bench.start(); for (let i = 0; i < n; i++) { - 'PATH' in process.env; + 'PATH' in process.env; // eslint-disable-line no-unused-expressions } bench.end(n); break; diff --git a/benchmark/string_decoder/string-decoder-create.js b/benchmark/string_decoder/string-decoder-create.js index f7fa5e0246b860..641e562fdeab3d 100644 --- a/benchmark/string_decoder/string-decoder-create.js +++ b/benchmark/string_decoder/string-decoder-create.js @@ -12,8 +12,7 @@ const bench = common.createBenchmark(main, { function main({ encoding, n }) { bench.start(); for (let i = 0; i < n; ++i) { - const sd = new StringDecoder(encoding); - !!sd.encoding; + new StringDecoder(encoding); } bench.end(n); } diff --git a/doc/.eslintrc.yaml b/doc/.eslintrc.yaml index 49c4f4f64736c7..8e01bea6abd8a7 100644 --- a/doc/.eslintrc.yaml +++ b/doc/.eslintrc.yaml @@ -4,6 +4,7 @@ rules: # ease some restrictions in doc examples no-restricted-properties: off no-undef: off + no-unused-expressions: off no-unused-vars: off symbol-description: off diff --git a/lib/internal/assert/assertion_error.js b/lib/internal/assert/assertion_error.js index c13a9d1ca1c3d8..e9e9a101970509 100644 --- a/lib/internal/assert/assertion_error.js +++ b/lib/internal/assert/assertion_error.js @@ -455,7 +455,7 @@ class AssertionError extends Error { } ErrorCaptureStackTrace(this, stackStartFn || stackStartFunction); // Create error message including the error code in the name. - this.stack; + this.stack; // eslint-disable-line no-unused-expressions // Reset the name. this.name = 'AssertionError'; } diff --git a/lib/internal/buffer.js b/lib/internal/buffer.js index 9eb722e2634deb..60f6cab093135d 100644 --- a/lib/internal/buffer.js +++ b/lib/internal/buffer.js @@ -952,18 +952,18 @@ function writeFloatBackwards(val, offset = 0) { class FastBuffer extends Uint8Array {} function addBufferPrototypeMethods(proto) { - proto.readBigUInt64LE = readBigUInt64LE, - proto.readBigUInt64BE = readBigUInt64BE, - proto.readBigUint64LE = readBigUInt64LE, - proto.readBigUint64BE = readBigUInt64BE, - proto.readBigInt64LE = readBigInt64LE, - proto.readBigInt64BE = readBigInt64BE, - proto.writeBigUInt64LE = writeBigUInt64LE, - proto.writeBigUInt64BE = writeBigUInt64BE, - proto.writeBigUint64LE = writeBigUInt64LE, - proto.writeBigUint64BE = writeBigUInt64BE, - proto.writeBigInt64LE = writeBigInt64LE, - proto.writeBigInt64BE = writeBigInt64BE, + proto.readBigUInt64LE = readBigUInt64LE; + proto.readBigUInt64BE = readBigUInt64BE; + proto.readBigUint64LE = readBigUInt64LE; + proto.readBigUint64BE = readBigUInt64BE; + proto.readBigInt64LE = readBigInt64LE; + proto.readBigInt64BE = readBigInt64BE; + proto.writeBigUInt64LE = writeBigUInt64LE; + proto.writeBigUInt64BE = writeBigUInt64BE; + proto.writeBigUint64LE = writeBigUInt64LE; + proto.writeBigUint64BE = writeBigUInt64BE; + proto.writeBigInt64LE = writeBigInt64LE; + proto.writeBigInt64BE = writeBigInt64BE; proto.readUIntLE = readUIntLE; proto.readUInt32LE = readUInt32LE; diff --git a/lib/internal/errors.js b/lib/internal/errors.js index d608ca42a09b75..8a7e744c5fe667 100644 --- a/lib/internal/errors.js +++ b/lib/internal/errors.js @@ -332,7 +332,7 @@ function addCodeToName(err, name, code) { err.name = `${name} [${code}]`; // Access the stack to generate the error message including the error code // from the name. - err.stack; + err.stack; // eslint-disable-line no-unused-expressions // Reset the name to the actual name. if (name === 'SystemError') { ObjectDefineProperty(err, 'name', { @@ -1411,11 +1411,11 @@ E('ERR_TLS_CERT_ALTNAME_INVALID', function(reason, host, cert) { }, Error); E('ERR_TLS_DH_PARAM_SIZE', 'DH parameter size %s is less than 2048', Error); E('ERR_TLS_HANDSHAKE_TIMEOUT', 'TLS handshake timeout', Error); -E('ERR_TLS_INVALID_CONTEXT', '%s must be a SecureContext', TypeError), -E('ERR_TLS_INVALID_STATE', 'TLS socket connection must be securely established', - Error), +E('ERR_TLS_INVALID_CONTEXT', '%s must be a SecureContext', TypeError); E('ERR_TLS_INVALID_PROTOCOL_VERSION', '%j is not a valid %s TLS protocol version', TypeError); +E('ERR_TLS_INVALID_STATE', 'TLS socket connection must be securely established', + Error); E('ERR_TLS_PROTOCOL_VERSION_CONFLICT', 'TLS protocol version %j conflicts with secureProtocol %j', TypeError); E('ERR_TLS_RENEGOTIATION_DISABLED', diff --git a/lib/internal/streams/destroy.js b/lib/internal/streams/destroy.js index 7477ec97379ff9..ff1bea5a415577 100644 --- a/lib/internal/streams/destroy.js +++ b/lib/internal/streams/destroy.js @@ -11,7 +11,7 @@ const kConstruct = Symbol('kConstruct'); function checkError(err, w, r) { if (err) { // Avoid V8 leak, https://github.com/nodejs/node/pull/34103#issuecomment-652002364 - err.stack; + err.stack; // eslint-disable-line no-unused-expressions if (w && !w.errored) { w.errored = err; @@ -118,7 +118,7 @@ function _destroy(self, err, cb) { function(err) { const r = self._readableState; const w = self._writableState; - err.stack; + err.stack; // eslint-disable-line no-unused-expressions called = true; @@ -237,7 +237,7 @@ function errorOrDestroy(stream, err, sync) { stream.destroy(err); else if (err) { // Avoid V8 leak, https://github.com/nodejs/node/pull/34103#issuecomment-652002364 - err.stack; + err.stack; // eslint-disable-line no-unused-expressions if (w && !w.errored) { w.errored = err; diff --git a/lib/internal/streams/writable.js b/lib/internal/streams/writable.js index 104a3c43452931..f76f3eb60777c8 100644 --- a/lib/internal/streams/writable.js +++ b/lib/internal/streams/writable.js @@ -438,7 +438,7 @@ function onwrite(stream, er) { if (er) { // Avoid V8 leak, https://github.com/nodejs/node/pull/34103#issuecomment-652002364 - er.stack; + er.stack; // eslint-disable-line no-unused-expressions if (!state.errored) { state.errored = er; diff --git a/test/common/index.js b/test/common/index.js index 4ec68cf5857a9f..0952f5de52fa3f 100644 --- a/test/common/index.js +++ b/test/common/index.js @@ -424,7 +424,7 @@ function getCallSite(top) { const err = new Error(); Error.captureStackTrace(err, top); // With the V8 Error API, the stack is not formatted until it is accessed - err.stack; + err.stack; // eslint-disable-line no-unused-expressions Error.prepareStackTrace = originalStackFormatter; return err.stack; } diff --git a/test/js-native-api/test_general/testEnvCleanup.js b/test/js-native-api/test_general/testEnvCleanup.js index 8d567bef4518ce..99b47a3e62560f 100644 --- a/test/js-native-api/test_general/testEnvCleanup.js +++ b/test/js-native-api/test_general/testEnvCleanup.js @@ -30,7 +30,7 @@ if (process.argv[2] === 'child') { // Make sure that only the latest attached version of a re-wrapped item's // finalizer gets called at env cleanup. module.exports['first wrap'] = - test_general.envCleanupWrap({}, finalizerMessages['first wrap']), + test_general.envCleanupWrap({}, finalizerMessages['first wrap']); test_general.removeWrap(module.exports['first wrap']); test_general.envCleanupWrap(module.exports['first wrap'], finalizerMessages['second wrap']); diff --git a/test/message/nexttick_throw.js b/test/message/nexttick_throw.js index a3369e0d102924..d7e51b411eda64 100644 --- a/test/message/nexttick_throw.js +++ b/test/message/nexttick_throw.js @@ -26,7 +26,7 @@ process.nextTick(function() { process.nextTick(function() { process.nextTick(function() { process.nextTick(function() { - // eslint-disable-next-line no-undef + // eslint-disable-next-line no-undef,no-unused-expressions undefined_reference_error_maker; }); }); diff --git a/test/message/timeout_throw.js b/test/message/timeout_throw.js index 6ae705369786c4..9bcbd85b5036e2 100644 --- a/test/message/timeout_throw.js +++ b/test/message/timeout_throw.js @@ -23,6 +23,6 @@ require('../common'); setTimeout(function() { - // eslint-disable-next-line no-undef + // eslint-disable-next-line no-undef,no-unused-expressions undefined_reference_error_maker; }, 1); diff --git a/test/parallel/test-accessor-properties.js b/test/parallel/test-accessor-properties.js index a84889d617b4ad..ae7919ea318c09 100644 --- a/test/parallel/test-accessor-properties.js +++ b/test/parallel/test-accessor-properties.js @@ -17,7 +17,7 @@ const UDP = internalBinding('udp_wrap').UDP; { // Should throw instead of raise assertions assert.throws(() => { - UDP.prototype.fd; + UDP.prototype.fd; // eslint-disable-line no-unused-expressions }, TypeError); const StreamWrapProto = Object.getPrototypeOf(TTY.prototype); @@ -26,7 +26,7 @@ const UDP = internalBinding('udp_wrap').UDP; properties.forEach((property) => { // Should throw instead of raise assertions assert.throws(() => { - TTY.prototype[property]; + TTY.prototype[property]; // eslint-disable-line no-unused-expressions }, TypeError, `Missing expected TypeError for TTY.prototype.${property}`); // Should not throw for Object.getOwnPropertyDescriptor @@ -42,6 +42,7 @@ const UDP = internalBinding('udp_wrap').UDP; const crypto = internalBinding('crypto'); assert.throws(() => { + // eslint-disable-next-line no-unused-expressions crypto.SecureContext.prototype._external; }, TypeError); diff --git a/test/parallel/test-buffer-backing-arraybuffer.js b/test/parallel/test-buffer-backing-arraybuffer.js index e7e15c079e6332..75dcd60068d5ab 100644 --- a/test/parallel/test-buffer-backing-arraybuffer.js +++ b/test/parallel/test-buffer-backing-arraybuffer.js @@ -31,7 +31,7 @@ for (const { length, expectOnHeap } of tests) { `for ${array.constructor.name}, length = ${length}`); // Consistency check: Accessing .buffer should create it. - array.buffer; + array.buffer; // eslint-disable-line no-unused-expressions assert(arrayBufferViewHasBuffer(array)); } } diff --git a/test/parallel/test-buffer-constructor-deprecation-error.js b/test/parallel/test-buffer-constructor-deprecation-error.js index 46535e103b33ee..6628bd490a2ff3 100644 --- a/test/parallel/test-buffer-constructor-deprecation-error.js +++ b/test/parallel/test-buffer-constructor-deprecation-error.js @@ -14,4 +14,4 @@ process.on('warning', common.mustCall()); Error.prepareStackTrace = (err, trace) => new Buffer(10); -new Error().stack; +new Error().stack; // eslint-disable-line no-unused-expressions diff --git a/test/parallel/test-buffer-fakes.js b/test/parallel/test-buffer-fakes.js index d126d39aa95263..da78fe0895e6bb 100644 --- a/test/parallel/test-buffer-fakes.js +++ b/test/parallel/test-buffer-fakes.js @@ -14,7 +14,7 @@ assert.throws(function() { }, TypeError); assert.throws(function() { - +Buffer.prototype; + +Buffer.prototype; // eslint-disable-line no-unused-expressions }, TypeError); assert.throws(function() { diff --git a/test/parallel/test-child-process-stdin-ipc.js b/test/parallel/test-child-process-stdin-ipc.js index b162ced916096d..945960b99b72cc 100644 --- a/test/parallel/test-child-process-stdin-ipc.js +++ b/test/parallel/test-child-process-stdin-ipc.js @@ -27,7 +27,7 @@ const spawn = require('child_process').spawn; if (process.argv[2] === 'child') { // Just reference stdin, it should start it - process.stdin; + process.stdin; // eslint-disable-line no-unused-expressions return; } diff --git a/test/parallel/test-dgram-deprecation-error.js b/test/parallel/test-dgram-deprecation-error.js index d244940b64d793..37664a5720c96f 100644 --- a/test/parallel/test-dgram-deprecation-error.js +++ b/test/parallel/test-dgram-deprecation-error.js @@ -31,7 +31,7 @@ const propertyCases = propertiesToTest.map((propName) => { `Socket.prototype.${propName} is deprecated`, 'DEP0112' ); - sock[propName]; + sock[propName]; // eslint-disable-line no-unused-expressions }, () => { // Test property setter diff --git a/test/parallel/test-disable-proto-throw.js b/test/parallel/test-disable-proto-throw.js index e7a1f679765235..a39cfef0d8bd43 100644 --- a/test/parallel/test-disable-proto-throw.js +++ b/test/parallel/test-disable-proto-throw.js @@ -10,7 +10,7 @@ const { Worker, isMainThread } = require('worker_threads'); assert(Object.prototype.hasOwnProperty('__proto__')); assert.throws(() => { - // eslint-disable-next-line no-proto + // eslint-disable-next-line no-proto,no-unused-expressions ({}).__proto__; }, { code: 'ERR_PROTO_ACCESS' diff --git a/test/parallel/test-error-prepare-stack-trace.js b/test/parallel/test-error-prepare-stack-trace.js index 2ace9c8d71491d..28ecdd25f50135 100644 --- a/test/parallel/test-error-prepare-stack-trace.js +++ b/test/parallel/test-error-prepare-stack-trace.js @@ -13,7 +13,7 @@ const assert = require('assert'); try { throw new Error('foo'); } catch (err) { - err.stack; + err.stack; // eslint-disable-line no-unused-expressions } assert(prepareCalled); } diff --git a/test/parallel/test-fs-readv-promises.js b/test/parallel/test-fs-readv-promises.js index 1132417c9e27c4..1d12126e557683 100644 --- a/test/parallel/test-fs-readv-promises.js +++ b/test/parallel/test-fs-readv-promises.js @@ -18,7 +18,7 @@ function getFileName() { const allocateEmptyBuffers = (combinedLength) => { const bufferArr = []; // Allocate two buffers, each half the size of exptectedBuff - bufferArr[0] = Buffer.alloc(Math.floor(combinedLength / 2)), + bufferArr[0] = Buffer.alloc(Math.floor(combinedLength / 2)); bufferArr[1] = Buffer.alloc(combinedLength - bufferArr[0].length); return bufferArr; diff --git a/test/parallel/test-fs-readv-sync.js b/test/parallel/test-fs-readv-sync.js index 92aa2fb6816752..9da39824d7f583 100644 --- a/test/parallel/test-fs-readv-sync.js +++ b/test/parallel/test-fs-readv-sync.js @@ -19,7 +19,7 @@ fs.writeFileSync(filename, exptectedBuff); const allocateEmptyBuffers = (combinedLength) => { const bufferArr = []; // Allocate two buffers, each half the size of exptectedBuff - bufferArr[0] = Buffer.alloc(Math.floor(combinedLength / 2)), + bufferArr[0] = Buffer.alloc(Math.floor(combinedLength / 2)); bufferArr[1] = Buffer.alloc(combinedLength - bufferArr[0].length); return bufferArr; diff --git a/test/parallel/test-fs-readv.js b/test/parallel/test-fs-readv.js index 8cffdb29c02060..2ca79b302c636f 100644 --- a/test/parallel/test-fs-readv.js +++ b/test/parallel/test-fs-readv.js @@ -17,7 +17,7 @@ const exptectedBuff = Buffer.from(expected); const allocateEmptyBuffers = (combinedLength) => { const bufferArr = []; // Allocate two buffers, each half the size of exptectedBuff - bufferArr[0] = Buffer.alloc(Math.floor(combinedLength / 2)), + bufferArr[0] = Buffer.alloc(Math.floor(combinedLength / 2)); bufferArr[1] = Buffer.alloc(combinedLength - bufferArr[0].length); return bufferArr; diff --git a/test/parallel/test-http-outgoing-internal-headernames-getter.js b/test/parallel/test-http-outgoing-internal-headernames-getter.js index c3caffff1f8a42..4a56a1301050b5 100644 --- a/test/parallel/test-http-outgoing-internal-headernames-getter.js +++ b/test/parallel/test-http-outgoing-internal-headernames-getter.js @@ -9,5 +9,5 @@ common.expectWarning('DeprecationWarning', warn, 'DEP0066'); { // Tests for _headerNames get method const outgoingMessage = new OutgoingMessage(); - outgoingMessage._headerNames; + outgoingMessage._headerNames; // eslint-disable-line no-unused-expressions } diff --git a/test/parallel/test-http-outgoing-internal-headers.js b/test/parallel/test-http-outgoing-internal-headers.js index b9e7aed165b68d..7bd97bcb530955 100644 --- a/test/parallel/test-http-outgoing-internal-headers.js +++ b/test/parallel/test-http-outgoing-internal-headers.js @@ -13,7 +13,7 @@ common.expectWarning('DeprecationWarning', warn, 'DEP0066'); // Tests for _headers get method const outgoingMessage = new OutgoingMessage(); outgoingMessage.getHeaders = common.mustCall(); - outgoingMessage._headers; + outgoingMessage._headers; // eslint-disable-line no-unused-expressions } { diff --git a/test/parallel/test-http-same-map.js b/test/parallel/test-http-same-map.js index 0adb73222de184..3d8d325ad7b0d1 100644 --- a/test/parallel/test-http-same-map.js +++ b/test/parallel/test-http-same-map.js @@ -39,9 +39,10 @@ onresponse.responses = []; function allSame(list) { assert(list.length >= 2); - // Use |elt| in no-op position to pacify eslint. - for (const elt of list) elt, eval('%DebugPrint(elt)'); - for (const elt of list) elt, assert(eval('%HaveSameMap(list[0], elt)')); + // eslint-disable-next-line no-unused-vars + for (const elt of list) eval('%DebugPrint(elt)'); + // eslint-disable-next-line no-unused-vars + for (const elt of list) assert(eval('%HaveSameMap(list[0], elt)')); } process.on('exit', () => { diff --git a/test/parallel/test-http2-unbound-socket-proxy.js b/test/parallel/test-http2-unbound-socket-proxy.js index a5505c8509dca3..74ca0169446afb 100644 --- a/test/parallel/test-http2-unbound-socket-proxy.js +++ b/test/parallel/test-http2-unbound-socket-proxy.js @@ -26,7 +26,7 @@ server.listen(0, common.mustCall(() => { // informative error. setImmediate(common.mustCall(() => { assert.throws(() => { - socket.example; + socket.example; // eslint-disable-line no-unused-expressions }, { code: 'ERR_HTTP2_SOCKET_UNBOUND' }); @@ -36,6 +36,7 @@ server.listen(0, common.mustCall(() => { code: 'ERR_HTTP2_SOCKET_UNBOUND' }); assert.throws(() => { + // eslint-disable-next-line no-unused-expressions socket instanceof net.Socket; }, { code: 'ERR_HTTP2_SOCKET_UNBOUND' diff --git a/test/parallel/test-inspector-tracing-domain.js b/test/parallel/test-inspector-tracing-domain.js index 152df1491553f1..164fbe1cd86b67 100644 --- a/test/parallel/test-inspector-tracing-domain.js +++ b/test/parallel/test-inspector-tracing-domain.js @@ -30,7 +30,7 @@ function post(message, data) { function generateTrace() { return new Promise((resolve) => setTimeout(() => { for (let i = 0; i < 1000000; i++) { - 'test' + i; + 'test' + i; // eslint-disable-line no-unused-expressions } resolve(); }, 1)); diff --git a/test/parallel/test-inspector-vm-global-accessors-sideeffects.js b/test/parallel/test-inspector-vm-global-accessors-sideeffects.js index 33545e14c7ae2b..b07ce182232fba 100644 --- a/test/parallel/test-inspector-vm-global-accessors-sideeffects.js +++ b/test/parallel/test-inspector-vm-global-accessors-sideeffects.js @@ -19,8 +19,7 @@ session.post('Runtime.evaluate', { expression: 'a', throwOnSideEffect: true, contextId: 2 // context's id -}, common.mustCall((error, res) => { - assert.ifError(error), +}, common.mustSucceed((res) => { assert.deepStrictEqual(res, { result: { type: 'number', diff --git a/test/parallel/test-internal-iterable-weak-map.js b/test/parallel/test-internal-iterable-weak-map.js index 04636c20903a2e..e0282c9081ee33 100644 --- a/test/parallel/test-internal-iterable-weak-map.js +++ b/test/parallel/test-internal-iterable-weak-map.js @@ -18,7 +18,7 @@ const { IterableWeakMap } = require('internal/util/iterable_weak_map'); wm.set(_cache.moduleC, 'goodbye'); delete _cache.moduleB; setImmediate(() => { - _cache; + _cache; // eslint-disable-line no-unused-expressions globalThis.gc(); const values = [...wm]; deepStrictEqual(values, ['hello', 'goodbye']); diff --git a/test/parallel/test-net-after-close.js b/test/parallel/test-net-after-close.js index 7d49780d001d6e..413e8f75992de9 100644 --- a/test/parallel/test-net-after-close.js +++ b/test/parallel/test-net-after-close.js @@ -32,6 +32,7 @@ const server = net.createServer(common.mustCall((s) => { server.listen(0, common.mustCall(() => { const c = net.createConnection(server.address().port); c.on('close', common.mustCall(() => { + /* eslint-disable no-unused-expressions */ console.error('connection closed'); assert.strictEqual(c._handle, null); // Calling functions / accessing properties of a closed socket should not @@ -45,5 +46,6 @@ server.listen(0, common.mustCall(() => { c.remoteAddress; c.remotePort; server.close(); + /* eslint-enable no-unused-expressions */ })); })); diff --git a/test/parallel/test-net-during-close.js b/test/parallel/test-net-during-close.js index 7bceb64041f2cc..3670ed9c273920 100644 --- a/test/parallel/test-net-during-close.js +++ b/test/parallel/test-net-during-close.js @@ -28,6 +28,7 @@ const server = net.createServer(function(socket) { }); server.listen(0, common.mustCall(function() { + /* eslint-disable no-unused-expressions */ const client = net.createConnection(this.address().port); server.close(); // Server connection event has not yet fired client is still attempting to @@ -37,4 +38,5 @@ server.listen(0, common.mustCall(function() { client.remotePort; // Exit now, do not wait for the client error event. process.exit(0); + /* eslint-enable no-unused-expressions */ })); diff --git a/test/parallel/test-process-env-windows-error-reset.js b/test/parallel/test-process-env-windows-error-reset.js index 59e5f287d82346..881da06d2926d3 100644 --- a/test/parallel/test-process-env-windows-error-reset.js +++ b/test/parallel/test-process-env-windows-error-reset.js @@ -7,7 +7,7 @@ const assert = require('assert'); { process.env.FOO = ''; - process.env.NONEXISTENT_ENV_VAR; + process.env.NONEXISTENT_ENV_VAR; // eslint-disable-line no-unused-expressions const foo = process.env.FOO; assert.strictEqual(foo, ''); @@ -15,7 +15,7 @@ const assert = require('assert'); { process.env.FOO = ''; - process.env.NONEXISTENT_ENV_VAR; + process.env.NONEXISTENT_ENV_VAR; // eslint-disable-line no-unused-expressions const hasFoo = 'FOO' in process.env; assert.strictEqual(hasFoo, true); diff --git a/test/parallel/test-repl-options.js b/test/parallel/test-repl-options.js index 94d849712b3e84..953255319cf9eb 100644 --- a/test/parallel/test-repl-options.js +++ b/test/parallel/test-repl-options.js @@ -29,7 +29,7 @@ const repl = require('repl'); const cp = require('child_process'); assert.strictEqual(repl.repl, undefined); -repl._builtinLibs; +repl._builtinLibs; // eslint-disable-line no-unused-expressions common.expectWarning({ DeprecationWarning: { diff --git a/test/parallel/test-repl-tab-complete.js b/test/parallel/test-repl-tab-complete.js index 6f5cbe2becd5f7..cc3dce1093fe4e 100644 --- a/test/parallel/test-repl-tab-complete.js +++ b/test/parallel/test-repl-tab-complete.js @@ -532,7 +532,7 @@ testMe.complete('obj.', common.mustCall((error, data) => { // check Buffer.prototype.length not crashing. // Refs: https://github.com/nodejs/node/pull/11961 -putIn.run['.clear']; +putIn.run(['.clear']); testMe.complete('Buffer.prototype.', common.mustCall()); const testNonGlobal = repl.start({ diff --git a/test/parallel/test-source-map-api.js b/test/parallel/test-source-map-api.js index 9bebc4c6c9ccae..b8ff59e365e2e9 100644 --- a/test/parallel/test-source-map-api.js +++ b/test/parallel/test-source-map-api.js @@ -54,6 +54,7 @@ const { readFileSync } = require('fs'); // Require a file that throws an exception, and has a source map. require('../fixtures/source-map/typescript-throw.js'); } catch (err) { + // eslint-disable-next-line no-unused-expressions err.stack; // Force prepareStackTrace() to be called. } assert(callSite); diff --git a/test/parallel/test-stdin-hang.js b/test/parallel/test-stdin-hang.js index 23c686320d3299..887f31fdb75adf 100644 --- a/test/parallel/test-stdin-hang.js +++ b/test/parallel/test-stdin-hang.js @@ -27,6 +27,6 @@ require('../common'); // If it does, then the test-runner will nuke it. // invoke the getter. -process.stdin; +process.stdin; // eslint-disable-line no-unused-expressions console.error('Should exit normally now.'); diff --git a/test/parallel/test-stdio-closed.js b/test/parallel/test-stdio-closed.js index c21bbc2eac12b7..cc9f1e86ccbf6c 100644 --- a/test/parallel/test-stdio-closed.js +++ b/test/parallel/test-stdio-closed.js @@ -7,10 +7,12 @@ const fixtures = require('../common/fixtures'); if (common.isWindows) { if (process.argv[2] === 'child') { + /* eslint-disable no-unused-expressions */ process.stdin; process.stdout; process.stderr; return; + /* eslint-enable no-unused-expressions */ } const python = process.env.PYTHON || 'python'; const script = fixtures.path('spawn_closed_stdio.py'); diff --git a/test/parallel/test-stdio-pipe-access.js b/test/parallel/test-stdio-pipe-access.js index e8f8131d1f19e8..6093e60b8b10a5 100644 --- a/test/parallel/test-stdio-pipe-access.js +++ b/test/parallel/test-stdio-pipe-access.js @@ -32,6 +32,6 @@ switch (who) { process.stderr ] }); break; case 'bottom': - process.stdin; + process.stdin; // eslint-disable-line no-unused-expressions break; } diff --git a/test/parallel/test-stream-pipeline-uncaught.js b/test/parallel/test-stream-pipeline-uncaught.js index 35b67c4ff0afb8..bfac4f1fee8d0b 100644 --- a/test/parallel/test-stream-pipeline-uncaught.js +++ b/test/parallel/test-stream-pipeline-uncaught.js @@ -16,9 +16,7 @@ process.on('uncaughtException', common.mustCall((err) => { const s = new PassThrough(); s.end('data'); pipeline(s, async function(source) { - for await (const chunk of source) { - chunk; - } + for await (const chunk of source) {} // eslint-disable-line no-unused-vars }, common.mustSucceed(() => { throw new Error('error'); })); diff --git a/test/parallel/test-stream-pipeline.js b/test/parallel/test-stream-pipeline.js index 5b12531f92e7a4..f4801ece268a5b 100644 --- a/test/parallel/test-stream-pipeline.js +++ b/test/parallel/test-stream-pipeline.js @@ -628,9 +628,7 @@ const net = require('net'); await Promise.resolve(); yield 'hello'; }, async function*(source) { - for await (const chunk of source) { - chunk; - } + for await (const chunk of source) {} }, common.mustCall((err) => { assert.strictEqual(err, undefined); })); @@ -646,9 +644,7 @@ const net = require('net'); await Promise.resolve(); throw new Error('kaboom'); }, async function*(source) { - for await (const chunk of source) { - chunk; - } + for await (const chunk of source) {} }, common.mustCall((err) => { assert.strictEqual(err.message, 'kaboom'); })); @@ -704,7 +700,6 @@ const net = require('net'); yield 'world'; }, s, async function(source) { for await (const chunk of source) { - chunk; throw new Error('kaboom'); } }, common.mustCall((err, val) => { @@ -719,7 +714,6 @@ const net = require('net'); return ['hello', 'world']; }, s, async function*(source) { for await (const chunk of source) { - chunk; throw new Error('kaboom'); } }, common.mustCall((err) => { diff --git a/test/parallel/test-stream-readable-async-iterators.js b/test/parallel/test-stream-readable-async-iterators.js index 788ed8a8e2e0e0..7c457fdc3da24b 100644 --- a/test/parallel/test-stream-readable-async-iterators.js +++ b/test/parallel/test-stream-readable-async-iterators.js @@ -62,8 +62,7 @@ async function tests() { }); await (async () => { - for await (const d of readable) { - d; + for await (const d of readable) { // eslint-disable-line no-unused-vars return; } })(); @@ -595,9 +594,7 @@ async function tests() { } }); - for await (const chunk of r) { - chunk; - } + for await (const chunk of r) {} // eslint-disable-line no-unused-vars assert.strictEqual(r.destroyed, false); } @@ -612,8 +609,7 @@ async function tests() { } }); - for await (const chunk of r) { - chunk; + for await (const chunk of r) { // eslint-disable-line no-unused-vars break; } assert.strictEqual(r.destroyed, true); @@ -631,9 +627,7 @@ async function tests() { assert.strictEqual(r.destroyed, false); }); - for await (const chunk of r) { - chunk; - } + for await (const chunk of r) {} // eslint-disable-line no-unused-vars assert.strictEqual(r.destroyed, true); } @@ -717,9 +711,8 @@ async function tests() { let _err; try { - for await (const chunk of res) { - chunk; - } + // eslint-disable-next-line no-unused-vars + for await (const chunk of res) {} } catch (err) { _err = err; } diff --git a/test/parallel/test-tls-external-accessor.js b/test/parallel/test-tls-external-accessor.js index 33d371923a600c..07d79ef64a5167 100644 --- a/test/parallel/test-tls-external-accessor.js +++ b/test/parallel/test-tls-external-accessor.js @@ -12,11 +12,11 @@ const tls = require('tls'); const pctx = tls.createSecureContext().context; const cctx = Object.create(pctx); assert.throws(() => cctx._external, TypeError); - pctx._external; + pctx._external; // eslint-disable-line no-unused-expressions } { const pctx = tls.createSecurePair().credentials.context; const cctx = Object.create(pctx); assert.throws(() => cctx._external, TypeError); - pctx._external; + pctx._external; // eslint-disable-line no-unused-expressions } diff --git a/test/parallel/test-trace-events-bootstrap.js b/test/parallel/test-trace-events-bootstrap.js index 7251a9824dc951..634ee7ece0294f 100644 --- a/test/parallel/test-trace-events-bootstrap.js +++ b/test/parallel/test-trace-events-bootstrap.js @@ -16,7 +16,7 @@ const names = [ ]; if (process.argv[2] === 'child') { - 1 + 1; + 1 + 1; // eslint-disable-line no-unused-expressions } else { tmpdir.refresh(); diff --git a/test/parallel/test-trace-events-environment.js b/test/parallel/test-trace-events-environment.js index 14900dfc96ff46..75714283fb1335 100644 --- a/test/parallel/test-trace-events-environment.js +++ b/test/parallel/test-trace-events-environment.js @@ -21,12 +21,14 @@ const names = new Set([ ]); if (process.argv[2] === 'child') { + /* eslint-disable no-unused-expressions */ // This is just so that the child has something to do. 1 + 1; // These ensure that the RunTimers, CheckImmediate, and // RunAndClearNativeImmediates appear in the list. setImmediate(() => { 1 + 1; }); setTimeout(() => { 1 + 1; }, 1); + /* eslint-enable no-unused-expressions */ } else { tmpdir.refresh(); diff --git a/test/parallel/test-vm-module-errors.js b/test/parallel/test-vm-module-errors.js index 2e9697ff4123f7..942e2f370dfff8 100644 --- a/test/parallel/test-vm-module-errors.js +++ b/test/parallel/test-vm-module-errors.js @@ -86,7 +86,7 @@ async function checkModuleState() { assert.throws(() => { const m = new SourceTextModule(''); - m.error; + m.error; // eslint-disable-line no-unused-expressions }, { code: 'ERR_VM_MODULE_STATUS', message: 'Module status must be errored' @@ -95,7 +95,7 @@ async function checkModuleState() { await assert.rejects(async () => { const m = await createEmptyLinkedModule(); await m.evaluate(); - m.error; + m.error; // eslint-disable-line no-unused-expressions }, { code: 'ERR_VM_MODULE_STATUS', message: 'Module status must be errored' @@ -103,7 +103,7 @@ async function checkModuleState() { assert.throws(() => { const m = new SourceTextModule(''); - m.namespace; + m.namespace; // eslint-disable-line no-unused-expressions }, { code: 'ERR_VM_MODULE_STATUS', message: 'Module status must not be unlinked or linking' diff --git a/test/parallel/test-worker-unsupported-things.js b/test/parallel/test-worker-unsupported-things.js index cc9eec4af67760..a9f434eeaf55bb 100644 --- a/test/parallel/test-worker-unsupported-things.js +++ b/test/parallel/test-worker-unsupported-things.js @@ -40,7 +40,7 @@ if (!process.env.HAS_STARTED_WORKER) { ['channel', 'connected'].forEach((fn) => { assert.throws(() => { - process[fn]; + process[fn]; // eslint-disable-line no-unused-expressions }, { code: 'ERR_WORKER_UNSUPPORTED_OPERATION' }); }); From deaafd578807ba1a9b0a6222b4af290fc10d1860 Mon Sep 17 00:00:00 2001 From: Antoine du Hamel Date: Fri, 20 Nov 2020 10:26:23 +0100 Subject: [PATCH 003/108] dns: refactor to use more primordials MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/36314 Reviewed-By: Michaël Zasso Reviewed-By: Rich Trott --- lib/dns.js | 7 +++++-- lib/internal/dns/promises.js | 7 +++++-- lib/internal/dns/utils.js | 21 +++++++++++++-------- 3 files changed, 23 insertions(+), 12 deletions(-) diff --git a/lib/dns.js b/lib/dns.js index 8d45be73baf316..0c1b259d7341ee 100644 --- a/lib/dns.js +++ b/lib/dns.js @@ -22,9 +22,11 @@ 'use strict'; const { + ArrayPrototypeMap, ObjectCreate, ObjectDefineProperties, ObjectDefineProperty, + ReflectApply, } = primordials; const cares = internalBinding('cares_wrap'); @@ -197,7 +199,8 @@ ObjectDefineProperty(lookupService, customPromisifyArgs, function onresolve(err, result, ttls) { if (ttls && this.ttl) - result = result.map((address, index) => ({ address, ttl: ttls[index] })); + result = ArrayPrototypeMap( + result, (address, index) => ({ address, ttl: ttls[index] })); if (err) this.callback(dnsException(err, this.bindingName, this.hostname)); @@ -261,7 +264,7 @@ function resolve(hostname, rrtype, callback) { } if (typeof resolver === 'function') { - return resolver.call(this, hostname, callback); + return ReflectApply(resolver, this, [hostname, callback]); } throw new ERR_INVALID_ARG_VALUE('rrtype', rrtype); } diff --git a/lib/internal/dns/promises.js b/lib/internal/dns/promises.js index 4240f9397487d8..e0158eef81307e 100644 --- a/lib/internal/dns/promises.js +++ b/lib/internal/dns/promises.js @@ -1,9 +1,11 @@ 'use strict'; const { + ArrayPrototypeMap, ObjectCreate, ObjectDefineProperty, Promise, + ReflectApply, } = primordials; const { @@ -169,7 +171,8 @@ function onresolve(err, result, ttls) { } if (ttls && this.ttl) - result = result.map((address, index) => ({ address, ttl: ttls[index] })); + result = ArrayPrototypeMap( + result, (address, index) => ({ address, ttl: ttls[index] })); this.resolve(result); } @@ -246,7 +249,7 @@ Resolver.prototype.resolve = function resolve(hostname, rrtype) { throw new ERR_INVALID_ARG_TYPE('rrtype', 'string', rrtype); } - return resolver.call(this, hostname); + return ReflectApply(resolver, this, [hostname]); }; diff --git a/lib/internal/dns/utils.js b/lib/internal/dns/utils.js index 1c50a089d1d89a..27d25c92ad93aa 100644 --- a/lib/internal/dns/utils.js +++ b/lib/internal/dns/utils.js @@ -2,8 +2,13 @@ const { ArrayIsArray, + ArrayPrototypeForEach, + ArrayPrototypeJoin, + ArrayPrototypeMap, ArrayPrototypePush, + FunctionPrototypeBind, NumberParseInt, + StringPrototypeMatch, StringPrototypeReplace, } = primordials; @@ -45,7 +50,7 @@ class Resolver { } getServers() { - return this._handle.getServers().map((val) => { + return ArrayPrototypeMap(this._handle.getServers(), (val) => { if (!val[1] || val[1] === IANA_DNS_PORT) return val[0]; @@ -65,16 +70,16 @@ class Resolver { const orig = this._handle.getServers(); const newSet = []; - servers.forEach((serv, index) => { + ArrayPrototypeForEach(servers, (serv, index) => { if (typeof serv !== 'string') { throw new ERR_INVALID_ARG_TYPE(`servers[${index}]`, 'string', serv); } let ipVersion = isIP(serv); if (ipVersion !== 0) - return newSet.push([ipVersion, serv, IANA_DNS_PORT]); + return ArrayPrototypePush(newSet, [ipVersion, serv, IANA_DNS_PORT]); - const match = serv.match(IPv6RE); + const match = StringPrototypeMatch(serv, IPv6RE); // Check for an IPv6 in brackets. if (match) { @@ -88,7 +93,7 @@ class Resolver { } // addr::port - const addrSplitMatch = serv.match(addrSplitRE); + const addrSplitMatch = StringPrototypeMatch(serv, addrSplitRE); if (addrSplitMatch) { const hostIP = addrSplitMatch[1]; @@ -109,7 +114,7 @@ class Resolver { if (errorNumber !== 0) { // Reset the servers to the old servers, because ares probably unset them. - this._handle.setServers(orig.join(',')); + this._handle.setServers(ArrayPrototypeJoin(orig, ',')); const err = strerror(errorNumber); throw new ERR_DNS_SET_SERVERS_FAILED(err, servers); } @@ -156,8 +161,8 @@ function setDefaultResolver(resolver) { } function bindDefaultResolver(target, source) { - resolverKeys.forEach((key) => { - target[key] = source[key].bind(defaultResolver); + ArrayPrototypeForEach(resolverKeys, (key) => { + target[key] = FunctionPrototypeBind(source[key], defaultResolver); }); } From 6a6b3af736fb597ca30dd4aa35ebbbc10514996e Mon Sep 17 00:00:00 2001 From: Michael Dawson Date: Fri, 20 Nov 2020 15:29:35 -0500 Subject: [PATCH 004/108] doc: provide more context on techinical values In the discussion of https://github.com/nodejs/node/pull/35323 it was suggested that we should add some additional context/clarification to the technical values documented for the project. Signed-off-by: Michael Dawson PR-URL: https://github.com/nodejs/node/pull/36201 Reviewed-By: Myles Borins Reviewed-By: Rich Trott --- doc/guides/technical-values.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/doc/guides/technical-values.md b/doc/guides/technical-values.md index fd4e18a485af10..5b634b5db83280 100644 --- a/doc/guides/technical-values.md +++ b/doc/guides/technical-values.md @@ -3,6 +3,16 @@ The project uses these technical values to establish priorities and guide collaboration. +These are the shared values as of this writing and will +evolve. We hope they are useful to people new +to the project in order to better understand which contributions +will be aligned with the current direction and as thinking +points when trading off between conflicting goals. + +The factors influencing every discussion/decision are +different and priority 1 does not always trump priority 2 +and so on. + ## Values and priority level * Priority 1 - Developer experience From 166aa8a7b5f5d3724080687a2d0445612ab79c77 Mon Sep 17 00:00:00 2001 From: Santiago Gimeno Date: Thu, 3 Dec 2020 10:38:28 +0100 Subject: [PATCH 005/108] test: fix child-process-pipe-dataflow Make sure all the `wc` process stdout data is received before checking its validity. Fixes: https://github.com/nodejs/node/issues/25988 PR-URL: https://github.com/nodejs/node/pull/36366 Reviewed-By: Gireesh Punathil Reviewed-By: Colin Ihrig Reviewed-By: Luigi Pinca Reviewed-By: Rich Trott Reviewed-By: James M Snell --- test/parallel/test-child-process-pipe-dataflow.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test/parallel/test-child-process-pipe-dataflow.js b/test/parallel/test-child-process-pipe-dataflow.js index 5f425a6f3d087c..31846c8a715c4c 100644 --- a/test/parallel/test-child-process-pipe-dataflow.js +++ b/test/parallel/test-child-process-pipe-dataflow.js @@ -61,8 +61,13 @@ const MB = KB * KB; })); }); + let wcBuf = ''; wc.stdout.on('data', common.mustCall((data) => { + wcBuf += data; + })); + + wc.on('close', common.mustCall(() => { // Grep always adds one extra byte at the end. - assert.strictEqual(data.toString().trim(), (MB + 1).toString()); + assert.strictEqual(wcBuf.trim(), (MB + 1).toString()); })); } From d3d1f338c787b64ab8c11ca89b9f39baf500180f Mon Sep 17 00:00:00 2001 From: Ash Cripps Date: Thu, 3 Dec 2020 16:22:20 +0000 Subject: [PATCH 006/108] test: add SIGTRAP to test-signal-handler PR-URL: https://github.com/nodejs/node/pull/36368 Reviewed-By: Richard Lau Reviewed-By: Luigi Pinca Reviewed-By: Evan Lucas --- test/abort/test-signal-handler.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/abort/test-signal-handler.js b/test/abort/test-signal-handler.js index f68e6881f6e5b6..69ac95f5261fb7 100644 --- a/test/abort/test-signal-handler.js +++ b/test/abort/test-signal-handler.js @@ -18,6 +18,6 @@ if (process.argv[2] === 'child') { ['--expose-internals', __filename, 'child'], { stdio: 'inherit' }); // FreeBSD and macOS use SIGILL for the kind of crash we're causing here. - assert(child.signal === 'SIGSEGV' || child.signal === 'SIGILL', - `child.signal = ${child.signal}`); + assert(child.signal === 'SIGSEGV' || child.signal === 'SIGILL' || + child.signal === 'SIGTRAP', `child.signal = ${child.signal}`); } From 023291b43c0d255beb866cdf660e683da2ef2f6b Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Sat, 5 Dec 2020 09:50:03 -0800 Subject: [PATCH 007/108] test: check null proto-of-proto in util.inspect() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add a test to check util.inspect()'s handling of a null prototype-of-an-iterable-prototype. This covers a previously uncovered code branch. Refs: https://coverage.nodejs.org/coverage-0fd121e00c9d5987/lib/internal/util/inspect.js.html#L597 PR-URL: https://github.com/nodejs/node/pull/36399 Reviewed-By: Anna Henningsen Reviewed-By: Michaël Zasso Reviewed-By: Antoine du Hamel Reviewed-By: Daijiro Wachi Reviewed-By: James M Snell --- test/parallel/test-util-inspect.js | 32 ++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/test/parallel/test-util-inspect.js b/test/parallel/test-util-inspect.js index 8961b6cef20bd5..e51b96fffd6d40 100644 --- a/test/parallel/test-util-inspect.js +++ b/test/parallel/test-util-inspect.js @@ -3011,3 +3011,35 @@ assert.strictEqual( '}' ); } + +{ + // Confirm null prototype of generator prototype displays as expected. + + function getProtoOfProto() { + return Object.getPrototypeOf(Object.getPrototypeOf(function* () {})); + } + + function* generator() {} + + const generatorPrototype = Object.getPrototypeOf(generator); + const originalProtoOfProto = Object.getPrototypeOf(generatorPrototype); + assert.strictEqual(getProtoOfProto(), originalProtoOfProto); + Object.setPrototypeOf(generatorPrototype, null); + assert.notStrictEqual(getProtoOfProto, originalProtoOfProto); + + // This is the actual test. The other assertions in this block are about + // making sure the test is set up correctly and isn't polluting other tests. + assert.strictEqual( + util.inspect(generator, { showHidden: true }), + '[GeneratorFunction: generator] {\n' + + ' [length]: 0,\n' + + " [name]: 'generator',\n" + + " [prototype]: Object [Generator] { [Symbol(Symbol.toStringTag)]: 'Generator' },\n" + // eslint-disable-line max-len + " [Symbol(Symbol.toStringTag)]: 'GeneratorFunction'\n" + + '}' + ); + + // Reset so we don't pollute other tests + Object.setPrototypeOf(generatorPrototype, originalProtoOfProto); + assert.strictEqual(getProtoOfProto(), originalProtoOfProto); +} From 169406b7d715624bb40c9ca248cd074bc0346f56 Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Sun, 6 Dec 2020 16:35:06 +0100 Subject: [PATCH 008/108] src: add missing context scopes Add scopes that ensure that the context associated with the current Environment is always entered when working with it. PR-URL: https://github.com/nodejs/node/pull/36413 Reviewed-By: Colin Ihrig Reviewed-By: Gus Caplan Reviewed-By: Benjamin Gruenbaum Reviewed-By: Gireesh Punathil Reviewed-By: James M Snell Reviewed-By: Rich Trott --- src/env.cc | 2 ++ src/node_file.cc | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/env.cc b/src/env.cc index 544bb4b54daa0f..9e7ece1e5f1b80 100644 --- a/src/env.cc +++ b/src/env.cc @@ -547,6 +547,8 @@ void Environment::InitializeLibuv() { [](uv_async_t* async) { Environment* env = ContainerOf( &Environment::task_queues_async_, async); + HandleScope handle_scope(env->isolate()); + Context::Scope context_scope(env->context()); env->RunAndClearNativeImmediates(); }); uv_unref(reinterpret_cast(&task_queues_async_)); diff --git a/src/node_file.cc b/src/node_file.cc index 074935b51aa66b..4e975530b2c63c 100644 --- a/src/node_file.cc +++ b/src/node_file.cc @@ -288,6 +288,7 @@ inline void FileHandle::Close() { void FileHandle::CloseReq::Resolve() { Isolate* isolate = env()->isolate(); HandleScope scope(isolate); + Context::Scope context_scope(env()->context()); InternalCallbackScope callback_scope(this); Local promise = promise_.Get(isolate); Local resolver = promise.As(); @@ -297,6 +298,7 @@ void FileHandle::CloseReq::Resolve() { void FileHandle::CloseReq::Reject(Local reason) { Isolate* isolate = env()->isolate(); HandleScope scope(isolate); + Context::Scope context_scope(env()->context()); InternalCallbackScope callback_scope(this); Local promise = promise_.Get(isolate); Local resolver = promise.As(); From 8ecf2f997607d1f3ee7a3f84ec81b6dee5678727 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= Date: Sun, 6 Dec 2020 14:09:25 +0100 Subject: [PATCH 009/108] tools: update doc tool dependencies PR-URL: https://github.com/nodejs/node/pull/36407 Reviewed-By: Rich Trott Reviewed-By: Myles Borins Reviewed-By: James M Snell --- tools/doc/package-lock.json | 957 ++++++++++++++++++++++-------------- tools/doc/package.json | 10 +- 2 files changed, 598 insertions(+), 369 deletions(-) diff --git a/tools/doc/package-lock.json b/tools/doc/package-lock.json index be354f69add4a5..40c07c350b3e24 100644 --- a/tools/doc/package-lock.json +++ b/tools/doc/package-lock.json @@ -11,24 +11,33 @@ "node-doc-generator": "generate.js" }, "devDependencies": { - "highlight.js": "10.1.2", + "highlight.js": "10.4.1", "js-yaml": "3.14.0", - "rehype-raw": "4.0.2", + "rehype-raw": "5.0.0", "rehype-stringify": "8.0.0", "remark-gfm": "^1.0.0", - "remark-html": "12.0.0", + "remark-html": "13.0.1", "remark-parse": "^9.0.0", - "remark-rehype": "7.0.0", + "remark-rehype": "8.0.0", "to-vfile": "6.1.0", "unified": "9.2.0", "unist-util-find": "^1.0.2", - "unist-util-select": "3.0.1", + "unist-util-select": "3.0.3", "unist-util-visit": "2.0.3" }, "engines": { "node": ">=12.10.0" } }, + "node_modules/@types/hast": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@types/hast/-/hast-2.3.1.tgz", + "integrity": "sha512-viwwrB+6xGzw+G1eWpF9geV3fnsDgXqHG+cqgiHrvQfDUW5hzhCyV7Sy3UJxhfRFBsgky2SSW33qi/YrIkjX5Q==", + "dev": true, + "dependencies": { + "@types/unist": "*" + } + }, "node_modules/@types/mdast": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.3.tgz", @@ -38,6 +47,12 @@ "@types/unist": "*" } }, + "node_modules/@types/parse5": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/@types/parse5/-/parse5-5.0.3.tgz", + "integrity": "sha512-kUNnecmtkunAoQ3CnjmMkzNU/gtxG8guhi+Fk2U/kOpIKjIMKnXGp4IJCgQJrXSgMsWYimYG4TGjz/UzbGEBTw==", + "dev": true + }, "node_modules/@types/unist": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.3.tgz", @@ -57,7 +72,11 @@ "version": "1.0.5", "resolved": "https://registry.npmjs.org/bail/-/bail-1.0.5.tgz", "integrity": "sha512-xFbRxM1tahm08yHBP16MMjVUAvDaBMD38zsM9EMAUN61omwLmKlOpB/Zku5QkjZ8TZ4vn53pj+t518cH0S03RQ==", - "dev": true + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } }, "node_modules/boolbase": { "version": "1.0.0", @@ -66,40 +85,64 @@ "dev": true }, "node_modules/ccount": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/ccount/-/ccount-1.0.5.tgz", - "integrity": "sha512-MOli1W+nfbPLlKEhInaxhRdp7KVLFxLN5ykwzHgLsLI3H3gs5jjFAK4Eoj3OzzcxCtumDaI8onoVDeQyWaNTkw==", - "dev": true + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/ccount/-/ccount-1.1.0.tgz", + "integrity": "sha512-vlNK021QdI7PNeiUh/lKkC/mNHHfV0m/Ad5JoI0TYtlBnJAslM/JIkm/tGC88bkLIwO6OQ5uV6ztS6kVAtCDlg==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } }, "node_modules/character-entities": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/character-entities/-/character-entities-1.2.4.tgz", "integrity": "sha512-iBMyeEHxfVnIakwOuDXpVkc54HijNgCyQB2w0VfGQThle6NXn50zU6V/u+LDhxHcDUPojn6Kpga3PTAD8W1bQw==", - "dev": true + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } }, "node_modules/character-entities-html4": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/character-entities-html4/-/character-entities-html4-1.1.4.tgz", "integrity": "sha512-HRcDxZuZqMx3/a+qrzxdBKBPUpxWEq9xw2OPZ3a/174ihfrQKVsFhqtthBInFy1zZ9GgZyFXOatNujm8M+El3g==", - "dev": true + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } }, "node_modules/character-entities-legacy": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/character-entities-legacy/-/character-entities-legacy-1.1.4.tgz", "integrity": "sha512-3Xnr+7ZFS1uxeiUDvV02wQ+QDbc55o97tIV5zHScSPJpcLm/r0DFPcoY3tYRp+VZukxuMeKgXYmsXQHO05zQeA==", - "dev": true + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } }, "node_modules/character-reference-invalid": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/character-reference-invalid/-/character-reference-invalid-1.1.4.tgz", "integrity": "sha512-mKKUkUbhPpQlCOfIuZkvSEgktjPFIsZKRRbC6KWVEMvlzblj3i3asQv5ODsrwt0N3pHAEvjP8KTQPHkp0+6jOg==", - "dev": true + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } }, "node_modules/comma-separated-tokens": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/comma-separated-tokens/-/comma-separated-tokens-1.0.8.tgz", "integrity": "sha512-GHuDRO12Sypu2cV70d1dkA2EUmXHgntrzbpvOB+Qy+49ypNfGgFQIC2fhhXbnyrJRynDCAARsT7Ou0M6hirpfw==", - "dev": true + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } }, "node_modules/css-selector-parser": { "version": "1.4.1", @@ -108,9 +151,9 @@ "dev": true }, "node_modules/debug": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz", - "integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==", + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", "dev": true, "dependencies": { "ms": "2.1.2" @@ -128,7 +171,14 @@ "version": "4.0.1", "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "dev": true + "dev": true, + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } }, "node_modules/extend": { "version": "3.0.2", @@ -137,73 +187,101 @@ "dev": true }, "node_modules/hast-to-hyperscript": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/hast-to-hyperscript/-/hast-to-hyperscript-7.0.4.tgz", - "integrity": "sha512-vmwriQ2H0RPS9ho4Kkbf3n3lY436QKLq6VaGA1pzBh36hBi3tm1DO9bR+kaJIbpT10UqaANDkMjxvjVfr+cnOA==", + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/hast-to-hyperscript/-/hast-to-hyperscript-9.0.1.tgz", + "integrity": "sha512-zQgLKqF+O2F72S1aa4y2ivxzSlko3MAvxkwG8ehGmNiqd98BIN3JM1rAJPmplEyLmGLO2QZYJtIneOSZ2YbJuA==", "dev": true, "dependencies": { + "@types/unist": "^2.0.3", "comma-separated-tokens": "^1.0.0", "property-information": "^5.3.0", "space-separated-tokens": "^1.0.0", - "style-to-object": "^0.2.1", - "unist-util-is": "^3.0.0", - "web-namespaces": "^1.1.2" + "style-to-object": "^0.3.0", + "unist-util-is": "^4.0.0", + "web-namespaces": "^1.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, "node_modules/hast-util-from-parse5": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/hast-util-from-parse5/-/hast-util-from-parse5-5.0.3.tgz", - "integrity": "sha512-gOc8UB99F6eWVWFtM9jUikjN7QkWxB3nY0df5Z0Zq1/Nkwl5V4hAAsl0tmwlgWl/1shlTF8DnNYLO8X6wRV9pA==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/hast-util-from-parse5/-/hast-util-from-parse5-6.0.1.tgz", + "integrity": "sha512-jeJUWiN5pSxW12Rh01smtVkZgZr33wBokLzKLwinYOUfSzm1Nl/c3GUGebDyOKjdsRgMvoVbV0VpAcpjF4NrJA==", "dev": true, "dependencies": { - "ccount": "^1.0.3", - "hastscript": "^5.0.0", + "@types/parse5": "^5.0.0", + "hastscript": "^6.0.0", "property-information": "^5.0.0", - "web-namespaces": "^1.1.2", - "xtend": "^4.0.1" + "vfile": "^4.0.0", + "vfile-location": "^3.2.0", + "web-namespaces": "^1.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, "node_modules/hast-util-is-element": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/hast-util-is-element/-/hast-util-is-element-1.1.0.tgz", "integrity": "sha512-oUmNua0bFbdrD/ELDSSEadRVtWZOf3iF6Lbv81naqsIV99RnSCieTbWuWCY8BAeEfKJTKl0gRdokv+dELutHGQ==", - "dev": true + "dev": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } }, "node_modules/hast-util-parse-selector": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/hast-util-parse-selector/-/hast-util-parse-selector-2.2.4.tgz", - "integrity": "sha512-gW3sxfynIvZApL4L07wryYF4+C9VvH3AUi7LAnVXV4MneGEgwOByXvFo18BgmTWnm7oHAe874jKbIB1YhHSIzA==", - "dev": true + "version": "2.2.5", + "resolved": "https://registry.npmjs.org/hast-util-parse-selector/-/hast-util-parse-selector-2.2.5.tgz", + "integrity": "sha512-7j6mrk/qqkSehsM92wQjdIgWM2/BW61u/53G6xmC8i1OmEdKLHbk419QKQUjz6LglWsfqoiHmyMRkP1BGjecNQ==", + "dev": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } }, "node_modules/hast-util-raw": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/hast-util-raw/-/hast-util-raw-5.0.2.tgz", - "integrity": "sha512-3ReYQcIHmzSgMq8UrDZHFL0oGlbuVGdLKs8s/Fe8BfHFAyZDrdv1fy/AGn+Fim8ZuvAHcJ61NQhVMtyfHviT/g==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/hast-util-raw/-/hast-util-raw-6.0.2.tgz", + "integrity": "sha512-m7IlmqO8cytmG3EIMDMXUG8LjO2uyApWcxwL6apsGvikIClgykFg3UYps4rnt4kUpY3j8Mc7ANJ8zW6KPPLb+w==", "dev": true, "dependencies": { - "hast-util-from-parse5": "^5.0.0", - "hast-util-to-parse5": "^5.0.0", + "@types/hast": "^2.0.0", + "hast-util-from-parse5": "^6.0.0", + "hast-util-to-parse5": "^6.0.0", "html-void-elements": "^1.0.0", - "parse5": "^5.0.0", + "parse5": "^6.0.0", "unist-util-position": "^3.0.0", + "vfile": "^4.0.0", "web-namespaces": "^1.0.0", "xtend": "^4.0.0", "zwitch": "^1.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, "node_modules/hast-util-sanitize": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/hast-util-sanitize/-/hast-util-sanitize-3.0.0.tgz", - "integrity": "sha512-gxsM24ARtuulsrWEj8QtVM6FNeAEHklF/t7TEIWvX1wuQcoAQtJtEUcT8t0os4uxCUqh1epX/gTi8fp8gNKvCA==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/hast-util-sanitize/-/hast-util-sanitize-3.0.2.tgz", + "integrity": "sha512-+2I0x2ZCAyiZOO/sb4yNLFmdwPBnyJ4PBkVTUMKMqBwYNA+lXSgOmoRXlJFazoyid9QPogRRKgKhVEodv181sA==", "dev": true, "dependencies": { "xtend": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, "node_modules/hast-util-to-html": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/hast-util-to-html/-/hast-util-to-html-7.1.1.tgz", - "integrity": "sha512-Ujqj0hGuo3dIQKilkbauAv5teOqPvhaSLEgs1lgApFT0812e114KiffV8XfE4ttR8dRPqxNOIJOMu6SKOVOGlg==", + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/hast-util-to-html/-/hast-util-to-html-7.1.2.tgz", + "integrity": "sha512-pu73bvORzdF6XZgwl9eID/0RjBb/jtRfoGRRSykpR1+o9rCdiAHpgkSukZsQBRlIqMg6ylAcd7F0F7myJUb09Q==", "dev": true, "dependencies": { "ccount": "^1.0.0", @@ -216,49 +294,60 @@ "stringify-entities": "^3.0.1", "unist-util-is": "^4.0.0", "xtend": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, - "node_modules/hast-util-to-html/node_modules/unist-util-is": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-4.0.2.tgz", - "integrity": "sha512-Ofx8uf6haexJwI1gxWMGg6I/dLnF2yE+KibhD3/diOqY2TinLcqHXCV6OI5gFVn3xQqDH+u0M625pfKwIwgBKQ==", - "dev": true - }, "node_modules/hast-util-to-parse5": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/hast-util-to-parse5/-/hast-util-to-parse5-5.1.2.tgz", - "integrity": "sha512-ZgYLJu9lYknMfsBY0rBV4TJn2xiwF1fXFFjbP6EE7S0s5mS8LIKBVWzhA1MeIs1SWW6GnnE4In6c3kPb+CWhog==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/hast-util-to-parse5/-/hast-util-to-parse5-6.0.0.tgz", + "integrity": "sha512-Lu5m6Lgm/fWuz8eWnrKezHtVY83JeRGaNQ2kn9aJgqaxvVkFCZQBEhgodZUDUvoodgyROHDb3r5IxAEdl6suJQ==", "dev": true, "dependencies": { - "hast-to-hyperscript": "^7.0.0", + "hast-to-hyperscript": "^9.0.0", "property-information": "^5.0.0", "web-namespaces": "^1.0.0", "xtend": "^4.0.0", "zwitch": "^1.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, "node_modules/hast-util-whitespace": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/hast-util-whitespace/-/hast-util-whitespace-1.0.4.tgz", "integrity": "sha512-I5GTdSfhYfAPNztx2xJRQpG8cuDSNt599/7YUn7Gx/WxNMsG+a835k97TDkFgk123cwjfwINaZknkKkphx/f2A==", - "dev": true + "dev": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } }, "node_modules/hastscript": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/hastscript/-/hastscript-5.1.2.tgz", - "integrity": "sha512-WlztFuK+Lrvi3EggsqOkQ52rKbxkXL3RwB6t5lwoa8QLMemoWfBuL43eDrwOamJyR7uKQKdmKYaBH1NZBiIRrQ==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/hastscript/-/hastscript-6.0.0.tgz", + "integrity": "sha512-nDM6bvd7lIqDUiYEiu5Sl/+6ReP0BMk/2f4U/Rooccxkj0P5nm+acM5PrGJ/t5I8qPGiqZSE6hVAwZEdZIvP4w==", "dev": true, "dependencies": { + "@types/hast": "^2.0.0", "comma-separated-tokens": "^1.0.0", "hast-util-parse-selector": "^2.0.0", "property-information": "^5.0.0", "space-separated-tokens": "^1.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, "node_modules/highlight.js": { - "version": "10.1.2", - "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-10.1.2.tgz", - "integrity": "sha512-Q39v/Mn5mfBlMff9r+zzA+gWxRsCRKwEMvYTiisLr/XUiFI/4puWt0Ojdko3R3JCNWGdOWaA5g/Yxqa23kC5AA==", + "version": "10.4.1", + "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-10.4.1.tgz", + "integrity": "sha512-yR5lWvNz7c85OhVAEAeFhVCc/GV4C30Fjzc/rCP0aCWzc1UUOPUk55dK/qdwTZHBvMZo+eZ2jpk62ndX/xMFlg==", "dev": true, "engines": { "node": "*" @@ -268,7 +357,11 @@ "version": "1.0.5", "resolved": "https://registry.npmjs.org/html-void-elements/-/html-void-elements-1.0.5.tgz", "integrity": "sha512-uE/TxKuyNIcx44cIWnjr/rfIATDH7ZaOMmstu0CwhFG1Dunhlp4OC6/NMbhiwoq5BpW0ubi303qnEk/PZj614w==", - "dev": true + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } }, "node_modules/inline-style-parser": { "version": "0.1.1", @@ -280,7 +373,11 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/is-alphabetical/-/is-alphabetical-1.0.4.tgz", "integrity": "sha512-DwzsA04LQ10FHTZuL0/grVDk4rFoVH1pjAToYwBrHSxcrBIGQuXrQMtD5U1b0U2XVgKZCTLLP8u2Qxqhy3l2Vg==", - "dev": true + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } }, "node_modules/is-alphanumerical": { "version": "1.0.4", @@ -290,31 +387,63 @@ "dependencies": { "is-alphabetical": "^1.0.0", "is-decimal": "^1.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" } }, "node_modules/is-buffer": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.4.tgz", - "integrity": "sha512-Kq1rokWXOPXWuaMAqZiJW4XxsmD9zGx9q4aePabbn3qCRGedtH7Cm+zV8WETitMfu1wdh+Rvd6w5egwSngUX2A==", - "dev": true + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.5.tgz", + "integrity": "sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "engines": { + "node": ">=4" + } }, "node_modules/is-decimal": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/is-decimal/-/is-decimal-1.0.4.tgz", "integrity": "sha512-RGdriMmQQvZ2aqaQq3awNA6dCGtKpiDFcOzrTWrDAT2MiWrKQVPmxLGHl7Y2nNu6led0kEyoX0enY0qXYsv9zw==", - "dev": true + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } }, "node_modules/is-hexadecimal": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/is-hexadecimal/-/is-hexadecimal-1.0.4.tgz", "integrity": "sha512-gyPJuv83bHMpocVYoqof5VDiZveEoGoFL8m3BXNb2VW8Xs+rz9kqO8LOQ5DH6EsuvilT1ApazU0pyl+ytbPtlw==", - "dev": true + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } }, "node_modules/is-plain-obj": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", - "dev": true + "dev": true, + "engines": { + "node": ">=8" + } }, "node_modules/js-yaml": { "version": "3.14.0", @@ -324,6 +453,9 @@ "dependencies": { "argparse": "^1.0.7", "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" } }, "node_modules/lodash.iteratee": { @@ -332,13 +464,40 @@ "integrity": "sha1-vkF32yiajMw8CZDx2ya1si/BVUw=", "dev": true }, + "node_modules/longest-streak": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/longest-streak/-/longest-streak-2.0.4.tgz", + "integrity": "sha512-vM6rUVCVUJJt33bnmHiZEvr7wPT78ztX7rojL+LW51bHtLh6HTjx84LA5W4+oa6aKEJA7jJu5LR6vQRBpA5DVg==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/markdown-table": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/markdown-table/-/markdown-table-2.0.0.tgz", + "integrity": "sha512-Ezda85ToJUBhM6WGaG6veasyym+Tbs3cMAw/ZhOPqXiYsr0jgocBV3j3nx+4lk47plLlIqjwuTm/ywVI+zjJ/A==", + "dev": true, + "dependencies": { + "repeat-string": "^1.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/mdast-util-definitions": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/mdast-util-definitions/-/mdast-util-definitions-3.0.1.tgz", - "integrity": "sha512-BAv2iUm/e6IK/b2/t+Fx69EL/AGcq/IG2S+HxHjDJGfLJtd6i9SZUS76aC9cig+IEucsqxKTR0ot3m933R3iuA==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/mdast-util-definitions/-/mdast-util-definitions-4.0.0.tgz", + "integrity": "sha512-k8AJ6aNnUkB7IE+5azR9h81O5EQ/cTDXtWdMq9Kk5KcEW/8ritU5CeLg/9HhOC++nALHBlaogJ5jz0Ybk3kPMQ==", "dev": true, "dependencies": { "unist-util-visit": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, "node_modules/mdast-util-from-markdown": { @@ -357,6 +516,16 @@ "url": "https://opencollective.com/unified" } }, + "node_modules/mdast-util-from-markdown/node_modules/mdast-util-to-string": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/mdast-util-to-string/-/mdast-util-to-string-1.1.0.tgz", + "integrity": "sha512-jVU0Nr2B9X3MU4tSK7JP1CMkSvOj7X5l/GboG1tKRw52lLF1x2Ju92Ms9tNetCcbfX3hzlM73zYo2NKkWSfF/A==", + "dev": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, "node_modules/mdast-util-gfm": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/mdast-util-gfm/-/mdast-util-gfm-0.1.0.tgz", @@ -410,19 +579,6 @@ "url": "https://opencollective.com/unified" } }, - "node_modules/mdast-util-gfm-table/node_modules/markdown-table": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/markdown-table/-/markdown-table-2.0.0.tgz", - "integrity": "sha512-Ezda85ToJUBhM6WGaG6veasyym+Tbs3cMAw/ZhOPqXiYsr0jgocBV3j3nx+4lk47plLlIqjwuTm/ywVI+zjJ/A==", - "dev": true, - "dependencies": { - "repeat-string": "^1.0.0" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, "node_modules/mdast-util-gfm-task-list-item": { "version": "0.1.5", "resolved": "https://registry.npmjs.org/mdast-util-gfm-task-list-item/-/mdast-util-gfm-task-list-item-0.1.5.tgz", @@ -437,30 +593,34 @@ } }, "node_modules/mdast-util-to-hast": { - "version": "9.1.1", - "resolved": "https://registry.npmjs.org/mdast-util-to-hast/-/mdast-util-to-hast-9.1.1.tgz", - "integrity": "sha512-vpMWKFKM2mnle+YbNgDXxx95vv0CoLU0v/l3F5oFAG5DV7qwkZVWA206LsAdOnEVyf5vQcLnb3cWJywu7mUxsQ==", + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/mdast-util-to-hast/-/mdast-util-to-hast-10.0.1.tgz", + "integrity": "sha512-BW3LM9SEMnjf4HXXVApZMt8gLQWVNXc3jryK0nJu/rOXPOnlkUjmdkDlmxMirpbU9ILncGFIwLH/ubnWBbcdgA==", "dev": true, "dependencies": { "@types/mdast": "^3.0.0", - "@types/unist": "^2.0.3", - "mdast-util-definitions": "^3.0.0", + "@types/unist": "^2.0.0", + "mdast-util-definitions": "^4.0.0", "mdurl": "^1.0.0", "unist-builder": "^2.0.0", "unist-util-generated": "^1.0.0", "unist-util-position": "^3.0.0", "unist-util-visit": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, "node_modules/mdast-util-to-markdown": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/mdast-util-to-markdown/-/mdast-util-to-markdown-0.5.3.tgz", - "integrity": "sha512-sr8q7fQJ1xoCqZSXW6dO/MYu2Md+a4Hfk9uO+XHCfiBhVM0EgWtfAV7BuN+ff6otUeu2xDyt1o7vhZGwOG3+BA==", + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/mdast-util-to-markdown/-/mdast-util-to-markdown-0.5.4.tgz", + "integrity": "sha512-0jQTkbWYx0HdEA/h++7faebJWr5JyBoBeiRf0u3F4F3QtnyyGaWIsOwo749kRb1ttKrLLr+wRtOkfou9yB0p6A==", "dev": true, "dependencies": { "@types/unist": "^2.0.0", "longest-streak": "^2.0.0", - "mdast-util-to-string": "^1.0.0", + "mdast-util-to-string": "^2.0.0", "parse-entities": "^2.0.0", "repeat-string": "^1.0.0", "zwitch": "^1.0.0" @@ -470,20 +630,10 @@ "url": "https://opencollective.com/unified" } }, - "node_modules/mdast-util-to-markdown/node_modules/longest-streak": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/longest-streak/-/longest-streak-2.0.4.tgz", - "integrity": "sha512-vM6rUVCVUJJt33bnmHiZEvr7wPT78ztX7rojL+LW51bHtLh6HTjx84LA5W4+oa6aKEJA7jJu5LR6vQRBpA5DVg==", - "dev": true, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, "node_modules/mdast-util-to-string": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/mdast-util-to-string/-/mdast-util-to-string-1.1.0.tgz", - "integrity": "sha512-jVU0Nr2B9X3MU4tSK7JP1CMkSvOj7X5l/GboG1tKRw52lLF1x2Ju92Ms9tNetCcbfX3hzlM73zYo2NKkWSfF/A==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/mdast-util-to-string/-/mdast-util-to-string-2.0.0.tgz", + "integrity": "sha512-AW4DRS3QbBayY/jJmD8437V1Gombjf8RSOUCMFBuo5iHi58AGEgVCKQ+ezHkZZDpAQS75hcBMpLqjpJTjtUL7w==", "dev": true, "funding": { "type": "opencollective", @@ -609,12 +759,15 @@ "dev": true }, "node_modules/nth-check": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-1.0.2.tgz", - "integrity": "sha512-WeBOdju8SnzPN5vTUJYxYUxLeXpCaVP5i5e0LF8fg7WORF2Wd7wFX/pk0tYZk7s8T+J7VLy0Da6J1+wCT0AtHg==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.0.0.tgz", + "integrity": "sha512-i4sc/Kj8htBrAiH1viZ0TgU8Y5XqCaV/FziYK6TBczxmeKm3AEFWqqF3195yKudrarqy7Zu80Ra5dobFjn9X/Q==", "dev": true, "dependencies": { - "boolbase": "~1.0.0" + "boolbase": "^1.0.0" + }, + "funding": { + "url": "https://github.com/fb55/nth-check?sponsor=1" } }, "node_modules/parse-entities": { @@ -636,27 +789,35 @@ } }, "node_modules/parse5": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/parse5/-/parse5-5.1.1.tgz", - "integrity": "sha512-ugq4DFI0Ptb+WWjAdOK16+u/nHfiIrcE+sh8kZMaM0WllQKLI9rOUq6c2b7cwPkXdzfQESqvoqK6ug7U/Yyzug==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz", + "integrity": "sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==", "dev": true }, "node_modules/property-information": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/property-information/-/property-information-5.5.0.tgz", - "integrity": "sha512-RgEbCx2HLa1chNgvChcx+rrCWD0ctBmGSE0M7lVm1yyv4UbvbrWoXp/BkVLZefzjrRBGW8/Js6uh/BnlHXFyjA==", + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/property-information/-/property-information-5.6.0.tgz", + "integrity": "sha512-YUHSPk+A30YPv+0Qf8i9Mbfe/C0hdPXk1s1jPVToV8pk8BQtpw10ct89Eo7OWkutrwqvT0eicAxlOg3dOAu8JA==", "dev": true, "dependencies": { "xtend": "^4.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" } }, "node_modules/rehype-raw": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/rehype-raw/-/rehype-raw-4.0.2.tgz", - "integrity": "sha512-xQt94oXfDaO7sK9mJBtsZXkjW/jm6kArCoYN+HqKZ51O19AFHlp3Xa5UfZZ2tJkbpAZzKtgVUYvnconk9IsFuA==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/rehype-raw/-/rehype-raw-5.0.0.tgz", + "integrity": "sha512-q/MOBj4fs1WF/LSCh5uOtNhnm5OESuDcSvq1mDQP4/2t6Q52E9MHeVoLeMy9vOn93BEcgVBm4FCokcK2iXRDvA==", "dev": true, "dependencies": { - "hast-util-raw": "^5.0.0" + "hast-util-raw": "^6.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, "node_modules/rehype-stringify": { @@ -666,6 +827,10 @@ "dev": true, "dependencies": { "hast-util-to-html": "^7.1.1" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, "node_modules/remark-gfm": { @@ -683,15 +848,18 @@ } }, "node_modules/remark-html": { - "version": "12.0.0", - "resolved": "https://registry.npmjs.org/remark-html/-/remark-html-12.0.0.tgz", - "integrity": "sha512-M104NMHs48+uswChJkCDXCdabzxAinpHikpt6kS3gmGMyIvPZ5kn53tB9shFsL2O4HUJ9DIEsah1SX1Ve5FXHA==", + "version": "13.0.1", + "resolved": "https://registry.npmjs.org/remark-html/-/remark-html-13.0.1.tgz", + "integrity": "sha512-K5KQCXWVz+harnyC+UVM/J9eJWCgjYRqFeZoZf2NgP0iFbuuw/RgMZv3MA34b/OEpGnstl3oiOUtZzD3tJ+CBw==", "dev": true, "dependencies": { "hast-util-sanitize": "^3.0.0", "hast-util-to-html": "^7.0.0", - "mdast-util-to-hast": "^9.0.0", - "xtend": "^4.0.1" + "mdast-util-to-hast": "^10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, "node_modules/remark-parse": { @@ -708,31 +876,36 @@ } }, "node_modules/remark-rehype": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/remark-rehype/-/remark-rehype-7.0.0.tgz", - "integrity": "sha512-uqQ/VbaTdxyu/da6npHAso6hA00cMqhA3a59RziQdOLN2KEIkPykAVy52IcmZEVTuauXO0VtpxkyCey4phtHzQ==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/remark-rehype/-/remark-rehype-8.0.0.tgz", + "integrity": "sha512-gVvOH02TMFqXOWoL6iXU7NXMsDJguNkNuMrzfkQeA4V6WCyHQnOKptn+IQBVVPuIH2sMJBwo8hlrmtn1MLTh9w==", "dev": true, "dependencies": { - "mdast-util-to-hast": "^9.1.0" + "mdast-util-to-hast": "^10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, "node_modules/repeat-string": { "version": "1.6.1", "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", - "dev": true - }, - "node_modules/replace-ext": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-1.0.0.tgz", - "integrity": "sha1-3mMSg3P8v3w8z6TeWkgMRaZ5WOs=", - "dev": true + "dev": true, + "engines": { + "node": ">=0.10" + } }, "node_modules/space-separated-tokens": { "version": "1.1.5", "resolved": "https://registry.npmjs.org/space-separated-tokens/-/space-separated-tokens-1.1.5.tgz", "integrity": "sha512-q/JSVd1Lptzhf5bkYm4ob4iWPjx0KiRe3sRFBNrVqbJkFaBm5vbbowy1mymoPNLRa52+oadOhJ+K49wsSeSjTA==", - "dev": true + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } }, "node_modules/sprintf-js": { "version": "1.0.3", @@ -741,22 +914,24 @@ "dev": true }, "node_modules/stringify-entities": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/stringify-entities/-/stringify-entities-3.0.1.tgz", - "integrity": "sha512-Lsk3ISA2++eJYqBMPKcr/8eby1I6L0gP0NlxF8Zja6c05yr/yCYyb2c9PwXjd08Ib3If1vn1rbs1H5ZtVuOfvQ==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/stringify-entities/-/stringify-entities-3.1.0.tgz", + "integrity": "sha512-3FP+jGMmMV/ffZs86MoghGqAoqXAdxLrJP4GUdrDN1aIScYih5tuIO3eF4To5AJZ79KDZ8Fpdy7QJnK8SsL1Vg==", "dev": true, "dependencies": { "character-entities-html4": "^1.0.0", "character-entities-legacy": "^1.0.0", - "is-alphanumerical": "^1.0.0", - "is-decimal": "^1.0.2", - "is-hexadecimal": "^1.0.0" + "xtend": "^4.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" } }, "node_modules/style-to-object": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/style-to-object/-/style-to-object-0.2.3.tgz", - "integrity": "sha512-1d/k4EY2N7jVLOqf2j04dTc37TPOv/hHxZmvpg8Pdh8UYydxeu/C1W1U4vD8alzf5V2Gt7rLsmkr4dxAlDm9ng==", + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/style-to-object/-/style-to-object-0.3.0.tgz", + "integrity": "sha512-CzFnRRXhzWIdItT3OmF8SQfWyahHhjq3HwcMNCNLn+N7klOOqPjMeG/4JSu77D7ypZdGvSzvkrbyeTMizz2VrA==", "dev": true, "dependencies": { "inline-style-parser": "0.1.1" @@ -770,13 +945,21 @@ "dependencies": { "is-buffer": "^2.0.0", "vfile": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, "node_modules/trough": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/trough/-/trough-1.0.5.tgz", "integrity": "sha512-rvuRbTarPXmMb79SmzEp8aqXNKcK+y0XaB298IXueQ8I2PsrATcPBCSPyK/dDNa2iWOhKlfNnOjdAOTBU/nkFA==", - "dev": true + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } }, "node_modules/unified": { "version": "9.2.0", @@ -790,13 +973,21 @@ "is-plain-obj": "^2.0.0", "trough": "^1.0.0", "vfile": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, "node_modules/unist-builder": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/unist-builder/-/unist-builder-2.0.3.tgz", "integrity": "sha512-f98yt5pnlMWlzP539tPc4grGMsFaQQlP/vM396b00jngsiINumNmsY8rkXjfoi1c6QaM8nQ3vaGDuoKWbe/1Uw==", - "dev": true + "dev": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } }, "node_modules/unist-util-find": { "version": "1.0.2", @@ -808,6 +999,12 @@ "unist-util-visit": "^1.1.0" } }, + "node_modules/unist-util-find/node_modules/unist-util-is": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-3.0.0.tgz", + "integrity": "sha512-sVZZX3+kspVNmLWBPAB6r+7D9ZgAFPNWm66f7YNb420RlQSbn+n8rG8dGZSkrER7ZIXGQYNm5pqC3v3HopH24A==", + "dev": true + }, "node_modules/unist-util-find/node_modules/unist-util-visit": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-1.4.1.tgz", @@ -827,42 +1024,52 @@ } }, "node_modules/unist-util-generated": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/unist-util-generated/-/unist-util-generated-1.1.5.tgz", - "integrity": "sha512-1TC+NxQa4N9pNdayCYA1EGUOCAO0Le3fVp7Jzns6lnua/mYgwHo0tz5WUAfrdpNch1RZLHc61VZ1SDgrtNXLSw==", - "dev": true + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/unist-util-generated/-/unist-util-generated-1.1.6.tgz", + "integrity": "sha512-cln2Mm1/CZzN5ttGK7vkoGw+RZ8VcUH6BtGbq98DDtRGquAAOXig1mrBQYelOwMXYS8rK+vZDyyojSjp7JX+Lg==", + "dev": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } }, "node_modules/unist-util-is": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-3.0.0.tgz", - "integrity": "sha512-sVZZX3+kspVNmLWBPAB6r+7D9ZgAFPNWm66f7YNb420RlQSbn+n8rG8dGZSkrER7ZIXGQYNm5pqC3v3HopH24A==", - "dev": true + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-4.0.4.tgz", + "integrity": "sha512-3dF39j/u423v4BBQrk1AQ2Ve1FxY5W3JKwXxVFzBODQ6WEvccguhgp802qQLKSnxPODE6WuRZtV+ohlUg4meBA==", + "dev": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } }, "node_modules/unist-util-position": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/unist-util-position/-/unist-util-position-3.1.0.tgz", "integrity": "sha512-w+PkwCbYSFw8vpgWD0v7zRCl1FpY3fjDSQ3/N/wNd9Ffa4gPi8+4keqt99N3XW6F99t/mUzp2xAhNmfKWp95QA==", - "dev": true + "dev": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } }, "node_modules/unist-util-select": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/unist-util-select/-/unist-util-select-3.0.1.tgz", - "integrity": "sha512-VQpTuqZVJlRbosQdnLdTPIIqwZeU70YZ5aMBOqtFNGeeCdYn6ORZt/9RiaVlbl06ocuf58SVMoFa7a13CSGPMA==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/unist-util-select/-/unist-util-select-3.0.3.tgz", + "integrity": "sha512-DnbjRvotPiDGsUaw9knEvprwD6conwGtaArUn5niG9yBQvWQyHMmUJ4p/vXXzLBm+8XyiTr3pcuw9n3TlF6SYg==", "dev": true, "dependencies": { "css-selector-parser": "^1.0.0", "not": "^0.1.0", - "nth-check": "^1.0.0", + "nth-check": "^2.0.0", "unist-util-is": "^4.0.0", "zwitch": "^1.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, - "node_modules/unist-util-select/node_modules/unist-util-is": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-4.0.2.tgz", - "integrity": "sha512-Ofx8uf6haexJwI1gxWMGg6I/dLnF2yE+KibhD3/diOqY2TinLcqHXCV6OI5gFVn3xQqDH+u0M625pfKwIwgBKQ==", - "dev": true - }, "node_modules/unist-util-stringify-position": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-2.0.3.tgz", @@ -870,6 +1077,10 @@ "dev": true, "dependencies": { "@types/unist": "^2.0.2" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, "node_modules/unist-util-visit": { @@ -881,41 +1092,50 @@ "@types/unist": "^2.0.0", "unist-util-is": "^4.0.0", "unist-util-visit-parents": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, "node_modules/unist-util-visit-parents": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-3.1.0.tgz", - "integrity": "sha512-0g4wbluTF93npyPrp/ymd3tCDTMnP0yo2akFD2FIBAYXq/Sga3lwaU1D8OYKbtpioaI6CkDcQ6fsMnmtzt7htw==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-3.1.1.tgz", + "integrity": "sha512-1KROIZWo6bcMrZEwiH2UrXDyalAa0uqzWCxCJj6lPOvTve2WkfgCytoDTPaMnodXh1WrXOq0haVYHj99ynJlsg==", "dev": true, "dependencies": { "@types/unist": "^2.0.0", "unist-util-is": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, - "node_modules/unist-util-visit-parents/node_modules/unist-util-is": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-4.0.2.tgz", - "integrity": "sha512-Ofx8uf6haexJwI1gxWMGg6I/dLnF2yE+KibhD3/diOqY2TinLcqHXCV6OI5gFVn3xQqDH+u0M625pfKwIwgBKQ==", - "dev": true - }, - "node_modules/unist-util-visit/node_modules/unist-util-is": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-4.0.2.tgz", - "integrity": "sha512-Ofx8uf6haexJwI1gxWMGg6I/dLnF2yE+KibhD3/diOqY2TinLcqHXCV6OI5gFVn3xQqDH+u0M625pfKwIwgBKQ==", - "dev": true - }, "node_modules/vfile": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/vfile/-/vfile-4.2.0.tgz", - "integrity": "sha512-a/alcwCvtuc8OX92rqqo7PflxiCgXRFjdyoGVuYV+qbgCb0GgZJRvIgCD4+U/Kl1yhaRsaTwksF88xbPyGsgpw==", + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/vfile/-/vfile-4.2.1.tgz", + "integrity": "sha512-O6AE4OskCG5S1emQ/4gl8zK586RqA3srz3nfK/Viy0UPToBc5Trp9BVFb1u0CjsKrAWwnpr4ifM/KBXPWwJbCA==", "dev": true, "dependencies": { "@types/unist": "^2.0.0", "is-buffer": "^2.0.0", - "replace-ext": "1.0.0", "unist-util-stringify-position": "^2.0.0", "vfile-message": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/vfile-location": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/vfile-location/-/vfile-location-3.2.0.tgz", + "integrity": "sha512-aLEIZKv/oxuCDZ8lkJGhuhztf/BW4M+iHdCwglA/eWc+vtuRFJj8EtgceYFX4LRjOhCAAiNHsKGssC6onJ+jbA==", + "dev": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, "node_modules/vfile-message": { @@ -926,28 +1146,52 @@ "dependencies": { "@types/unist": "^2.0.0", "unist-util-stringify-position": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, "node_modules/web-namespaces": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/web-namespaces/-/web-namespaces-1.1.4.tgz", "integrity": "sha512-wYxSGajtmoP4WxfejAPIr4l0fVh+jeMXZb08wNc0tMg6xsfZXj3cECqIK0G7ZAqUq0PP8WlMDtaOGVBTAWztNw==", - "dev": true + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } }, "node_modules/xtend": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", - "dev": true + "dev": true, + "engines": { + "node": ">=0.4" + } }, "node_modules/zwitch": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/zwitch/-/zwitch-1.0.5.tgz", "integrity": "sha512-V50KMwwzqJV0NpZIZFwfOD5/lyny3WlSzRiXgA0G7VUnRlqttta1L6UQIHzd6EuBY/cHGfwTIck7w1yH6Q5zUw==", - "dev": true + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } } }, "dependencies": { + "@types/hast": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@types/hast/-/hast-2.3.1.tgz", + "integrity": "sha512-viwwrB+6xGzw+G1eWpF9geV3fnsDgXqHG+cqgiHrvQfDUW5hzhCyV7Sy3UJxhfRFBsgky2SSW33qi/YrIkjX5Q==", + "dev": true, + "requires": { + "@types/unist": "*" + } + }, "@types/mdast": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.3.tgz", @@ -957,6 +1201,12 @@ "@types/unist": "*" } }, + "@types/parse5": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/@types/parse5/-/parse5-5.0.3.tgz", + "integrity": "sha512-kUNnecmtkunAoQ3CnjmMkzNU/gtxG8guhi+Fk2U/kOpIKjIMKnXGp4IJCgQJrXSgMsWYimYG4TGjz/UzbGEBTw==", + "dev": true + }, "@types/unist": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.3.tgz", @@ -985,9 +1235,9 @@ "dev": true }, "ccount": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/ccount/-/ccount-1.0.5.tgz", - "integrity": "sha512-MOli1W+nfbPLlKEhInaxhRdp7KVLFxLN5ykwzHgLsLI3H3gs5jjFAK4Eoj3OzzcxCtumDaI8onoVDeQyWaNTkw==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/ccount/-/ccount-1.1.0.tgz", + "integrity": "sha512-vlNK021QdI7PNeiUh/lKkC/mNHHfV0m/Ad5JoI0TYtlBnJAslM/JIkm/tGC88bkLIwO6OQ5uV6ztS6kVAtCDlg==", "dev": true }, "character-entities": { @@ -1027,9 +1277,9 @@ "dev": true }, "debug": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz", - "integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==", + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", "dev": true, "requires": { "ms": "2.1.2" @@ -1048,30 +1298,32 @@ "dev": true }, "hast-to-hyperscript": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/hast-to-hyperscript/-/hast-to-hyperscript-7.0.4.tgz", - "integrity": "sha512-vmwriQ2H0RPS9ho4Kkbf3n3lY436QKLq6VaGA1pzBh36hBi3tm1DO9bR+kaJIbpT10UqaANDkMjxvjVfr+cnOA==", + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/hast-to-hyperscript/-/hast-to-hyperscript-9.0.1.tgz", + "integrity": "sha512-zQgLKqF+O2F72S1aa4y2ivxzSlko3MAvxkwG8ehGmNiqd98BIN3JM1rAJPmplEyLmGLO2QZYJtIneOSZ2YbJuA==", "dev": true, "requires": { + "@types/unist": "^2.0.3", "comma-separated-tokens": "^1.0.0", "property-information": "^5.3.0", "space-separated-tokens": "^1.0.0", - "style-to-object": "^0.2.1", - "unist-util-is": "^3.0.0", - "web-namespaces": "^1.1.2" + "style-to-object": "^0.3.0", + "unist-util-is": "^4.0.0", + "web-namespaces": "^1.0.0" } }, "hast-util-from-parse5": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/hast-util-from-parse5/-/hast-util-from-parse5-5.0.3.tgz", - "integrity": "sha512-gOc8UB99F6eWVWFtM9jUikjN7QkWxB3nY0df5Z0Zq1/Nkwl5V4hAAsl0tmwlgWl/1shlTF8DnNYLO8X6wRV9pA==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/hast-util-from-parse5/-/hast-util-from-parse5-6.0.1.tgz", + "integrity": "sha512-jeJUWiN5pSxW12Rh01smtVkZgZr33wBokLzKLwinYOUfSzm1Nl/c3GUGebDyOKjdsRgMvoVbV0VpAcpjF4NrJA==", "dev": true, "requires": { - "ccount": "^1.0.3", - "hastscript": "^5.0.0", + "@types/parse5": "^5.0.0", + "hastscript": "^6.0.0", "property-information": "^5.0.0", - "web-namespaces": "^1.1.2", - "xtend": "^4.0.1" + "vfile": "^4.0.0", + "vfile-location": "^3.2.0", + "web-namespaces": "^1.0.0" } }, "hast-util-is-element": { @@ -1081,40 +1333,42 @@ "dev": true }, "hast-util-parse-selector": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/hast-util-parse-selector/-/hast-util-parse-selector-2.2.4.tgz", - "integrity": "sha512-gW3sxfynIvZApL4L07wryYF4+C9VvH3AUi7LAnVXV4MneGEgwOByXvFo18BgmTWnm7oHAe874jKbIB1YhHSIzA==", + "version": "2.2.5", + "resolved": "https://registry.npmjs.org/hast-util-parse-selector/-/hast-util-parse-selector-2.2.5.tgz", + "integrity": "sha512-7j6mrk/qqkSehsM92wQjdIgWM2/BW61u/53G6xmC8i1OmEdKLHbk419QKQUjz6LglWsfqoiHmyMRkP1BGjecNQ==", "dev": true }, "hast-util-raw": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/hast-util-raw/-/hast-util-raw-5.0.2.tgz", - "integrity": "sha512-3ReYQcIHmzSgMq8UrDZHFL0oGlbuVGdLKs8s/Fe8BfHFAyZDrdv1fy/AGn+Fim8ZuvAHcJ61NQhVMtyfHviT/g==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/hast-util-raw/-/hast-util-raw-6.0.2.tgz", + "integrity": "sha512-m7IlmqO8cytmG3EIMDMXUG8LjO2uyApWcxwL6apsGvikIClgykFg3UYps4rnt4kUpY3j8Mc7ANJ8zW6KPPLb+w==", "dev": true, "requires": { - "hast-util-from-parse5": "^5.0.0", - "hast-util-to-parse5": "^5.0.0", + "@types/hast": "^2.0.0", + "hast-util-from-parse5": "^6.0.0", + "hast-util-to-parse5": "^6.0.0", "html-void-elements": "^1.0.0", - "parse5": "^5.0.0", + "parse5": "^6.0.0", "unist-util-position": "^3.0.0", + "vfile": "^4.0.0", "web-namespaces": "^1.0.0", "xtend": "^4.0.0", "zwitch": "^1.0.0" } }, "hast-util-sanitize": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/hast-util-sanitize/-/hast-util-sanitize-3.0.0.tgz", - "integrity": "sha512-gxsM24ARtuulsrWEj8QtVM6FNeAEHklF/t7TEIWvX1wuQcoAQtJtEUcT8t0os4uxCUqh1epX/gTi8fp8gNKvCA==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/hast-util-sanitize/-/hast-util-sanitize-3.0.2.tgz", + "integrity": "sha512-+2I0x2ZCAyiZOO/sb4yNLFmdwPBnyJ4PBkVTUMKMqBwYNA+lXSgOmoRXlJFazoyid9QPogRRKgKhVEodv181sA==", "dev": true, "requires": { "xtend": "^4.0.0" } }, "hast-util-to-html": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/hast-util-to-html/-/hast-util-to-html-7.1.1.tgz", - "integrity": "sha512-Ujqj0hGuo3dIQKilkbauAv5teOqPvhaSLEgs1lgApFT0812e114KiffV8XfE4ttR8dRPqxNOIJOMu6SKOVOGlg==", + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/hast-util-to-html/-/hast-util-to-html-7.1.2.tgz", + "integrity": "sha512-pu73bvORzdF6XZgwl9eID/0RjBb/jtRfoGRRSykpR1+o9rCdiAHpgkSukZsQBRlIqMg6ylAcd7F0F7myJUb09Q==", "dev": true, "requires": { "ccount": "^1.0.0", @@ -1127,23 +1381,15 @@ "stringify-entities": "^3.0.1", "unist-util-is": "^4.0.0", "xtend": "^4.0.0" - }, - "dependencies": { - "unist-util-is": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-4.0.2.tgz", - "integrity": "sha512-Ofx8uf6haexJwI1gxWMGg6I/dLnF2yE+KibhD3/diOqY2TinLcqHXCV6OI5gFVn3xQqDH+u0M625pfKwIwgBKQ==", - "dev": true - } } }, "hast-util-to-parse5": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/hast-util-to-parse5/-/hast-util-to-parse5-5.1.2.tgz", - "integrity": "sha512-ZgYLJu9lYknMfsBY0rBV4TJn2xiwF1fXFFjbP6EE7S0s5mS8LIKBVWzhA1MeIs1SWW6GnnE4In6c3kPb+CWhog==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/hast-util-to-parse5/-/hast-util-to-parse5-6.0.0.tgz", + "integrity": "sha512-Lu5m6Lgm/fWuz8eWnrKezHtVY83JeRGaNQ2kn9aJgqaxvVkFCZQBEhgodZUDUvoodgyROHDb3r5IxAEdl6suJQ==", "dev": true, "requires": { - "hast-to-hyperscript": "^7.0.0", + "hast-to-hyperscript": "^9.0.0", "property-information": "^5.0.0", "web-namespaces": "^1.0.0", "xtend": "^4.0.0", @@ -1157,11 +1403,12 @@ "dev": true }, "hastscript": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/hastscript/-/hastscript-5.1.2.tgz", - "integrity": "sha512-WlztFuK+Lrvi3EggsqOkQ52rKbxkXL3RwB6t5lwoa8QLMemoWfBuL43eDrwOamJyR7uKQKdmKYaBH1NZBiIRrQ==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/hastscript/-/hastscript-6.0.0.tgz", + "integrity": "sha512-nDM6bvd7lIqDUiYEiu5Sl/+6ReP0BMk/2f4U/Rooccxkj0P5nm+acM5PrGJ/t5I8qPGiqZSE6hVAwZEdZIvP4w==", "dev": true, "requires": { + "@types/hast": "^2.0.0", "comma-separated-tokens": "^1.0.0", "hast-util-parse-selector": "^2.0.0", "property-information": "^5.0.0", @@ -1169,9 +1416,9 @@ } }, "highlight.js": { - "version": "10.1.2", - "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-10.1.2.tgz", - "integrity": "sha512-Q39v/Mn5mfBlMff9r+zzA+gWxRsCRKwEMvYTiisLr/XUiFI/4puWt0Ojdko3R3JCNWGdOWaA5g/Yxqa23kC5AA==", + "version": "10.4.1", + "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-10.4.1.tgz", + "integrity": "sha512-yR5lWvNz7c85OhVAEAeFhVCc/GV4C30Fjzc/rCP0aCWzc1UUOPUk55dK/qdwTZHBvMZo+eZ2jpk62ndX/xMFlg==", "dev": true }, "html-void-elements": { @@ -1203,9 +1450,9 @@ } }, "is-buffer": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.4.tgz", - "integrity": "sha512-Kq1rokWXOPXWuaMAqZiJW4XxsmD9zGx9q4aePabbn3qCRGedtH7Cm+zV8WETitMfu1wdh+Rvd6w5egwSngUX2A==", + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.5.tgz", + "integrity": "sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ==", "dev": true }, "is-decimal": { @@ -1242,10 +1489,25 @@ "integrity": "sha1-vkF32yiajMw8CZDx2ya1si/BVUw=", "dev": true }, + "longest-streak": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/longest-streak/-/longest-streak-2.0.4.tgz", + "integrity": "sha512-vM6rUVCVUJJt33bnmHiZEvr7wPT78ztX7rojL+LW51bHtLh6HTjx84LA5W4+oa6aKEJA7jJu5LR6vQRBpA5DVg==", + "dev": true + }, + "markdown-table": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/markdown-table/-/markdown-table-2.0.0.tgz", + "integrity": "sha512-Ezda85ToJUBhM6WGaG6veasyym+Tbs3cMAw/ZhOPqXiYsr0jgocBV3j3nx+4lk47plLlIqjwuTm/ywVI+zjJ/A==", + "dev": true, + "requires": { + "repeat-string": "^1.0.0" + } + }, "mdast-util-definitions": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/mdast-util-definitions/-/mdast-util-definitions-3.0.1.tgz", - "integrity": "sha512-BAv2iUm/e6IK/b2/t+Fx69EL/AGcq/IG2S+HxHjDJGfLJtd6i9SZUS76aC9cig+IEucsqxKTR0ot3m933R3iuA==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/mdast-util-definitions/-/mdast-util-definitions-4.0.0.tgz", + "integrity": "sha512-k8AJ6aNnUkB7IE+5azR9h81O5EQ/cTDXtWdMq9Kk5KcEW/8ritU5CeLg/9HhOC++nALHBlaogJ5jz0Ybk3kPMQ==", "dev": true, "requires": { "unist-util-visit": "^2.0.0" @@ -1261,6 +1523,14 @@ "mdast-util-to-string": "^1.0.0", "micromark": "~2.10.0", "parse-entities": "^2.0.0" + }, + "dependencies": { + "mdast-util-to-string": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/mdast-util-to-string/-/mdast-util-to-string-1.1.0.tgz", + "integrity": "sha512-jVU0Nr2B9X3MU4tSK7JP1CMkSvOj7X5l/GboG1tKRw52lLF1x2Ju92Ms9tNetCcbfX3hzlM73zYo2NKkWSfF/A==", + "dev": true + } } }, "mdast-util-gfm": { @@ -1298,17 +1568,6 @@ "requires": { "markdown-table": "^2.0.0", "mdast-util-to-markdown": "^0.5.0" - }, - "dependencies": { - "markdown-table": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/markdown-table/-/markdown-table-2.0.0.tgz", - "integrity": "sha512-Ezda85ToJUBhM6WGaG6veasyym+Tbs3cMAw/ZhOPqXiYsr0jgocBV3j3nx+4lk47plLlIqjwuTm/ywVI+zjJ/A==", - "dev": true, - "requires": { - "repeat-string": "^1.0.0" - } - } } }, "mdast-util-gfm-task-list-item": { @@ -1321,14 +1580,14 @@ } }, "mdast-util-to-hast": { - "version": "9.1.1", - "resolved": "https://registry.npmjs.org/mdast-util-to-hast/-/mdast-util-to-hast-9.1.1.tgz", - "integrity": "sha512-vpMWKFKM2mnle+YbNgDXxx95vv0CoLU0v/l3F5oFAG5DV7qwkZVWA206LsAdOnEVyf5vQcLnb3cWJywu7mUxsQ==", + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/mdast-util-to-hast/-/mdast-util-to-hast-10.0.1.tgz", + "integrity": "sha512-BW3LM9SEMnjf4HXXVApZMt8gLQWVNXc3jryK0nJu/rOXPOnlkUjmdkDlmxMirpbU9ILncGFIwLH/ubnWBbcdgA==", "dev": true, "requires": { "@types/mdast": "^3.0.0", - "@types/unist": "^2.0.3", - "mdast-util-definitions": "^3.0.0", + "@types/unist": "^2.0.0", + "mdast-util-definitions": "^4.0.0", "mdurl": "^1.0.0", "unist-builder": "^2.0.0", "unist-util-generated": "^1.0.0", @@ -1337,31 +1596,23 @@ } }, "mdast-util-to-markdown": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/mdast-util-to-markdown/-/mdast-util-to-markdown-0.5.3.tgz", - "integrity": "sha512-sr8q7fQJ1xoCqZSXW6dO/MYu2Md+a4Hfk9uO+XHCfiBhVM0EgWtfAV7BuN+ff6otUeu2xDyt1o7vhZGwOG3+BA==", + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/mdast-util-to-markdown/-/mdast-util-to-markdown-0.5.4.tgz", + "integrity": "sha512-0jQTkbWYx0HdEA/h++7faebJWr5JyBoBeiRf0u3F4F3QtnyyGaWIsOwo749kRb1ttKrLLr+wRtOkfou9yB0p6A==", "dev": true, "requires": { "@types/unist": "^2.0.0", "longest-streak": "^2.0.0", - "mdast-util-to-string": "^1.0.0", + "mdast-util-to-string": "^2.0.0", "parse-entities": "^2.0.0", "repeat-string": "^1.0.0", "zwitch": "^1.0.0" - }, - "dependencies": { - "longest-streak": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/longest-streak/-/longest-streak-2.0.4.tgz", - "integrity": "sha512-vM6rUVCVUJJt33bnmHiZEvr7wPT78ztX7rojL+LW51bHtLh6HTjx84LA5W4+oa6aKEJA7jJu5LR6vQRBpA5DVg==", - "dev": true - } } }, "mdast-util-to-string": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/mdast-util-to-string/-/mdast-util-to-string-1.1.0.tgz", - "integrity": "sha512-jVU0Nr2B9X3MU4tSK7JP1CMkSvOj7X5l/GboG1tKRw52lLF1x2Ju92Ms9tNetCcbfX3hzlM73zYo2NKkWSfF/A==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/mdast-util-to-string/-/mdast-util-to-string-2.0.0.tgz", + "integrity": "sha512-AW4DRS3QbBayY/jJmD8437V1Gombjf8RSOUCMFBuo5iHi58AGEgVCKQ+ezHkZZDpAQS75hcBMpLqjpJTjtUL7w==", "dev": true }, "mdurl": { @@ -1449,12 +1700,12 @@ "dev": true }, "nth-check": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-1.0.2.tgz", - "integrity": "sha512-WeBOdju8SnzPN5vTUJYxYUxLeXpCaVP5i5e0LF8fg7WORF2Wd7wFX/pk0tYZk7s8T+J7VLy0Da6J1+wCT0AtHg==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.0.0.tgz", + "integrity": "sha512-i4sc/Kj8htBrAiH1viZ0TgU8Y5XqCaV/FziYK6TBczxmeKm3AEFWqqF3195yKudrarqy7Zu80Ra5dobFjn9X/Q==", "dev": true, "requires": { - "boolbase": "~1.0.0" + "boolbase": "^1.0.0" } }, "parse-entities": { @@ -1472,27 +1723,27 @@ } }, "parse5": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/parse5/-/parse5-5.1.1.tgz", - "integrity": "sha512-ugq4DFI0Ptb+WWjAdOK16+u/nHfiIrcE+sh8kZMaM0WllQKLI9rOUq6c2b7cwPkXdzfQESqvoqK6ug7U/Yyzug==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz", + "integrity": "sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==", "dev": true }, "property-information": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/property-information/-/property-information-5.5.0.tgz", - "integrity": "sha512-RgEbCx2HLa1chNgvChcx+rrCWD0ctBmGSE0M7lVm1yyv4UbvbrWoXp/BkVLZefzjrRBGW8/Js6uh/BnlHXFyjA==", + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/property-information/-/property-information-5.6.0.tgz", + "integrity": "sha512-YUHSPk+A30YPv+0Qf8i9Mbfe/C0hdPXk1s1jPVToV8pk8BQtpw10ct89Eo7OWkutrwqvT0eicAxlOg3dOAu8JA==", "dev": true, "requires": { "xtend": "^4.0.0" } }, "rehype-raw": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/rehype-raw/-/rehype-raw-4.0.2.tgz", - "integrity": "sha512-xQt94oXfDaO7sK9mJBtsZXkjW/jm6kArCoYN+HqKZ51O19AFHlp3Xa5UfZZ2tJkbpAZzKtgVUYvnconk9IsFuA==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/rehype-raw/-/rehype-raw-5.0.0.tgz", + "integrity": "sha512-q/MOBj4fs1WF/LSCh5uOtNhnm5OESuDcSvq1mDQP4/2t6Q52E9MHeVoLeMy9vOn93BEcgVBm4FCokcK2iXRDvA==", "dev": true, "requires": { - "hast-util-raw": "^5.0.0" + "hast-util-raw": "^6.0.0" } }, "rehype-stringify": { @@ -1515,15 +1766,14 @@ } }, "remark-html": { - "version": "12.0.0", - "resolved": "https://registry.npmjs.org/remark-html/-/remark-html-12.0.0.tgz", - "integrity": "sha512-M104NMHs48+uswChJkCDXCdabzxAinpHikpt6kS3gmGMyIvPZ5kn53tB9shFsL2O4HUJ9DIEsah1SX1Ve5FXHA==", + "version": "13.0.1", + "resolved": "https://registry.npmjs.org/remark-html/-/remark-html-13.0.1.tgz", + "integrity": "sha512-K5KQCXWVz+harnyC+UVM/J9eJWCgjYRqFeZoZf2NgP0iFbuuw/RgMZv3MA34b/OEpGnstl3oiOUtZzD3tJ+CBw==", "dev": true, "requires": { "hast-util-sanitize": "^3.0.0", "hast-util-to-html": "^7.0.0", - "mdast-util-to-hast": "^9.0.0", - "xtend": "^4.0.1" + "mdast-util-to-hast": "^10.0.0" } }, "remark-parse": { @@ -1536,12 +1786,12 @@ } }, "remark-rehype": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/remark-rehype/-/remark-rehype-7.0.0.tgz", - "integrity": "sha512-uqQ/VbaTdxyu/da6npHAso6hA00cMqhA3a59RziQdOLN2KEIkPykAVy52IcmZEVTuauXO0VtpxkyCey4phtHzQ==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/remark-rehype/-/remark-rehype-8.0.0.tgz", + "integrity": "sha512-gVvOH02TMFqXOWoL6iXU7NXMsDJguNkNuMrzfkQeA4V6WCyHQnOKptn+IQBVVPuIH2sMJBwo8hlrmtn1MLTh9w==", "dev": true, "requires": { - "mdast-util-to-hast": "^9.1.0" + "mdast-util-to-hast": "^10.0.0" } }, "repeat-string": { @@ -1550,12 +1800,6 @@ "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", "dev": true }, - "replace-ext": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-1.0.0.tgz", - "integrity": "sha1-3mMSg3P8v3w8z6TeWkgMRaZ5WOs=", - "dev": true - }, "space-separated-tokens": { "version": "1.1.5", "resolved": "https://registry.npmjs.org/space-separated-tokens/-/space-separated-tokens-1.1.5.tgz", @@ -1569,22 +1813,20 @@ "dev": true }, "stringify-entities": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/stringify-entities/-/stringify-entities-3.0.1.tgz", - "integrity": "sha512-Lsk3ISA2++eJYqBMPKcr/8eby1I6L0gP0NlxF8Zja6c05yr/yCYyb2c9PwXjd08Ib3If1vn1rbs1H5ZtVuOfvQ==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/stringify-entities/-/stringify-entities-3.1.0.tgz", + "integrity": "sha512-3FP+jGMmMV/ffZs86MoghGqAoqXAdxLrJP4GUdrDN1aIScYih5tuIO3eF4To5AJZ79KDZ8Fpdy7QJnK8SsL1Vg==", "dev": true, "requires": { "character-entities-html4": "^1.0.0", "character-entities-legacy": "^1.0.0", - "is-alphanumerical": "^1.0.0", - "is-decimal": "^1.0.2", - "is-hexadecimal": "^1.0.0" + "xtend": "^4.0.0" } }, "style-to-object": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/style-to-object/-/style-to-object-0.2.3.tgz", - "integrity": "sha512-1d/k4EY2N7jVLOqf2j04dTc37TPOv/hHxZmvpg8Pdh8UYydxeu/C1W1U4vD8alzf5V2Gt7rLsmkr4dxAlDm9ng==", + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/style-to-object/-/style-to-object-0.3.0.tgz", + "integrity": "sha512-CzFnRRXhzWIdItT3OmF8SQfWyahHhjq3HwcMNCNLn+N7klOOqPjMeG/4JSu77D7ypZdGvSzvkrbyeTMizz2VrA==", "dev": true, "requires": { "inline-style-parser": "0.1.1" @@ -1636,6 +1878,12 @@ "unist-util-visit": "^1.1.0" }, "dependencies": { + "unist-util-is": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-3.0.0.tgz", + "integrity": "sha512-sVZZX3+kspVNmLWBPAB6r+7D9ZgAFPNWm66f7YNb420RlQSbn+n8rG8dGZSkrER7ZIXGQYNm5pqC3v3HopH24A==", + "dev": true + }, "unist-util-visit": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-1.4.1.tgz", @@ -1657,15 +1905,15 @@ } }, "unist-util-generated": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/unist-util-generated/-/unist-util-generated-1.1.5.tgz", - "integrity": "sha512-1TC+NxQa4N9pNdayCYA1EGUOCAO0Le3fVp7Jzns6lnua/mYgwHo0tz5WUAfrdpNch1RZLHc61VZ1SDgrtNXLSw==", + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/unist-util-generated/-/unist-util-generated-1.1.6.tgz", + "integrity": "sha512-cln2Mm1/CZzN5ttGK7vkoGw+RZ8VcUH6BtGbq98DDtRGquAAOXig1mrBQYelOwMXYS8rK+vZDyyojSjp7JX+Lg==", "dev": true }, "unist-util-is": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-3.0.0.tgz", - "integrity": "sha512-sVZZX3+kspVNmLWBPAB6r+7D9ZgAFPNWm66f7YNb420RlQSbn+n8rG8dGZSkrER7ZIXGQYNm5pqC3v3HopH24A==", + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-4.0.4.tgz", + "integrity": "sha512-3dF39j/u423v4BBQrk1AQ2Ve1FxY5W3JKwXxVFzBODQ6WEvccguhgp802qQLKSnxPODE6WuRZtV+ohlUg4meBA==", "dev": true }, "unist-util-position": { @@ -1675,24 +1923,16 @@ "dev": true }, "unist-util-select": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/unist-util-select/-/unist-util-select-3.0.1.tgz", - "integrity": "sha512-VQpTuqZVJlRbosQdnLdTPIIqwZeU70YZ5aMBOqtFNGeeCdYn6ORZt/9RiaVlbl06ocuf58SVMoFa7a13CSGPMA==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/unist-util-select/-/unist-util-select-3.0.3.tgz", + "integrity": "sha512-DnbjRvotPiDGsUaw9knEvprwD6conwGtaArUn5niG9yBQvWQyHMmUJ4p/vXXzLBm+8XyiTr3pcuw9n3TlF6SYg==", "dev": true, "requires": { "css-selector-parser": "^1.0.0", "not": "^0.1.0", - "nth-check": "^1.0.0", + "nth-check": "^2.0.0", "unist-util-is": "^4.0.0", "zwitch": "^1.0.0" - }, - "dependencies": { - "unist-util-is": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-4.0.2.tgz", - "integrity": "sha512-Ofx8uf6haexJwI1gxWMGg6I/dLnF2yE+KibhD3/diOqY2TinLcqHXCV6OI5gFVn3xQqDH+u0M625pfKwIwgBKQ==", - "dev": true - } } }, "unist-util-stringify-position": { @@ -1713,47 +1953,36 @@ "@types/unist": "^2.0.0", "unist-util-is": "^4.0.0", "unist-util-visit-parents": "^3.0.0" - }, - "dependencies": { - "unist-util-is": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-4.0.2.tgz", - "integrity": "sha512-Ofx8uf6haexJwI1gxWMGg6I/dLnF2yE+KibhD3/diOqY2TinLcqHXCV6OI5gFVn3xQqDH+u0M625pfKwIwgBKQ==", - "dev": true - } } }, "unist-util-visit-parents": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-3.1.0.tgz", - "integrity": "sha512-0g4wbluTF93npyPrp/ymd3tCDTMnP0yo2akFD2FIBAYXq/Sga3lwaU1D8OYKbtpioaI6CkDcQ6fsMnmtzt7htw==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-3.1.1.tgz", + "integrity": "sha512-1KROIZWo6bcMrZEwiH2UrXDyalAa0uqzWCxCJj6lPOvTve2WkfgCytoDTPaMnodXh1WrXOq0haVYHj99ynJlsg==", "dev": true, "requires": { "@types/unist": "^2.0.0", "unist-util-is": "^4.0.0" - }, - "dependencies": { - "unist-util-is": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-4.0.2.tgz", - "integrity": "sha512-Ofx8uf6haexJwI1gxWMGg6I/dLnF2yE+KibhD3/diOqY2TinLcqHXCV6OI5gFVn3xQqDH+u0M625pfKwIwgBKQ==", - "dev": true - } } }, "vfile": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/vfile/-/vfile-4.2.0.tgz", - "integrity": "sha512-a/alcwCvtuc8OX92rqqo7PflxiCgXRFjdyoGVuYV+qbgCb0GgZJRvIgCD4+U/Kl1yhaRsaTwksF88xbPyGsgpw==", + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/vfile/-/vfile-4.2.1.tgz", + "integrity": "sha512-O6AE4OskCG5S1emQ/4gl8zK586RqA3srz3nfK/Viy0UPToBc5Trp9BVFb1u0CjsKrAWwnpr4ifM/KBXPWwJbCA==", "dev": true, "requires": { "@types/unist": "^2.0.0", "is-buffer": "^2.0.0", - "replace-ext": "1.0.0", "unist-util-stringify-position": "^2.0.0", "vfile-message": "^2.0.0" } }, + "vfile-location": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/vfile-location/-/vfile-location-3.2.0.tgz", + "integrity": "sha512-aLEIZKv/oxuCDZ8lkJGhuhztf/BW4M+iHdCwglA/eWc+vtuRFJj8EtgceYFX4LRjOhCAAiNHsKGssC6onJ+jbA==", + "dev": true + }, "vfile-message": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/vfile-message/-/vfile-message-2.0.4.tgz", diff --git a/tools/doc/package.json b/tools/doc/package.json index 6610f358fbb17a..dec820f60886ae 100644 --- a/tools/doc/package.json +++ b/tools/doc/package.json @@ -7,18 +7,18 @@ "node": ">=12.10.0" }, "devDependencies": { - "highlight.js": "10.1.2", + "highlight.js": "10.4.1", "js-yaml": "3.14.0", - "rehype-raw": "4.0.2", + "rehype-raw": "5.0.0", "rehype-stringify": "8.0.0", "remark-gfm": "^1.0.0", - "remark-html": "12.0.0", + "remark-html": "13.0.1", "remark-parse": "^9.0.0", - "remark-rehype": "7.0.0", + "remark-rehype": "8.0.0", "to-vfile": "6.1.0", "unified": "9.2.0", "unist-util-find": "^1.0.2", - "unist-util-select": "3.0.1", + "unist-util-select": "3.0.3", "unist-util-visit": "2.0.3" }, "bin": { From 3341b2cb9d9fcc307bb158f902ace6822e46a607 Mon Sep 17 00:00:00 2001 From: Benjamin Gruenbaum Date: Sun, 29 Nov 2020 20:11:32 +0200 Subject: [PATCH 010/108] doc: document ABORT_ERR code We added an `AbortError` with the same code and name as the web's as part of the consensus in https://github.com/nodejs/node/issues/36084 but never actually documented the error in our error codes list. This PR adds the error code. PR-URL: https://github.com/nodejs/node/pull/36319 Reviewed-By: Matteo Collina Reviewed-By: Luigi Pinca Reviewed-By: Daijiro Wachi Reviewed-By: Anna Henningsen --- doc/api/errors.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/doc/api/errors.md b/doc/api/errors.md index 9433e00897877b..d0e0b8794f09ce 100644 --- a/doc/api/errors.md +++ b/doc/api/errors.md @@ -612,6 +612,18 @@ A human-readable string describing the reason for the error. ## Node.js error codes + +### `ABORT_ERR` + +Used when an operation has been aborted (typically using an `AbortController`). + +APIs _not_ using `AbortSignal`s typically do not raise an error with this code. + +This code does not use the regular `ERR_*` convention Node.js errors use in +order to be compatible with the web platform's `AbortError`. + ### `ERR_AMBIGUOUS_ARGUMENT` From 02afe586aa1fef7f40c086b9ee9e78ebb2dcb1c2 Mon Sep 17 00:00:00 2001 From: Daniel Bevenius Date: Thu, 3 Dec 2020 05:58:41 +0100 Subject: [PATCH 011/108] src: use using declarations consistently PR-URL: https://github.com/nodejs/node/pull/36365 Reviewed-By: Colin Ihrig Reviewed-By: Richard Lau Reviewed-By: Rich Trott --- src/node_process_methods.cc | 41 ++++++++++++++++++++++--------------- 1 file changed, 24 insertions(+), 17 deletions(-) diff --git a/src/node_process_methods.cc b/src/node_process_methods.cc index 4a6d767f9b758c..40164fc990ebfb 100644 --- a/src/node_process_methods.cc +++ b/src/node_process_methods.cc @@ -34,12 +34,17 @@ typedef int mode_t; namespace node { +using v8::ApiObject; using v8::Array; using v8::ArrayBuffer; using v8::BackingStore; +using v8::CFunction; +using v8::ConstructorBehavior; using v8::Context; using v8::Float64Array; using v8::FunctionCallbackInfo; +using v8::FunctionTemplate; +using v8::Global; using v8::HeapStatistics; using v8::Integer; using v8::Isolate; @@ -47,6 +52,9 @@ using v8::Local; using v8::NewStringType; using v8::Number; using v8::Object; +using v8::ObjectTemplate; +using v8::SideEffectType; +using v8::Signature; using v8::String; using v8::Uint32; using v8::Value; @@ -406,22 +414,21 @@ static void ReallyExit(const FunctionCallbackInfo& args) { class FastHrtime : public BaseObject { public: static Local New(Environment* env) { - Local ctor = - v8::FunctionTemplate::New(env->isolate()); + Local ctor = FunctionTemplate::New(env->isolate()); ctor->Inherit(BaseObject::GetConstructorTemplate(env)); - Local otmpl = ctor->InstanceTemplate(); + Local otmpl = ctor->InstanceTemplate(); otmpl->SetInternalFieldCount(FastHrtime::kInternalFieldCount); auto create_func = [env](auto fast_func, auto slow_func) { - auto cfunc = v8::CFunction::Make(fast_func); - return v8::FunctionTemplate::New(env->isolate(), - slow_func, - Local(), - Local(), - 0, - v8::ConstructorBehavior::kThrow, - v8::SideEffectType::kHasNoSideEffect, - &cfunc); + auto cfunc = CFunction::Make(fast_func); + return FunctionTemplate::New(env->isolate(), + slow_func, + Local(), + Local(), + 0, + ConstructorBehavior::kThrow, + SideEffectType::kHasNoSideEffect, + &cfunc); }; otmpl->Set(FIXED_ONE_BYTE_STRING(env->isolate(), "hrtime"), @@ -458,8 +465,8 @@ class FastHrtime : public BaseObject { SET_MEMORY_INFO_NAME(FastHrtime) SET_SELF_SIZE(FastHrtime) - static FastHrtime* FromV8ApiObject(v8::ApiObject api_object) { - v8::Object* v8_object = reinterpret_cast(&api_object); + static FastHrtime* FromV8ApiObject(ApiObject api_object) { + Object* v8_object = reinterpret_cast(&api_object); return static_cast( v8_object->GetAlignedPointerFromInternalField(BaseObject::kSlot)); } @@ -481,7 +488,7 @@ class FastHrtime : public BaseObject { fields[2] = t % NANOS_PER_SEC; } - static void FastNumber(v8::ApiObject receiver) { + static void FastNumber(ApiObject receiver) { NumberImpl(FromV8ApiObject(receiver)); } @@ -495,7 +502,7 @@ class FastHrtime : public BaseObject { fields[0] = t; } - static void FastBigInt(v8::ApiObject receiver) { + static void FastBigInt(ApiObject receiver) { BigIntImpl(FromV8ApiObject(receiver)); } @@ -503,7 +510,7 @@ class FastHrtime : public BaseObject { BigIntImpl(FromJSObject(args.Holder())); } - v8::Global array_buffer_; + Global array_buffer_; std::shared_ptr backing_store_; }; From 210390f6fd1505586db4054ee4512d6aae38268a Mon Sep 17 00:00:00 2001 From: Daniel Bevenius Date: Mon, 7 Dec 2020 15:08:46 +0100 Subject: [PATCH 012/108] src: remove identical V macro This commit removes one of the V macros in IsolateData::MemoryInfo as they are identical as far as I can tell. PR-URL: https://github.com/nodejs/node/pull/36427 Reviewed-By: Joyee Cheung Reviewed-By: Colin Ihrig Reviewed-By: James M Snell Reviewed-By: Anna Henningsen Reviewed-By: Richard Lau Reviewed-By: Gireesh Punathil Reviewed-By: Zeyu Yang --- src/env.cc | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/env.cc b/src/env.cc index 9e7ece1e5f1b80..5069e24b6d01a5 100644 --- a/src/env.cc +++ b/src/env.cc @@ -211,10 +211,7 @@ void IsolateData::MemoryInfo(MemoryTracker* tracker) const { #define V(PropertyName, StringValue) \ tracker->TrackField(#PropertyName, PropertyName()); PER_ISOLATE_SYMBOL_PROPERTIES(V) -#undef V -#define V(PropertyName, StringValue) \ - tracker->TrackField(#PropertyName, PropertyName()); PER_ISOLATE_STRING_PROPERTIES(V) #undef V From 2a60e3b9dff036629ee724ca5439edd3d7829df6 Mon Sep 17 00:00:00 2001 From: Daniel Bevenius Date: Mon, 7 Dec 2020 13:42:48 +0100 Subject: [PATCH 013/108] src: fix indentation in memory_tracker-inl.h PR-URL: https://github.com/nodejs/node/pull/36425 Reviewed-By: Colin Ihrig Reviewed-By: Gireesh Punathil Reviewed-By: James M Snell Reviewed-By: Anna Henningsen Reviewed-By: Rich Trott Reviewed-By: Luigi Pinca --- src/memory_tracker-inl.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/memory_tracker-inl.h b/src/memory_tracker-inl.h index 4167064847253e..0ba44f1f16efbb 100644 --- a/src/memory_tracker-inl.h +++ b/src/memory_tracker-inl.h @@ -22,7 +22,7 @@ inline const char* GetNodeName(const char* node_name, const char* edge_name) { class MemoryRetainerNode : public v8::EmbedderGraph::Node { public: inline MemoryRetainerNode(MemoryTracker* tracker, - const MemoryRetainer* retainer) + const MemoryRetainer* retainer) : retainer_(retainer) { CHECK_NOT_NULL(retainer_); v8::HandleScope handle_scope(tracker->isolate()); @@ -34,9 +34,9 @@ class MemoryRetainerNode : public v8::EmbedderGraph::Node { } inline MemoryRetainerNode(MemoryTracker* tracker, - const char* name, - size_t size, - bool is_root_node = false) + const char* name, + size_t size, + bool is_root_node = false) : retainer_(nullptr) { name_ = name; size_ = size; From 31b062d591161cbb44e740c8224ef63322931e6d Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Sun, 6 Dec 2020 08:14:36 -0800 Subject: [PATCH 014/108] test: fix flaky test-repl MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The timeout is insufficient in CI (failures on Raspberry Pi) and I can reproduce locally (on macOS) with `tools/test.py -j 96 --repeat 192 test-repl`. Increase timeout drastically as it only is useful in an error condition. PR-URL: https://github.com/nodejs/node/pull/36415 Reviewed-By: Antoine du Hamel Reviewed-By: Michaël Zasso Reviewed-By: Luigi Pinca Reviewed-By: Gerhard Stöbich Reviewed-By: James M Snell --- test/parallel/test-repl.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/parallel/test-repl.js b/test/parallel/test-repl.js index 663b13ca0fe985..e900f3ce15579a 100644 --- a/test/parallel/test-repl.js +++ b/test/parallel/test-repl.js @@ -926,7 +926,7 @@ function event(ee, expected) { const data = inspect(expected, { compact: false }); const msg = `The REPL did not reply as expected for:\n\n${data}`; reject(new Error(msg)); - }, common.platformTimeout(1000)); + }, common.platformTimeout(9999)); ee.once('data', common.mustCall((...args) => { clearTimeout(timeout); resolve(...args); From 5929b08851825f000000be864941c399068b0300 Mon Sep 17 00:00:00 2001 From: Ruy Adorno Date: Fri, 4 Dec 2020 15:51:55 -0500 Subject: [PATCH 015/108] deps: upgrade npm to 7.1.0 PR-URL: https://github.com/nodejs/node/pull/36395 Reviewed-By: Colin Ihrig Reviewed-By: Rich Trott Reviewed-By: Luigi Pinca Reviewed-By: Myles Borins --- deps/npm/AUTHORS | 1 + deps/npm/CHANGELOG.md | 34 +++ .../npm/docs/content/commands/npm-dist-tag.md | 4 +- deps/npm/docs/content/commands/npm-exec.md | 7 + .../docs/content/commands/npm-set-script.md | 34 +++ .../docs/output/commands/npm-dist-tag.html | 3 +- deps/npm/docs/output/commands/npm-exec.html | 6 + deps/npm/docs/output/commands/npm-ls.html | 2 +- .../docs/output/commands/npm-set-script.html | 184 +++++++++++ deps/npm/docs/output/commands/npm.html | 2 +- deps/npm/lib/exec.js | 48 ++- deps/npm/lib/explore.js | 76 ++--- deps/npm/lib/set-script.js | 55 ++++ deps/npm/lib/uninstall.js | 37 ++- deps/npm/lib/update.js | 5 +- deps/npm/lib/utils/cmd-list.js | 1 + deps/npm/lib/utils/depr-check.js | 22 -- deps/npm/lib/utils/escape-arg.js | 18 -- deps/npm/lib/utils/escape-exec-path.js | 21 -- deps/npm/lib/utils/package-id.js | 15 - .../pick-manifest-from-registry-metadata.js | 26 -- deps/npm/lib/utils/save-stack.js | 16 - deps/npm/lib/utils/unix-format-path.js | 5 - deps/npm/lib/utils/warn-deprecated.js | 28 -- deps/npm/man/man1/npm-access.1 | 2 +- deps/npm/man/man1/npm-adduser.1 | 2 +- deps/npm/man/man1/npm-audit.1 | 2 +- deps/npm/man/man1/npm-bin.1 | 2 +- deps/npm/man/man1/npm-bugs.1 | 2 +- deps/npm/man/man1/npm-cache.1 | 2 +- deps/npm/man/man1/npm-ci.1 | 2 +- deps/npm/man/man1/npm-completion.1 | 2 +- deps/npm/man/man1/npm-config.1 | 2 +- deps/npm/man/man1/npm-dedupe.1 | 2 +- deps/npm/man/man1/npm-deprecate.1 | 2 +- deps/npm/man/man1/npm-dist-tag.1 | 6 +- deps/npm/man/man1/npm-docs.1 | 2 +- deps/npm/man/man1/npm-doctor.1 | 2 +- deps/npm/man/man1/npm-edit.1 | 2 +- deps/npm/man/man1/npm-exec.1 | 9 +- deps/npm/man/man1/npm-explain.1 | 2 +- deps/npm/man/man1/npm-explore.1 | 2 +- deps/npm/man/man1/npm-fund.1 | 2 +- deps/npm/man/man1/npm-help-search.1 | 2 +- deps/npm/man/man1/npm-help.1 | 2 +- deps/npm/man/man1/npm-hook.1 | 2 +- deps/npm/man/man1/npm-init.1 | 2 +- deps/npm/man/man1/npm-install-ci-test.1 | 2 +- deps/npm/man/man1/npm-install-test.1 | 2 +- deps/npm/man/man1/npm-install.1 | 2 +- deps/npm/man/man1/npm-link.1 | 2 +- deps/npm/man/man1/npm-logout.1 | 2 +- deps/npm/man/man1/npm-ls.1 | 4 +- deps/npm/man/man1/npm-org.1 | 2 +- deps/npm/man/man1/npm-outdated.1 | 2 +- deps/npm/man/man1/npm-owner.1 | 2 +- deps/npm/man/man1/npm-pack.1 | 2 +- deps/npm/man/man1/npm-ping.1 | 2 +- deps/npm/man/man1/npm-prefix.1 | 2 +- deps/npm/man/man1/npm-profile.1 | 2 +- deps/npm/man/man1/npm-prune.1 | 2 +- deps/npm/man/man1/npm-publish.1 | 2 +- deps/npm/man/man1/npm-rebuild.1 | 2 +- deps/npm/man/man1/npm-repo.1 | 2 +- deps/npm/man/man1/npm-restart.1 | 2 +- deps/npm/man/man1/npm-root.1 | 2 +- deps/npm/man/man1/npm-run-script.1 | 2 +- deps/npm/man/man1/npm-search.1 | 2 +- deps/npm/man/man1/npm-set-script.1 | 43 +++ deps/npm/man/man1/npm-shrinkwrap.1 | 2 +- deps/npm/man/man1/npm-star.1 | 2 +- deps/npm/man/man1/npm-stars.1 | 2 +- deps/npm/man/man1/npm-start.1 | 2 +- deps/npm/man/man1/npm-stop.1 | 2 +- deps/npm/man/man1/npm-team.1 | 2 +- deps/npm/man/man1/npm-test.1 | 2 +- deps/npm/man/man1/npm-token.1 | 2 +- deps/npm/man/man1/npm-uninstall.1 | 2 +- deps/npm/man/man1/npm-unpublish.1 | 2 +- deps/npm/man/man1/npm-unstar.1 | 2 +- deps/npm/man/man1/npm-update.1 | 2 +- deps/npm/man/man1/npm-version.1 | 2 +- deps/npm/man/man1/npm-view.1 | 2 +- deps/npm/man/man1/npm-whoami.1 | 2 +- deps/npm/man/man1/npm.1 | 4 +- deps/npm/man/man1/npx.1 | 2 +- deps/npm/man/man5/folders.5 | 2 +- deps/npm/man/man5/install.5 | 2 +- deps/npm/man/man5/npmrc.5 | 2 +- deps/npm/man/man5/package-json.5 | 2 +- deps/npm/man/man5/package-lock-json.5 | 2 +- deps/npm/man/man5/package-locks.5 | 2 +- deps/npm/man/man5/shrinkwrap-json.5 | 2 +- deps/npm/man/man7/config.7 | 2 +- deps/npm/man/man7/developers.7 | 2 +- deps/npm/man/man7/disputes.7 | 2 +- deps/npm/man/man7/orgs.7 | 2 +- deps/npm/man/man7/registry.7 | 2 +- deps/npm/man/man7/removal.7 | 2 +- deps/npm/man/man7/scope.7 | 2 +- deps/npm/man/man7/scripts.7 | 2 +- deps/npm/man/man7/semver.7 | 2 +- deps/npm/man/man7/workspaces.7 | 2 +- .../node_modules/@npmcli/arborist/lib/node.js | 10 +- .../@npmcli/arborist/package.json | 2 +- .../node_modules/@npmcli/config/package.json | 7 +- .../node_modules/semver/classes/comparator.js | 8 +- deps/npm/node_modules/semver/classes/range.js | 63 +++- .../npm/node_modules/semver/classes/semver.js | 9 +- .../node_modules/semver/functions/parse.js | 8 +- .../semver/internal/parse-options.js | 11 + deps/npm/node_modules/semver/package.json | 7 +- .../node_modules/semver/ranges/min-version.js | 7 +- .../npm/node_modules/semver/ranges/outside.js | 2 +- deps/npm/node_modules/semver/ranges/subset.js | 15 +- deps/npm/package.json | 14 +- .../test-lib-utils-cmd-list.js-TAP.test.js | 1 + deps/npm/test/coverage-map.js | 3 +- deps/npm/test/lib/exec.js | 74 ++++- deps/npm/test/lib/explore.js | 285 +++++++++++------- deps/npm/test/lib/set-script.js | 154 ++++++++++ deps/npm/test/lib/uninstall.js | 253 ++++++++++++++++ deps/npm/test/lib/update.js | 162 ++++++++++ deps/npm/test/lib/utils/escape-arg.js | 15 - deps/npm/test/lib/utils/escape-exec-path.js | 15 - 125 files changed, 1501 insertions(+), 488 deletions(-) create mode 100644 deps/npm/docs/content/commands/npm-set-script.md create mode 100644 deps/npm/docs/output/commands/npm-set-script.html create mode 100644 deps/npm/lib/set-script.js delete mode 100644 deps/npm/lib/utils/depr-check.js delete mode 100644 deps/npm/lib/utils/escape-arg.js delete mode 100644 deps/npm/lib/utils/escape-exec-path.js delete mode 100644 deps/npm/lib/utils/package-id.js delete mode 100644 deps/npm/lib/utils/pick-manifest-from-registry-metadata.js delete mode 100644 deps/npm/lib/utils/save-stack.js delete mode 100644 deps/npm/lib/utils/unix-format-path.js delete mode 100644 deps/npm/lib/utils/warn-deprecated.js create mode 100644 deps/npm/man/man1/npm-set-script.1 create mode 100644 deps/npm/node_modules/semver/internal/parse-options.js create mode 100644 deps/npm/test/lib/set-script.js create mode 100644 deps/npm/test/lib/uninstall.js create mode 100644 deps/npm/test/lib/update.js delete mode 100644 deps/npm/test/lib/utils/escape-arg.js delete mode 100644 deps/npm/test/lib/utils/escape-exec-path.js diff --git a/deps/npm/AUTHORS b/deps/npm/AUTHORS index 33647f09277cf2..008d9099561199 100644 --- a/deps/npm/AUTHORS +++ b/deps/npm/AUTHORS @@ -738,3 +738,4 @@ Hollow Man kai zhu Alex Woollam Daniel Fischer +Yash-Singh1 diff --git a/deps/npm/CHANGELOG.md b/deps/npm/CHANGELOG.md index a3a9984d24462f..cb9f013bc32625 100644 --- a/deps/npm/CHANGELOG.md +++ b/deps/npm/CHANGELOG.md @@ -1,3 +1,37 @@ +## 7.1.0 (2020-12-04) + +### FEATURES + +* [`6b1575110`](https://github.com/npm/cli/commit/6b15751106beb99234aa4bf39ae05cf40076d42a) + [#2237](https://github.com/npm/cli/pull/2237) + add `npm set-script` command + ([@Yash-Singh1](https://github.com/Yash-Singh1)) +* [`15d7333f8`](https://github.com/npm/cli/commit/15d7333f832e3d68ae16895569f27a27ef86573e) + add interactive `npm exec` + ([@isaacs](https://github.com/isaacs)) + +### BUG FIXES + +* [`2a1192e4b`](https://github.com/npm/cli/commit/2a1192e4b03acdf6e6e24e58de68f736ab9bb35f) + [#2202](https://github.com/npm/cli/pull/2202) + Do not run interactive `npm exec` in CI when a TTY + ([@isaacs](https://github.com/isaacs)) + +### DOCUMENTATION + +* [`0599cc37d`](https://github.com/npm/cli/commit/0599cc37df453bf79d47490eb4fca3cd63f67f80) + [#2271](https://github.com/npm/cli/pull/2271) + don't wrap code block + ([@ethomson](https://github.com/ethomson)) + +### DEPENDENCIES + +* [`def85c726`](https://github.com/npm/cli/commit/def85c72640ffe2d27977c56b7aa06c6f6346ca9) + `@npmcli/arborist@1.0.14` + * fixes running `npm exec` from file system root folder +* [`4c94673ab`](https://github.com/npm/cli/commit/4c94673ab5399d27e5a48e52f7a65b038a456265) + `semver@7.3.4` + ## 7.0.15 (2020-11-27) ### DEPENDENCIES diff --git a/deps/npm/docs/content/commands/npm-dist-tag.md b/deps/npm/docs/content/commands/npm-dist-tag.md index 65ce22a179fc7f..585da16ad2d2c4 100644 --- a/deps/npm/docs/content/commands/npm-dist-tag.md +++ b/deps/npm/docs/content/commands/npm-dist-tag.md @@ -78,8 +78,8 @@ This command used to be known as `npm tag`, which only created new tags, and so had a different syntax. Tags must share a namespace with version numbers, because they are -specified in the same slot: `npm install @` vs `npm install -@`. +specified in the same slot: `npm install @` vs +`npm install @`. Tags that can be interpreted as valid semver ranges will be rejected. For example, `v1.4` cannot be used as a tag, because it is interpreted by diff --git a/deps/npm/docs/content/commands/npm-exec.md b/deps/npm/docs/content/commands/npm-exec.md index c9de9933be3a55..3ae30fa0cba9a7 100644 --- a/deps/npm/docs/content/commands/npm-exec.md +++ b/deps/npm/docs/content/commands/npm-exec.md @@ -16,9 +16,11 @@ npx [@] [args...] npx -p [@] [args...] npx -c ' [args...]' npx -p [@] -c ' [args...]' +Run without --call or positional args to open interactive subshell alias: npm x, npx +common options: --package= (may be specified multiple times) -p is a shorthand for --package only when using npx executable -c --call= (may not be mixed with positional arguments) @@ -30,6 +32,11 @@ This command allows you to run an arbitrary command from an npm package (either one installed locally, or fetched remotely), in a similar context as running it via `npm run`. +Run without positional arguments or `--call`, this allows you to +interactively run commands in the same sort of shell environment that +`package.json` scripts are run. Interactive mode is not supported in CI +environments when standard input is a TTY, to prevent hangs. + Whatever packages are specified by the `--package` option will be provided in the `PATH` of the executed command, along with any locally installed package executables. The `--package` option may be diff --git a/deps/npm/docs/content/commands/npm-set-script.md b/deps/npm/docs/content/commands/npm-set-script.md new file mode 100644 index 00000000000000..7bc8f75d236537 --- /dev/null +++ b/deps/npm/docs/content/commands/npm-set-script.md @@ -0,0 +1,34 @@ +--- +title: npm-set-script +section: 1 +description: Set tasks in the scripts section of package.json +--- + +### Synopsis +An npm command that lets you create a task in the scripts section of the package.json. + +```bash +npm set-script [