Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upgrade edge-runtime #38766

Closed
wants to merge 1 commit into from
Closed

upgrade edge-runtime #38766

wants to merge 1 commit into from

Conversation

Kikobeats
Copy link
Member

@Kikobeats Kikobeats commented Jul 18, 2022

The latest Edge Runtime version adresses issues related with instanceof.

Closes #38184

@Kikobeats Kikobeats force-pushed the edge-runtime branch 3 times, most recently from 3a2e37b to 95ead36 Compare July 18, 2022 17:34
kodiakhq bot pushed a commit that referenced this pull request Jul 21, 2022
This PR updates the Edge Runtime to use a new version that loads dependencies differently. This addresses #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.
Copy link
Member

@ijjk ijjk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Closing as this was superseded by #38862

@ijjk ijjk closed this Jul 22, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 21, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

instanceof doesn't work in middleware v12.2
2 participants