From d7d9c842d69c1a70e05b42a1cdf8b4983e203ef0 Mon Sep 17 00:00:00 2001 From: Daniel La Rocque Date: Mon, 22 Jul 2024 10:38:03 -0400 Subject: [PATCH 1/7] Migrate from the Node to the Web ReadableStream --- .changeset/itchy-boxes-try.md | 5 +++ common/api-review/storage.api.md | 3 +- docs-devsite/storage.md | 4 +- packages/storage/src/api.browser.ts | 3 +- packages/storage/src/api.node.ts | 3 +- .../storage/src/implementation/connection.ts | 7 +--- .../src/platform/browser/connection.ts | 3 +- packages/storage/src/platform/connection.ts | 3 +- .../storage/src/platform/node/connection.ts | 17 +++++---- packages/storage/src/reference.ts | 33 ++++++++-------- packages/storage/test/node/stream.test.ts | 38 +++++++++++++------ 11 files changed, 71 insertions(+), 48 deletions(-) create mode 100644 .changeset/itchy-boxes-try.md diff --git a/.changeset/itchy-boxes-try.md b/.changeset/itchy-boxes-try.md new file mode 100644 index 00000000000..0232c323441 --- /dev/null +++ b/.changeset/itchy-boxes-try.md @@ -0,0 +1,5 @@ +--- +'@firebase/storage': minor +--- + +Migrate from the Node to Web ReadableStream interface diff --git a/common/api-review/storage.api.md b/common/api-review/storage.api.md index 2ed774c8bb0..17769a939de 100644 --- a/common/api-review/storage.api.md +++ b/common/api-review/storage.api.md @@ -13,6 +13,7 @@ import { FirebaseError } from '@firebase/util'; import { _FirebaseService } from '@firebase/app'; import { NextFn } from '@firebase/util'; import { Provider } from '@firebase/component'; +import { ReadableStream as ReadableStream_2 } from 'stream/web'; import { Subscribe } from '@firebase/util'; import { Unsubscribe } from '@firebase/util'; @@ -132,7 +133,7 @@ export function getMetadata(ref: StorageReference): Promise; export function getStorage(app?: FirebaseApp, bucketUrl?: string): FirebaseStorage; // @public -export function getStream(ref: StorageReference, maxDownloadSizeBytes?: number): NodeJS.ReadableStream; +export function getStream(ref: StorageReference, maxDownloadSizeBytes?: number): ReadableStream_2; // @internal (undocumented) export function _invalidArgument(message: string): StorageError; diff --git a/docs-devsite/storage.md b/docs-devsite/storage.md index e929246b5b9..76d6f6887d3 100644 --- a/docs-devsite/storage.md +++ b/docs-devsite/storage.md @@ -279,7 +279,7 @@ This API is only available in Node. Signature: ```typescript -export declare function getStream(ref: StorageReference, maxDownloadSizeBytes?: number): NodeJS.ReadableStream; +export declare function getStream(ref: StorageReference, maxDownloadSizeBytes?: number): ReadableStream; ``` #### Parameters @@ -291,7 +291,7 @@ export declare function getStream(ref: StorageReference, maxDownloadSizeBytes?: Returns: -NodeJS.ReadableStream +ReadableStream A stream with the object's data as bytes diff --git a/packages/storage/src/api.browser.ts b/packages/storage/src/api.browser.ts index 0ccf31bbdfb..eb1f999712c 100644 --- a/packages/storage/src/api.browser.ts +++ b/packages/storage/src/api.browser.ts @@ -18,6 +18,7 @@ import { StorageReference } from './public-types'; import { Reference, getBlobInternal } from './reference'; import { getModularInstance } from '@firebase/util'; +import { ReadableStream } from 'stream/web'; /** * Downloads the data at the object's location. Returns an error if the object @@ -58,6 +59,6 @@ export function getBlob( export function getStream( ref: StorageReference, maxDownloadSizeBytes?: number -): NodeJS.ReadableStream { +): ReadableStream { throw new Error('getStream() is only supported by NodeJS builds'); } diff --git a/packages/storage/src/api.node.ts b/packages/storage/src/api.node.ts index 790147d26fa..06a04c1ffdc 100644 --- a/packages/storage/src/api.node.ts +++ b/packages/storage/src/api.node.ts @@ -18,6 +18,7 @@ import { StorageReference } from './public-types'; import { Reference, getStreamInternal } from './reference'; import { getModularInstance } from '@firebase/util'; +import { ReadableStream } from 'stream/web'; /** * Downloads the data at the object's location. Returns an error if the object @@ -58,7 +59,7 @@ export function getBlob( export function getStream( ref: StorageReference, maxDownloadSizeBytes?: number -): NodeJS.ReadableStream { +): ReadableStream { ref = getModularInstance(ref); return getStreamInternal(ref as Reference, maxDownloadSizeBytes); } diff --git a/packages/storage/src/implementation/connection.ts b/packages/storage/src/implementation/connection.ts index 19de2ec941d..7f15d35d5f3 100644 --- a/packages/storage/src/implementation/connection.ts +++ b/packages/storage/src/implementation/connection.ts @@ -14,16 +14,13 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +import { ReadableStream } from 'stream/web'; /** Network headers */ export type Headers = Record; /** Response type exposed by the networking APIs. */ -export type ConnectionType = - | string - | ArrayBuffer - | Blob - | NodeJS.ReadableStream; +export type ConnectionType = string | ArrayBuffer | Blob | ReadableStream; /** * A lightweight wrapper around XMLHttpRequest with a diff --git a/packages/storage/src/platform/browser/connection.ts b/packages/storage/src/platform/browser/connection.ts index 442962dafe8..e29ff51a1c9 100644 --- a/packages/storage/src/platform/browser/connection.ts +++ b/packages/storage/src/platform/browser/connection.ts @@ -22,6 +22,7 @@ import { Headers } from '../../implementation/connection'; import { internalError } from '../../implementation/error'; +import { ReadableStream } from 'stream/web'; /** An override for the text-based Connection. Used in tests. */ let textFactoryOverride: (() => Connection) | null = null; @@ -171,7 +172,7 @@ export function newBlobConnection(): Connection { return new XhrBlobConnection(); } -export function newStreamConnection(): Connection { +export function newStreamConnection(): Connection { throw new Error('Streams are only supported on Node'); } diff --git a/packages/storage/src/platform/connection.ts b/packages/storage/src/platform/connection.ts index a647c19cacf..86e8219a7b4 100644 --- a/packages/storage/src/platform/connection.ts +++ b/packages/storage/src/platform/connection.ts @@ -22,6 +22,7 @@ import { newStreamConnection as nodeNewStreamConnection, injectTestConnection as nodeInjectTestConnection } from './node/connection'; +import { ReadableStream } from 'stream/web'; export function injectTestConnection( factory: (() => Connection) | null @@ -45,7 +46,7 @@ export function newBlobConnection(): Connection { return nodeNewBlobConnection(); } -export function newStreamConnection(): Connection { +export function newStreamConnection(): Connection { // This file is only used in Node.js tests using ts-node. return nodeNewStreamConnection(); } diff --git a/packages/storage/src/platform/node/connection.ts b/packages/storage/src/platform/node/connection.ts index f51fa6fdb5b..84415fedee2 100644 --- a/packages/storage/src/platform/node/connection.ts +++ b/packages/storage/src/platform/node/connection.ts @@ -22,6 +22,7 @@ import { } from '../../implementation/connection'; import { internalError } from '../../implementation/error'; import { fetch as undiciFetch, Headers as undiciHeaders } from 'undici'; +import { ReadableStream } from 'stream/web'; /** An override for the text-based Connection. Used in tests. */ let textFactoryOverride: (() => Connection) | null = null; @@ -50,7 +51,7 @@ abstract class FetchConnection async send( url: string, method: string, - body?: ArrayBufferView | Blob | string, + body?: NodeJS.ArrayBufferView | Blob | string, headers?: Record ): Promise { if (this.sent_) { @@ -62,7 +63,7 @@ abstract class FetchConnection const response = await this.fetch_(url, { method, headers: headers || {}, - body: body as ArrayBufferView | string + body: body as NodeJS.ArrayBufferView | string }); this.headers_ = response.headers; this.statusCode_ = response.status; @@ -146,13 +147,13 @@ export function newBytesConnection(): Connection { return new FetchBytesConnection(); } -export class FetchStreamConnection extends FetchConnection { - private stream_: NodeJS.ReadableStream | null = null; +export class FetchStreamConnection extends FetchConnection { + private stream_: ReadableStream | null = null; async send( url: string, method: string, - body?: ArrayBufferView | Blob | string, + body?: NodeJS.ArrayBufferView | Blob | string, headers?: Record ): Promise { if (this.sent_) { @@ -164,7 +165,7 @@ export class FetchStreamConnection extends FetchConnection { +export function newStreamConnection(): Connection { return new FetchStreamConnection(); } diff --git a/packages/storage/src/reference.ts b/packages/storage/src/reference.ts index 46249da8146..990496d66fc 100644 --- a/packages/storage/src/reference.ts +++ b/packages/storage/src/reference.ts @@ -19,7 +19,7 @@ * @fileoverview Defines the Firebase StorageReference class. */ -import { PassThrough, Transform, TransformOptions } from 'stream'; +import { ReadableStream, TransformStream, Transformer } from 'stream/web'; import { FbsBlob } from './implementation/blob'; import { Location } from './implementation/location'; @@ -48,6 +48,7 @@ import { newStreamConnection, newTextConnection } from './platform/connection'; +import { RequestInfo } from './implementation/requestinfo'; /** * Provides methods to interact with a bucket in the Firebase Storage service. @@ -203,42 +204,42 @@ export function getBlobInternal( export function getStreamInternal( ref: Reference, maxDownloadSizeBytes?: number -): NodeJS.ReadableStream { +): ReadableStream { ref._throwIfRoot('getStream'); - const requestInfo = getBytes( + const requestInfo: RequestInfo = getBytes( ref.storage, ref._location, maxDownloadSizeBytes ); - /** A transformer that passes through the first n bytes. */ - const newMaxSizeTransform: (n: number) => TransformOptions = n => { + // Transforms the stream so that only `maxDownloadSizeBytes` bytes are piped to the result + const newMaxSizeTransform = (n: number): Transformer => { let missingBytes = n; return { - transform(chunk, encoding, callback) { + transform(chunk, controller: TransformStreamDefaultController) { // GCS may not honor the Range header for small files if (chunk.length < missingBytes) { - this.push(chunk); + controller.enqueue(chunk); missingBytes -= chunk.length; } else { - this.push(chunk.slice(0, missingBytes)); - this.emit('end'); + controller.enqueue(chunk.slice(0, missingBytes)); + controller.terminate(); } - callback(); } - } as TransformOptions; + }; }; const result = maxDownloadSizeBytes !== undefined - ? new Transform(newMaxSizeTransform(maxDownloadSizeBytes)) - : new PassThrough(); + ? new TransformStream(newMaxSizeTransform(maxDownloadSizeBytes)) + : new TransformStream(); // The default transformer forwards all chunks to its readable side ref.storage .makeRequestWithTokens(requestInfo, newStreamConnection) - .then(stream => (stream as NodeJS.ReadableStream).pipe(result)) - .catch(e => result.destroy(e)); - return result; + .then(readableStream => readableStream.pipeThrough(result)) + .catch(err => result.writable.getWriter().abort(err)); + + return result.readable; } /** diff --git a/packages/storage/test/node/stream.test.ts b/packages/storage/test/node/stream.test.ts index 65b2fee1498..79d02724ebd 100644 --- a/packages/storage/test/node/stream.test.ts +++ b/packages/storage/test/node/stream.test.ts @@ -20,13 +20,29 @@ import { createApp, createStorage } from '../integration/integration.test'; import { FirebaseApp, deleteApp } from '@firebase/app'; import { getStream, ref, uploadBytes } from '../../src/index.node'; import * as types from '../../src/public-types'; +import { ReadableStream } from 'stream/web'; -async function readData(reader: NodeJS.ReadableStream): Promise { - return new Promise((resolve, reject) => { - const data: number[] = []; - reader.on('error', e => reject(e)); - reader.on('data', chunk => data.push(...Array.from(chunk as Buffer))); - reader.on('end', () => resolve(data)); +// See: https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream/getReader +async function readData(readableStream: ReadableStream): Promise { + return new Promise((resolve, reject) => { + const reader: ReadableStreamDefaultReader = readableStream.getReader(); + const result: any[] = []; + reader + .read() + .then(function processBytes({ done, value }): any { + if (done) { + resolve(new Uint8Array(result)); + return; + } + + result.push(...value); + return reader.read().then(processBytes); + }) + .catch(err => { + console.error(err); + reject(err); + return; + }); }); } @@ -46,19 +62,17 @@ describe('Firebase Storage > getStream', () => { it('can get stream', async () => { const reference = ref(storage, 'public/exp-bytes'); await uploadBytes(reference, new Uint8Array([0, 1, 3, 128, 255])); - const stream = await getStream(reference); + const stream = getStream(reference); const data = await readData(stream); - expect(new Uint8Array(data)).to.deep.equal( - new Uint8Array([0, 1, 3, 128, 255]) - ); + expect(data).to.deep.equal(new Uint8Array([0, 1, 3, 128, 255])); }); it('can get first n bytes of stream', async () => { const reference = ref(storage, 'public/exp-bytes'); await uploadBytes(reference, new Uint8Array([0, 1, 3])); - const stream = await getStream(reference, 2); + const stream = getStream(reference, 2); const data = await readData(stream); - expect(new Uint8Array(data)).to.deep.equal(new Uint8Array([0, 1])); + expect(data).to.deep.equal(new Uint8Array([0, 1])); }); it('getStream() throws for missing file', async () => { From 4e16c41ec6cc49bad47e53195baa727edf2f009c Mon Sep 17 00:00:00 2001 From: Daniel La Rocque Date: Tue, 6 Aug 2024 17:22:47 -0400 Subject: [PATCH 2/7] Update changeset to bump firebase package --- .changeset/itchy-boxes-try.md | 1 + 1 file changed, 1 insertion(+) diff --git a/.changeset/itchy-boxes-try.md b/.changeset/itchy-boxes-try.md index 0232c323441..3a5453fbb1a 100644 --- a/.changeset/itchy-boxes-try.md +++ b/.changeset/itchy-boxes-try.md @@ -1,4 +1,5 @@ --- +'firebase': minor '@firebase/storage': minor --- From 01854cc61363d64c38298922ad87dc9fa10ad31a Mon Sep 17 00:00:00 2001 From: Daniel La Rocque Date: Fri, 9 Aug 2024 09:48:34 -0400 Subject: [PATCH 3/7] Call `abort()` on `WriteableStream` instead of `WriteableStreamDefaultReader` --- packages/storage/src/reference.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/storage/src/reference.ts b/packages/storage/src/reference.ts index 990496d66fc..179b5782614 100644 --- a/packages/storage/src/reference.ts +++ b/packages/storage/src/reference.ts @@ -237,7 +237,7 @@ export function getStreamInternal( ref.storage .makeRequestWithTokens(requestInfo, newStreamConnection) .then(readableStream => readableStream.pipeThrough(result)) - .catch(err => result.writable.getWriter().abort(err)); + .catch(err => result.writable.abort(err)); return result.readable; } From abd89155eccfdbeeda1eaf593b85f4a3dc3ad275 Mon Sep 17 00:00:00 2001 From: Daniel La Rocque Date: Tue, 13 Aug 2024 12:20:26 -0400 Subject: [PATCH 4/7] Cast ReadableStream to ReadableStream --- packages/storage/src/api.browser.ts | 1 - packages/storage/src/api.node.ts | 1 - packages/storage/src/implementation/connection.ts | 4 +--- packages/storage/src/platform/browser/connection.ts | 1 - packages/storage/src/platform/connection.ts | 3 +-- packages/storage/src/platform/node/connection.ts | 9 ++++----- packages/storage/src/reference.ts | 2 +- packages/storage/test/node/stream.test.ts | 1 - 8 files changed, 7 insertions(+), 15 deletions(-) diff --git a/packages/storage/src/api.browser.ts b/packages/storage/src/api.browser.ts index eb1f999712c..3cf653360f5 100644 --- a/packages/storage/src/api.browser.ts +++ b/packages/storage/src/api.browser.ts @@ -18,7 +18,6 @@ import { StorageReference } from './public-types'; import { Reference, getBlobInternal } from './reference'; import { getModularInstance } from '@firebase/util'; -import { ReadableStream } from 'stream/web'; /** * Downloads the data at the object's location. Returns an error if the object diff --git a/packages/storage/src/api.node.ts b/packages/storage/src/api.node.ts index 06a04c1ffdc..beeabc7d93f 100644 --- a/packages/storage/src/api.node.ts +++ b/packages/storage/src/api.node.ts @@ -18,7 +18,6 @@ import { StorageReference } from './public-types'; import { Reference, getStreamInternal } from './reference'; import { getModularInstance } from '@firebase/util'; -import { ReadableStream } from 'stream/web'; /** * Downloads the data at the object's location. Returns an error if the object diff --git a/packages/storage/src/implementation/connection.ts b/packages/storage/src/implementation/connection.ts index 7f15d35d5f3..f9cdb3ac238 100644 --- a/packages/storage/src/implementation/connection.ts +++ b/packages/storage/src/implementation/connection.ts @@ -14,13 +14,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import { ReadableStream } from 'stream/web'; - /** Network headers */ export type Headers = Record; /** Response type exposed by the networking APIs. */ -export type ConnectionType = string | ArrayBuffer | Blob | ReadableStream; +export type ConnectionType = string | ArrayBuffer | Blob | ReadableStream; /** * A lightweight wrapper around XMLHttpRequest with a diff --git a/packages/storage/src/platform/browser/connection.ts b/packages/storage/src/platform/browser/connection.ts index e29ff51a1c9..fdd9b496242 100644 --- a/packages/storage/src/platform/browser/connection.ts +++ b/packages/storage/src/platform/browser/connection.ts @@ -22,7 +22,6 @@ import { Headers } from '../../implementation/connection'; import { internalError } from '../../implementation/error'; -import { ReadableStream } from 'stream/web'; /** An override for the text-based Connection. Used in tests. */ let textFactoryOverride: (() => Connection) | null = null; diff --git a/packages/storage/src/platform/connection.ts b/packages/storage/src/platform/connection.ts index 86e8219a7b4..8f02d3c8b50 100644 --- a/packages/storage/src/platform/connection.ts +++ b/packages/storage/src/platform/connection.ts @@ -22,7 +22,6 @@ import { newStreamConnection as nodeNewStreamConnection, injectTestConnection as nodeInjectTestConnection } from './node/connection'; -import { ReadableStream } from 'stream/web'; export function injectTestConnection( factory: (() => Connection) | null @@ -46,7 +45,7 @@ export function newBlobConnection(): Connection { return nodeNewBlobConnection(); } -export function newStreamConnection(): Connection { +export function newStreamConnection(): Connection> { // This file is only used in Node.js tests using ts-node. return nodeNewStreamConnection(); } diff --git a/packages/storage/src/platform/node/connection.ts b/packages/storage/src/platform/node/connection.ts index 84415fedee2..9f401bb3967 100644 --- a/packages/storage/src/platform/node/connection.ts +++ b/packages/storage/src/platform/node/connection.ts @@ -22,7 +22,6 @@ import { } from '../../implementation/connection'; import { internalError } from '../../implementation/error'; import { fetch as undiciFetch, Headers as undiciHeaders } from 'undici'; -import { ReadableStream } from 'stream/web'; /** An override for the text-based Connection. Used in tests. */ let textFactoryOverride: (() => Connection) | null = null; @@ -147,8 +146,8 @@ export function newBytesConnection(): Connection { return new FetchBytesConnection(); } -export class FetchStreamConnection extends FetchConnection { - private stream_: ReadableStream | null = null; +export class FetchStreamConnection extends FetchConnection> { + private stream_: ReadableStream | null = null; async send( url: string, @@ -170,7 +169,7 @@ export class FetchStreamConnection extends FetchConnection { this.headers_ = response.headers; this.statusCode_ = response.status; this.errorCode_ = ErrorCode.NO_ERROR; - this.stream_ = response.body; + this.stream_ = response.body as ReadableStream; } catch (e) { this.errorText_ = (e as Error)?.message; // emulate XHR which sets status to 0 when encountering a network error @@ -187,7 +186,7 @@ export class FetchStreamConnection extends FetchConnection { } } -export function newStreamConnection(): Connection { +export function newStreamConnection(): Connection> { return new FetchStreamConnection(); } diff --git a/packages/storage/src/reference.ts b/packages/storage/src/reference.ts index 179b5782614..7b351e96333 100644 --- a/packages/storage/src/reference.ts +++ b/packages/storage/src/reference.ts @@ -19,7 +19,7 @@ * @fileoverview Defines the Firebase StorageReference class. */ -import { ReadableStream, TransformStream, Transformer } from 'stream/web'; +// import { ReadableStream, TransformStream, Transformer } from 'stream/web'; import { FbsBlob } from './implementation/blob'; import { Location } from './implementation/location'; diff --git a/packages/storage/test/node/stream.test.ts b/packages/storage/test/node/stream.test.ts index 79d02724ebd..5fde3099d4e 100644 --- a/packages/storage/test/node/stream.test.ts +++ b/packages/storage/test/node/stream.test.ts @@ -20,7 +20,6 @@ import { createApp, createStorage } from '../integration/integration.test'; import { FirebaseApp, deleteApp } from '@firebase/app'; import { getStream, ref, uploadBytes } from '../../src/index.node'; import * as types from '../../src/public-types'; -import { ReadableStream } from 'stream/web'; // See: https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream/getReader async function readData(readableStream: ReadableStream): Promise { From 47aadca0bcaaf536b8472009834bc25c5848d12a Mon Sep 17 00:00:00 2001 From: Daniel La Rocque Date: Tue, 13 Aug 2024 12:29:09 -0400 Subject: [PATCH 5/7] run yarn format --- packages/storage/src/implementation/connection.ts | 6 +++++- packages/storage/src/platform/node/connection.ts | 4 +++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/packages/storage/src/implementation/connection.ts b/packages/storage/src/implementation/connection.ts index f9cdb3ac238..80e29c9cd2f 100644 --- a/packages/storage/src/implementation/connection.ts +++ b/packages/storage/src/implementation/connection.ts @@ -18,7 +18,11 @@ export type Headers = Record; /** Response type exposed by the networking APIs. */ -export type ConnectionType = string | ArrayBuffer | Blob | ReadableStream; +export type ConnectionType = + | string + | ArrayBuffer + | Blob + | ReadableStream; /** * A lightweight wrapper around XMLHttpRequest with a diff --git a/packages/storage/src/platform/node/connection.ts b/packages/storage/src/platform/node/connection.ts index 9f401bb3967..d7141e6ef68 100644 --- a/packages/storage/src/platform/node/connection.ts +++ b/packages/storage/src/platform/node/connection.ts @@ -146,7 +146,9 @@ export function newBytesConnection(): Connection { return new FetchBytesConnection(); } -export class FetchStreamConnection extends FetchConnection> { +export class FetchStreamConnection extends FetchConnection< + ReadableStream +> { private stream_: ReadableStream | null = null; async send( From 32e4da242a72861187132d0c191d77804b23335b Mon Sep 17 00:00:00 2001 From: dlarocque Date: Tue, 13 Aug 2024 16:43:06 +0000 Subject: [PATCH 6/7] Update API reports --- common/api-review/storage.api.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/common/api-review/storage.api.md b/common/api-review/storage.api.md index 17769a939de..4964aa40af7 100644 --- a/common/api-review/storage.api.md +++ b/common/api-review/storage.api.md @@ -13,7 +13,6 @@ import { FirebaseError } from '@firebase/util'; import { _FirebaseService } from '@firebase/app'; import { NextFn } from '@firebase/util'; import { Provider } from '@firebase/component'; -import { ReadableStream as ReadableStream_2 } from 'stream/web'; import { Subscribe } from '@firebase/util'; import { Unsubscribe } from '@firebase/util'; @@ -133,7 +132,7 @@ export function getMetadata(ref: StorageReference): Promise; export function getStorage(app?: FirebaseApp, bucketUrl?: string): FirebaseStorage; // @public -export function getStream(ref: StorageReference, maxDownloadSizeBytes?: number): ReadableStream_2; +export function getStream(ref: StorageReference, maxDownloadSizeBytes?: number): ReadableStream; // @internal (undocumented) export function _invalidArgument(message: string): StorageError; From 85a432a8ac96ae96520bd5d481914cbd4faf9d7a Mon Sep 17 00:00:00 2001 From: Daniel La Rocque Date: Tue, 13 Aug 2024 16:30:03 -0400 Subject: [PATCH 7/7] Remove comment --- packages/storage/src/reference.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/packages/storage/src/reference.ts b/packages/storage/src/reference.ts index 7b351e96333..e00bceb2f7c 100644 --- a/packages/storage/src/reference.ts +++ b/packages/storage/src/reference.ts @@ -19,8 +19,6 @@ * @fileoverview Defines the Firebase StorageReference class. */ -// import { ReadableStream, TransformStream, Transformer } from 'stream/web'; - import { FbsBlob } from './implementation/blob'; import { Location } from './implementation/location'; import { getMappings } from './implementation/metadata';