From b5c79062a92b5ea334593f668f2baf84a66d183d Mon Sep 17 00:00:00 2001 From: James Daniels Date: Fri, 27 Aug 2021 18:28:58 -0400 Subject: [PATCH 1/2] Fix the import of node-fetch polyfill --- packages/firestore/src/platform/node_lite/connection.ts | 2 +- packages/storage/src/platform/node/connection.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/firestore/src/platform/node_lite/connection.ts b/packages/firestore/src/platform/node_lite/connection.ts index 629a9a4c0b0..4ef76ac28fc 100644 --- a/packages/firestore/src/platform/node_lite/connection.ts +++ b/packages/firestore/src/platform/node_lite/connection.ts @@ -15,7 +15,7 @@ * limitations under the License. */ -import * as nodeFetch from 'node-fetch'; +import nodeFetch from 'node-fetch'; import { DatabaseInfo } from '../../core/database_info'; import { Connection } from '../../remote/connection'; diff --git a/packages/storage/src/platform/node/connection.ts b/packages/storage/src/platform/node/connection.ts index d7717db1a67..1d4633fd77b 100644 --- a/packages/storage/src/platform/node/connection.ts +++ b/packages/storage/src/platform/node/connection.ts @@ -17,7 +17,7 @@ import { ErrorCode, Connection } from '../../implementation/connection'; import { internalError } from '../../implementation/error'; -import * as nodeFetch from 'node-fetch'; +import nodeFetch from 'node-fetch'; // eslint-disable-next-line @typescript-eslint/no-explicit-any const fetch: typeof window.fetch = nodeFetch as any; From 14bf97c92b7a6bf7fa130b47f00c858cead97bd2 Mon Sep 17 00:00:00 2001 From: James Daniels Date: Fri, 27 Aug 2021 18:59:07 -0400 Subject: [PATCH 2/2] Adding changeset --- .changeset/twelve-items-wonder.md | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .changeset/twelve-items-wonder.md diff --git a/.changeset/twelve-items-wonder.md b/.changeset/twelve-items-wonder.md new file mode 100644 index 00000000000..e96e3583c91 --- /dev/null +++ b/.changeset/twelve-items-wonder.md @@ -0,0 +1,6 @@ +--- +'@firebase/firestore': patch +'@firebase/storage': patch +--- + +Addressed incorrect use of the `node-fetch` polyfill