@@ -2,8 +2,7 @@ import { randomBytes, createHash } from 'node:crypto';
22import { Readable } from 'node:stream' ;
33import { performance } from 'node:perf_hooks' ;
44import { ReadableStream , TransformStream } from 'node:stream/web' ;
5- import { Blob , File } from 'node:buffer' ;
6- import { toUSVString } from 'node:util' ;
5+ import { Blob } from 'node:buffer' ;
76import type { FixJSONCtlChars } from './Request.js' ;
87import { SocketInfo } from './Response.js' ;
98import symbols from './symbols.js' ;
@@ -232,37 +231,6 @@ export function patchForNode16() {
232231 // @ts -ignore
233232 global . DOMException = getDOMExceptionClass ( ) ;
234233 }
235- // multi undici version in node version less than 20 https://github.com/nodejs/undici/issues/4374
236- if ( typeof global . File === 'undefined' ) {
237- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
238- // @ts -ignore
239- global . File = File ;
240- }
241-
242- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
243- // @ts -ignore
244- if ( String . prototype . toWellFormed === undefined ) {
245- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
246- // @ts -ignore
247- String . prototype . toWellFormed = function ( ) {
248- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
249- // @ts -ignore
250- return toUSVString ( this ) ;
251- } ;
252- }
253-
254- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
255- // @ts -ignore
256- if ( String . prototype . isWellFormed === undefined ) {
257- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
258- // @ts -ignore
259- String . prototype . isWellFormed = function ( ) {
260- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
261- // @ts -ignore
262- return toUSVString ( this ) === this ;
263- } ;
264- }
265-
266234}
267235
268236// https://github.com/jimmywarting/node-domexception/blob/main/index.js
0 commit comments