Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

support whatwg-stream.ReadableStream as decodeAsync() input source #43

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

Merged
gfx merged 4 commits into master from whatwg-streams
May 30, 2019

Conversation

gfx
Copy link
Member

@gfx gfx commented May 30, 2019

whatwg-streams are standard stream api in browsers, for example as the response body of whatwg fetch api. Unfortunately, whatwg-streams do not support AsyncIterable, so if you want to give them to decodeAsync() you have to convert them to AsyncIterable, which is not a trivial thing.


This PR is working in progress, waiting for #42 is merged.

Copy link
Collaborator

lol this is exactly that I needed to add next 😄

Copy link

codecov-io commented May 30, 2019
edited
Loading

Codecov Report

Merging #43 into master will decrease coverage by 1.26%.
The diff coverage is 33.33%.

Impacted file tree graph

@@ Coverage Diff @@
## master #43 +/- ##
==========================================
- Coverage 91.46% 90.19% -1.27% 
==========================================
 Files 14 15 +1 
 Lines 808 826 +18 
 Branches 170 173 +3 
==========================================
+ Hits 739 745 +6 
- Misses 49 59 +10 
- Partials 20 22 +2
Impacted Files Coverage Δ
src/utils/stream.ts 26.66% <26.66%> (ø)
src/decodeAsync.ts 66.66% <66.66%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0e3f706...df769d0. Read the comment docs.

Copy link
Member Author

gfx commented May 30, 2019

lol

@gfx gfx force-pushed the whatwg-streams branch from 188d25b to 3b7b4f2 Compare May 30, 2019 11:38
Copy link
Member Author

gfx commented May 30, 2019

@sergeyzenchenko Add ReadableStream to the input source type of decodeAsync and decodeArrayStream. What do you think of these interfaces?

Copy link
Collaborator

Looks good to me, but I think we need to make a function for it because same piece of code will be used in decodeStream too, so in 3 places in total.

gfx reacted with thumbs up emoji

Copy link
Member Author

gfx commented May 30, 2019

Right. Extracted ensureAsyncIterable() df769d0

sergeyzenchenko reacted with thumbs up emoji

Copy link
Collaborator

Looks good for merge

Copy link
Member Author

gfx commented May 30, 2019

Thanks 😉

Copy link
Member Author

gfx commented May 30, 2019

@sergeyzenchenko

BTW I've invited you to a collaborator of this repo to work for this repo easily. Please check your inbox.

And, please make a pull request for changes anyway, except for doc fixes. I'll do so, too.

Copy link
Collaborator

Thanks! Sure everything will be using PRs

Copy link
Collaborator

sergeyzenchenko commented May 30, 2019
edited
Loading

@gfx what the process of merging? Should you merge mine PR and I yours or it can be done by ourself?

Copy link
Member Author

gfx commented May 30, 2019

@sergeyzenchenko

I think it's better to review each other for the code, as much as possible, but feel free to fix/improve docs, examples, benchmark scripts, and tests.

Copy link
Collaborator

I meant who will press merge button after review?) Also are we using only merge or squash and merge too?

Copy link
Member Author

gfx commented May 30, 2019

Basically, the author of the PR should push the merge button after reviewed, but because we live in different timezones, there can be exeptions.
No squash nor rebase is needed.

@gfx gfx merged commit 875ecd2 into master May 30, 2019
@gfx gfx deleted the whatwg-streams branch May 30, 2019 12:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /