-
Notifications
You must be signed in to change notification settings - Fork 52
Safari fix: refactor Stream Parses to use while(true) instead of for await
#1444
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
Conversation
🦋 Changeset detectedLatest commit: 5e6735c The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
carterworks
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please run pnpm changeset, select @adobe/alloy, and write what you want to go on the public changelog file
dompuiu
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR seems ok. Please do what Carter asked.
As I already told you, there are some potential issues that could be fixed. I sent you the list on Slack.
jonsnyder
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Can you remove the hard-coded 10 seconds in this error message:
| message: "Stream timeout: No data received within 10 seconds", |
sure |
Nina finished what he was asking for.
Description
In previous version we were using
for await(chunks in stream)which was causing issues in Safari. Safari does have support forfor awaitsyntax. The problem is that Safari'sReadableStreamclass does not implementSymbol.asyncIteratoron its prototype.The solution is to refactor the code to use
stream.getReader()andwhile(true),catch,finallyblock.Related Issue
Motivation and Context
Screenshots (if appropriate):
Checklist:
pnpm changeset) or it is not necessary because this PR is not consumer-facing.