@@ -10,7 +10,6 @@ import * as http from 'http';
1010import * as https from 'https' ;
1111import * as http2 from 'http2' ;
1212
13-
1413import * as _ from 'lodash' ;
1514import * as http2Wrapper from 'http2-wrapper' ;
1615import * as CrossFetch from "cross-fetch" ;
@@ -65,8 +64,6 @@ process.on('unhandledRejection', (reason, promise) => {
6564chai . use ( chaiAsPromised ) ;
6665chai . use ( chaiFetch ) ;
6766
68- export const AssertionError = chai . AssertionError ;
69-
7067function getGlobalFetch ( ) {
7168 return {
7269 fetch : globalThis . fetch . bind ( globalThis ) ,
@@ -83,11 +80,7 @@ export const fetch = fetchImplementation.fetch;
8380// All a bit convoluted, so we don't shadow the global vars,
8481// and we can still use those to define these in the browser
8582const headersImplementation = fetchImplementation . Headers ;
86- const requestImplementation = fetchImplementation . Request ;
87- const responseImplementation = fetchImplementation . Response ;
8883export { headersImplementation as Headers } ;
89- export { requestImplementation as Request } ;
90- export { responseImplementation as Response } ;
9184
9285export const FormData = globalThis . FormData ?? FormDataPolyfill ;
9386export const File = globalThis . File ?? FilePolyfill ;
@@ -298,11 +291,10 @@ export const nodeSatisfies = (range: string) =>
298291 isNode && semver . satisfies ( process . version , range ) ;
299292
300293export const BROKEN_H1_OVER_H2_TUNNELLING = "^18.8" ;
301- export const DEFAULT_KEEP_ALIVE = ">=19" ;
302- export const FIXED_KEEP_ALIVE_BEHAVIOUR = ">=20" ;
303294export const BROKEN_H2_OVER_H2_TUNNELLING = "~20.12" ; // https://github.com/nodejs/node/issues/52344
304295export const DEFAULT_REQ_HEADERS_DISABLED = "^22.13.0 || >=23.5.0" ;
305296
297+ const DEFAULT_KEEP_ALIVE = ">=19" ;
306298export const defaultNodeConnectionHeader = nodeSatisfies ( DEFAULT_KEEP_ALIVE )
307299 ? 'keep-alive'
308300 : 'close' ;
@@ -348,7 +340,7 @@ export function getHttp2ResponseTrailers(req: http2.ClientHttp2Stream) {
348340 } ) ;
349341}
350342
351- export async function http2Request (
343+ async function http2Request (
352344 url : string ,
353345 headers : { } ,
354346 requestBody = '' ,
0 commit comments