Skip to content

Commit 14463dd

Browse files
authored
Update Edge Runtime (vercel#38862)
This PR updates the Edge Runtime to use a new version that loads dependencies differently. This addresses vercel#38766 so `instanceof` works as expected. It involved a few code changes, mostly regarding to types. The most important change is that the `Runner` function in the sandbox doesn't take a `ReadableStream` as `body` anymore since this implies creating the instance on "node land" and makes the runtime `fetch` function not to be able to compare with `ReadableStream` using `instanceof`. Instead we introduce a "clonable body" abstraction that allows to create the `ReadableStream` from `Readable` by using the edge runtime primitive which would hold the correct prototype. Also, this PR changes the way we pre-compile the Edge Runtime to adapt it to the new version.
1 parent fe4b711 commit 14463dd

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+27589
-21985
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
"@babel/plugin-proposal-object-rest-spread": "7.14.7",
5757
"@babel/preset-flow": "7.14.5",
5858
"@babel/preset-react": "7.14.5",
59-
"@edge-runtime/jest-environment": "1.1.0-beta.11",
59+
"@edge-runtime/jest-environment": "1.1.0-beta.17",
6060
"@fullhuman/postcss-purgecss": "1.3.0",
6161
"@mdx-js/loader": "0.18.0",
6262
"@next/bundle-analyzer": "workspace:*",

0 commit comments

Comments
 (0)