File tree Expand file tree Collapse file tree 4 files changed +4
-11
lines changed Expand file tree Collapse file tree 4 files changed +4
-11
lines changed Original file line number Diff line number Diff line change 103
103
"@firebase/webchannel-wrapper" : " 1.0.1" ,
104
104
"@grpc/grpc-js" : " ~1.9.0" ,
105
105
"@grpc/proto-loader" : " ^0.7.8" ,
106
- "undici" : " 6.19.7" ,
107
106
"tslib" : " ^2.1.0"
108
107
},
109
108
"peerDependencies" : {
Original file line number Diff line number Diff line change @@ -24,5 +24,5 @@ export { newConnectivityMonitor } from '../browser/connection';
24
24
25
25
/** Initializes the HTTP connection for the REST API. */
26
26
export function newConnection ( databaseInfo : DatabaseInfo ) : Connection {
27
- return new FetchConnection ( databaseInfo , fetch . bind ( null ) ) ;
27
+ return new FetchConnection ( databaseInfo ) ;
28
28
}
Original file line number Diff line number Diff line change @@ -30,11 +30,9 @@ import { StringMap } from '../../util/types';
30
30
export class FetchConnection extends RestConnection {
31
31
/**
32
32
* @param databaseInfo - The connection info.
33
- * @param fetchImpl - `fetch` or a Polyfill that implements the fetch API.
34
33
*/
35
34
constructor (
36
- databaseInfo : DatabaseInfo ,
37
- private readonly fetchImpl : typeof fetch
35
+ databaseInfo : DatabaseInfo
38
36
) {
39
37
super ( databaseInfo ) ;
40
38
}
@@ -56,7 +54,7 @@ export class FetchConnection extends RestConnection {
56
54
let response : Response ;
57
55
58
56
try {
59
- response = await this . fetchImpl ( url , {
57
+ response = await fetch ( url , {
60
58
method : 'POST' ,
61
59
headers,
62
60
body : requestJson
Original file line number Diff line number Diff line change 15
15
* limitations under the License.
16
16
*/
17
17
18
- import { fetch as undiciFetch } from 'undici' ;
19
-
20
18
import { DatabaseInfo } from '../../core/database_info' ;
21
19
import { Connection } from '../../remote/connection' ;
22
20
import { FetchConnection } from '../browser_lite/fetch_connection' ;
@@ -25,8 +23,6 @@ export { newConnectivityMonitor } from '../browser/connection';
25
23
26
24
/** Initializes the HTTP connection for the REST API. */
27
25
export function newConnection ( databaseInfo : DatabaseInfo ) : Connection {
28
- // undici is meant to be API compatible with `fetch`, but its type doesn't
29
- // match 100%.
30
26
// eslint-disable-next-line @typescript-eslint/no-explicit-any
31
- return new FetchConnection ( databaseInfo , undiciFetch as any ) ;
27
+ return new FetchConnection ( databaseInfo ) ;
32
28
}
You can’t perform that action at this time.
0 commit comments