File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import { randomBytes , createHash } from 'node:crypto' ;
22import { Readable } from 'node:stream' ;
33import { performance } from 'node:perf_hooks' ;
4- import { ReadableStream } from 'node:stream/web' ;
4+ import { ReadableStream , TransformStream } from 'node:stream/web' ;
55import { Blob } from 'node:buffer' ;
66import type { FixJSONCtlChars } from './Request.js' ;
77import { SocketInfo } from './Response.js' ;
@@ -216,6 +216,11 @@ export function patchForNode16() {
216216 // @ts -ignore
217217 global . ReadableStream = ReadableStream ;
218218 }
219+ if ( typeof global . TransformStream === 'undefined' ) {
220+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
221+ // @ts -ignore
222+ global . TransformStream = TransformStream ;
223+ }
219224 if ( typeof global . Blob === 'undefined' ) {
220225 // eslint-disable-next-line @typescript-eslint/ban-ts-comment
221226 // @ts -ignore
You can’t perform that action at this time.
0 commit comments