10
45
Fork
You've already forked doipjs
28

Refactor fetchers to use AbortSignal#timeout #73

Open
vladimyr wants to merge 6 commits from vladimyr/doipjs:refactor-fetchers into dev
pull from: vladimyr/doipjs:refactor-fetchers
merge into: keyoxide:dev
keyoxide:main
keyoxide:dev
keyoxide:fix-irc-fetcher
keyoxide:new-claim-eveonline-143
keyoxide:prepare-new-release
keyoxide:fix-jsdoc-types
keyoxide:yarn-to-npm
keyoxide:support-openpgp-aspe-claims
keyoxide:support-html-alias
keyoxide:improve-activitypub-support
keyoxide:v1-restructure
keyoxide:into-es-module
keyoxide:support-aspe
keyoxide:fix-js-lsp-issues
keyoxide:improve-linting
keyoxide:add-markers
keyoxide:support-opencollective-claim
keyoxide:support-entity-decoding
keyoxide:use-rome-tools
keyoxide:support-cloudflare-buster
keyoxide:support-fediverse-posts
keyoxide:matrix-room-verification

Swap all those timeoutPromise-s with the standard way of doing timeouts leveraging AbortSignal#timeout.

Swap all those `timeoutPromise`-s with the standard way of doing timeouts leveraging [`AbortSignal#timeout`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal/timeout_static).
vladimyr force-pushed refactor-fetchers from a6c98ad664
All checks were successful
ci/woodpecker/pr/test Pipeline was successful
to c241ae7160
All checks were successful
ci/woodpecker/pr/test Pipeline was successful
2024年01月30日 03:05:16 +01:00
Compare
vladimyr force-pushed refactor-fetchers from c241ae7160
All checks were successful
ci/woodpecker/pr/test Pipeline was successful
to 85db8b5792
All checks were successful
ci/woodpecker/pr/test Pipeline was successful
2024年01月30日 03:16:21 +01:00
Compare
vladimyr force-pushed refactor-fetchers from 85db8b5792
All checks were successful
ci/woodpecker/pr/test Pipeline was successful
to b6ad65ba24
All checks were successful
ci/woodpecker/pr/test Pipeline was successful
2024年01月30日 04:05:43 +01:00
Compare
vladimyr force-pushed refactor-fetchers from b6ad65ba24
All checks were successful
ci/woodpecker/pr/test Pipeline was successful
to 15e3d2dff3
All checks were successful
ci/woodpecker/pr/test Pipeline was successful
2024年01月30日 09:03:41 +01:00
Compare
Owner
Copy link

This PR is amazing, I did not know about AbortSignal and feel silly for not knowing.

Also, more red than green!

Have you tried the fetchers? From what I can tell, everything is still in there — that is one neat trick with the arraybuffer responseType, wasn't aware one could solve it like this.

This PR is amazing, I did not know about AbortSignal and feel silly for not knowing. Also, more red than green! Have you tried the fetchers? From what I can tell, everything is still in there — that is one neat trick with the `arraybuffer` responseType, wasn't aware one could solve it like this.
Author
Member
Copy link

I ran examples but that may not be sufficient so I decided to write some proper tests! I'm currently reading about using MSW for mocking Axios requests. The idea is to make all fetchers echo back request configuration data just like https://httpbin.org does and make sure correct URLs, headers, and payloads are being used.

I ran examples but that may not be sufficient so I decided to write some proper tests! I'm currently reading about using [MSW](https://mswjs.io) for mocking Axios requests. The idea is to make all fetchers echo back request configuration data just like https://httpbin.org does and make sure correct URLs, headers, and payloads are being used.
@ -115,0 +103,4 @@
}
/**
* Create Telegram API reqest
Owner
Copy link

Typo (missing u in request)

Typo (missing u in request)

I've only heard about AbortController before, but good to see an implementation using it. I have something to steal from now 👼

I've only heard about [AbortController](https://developer.mozilla.org/en-US/docs/Web/API/AbortController) before, but good to see an implementation using it. I have something to steal from now 👼
All checks were successful
ci/woodpecker/pr/test Pipeline was successful
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u refactor-fetchers:vladimyr-refactor-fetchers
git switch vladimyr-refactor-fetchers
Sign in to join this conversation.
No reviewers
Labels
Clear labels
bug
Something is not working

Archived

enhancement
New feature

Archived

Contribution welcome
Get started contributing here
Good first issue
Good if you are new to the project or to open source contributions
Impact
External
Affects the people using the project
Impact
Internal
Affects on the people working on the project
Priority
Critical
Work on right now
Priority
High
Work on at earliest convenience
Priority
Low
Work on in spare time
Priority
Medium
Work on regularly
Review
Duplicate
Already exists
Review
Off Topic
Does not fall within the scope of the repo/project
Status
Backlog
Is not being worked on yet
Status
Blocked
Is waiting on something or someone
Status
Completed
Is done
Status
In Progress
Is being worked on
Status
Investigating
Is waiting on research or questions
Status
Needs Decision
Is waiting on a decision by the devs/contributors
Status
Needs Info
Is waiting on additional information before it can be solved
Status
Needs Triage
Is new issue that needs reviewing
Status
Testing
Is being checked and verified
Status
Waiting For Review
Is waiting on reviewers to approve
Status
Won't Fix
Won't be fixed
Type
Bug
Related to something not working as intended
Type
CI
Related to continuous integration
Type
Documentation
Related to documentation
Type
Enhancement
Related to a new feature or an improved one
Type
New Claim
Related to a new identity claim/proof
Type
Security
Related to security
Type
Tests
Related to code tests
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
keyoxide/doipjs!73
Reference in a new issue
keyoxide/doipjs
No description provided.
Delete branch "vladimyr/doipjs:refactor-fetchers"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?