-
-
Notifications
You must be signed in to change notification settings - Fork 31
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
Fetch API implementation for Node #154
Conversation
🚀 Snapshot Release (
|
Package | Version | Info |
---|---|---|
@whatwg-node/fetch |
0.6.3-alpha-20230126122900-db01245 |
npm ↗︎ unpkg ↗︎ |
@whatwg-node/node-fetch |
0.0.1-alpha-20230126122900-db01245 |
npm ↗︎ unpkg ↗︎ |
@whatwg-node/router |
0.1.8-alpha-20230126122900-db01245 |
npm ↗︎ unpkg ↗︎ |
@whatwg-node/server |
0.5.9-alpha-20230126122900-db01245 |
npm ↗︎ unpkg ↗︎ |
43318e1
to
eac49c0
Compare
028caf5
to
745ee7a
Compare
69140df
to
02b2895
Compare
02b2895
to
203583b
Compare
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.
This looks awesome, great job! I haven't reviewed the in great detail, am trusting your judgement there. 😄
packages/node-fetch/src/Response.ts
Outdated
}); | ||
} | ||
|
||
static json(data: any, init: RequestInit = {}) { |
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.
what about adding the generic json<TResponse>
here?
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.
But the return type doesn't have a generic. Would it be really useful?
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.
@ardatan LGTM. I would just say that maybe we can improve the TypeScript interfaces and make them more TS-friendly? (when it comes to generics, return types and so on)
Also, @ardatan , do you think it's possible to add a CI check that runs other repos tests, with our |
@dotansimha Actually TS interfaces are not used directly by the consumer. It is imported by |
Got it, thanks!
Regarding this, I have to say that this is kinda a big concern, because we are going to introduce a replacement that should work the same way, and we don't have a way to test edge-cases at the moment |
203583b
to
51da18f
Compare
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 I guess
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.
looks good
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.
we can add more tests in future PR. Excited to see use this!
139e15d
to
9183b55
Compare
03f65c9
to
900e6b6
Compare
Will also close #197