-
Notifications
You must be signed in to change notification settings - Fork 603
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
BREAKING(async): make abortablePromise()
and abortableAsyncIterable()
private
#5056
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5056 +/- ##
==========================================
- Coverage 92.17% 92.17% -0.01%
==========================================
Files 487 487
Lines 38800 38796 -4
Branches 5435 5435
==========================================
- Hits 35764 35760 -4
Misses 2981 2981
Partials 55 55 ☔ View full report in Codecov by Sentry. |
Note: It was originally designed this way, but the exports were added later by the request from the community. ref: #2031 @harrysolovay Do you still find |
I think we should either:
|
I'm in favor of 1 because it's the original design and also #2031 doesn't seem discussed well (In addition, the requested point ('would prefer to not include the code of but if anyone has any opinion on this, please comment |
For more context, rough Github search results: While these searches aren't perfect, it seems that |
@kt3k Yes, I can replace |
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.
LGTM
What's changed
abortablePromise()
andabortableAsyncIterable()
have been made private functions (no longer exported) in favor ofabortable()
.Why this change was made
Under the hood,
abortable()
usesabortablePromise()
if the first argument,p
, is a promise, orabortableAsyncIterable()
ifp
is an async iterable. This change was made to avoid confusion for users regarding which function to use; now, useabortable()
.Migration guide
To migrate, use
abortable()
instead ofabortablePromise()
orabortableAsyncIterable()
in the same way.For promises:
For async iterables: