From c40eec3f3bbbe3cf0dad97245845c1c214724c7a Mon Sep 17 00:00:00 2001 From: Antoine du Hamel Date: Sat, 18 Feb 2023 18:55:52 +0100 Subject: [PATCH] stream: add trailing commas in webstream source files PR-URL: https://github.com/nodejs/node/pull/46685 Reviewed-By: Moshe Atlow Reviewed-By: Darshan Sen --- lib/.eslintrc.yaml | 1 + lib/internal/webstreams/readablestream.js | 10 +++++----- lib/internal/webstreams/transfer.js | 4 ++-- lib/internal/webstreams/transformstream.js | 4 ++-- lib/internal/webstreams/util.js | 4 ++-- lib/internal/webstreams/writablestream.js | 4 ++-- 6 files changed, 14 insertions(+), 13 deletions(-) diff --git a/lib/.eslintrc.yaml b/lib/.eslintrc.yaml index 284ebfd0d8166f..2a5a3a54a54184 100644 --- a/lib/.eslintrc.yaml +++ b/lib/.eslintrc.yaml @@ -288,6 +288,7 @@ overrides: - ./internal/vm.js - ./internal/watch_mode/*.js - ./internal/webidl.js + - ./internal/webstreams/*.js - ./module.js - ./path/*.js - ./process.js diff --git a/lib/internal/webstreams/readablestream.js b/lib/internal/webstreams/readablestream.js index 97b49a9c9484a0..1b2521e2c16dfc 100644 --- a/lib/internal/webstreams/readablestream.js +++ b/lib/internal/webstreams/readablestream.js @@ -504,7 +504,7 @@ class ReadableStream { done = true; readableStreamReaderGenericRelease(reader); promise.reject(error); - } + }, }); return promise.promise; } @@ -567,7 +567,7 @@ class ReadableStream { returnSteps(error); }, - [SymbolAsyncIterator]() { return this; } + [SymbolAsyncIterator]() { return this; }, }, AsyncIterator); } @@ -605,7 +605,7 @@ class ReadableStream { return { data: { port: this[kState].transfer.port2 }, deserializeInfo: - 'internal/webstreams/readablestream:TransferredReadableStream' + 'internal/webstreams/readablestream:TransferredReadableStream', }; } @@ -1225,7 +1225,7 @@ function createTeeReadableStream(start, pull, cancel) { ObjectCreate(null, { start: { __proto__: null, value: start }, pull: { __proto__: null, value: pull }, - cancel: { __proto__: null, value: cancel } + cancel: { __proto__: null, value: cancel }, }), 1, () => 1); @@ -1917,7 +1917,7 @@ function readableStreamError(stream, error) { setPromiseHandled(stream[kIsClosedPromise].promise); const { - reader + reader, } = stream[kState]; if (reader === undefined) diff --git a/lib/internal/webstreams/transfer.js b/lib/internal/webstreams/transfer.js index 4467d90bb5a90f..367daf4bc17339 100644 --- a/lib/internal/webstreams/transfer.js +++ b/lib/internal/webstreams/transfer.js @@ -66,7 +66,7 @@ class CloneableDOMException extends DOMException { code: this.code, }, deserializeInfo: - 'internal/webstreams/transfer:InternalCloneableDOMException' + 'internal/webstreams/transfer:InternalCloneableDOMException', }; } @@ -183,7 +183,7 @@ class CrossRealmTransformWritableSink { assert(typeof data === 'object'); const { type, - value + value, } = { ...data }; assert(typeof type === 'string'); switch (type) { diff --git a/lib/internal/webstreams/transformstream.js b/lib/internal/webstreams/transformstream.js index 411099552941b0..3a7fbebc042a22 100644 --- a/lib/internal/webstreams/transformstream.js +++ b/lib/internal/webstreams/transformstream.js @@ -226,7 +226,7 @@ class TransformStream { writable, }, deserializeInfo: - 'internal/webstreams/transformstream:TransferredTransformStream' + 'internal/webstreams/transformstream:TransferredTransformStream', }; } @@ -398,7 +398,7 @@ function initializeTransformStream( promise: undefined, resolve: undefined, reject: undefined, - } + }, }; transformStreamSetBackpressure(stream, true); diff --git a/lib/internal/webstreams/util.js b/lib/internal/webstreams/util.js index 73b9ddf141941e..0c1ad72eae81bf 100644 --- a/lib/internal/webstreams/util.js +++ b/lib/internal/webstreams/util.js @@ -26,7 +26,7 @@ const { const { copyArrayBuffer, - detachArrayBuffer + detachArrayBuffer, } = internalBinding('buffer'); const { @@ -91,7 +91,7 @@ function customInspect(depth, options, name, data) { const opts = { ...options, - depth: options.depth == null ? null : options.depth - 1 + depth: options.depth == null ? null : options.depth - 1, }; return `${name} ${inspect(data, opts)}`; diff --git a/lib/internal/webstreams/writablestream.js b/lib/internal/webstreams/writablestream.js index 04a4db15300682..e04ff381c51cd4 100644 --- a/lib/internal/webstreams/writablestream.js +++ b/lib/internal/webstreams/writablestream.js @@ -299,7 +299,7 @@ class WritableStream { return { data: { port: this[kState].transfer.port2 }, deserializeInfo: - 'internal/webstreams/writablestream:TransferredWritableStream' + 'internal/webstreams/writablestream:TransferredWritableStream', }; } @@ -398,7 +398,7 @@ class WritableStreamDefaultWriter { promise: undefined, resolve: undefined, reject: undefined, - } + }, }; setupWritableStreamDefaultWriter(this, stream); }