forked from vercel/next.js
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update polyfill of web streams (vercel#35571)
* attach pipeTo and pipeThrough polyfills to instance * remove transformer polyfill * remove polyfill * fix missing polyfill in sandbox * always polyfill the runtime * always polyfill web streams in renderer * fix missing AbortController and AbortSignal * type fix * fix type generation * use global Co-authored-by: Shu Ding <shu@shus-mac-studio.localdomain>
- Loading branch information
1 parent
8644056
commit 66a9b05
Showing
7 changed files
with
32 additions
and
226 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,12 @@ | ||
import { TransformStream } from 'next/dist/compiled/web-streams-polyfill' | ||
import { ReadableStream } from './web/sandbox/readable-stream' | ||
import { | ||
ReadableStream, | ||
TransformStream, | ||
} from 'next/dist/compiled/web-streams-polyfill' | ||
|
||
// Polyfill Web Streams in the Node.js environment | ||
// Polyfill Web Streams for the Node.js runtime. | ||
if (!global.ReadableStream) { | ||
global.ReadableStream = ReadableStream | ||
} | ||
if (!global.TransformStream) { | ||
global.TransformStream = TransformStream | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.