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

Fix conversion to async iterable from Response.body #114

Merged
merged 1 commit into from
Jan 10, 2025

Conversation

ardatan
Copy link
Contributor

@ardatan ardatan commented Jan 10, 2025

Symbol.asyncIterator is a method in AsyncIterables that returns AsyncIterator not AsyncIterable.
for await expects AsyncIterable not AsyncIterator.
This fixes the case when res.body is an AsyncIterable that returns AsyncIterator.
Even if some cases this method still works because AsyncIterableIterators Symbol.asyncIterator returns itself and AsyncIterableIterator is AsyncIterator and AsyncIterable at the same time.

Copy link
Owner

@enisdenjo enisdenjo left a comment

Choose a reason for hiding this comment

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

Thanks this is great!

@enisdenjo enisdenjo merged commit f2adc92 into enisdenjo:master Jan 10, 2025
6 checks passed
enisdenjo pushed a commit that referenced this pull request Jan 10, 2025
## [2.5.4](v2.5.3...v2.5.4) (2025-01-10)

### Bug Fixes

* **client:** Conversion to async iterable from Response.body ([#114](#114)) ([f2adc92](f2adc92))
@enisdenjo
Copy link
Owner

🎉 This PR is included in version 2.5.4 🎉

The release is available on:

Your semantic-release bot 📦🚀

@enisdenjo enisdenjo added the released Has been released and published label Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
released Has been released and published
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants