Skip to content

Commit 0601594

Browse files
committed
Remove undici from auth source and package.json
1 parent 6fdd758 commit 0601594

File tree

5 files changed

+8
-21
lines changed

5 files changed

+8
-21
lines changed

packages/auth-compat/index.node.ts

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,10 @@
2323
*/
2424
export * from './index';
2525
import { FetchProvider } from '@firebase/auth/internal';
26-
import {
27-
fetch as undiciFetch,
28-
Headers as undiciHeaders,
29-
Response as undiciResponse
30-
} from 'undici';
3126
import './index';
3227

3328
FetchProvider.initialize(
34-
undiciFetch as unknown as typeof fetch,
35-
undiciHeaders as unknown as typeof Headers,
36-
undiciResponse as unknown as typeof Response
29+
fetch as unknown as typeof fetch,
30+
Headers as unknown as typeof Headers,
31+
Response as unknown as typeof Response
3732
);

packages/auth-compat/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@
5555
"@firebase/auth-types": "0.12.2",
5656
"@firebase/component": "0.6.8",
5757
"@firebase/util": "1.9.7",
58-
"undici": "6.19.7",
5958
"tslib": "^2.1.0"
6059
},
6160
"license": "Apache-2.0",

packages/auth/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,6 @@
130130
"@firebase/component": "0.6.8",
131131
"@firebase/logger": "0.4.2",
132132
"@firebase/util": "1.9.7",
133-
"undici": "6.19.7",
134133
"tslib": "^2.1.0"
135134
},
136135
"license": "Apache-2.0",

packages/auth/src/platform_node/index.ts

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,17 +28,12 @@ import { AuthImpl } from '../core/auth/auth_impl';
2828

2929
import { FetchProvider } from '../core/util/fetch_provider';
3030
import { getDefaultEmulatorHost } from '@firebase/util';
31-
import {
32-
fetch as undiciFetch,
33-
Headers as undiciHeaders,
34-
Response as undiciResponse
35-
} from 'undici';
3631

3732
// Initialize the fetch polyfill, the types are slightly off so just cast and hope for the best
3833
FetchProvider.initialize(
39-
undiciFetch as unknown as typeof fetch,
40-
undiciHeaders as unknown as typeof Headers,
41-
undiciResponse as unknown as typeof Response
34+
fetch as unknown as typeof fetch,
35+
Headers as unknown as typeof Headers,
36+
Response as unknown as typeof Response
4237
);
4338

4439
// First, we set up the various platform-specific features for Node (register

packages/auth/test/helpers/integration/emulator_rest_helpers.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
* limitations under the License.
1616
*/
1717

18-
import { fetch as undiciFetch, RequestInit as undiciRequestInit } from 'undici';
1918
import { getAppConfig, getEmulatorUrl } from './settings';
2019

2120
export interface VerificationSession {
@@ -88,9 +87,9 @@ function doFetch(url: string, request?: RequestInit): ReturnType<typeof fetch> {
8887
if (typeof document !== 'undefined') {
8988
return fetch(url, request);
9089
} else {
91-
return undiciFetch(
90+
return fetch(
9291
url,
93-
request as undiciRequestInit
92+
request as RequestInit
9493
) as unknown as ReturnType<typeof fetch>;
9594
}
9695
}

0 commit comments

Comments
 (0)