stream: corrections to source normalization#63416
Open
Renegade334 wants to merge 1 commit into
Open
Conversation
Signed-off-by: Renegade334 <contact.9a5d6388@renegade334.me.uk>
Collaborator
|
Review requested:
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #63416 +/- ##
==========================================
- Coverage 91.68% 90.03% -1.65%
==========================================
Files 361 714 +353
Lines 156230 225741 +69511
Branches 24021 42710 +18689
==========================================
+ Hits 143232 203242 +60010
- Misses 12729 14298 +1569
- Partials 269 8201 +7932
🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fromSync(); doing so may exclude objects with both sync and async functionality (eg. objects with both[Symbol.iterator]and[Symbol.asyncIterator]properties). The spec text seems to suggest that objects with a valid sync pattern should be accepted here even if they also have an async pattern, but could do with some clarity.from(), normalise the object returned by toAsyncStreamable directly, not the return value of itsSymbol.asyncIteratormethod: firstly, the async iterator returned by theSymbol.asyncIteratormethod is not itself obliged to have aSymbol.asyncIteratormethod, and secondly, the result could in theory be any validfrom()source, not just an async iterable.isUint8ArrayBatchfor thefrom()/fromSync()fast paths.Note that as things stand, some of the
from()cases throw validation errors synchronously (eg.fromSync({ [toStreamable]() {} })) whereas the majority only throw validation errors at the point of iteration. AFAICT, the latter behaviour is what is compliant with the spec, but I haven't touched these for now.