From 10137cd9cc2f16b93160947c8b4f448a7a100109 Mon Sep 17 00:00:00 2001 From: matthewp Date: Mon, 9 Jan 2023 22:01:33 +0000 Subject: [PATCH] [ci] format --- packages/integrations/lit/server-shim.js | 2 +- packages/integrations/node/src/response-iterator.ts | 2 +- packages/webapi/run/build.js | 10 ++-------- packages/webapi/src/ponyfill.ts | 4 ++-- 4 files changed, 6 insertions(+), 12 deletions(-) diff --git a/packages/integrations/lit/server-shim.js b/packages/integrations/lit/server-shim.js index 873d3cd82..3f4a8df4f 100644 --- a/packages/integrations/lit/server-shim.js +++ b/packages/integrations/lit/server-shim.js @@ -1,6 +1,6 @@ import { installWindowOnGlobal } from '@lit-labs/ssr/lib/dom-shim.js'; -if(typeof fetch === 'function') { +if (typeof fetch === 'function') { const _fetch = fetch; installWindowOnGlobal(); globalThis.fetch = window.fetch = _fetch; diff --git a/packages/integrations/node/src/response-iterator.ts b/packages/integrations/node/src/response-iterator.ts index becd8be1b..890902e1e 100644 --- a/packages/integrations/node/src/response-iterator.ts +++ b/packages/integrations/node/src/response-iterator.ts @@ -4,8 +4,8 @@ * - https://github.com/apollographql/apollo-client/blob/main/src/utilities/common/responseIterator.ts */ -import type { Response as NodeResponse } from 'undici'; import { Readable as NodeReadableStream } from 'stream'; +import type { Response as NodeResponse } from 'undici'; interface NodeStreamIterator { next(): Promise>; diff --git a/packages/webapi/run/build.js b/packages/webapi/run/build.js index 154d6ffbd..2ec835644 100644 --- a/packages/webapi/run/build.js +++ b/packages/webapi/run/build.js @@ -75,16 +75,10 @@ const plugins = [ HTMLUnknownElement: ['./Element', 'HTMLUnknownElement'], MediaQueryList: ['./MediaQueryList', 'MediaQueryList'], Node: ['./Node', 'Node'], - ReadableStream: [ - 'node:stream/web', - 'ReadableStream', - ], + ReadableStream: ['node:stream/web', 'ReadableStream'], ShadowRoot: ['./Node', 'ShadowRoot'], Window: ['./Window', 'Window'], - 'globalThis.ReadableStream': [ - 'node:stream/web', - 'ReadableStream', - ], + 'globalThis.ReadableStream': ['node:stream/web', 'ReadableStream'], }), { async load(id) { diff --git a/packages/webapi/src/ponyfill.ts b/packages/webapi/src/ponyfill.ts index a1088bdb4..efaad8cd3 100644 --- a/packages/webapi/src/ponyfill.ts +++ b/packages/webapi/src/ponyfill.ts @@ -7,8 +7,6 @@ import { import { Event, EventTarget } from 'event-target-shim' import { Blob, File } from 'fetch-blob/from.js' import { FormData } from 'formdata-polyfill/esm.min.js' -import * as undici from 'undici' -import { URLPattern } from 'urlpattern-polyfill' import { ByteLengthQueuingStrategy, CountQueuingStrategy, @@ -23,6 +21,8 @@ import { WritableStreamDefaultController, WritableStreamDefaultWriter, } from 'node:stream/web' +import * as undici from 'undici' +import { URLPattern } from 'urlpattern-polyfill' import { cancelAnimationFrame, requestAnimationFrame,