-
Notifications
You must be signed in to change notification settings - Fork 151
feat!: support custom AbortSignal with timeout
#508
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
Conversation
|
cc @kricsleo wdyt? I think we dont need to use the custom AbortController, we should be able to only use the signal 😄 |
|
I'm not using these APIs just for compatibility reasons; |
Actually it is Chrome 103+, but with AbortError instead of Timeout Error. But you are right |
|
Both are available in latest baseline which is good. However we could do better with backward compat and introduce new API requirements in a major.
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #508 +/- ##
===========================================
+ Coverage 56.86% 93.17% +36.30%
===========================================
Files 16 4 -12
Lines 728 205 -523
Branches 113 110 -3
===========================================
- Hits 414 191 -223
+ Misses 303 14 -289
+ Partials 11 0 -11 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
like this? |
AbortSignal with timeoutAbortSignal with timeout
pi0
left a comment
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.
Thanks! Since now targetting v2, i have updated to use simpler Abortsignal.timeout 👍🏼
This PR uses a
AbortSignal.timeout()merged with an optionaloptions.signalwithAbortSignal.any()resolves #326
This should make the following obsolete: #481.