From 7756438c81d0e76339f4ac814ee2b1f250deb7ef 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 53942a3f30cb4a..eb9a81077ff9fb 100644 --- a/lib/.eslintrc.yaml +++ b/lib/.eslintrc.yaml @@ -300,6 +300,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 5f4370d48e40bd..6c2445b61d5fa9 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 91f487b98f19f3..abc064170926dd 100644 --- a/lib/internal/webstreams/util.js +++ b/lib/internal/webstreams/util.js @@ -25,7 +25,7 @@ const { const { copyArrayBuffer, - detachArrayBuffer + detachArrayBuffer, } = internalBinding('buffer'); const { @@ -81,7 +81,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); }