Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace node-fetch dependency with undici #7705

Merged
merged 44 commits into from
Nov 12, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
6f959f7
update node-fetch to 3.2.0
DellaBitta Oct 17, 2023
dca8b45
repo scripts build fixes
DellaBitta Oct 17, 2023
8bd20e7
upgrade to node fetch 3.3.2
DellaBitta Oct 17, 2023
3e19c06
attempt to template reponse as Object
DellaBitta Oct 17, 2023
b0b57d4
emulator list as any
DellaBitta Oct 18, 2023
170d8b8
convert changelog generator from type module to commonjs due to node-…
DellaBitta Oct 18, 2023
c7cb29a
URL to string
DellaBitta Oct 18, 2023
36030be
formatting
DellaBitta Oct 18, 2023
915d6d9
formatting2
DellaBitta Oct 18, 2023
87f7aee
yarn.lock file
DellaBitta Oct 18, 2023
1e5315d
functions -> node-fetch-cjs, rulesunittesting -> node-fetch
DellaBitta Oct 24, 2023
8a32b0d
auth, firestore, storage -> node-fetch-cjs
DellaBitta Oct 24, 2023
2de208f
node-fetch-cjs package.json
DellaBitta Oct 24, 2023
5943873
webpack config
DellaBitta Oct 25, 2023
61778a4
update to emulator_rest_helpers import of undici
DellaBitta Oct 26, 2023
0a2f3d2
update auth-compat
DellaBitta Oct 26, 2023
1b0a813
lint fixes
DellaBitta Oct 27, 2023
197de53
revert messaging integration test changes
DellaBitta Oct 27, 2023
c4411bc
yarn.lock push
DellaBitta Oct 27, 2023
187ff43
replaced node-fetch-cjs with undici
DellaBitta Oct 27, 2023
c50be9b
narrow scoped imports
DellaBitta Oct 27, 2023
e852caa
pushed undici-specific code to an else block within emulator_rest_hel…
DellaBitta Oct 29, 2023
a439ac9
format and functions changes
DellaBitta Oct 29, 2023
60dd788
firestore lint fix
DellaBitta Oct 29, 2023
a9f1f90
Changeset
DellaBitta Oct 29, 2023
4caec8d
Merge branch 'master' into ddb-upgrade-node-fetch
DellaBitta Oct 30, 2023
24d8c2a
Merge branch 'master' into ddb-upgrade-node-fetch
DellaBitta Nov 3, 2023
194ad81
Update changeset from patch to minor
DellaBitta Nov 5, 2023
4a48807
add comments to karma.conf.js files regarding why we're suppressing t…
DellaBitta Nov 5, 2023
1750136
mangle undici fetch imports as undiciFetch
DellaBitta Nov 5, 2023
8a29288
migrate node-fetch to undici in repo_scripts
DellaBitta Nov 5, 2023
2f8bfd8
removed errant , in repo-scripts package.json
DellaBitta Nov 5, 2023
140d686
revert undici upgrade of repo-scripts
DellaBitta Nov 6, 2023
02c4922
lint fix
DellaBitta Nov 6, 2023
272ea2a
generated new changeset with minor patch levels
DellaBitta Nov 6, 2023
632e2da
add firebase minor version entry to changeset file
DellaBitta Nov 6, 2023
083ebaa
add firebase minor version entry to changeset file
DellaBitta Nov 6, 2023
e93d827
Update to changeset conflict
DellaBitta Nov 6, 2023
395c420
migrate changelog-generator to undici
DellaBitta Nov 8, 2023
8ff801b
replace node-fetch in testing support for RUT, messaging and emulators
DellaBitta Nov 8, 2023
a95a38d
format and fetch rename fixes
DellaBitta Nov 8, 2023
3febc4c
revert undici changes in tests
DellaBitta Nov 8, 2023
b41fcde
Update remaining test targets to use undici (#7761)
DellaBitta Nov 10, 2023
fcb842c
revert changes from RUT to be implemented later
DellaBitta Nov 10, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
auth, firestore, storage -> node-fetch-cjs
  • Loading branch information
DellaBitta committed Oct 24, 2023
commit 8a32b0db832e0555d014ac7d076ef6c2bba59cb4
2 changes: 1 addition & 1 deletion packages/auth/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@
"@firebase/component": "0.6.4",
"@firebase/logger": "0.4.0",
"@firebase/util": "1.9.3",
"node-fetch": "3.3.2",
"node-fetch-cjs": "3.3.2",
"tslib": "^2.1.0"
},
"license": "Apache-2.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/auth/src/platform_node/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import { ClientPlatform } from '../core/util/version';
import { AuthImpl } from '../core/auth/auth_impl';

import { FetchProvider } from '../core/util/fetch_provider';
import * as fetchImpl from 'node-fetch';
import * as fetchImpl from 'node-fetch-cjs';
import { getDefaultEmulatorHost } from '@firebase/util';

// Initialize the fetch polyfill, the types are slightly off so just cast and hope for the best
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/

import * as fetchImpl from 'node-fetch';
import * as fetchImpl from 'node-fetch-cjs';
import { getAppConfig, getEmulatorUrl } from './settings';

export interface VerificationSession {
Expand Down
2 changes: 1 addition & 1 deletion packages/firestore/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
"@firebase/webchannel-wrapper": "0.10.3",
"@grpc/grpc-js": "~1.9.0",
"@grpc/proto-loader": "^0.7.8",
"node-fetch": "3.3.2",
"node-fetch-cjs": "3.3.2",
"tslib": "^2.1.0"
},
"peerDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions packages/firestore/src/platform/node_lite/connection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/

import nodeFetch from 'node-fetch';
import nodeFetch from 'node-fetch-cjs';

import { DatabaseInfo } from '../../core/database_info';
import { Connection } from '../../remote/connection';
Expand All @@ -25,7 +25,7 @@ export { newConnectivityMonitor } from '../browser/connection';

/** Initializes the HTTP connection for the REST API. */
export function newConnection(databaseInfo: DatabaseInfo): Connection {
// node-fetch is meant to be API compatible with `fetch`, but its type doesn't
// node-fetch-cjs is meant to be API compatible with `fetch`, but its type doesn't
// match 100%.
// eslint-disable-next-line @typescript-eslint/no-explicit-any
return new FetchConnection(databaseInfo, nodeFetch as any);
Expand Down
2 changes: 1 addition & 1 deletion packages/functions/src/index.node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/
import { registerFunctions } from './config';
import nodeFetch from 'node-fetch';
import nodeFetch from 'node-fetch-cjs';

export * from './api';

Expand Down
2 changes: 1 addition & 1 deletion packages/storage/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"dependencies": {
"@firebase/util": "1.9.3",
"@firebase/component": "0.6.4",
"node-fetch": "3.3.2",
"node-fetch-cjs": "3.3.2",
"tslib": "^2.1.0"
},
"peerDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/storage/src/platform/node/connection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import {
ErrorCode
} from '../../implementation/connection';
import { internalError } from '../../implementation/error';
import nodeFetch, { Headers } from 'node-fetch';
import nodeFetch, { Headers } from 'node-fetch-cjs';

/** An override for the text-based Connection. Used in tests. */
let textFactoryOverride: (() => Connection<string>) | null = null;
Expand Down