| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
Review requested:
|
Sorry, something went wrong.
There was a problem hiding this comment.
lgtm
Sorry, something went wrong.
When an input provides Symbol.iterator, fromSync() should consume the synchronous iterator instead of rejecting the input because it also exposes an asynchronous or promise-like protocol. Continue rejecting async-only iterables and promise/thenable-only inputs, but allow sync iterables that also define Symbol.asyncIterator or then(). Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com> Assisted-by: openai:gpt-5.5
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## main #64294 +/- ##
==========================================
+ Coverage 90.23% 90.25% +0.01%
==========================================
Files 741 741
Lines 240979 240984 +5
Branches 45401 45409 +8
==========================================
+ Hits 217449 217500 +51
+ Misses 15112 15068 -44
+ Partials 8418 8416 -2
... and 30 files with indirect coverage changes 🚀 New features to boost your workflow:
|
Sorry, something went wrong.
Sorry, something went wrong.
When an input provides Symbol.iterator, fromSync() should consume the synchronous iterator instead of rejecting the input because it also exposes an asynchronous or promise-like protocol. Continue rejecting async-only iterables and promise/thenable-only inputs, but allow sync iterables that also define Symbol.asyncIterator or then(). Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com> Assisted-by: openai:gpt-5.5 PR-URL: #64294 Fixes: #64292 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
When an input provides Symbol.iterator, fromSync() should consume the synchronous iterator instead of rejecting the input because it also exposes an asynchronous or promise-like protocol. Continue rejecting async-only iterables and promise/thenable-only inputs, but allow sync iterables that also define Symbol.asyncIterator or then(). Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com> Assisted-by: openai:gpt-5.5 PR-URL: #64294 Fixes: #64292 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
When an input provides Symbol.iterator, fromSync() should consume the synchronous iterator instead of rejecting the input because it also exposes an asynchronous or promise-like protocol. Continue rejecting async-only iterables and promise/thenable-only inputs, but allow sync iterables that also define Symbol.asyncIterator or then(). Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com> Assisted-by: openai:gpt-5.5 PR-URL: #64294 Fixes: #64292 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
| Back | FazBrowse Home | New Git URL |
Fixes: #64292
stream/iter's fromSync() rejected any input that exposed
Symbol.asyncIterator, even when the same input also exposed
Symbol.iterator.
This updates fromSync() to reject only inputs without a synchronous
iteration path, allowing dual sync/async iterables and thenable sync
iterables to be consumed through their synchronous iterator.
Assisted-by: openai:gpt-5.5