e6234df
Thanks @ardatan! - Do not call res.onAborted multiple times because it causes it to overwrite the previous listener, and use AbortSignal's abort event instead
-
#1246
4717be5
Thanks @ardatan! - Ensure unique context objects are sent per each request.For example in CloudFlare Workers,
fetch
receivesenv
andctx
, andenv
is shared across requests. That causes the server receives the same context object for each request. Now the server creates a new context object for each request, even if the first argument is the same. Before, it always takes the first argument as the context object, then merges the following arguments into it.
- #1224
d6bec0a
Thanks @ardatan! - IntroducehandleRequestFromResponse
method for a better Fastify integration
-
#1220
ac6b719
Thanks @ardatan! - Fix UWS's behavior in case of request cancellation -
#1220
ac6b719
Thanks @ardatan! - Use ServerResponse's close event to catch request cancellation
- #1218
1443f93
Thanks @ardatan! - Set `reason` in `ServerAdapterRequestAbortSignal` to get a proper error when the request got aborted by the client
- #1190
c6f93ee
Thanks @ardatan! - Remove node: protocol which is not supported still in some Node versions and ESM mode
3f31f2d
Thanks @ardatan! - Handle errors from async request handlers correctly in case of AbortSignal
-
Updated dependencies [
0c6e9ca
]:- @whatwg-node/fetch@0.9.17
-
#997
0c28ae9
Thanks @ardatan! - Avoid mutating the static contextFor example if the adapter receives the server object as the server context, it is isolated and the handler cannot mutate it, otherwise it will leak. Bun does that so this patch is needed to avoid leaking the server object.
- #806
9b6911a
Thanks @ardatan! - ReturnBuffer
instead ofArrayBuffer
in.arrayBuffer
due to a bug in Node.js that returns a bigger ArrayBuffer causing memory overflow - Updated dependencies
[
9b6911a
]:- @whatwg-node/fetch@0.9.10
- #777
e3ae0a3
Thanks @ardatan! - Do not create a new Buffer to uWS and node-http, and use the existing Buffer instead for better performance in Node.js.
- #753
10db17b
Thanks @ardatan! - Handle errors thrown in the request handlers as Internal Server Error
- #741
427b829
Thanks @ardatan! - Avoid promise usages while handling hooks for performance optimizations
- #732
0794ee5
Thanks @ardatan! - If the environment is not able to send the response, do not terminate the server and handle internal errors in a better way
633655d
Thanks @ardatan! - Cork the response once for status codes and headers with the static response in uWS handler
124bbe5
Thanks @ardatan! - BREAKING: splitSetCookieHeader has been removed. UseHeaders.getSetCookie
instead
- Updated dependencies
[
124bbe5
]:- @whatwg-node/fetch@0.9.7
-
#614
f07d1c5
Thanks @ardatan! - Fix set-cookie handling for Node -
Updated dependencies [
f07d1c5
]:- @whatwg-node/fetch@0.9.6
-
Updated dependencies [
273ca94
]:- @whatwg-node/fetch@0.9.5
-
Updated dependencies [
d118d53
]:- @whatwg-node/fetch@0.9.4
-
Updated dependencies [
d7d9d9f
]:- @whatwg-node/fetch@0.9.3
- #583
15bf7c2
Thanks @ardatan! - dependencies updates:- Added dependency
@repeaterjs/repeater@^3.0.4
↗︎ (todependencies
)
- Added dependency
-
#380
0df1ac7
Thanks @ardatan! - If a method returns the object itself, return the adapter object -
Updated dependencies [
0df1ac7
]:- @whatwg-node/fetch@0.8.2
-
720b6ab
Thanks @ardatan! - BREAKING:withCors
andwithErrorHandling
are removed inserver
andplugins
option is removed inrouter
7d94f60
Thanks @ardatan! - If the first parameter's request property throws, consider it as a Request
-
Updated dependencies []:
- @whatwg-node/fetch@0.8.1
- Updated dependencies
[
ea5d252
]:- @whatwg-node/fetch@0.8.0
-
Updated dependencies [
390510b
]:- @whatwg-node/fetch@0.7.0
-
#314
3aa1848
Thanks @ardatan! - dependencies updates:- Updated dependency
@whatwg-node/fetch@^0.6.8
↗︎ (from0.6.8
, independencies
)
- Updated dependency
-
#314
3aa1848
Thanks @ardatan! - Align versions with ranged dependencies and cross version support internally -
Updated dependencies [
3aa1848
,3aa1848
]:- @whatwg-node/fetch@0.6.9
- Updated dependencies []:
- @whatwg-node/fetch@0.6.8
-
Updated dependencies []:
- @whatwg-node/fetch@0.6.7
- Updated dependencies []:
- @whatwg-node/fetch@0.6.6
- Updated dependencies
[
63c96f5
]:- @whatwg-node/fetch@0.6.5
- Updated dependencies
[
2ce7122
]:- @whatwg-node/fetch@0.6.4
- #154
9f4fe48
Thanks @ardatan! - dependencies updates:- Removed dependency
@types/node@^18.0.6
↗︎ (frompeerDependencies
)
- Removed dependency
- Updated dependencies
[
9f4fe48
,9f4fe48
]:- @whatwg-node/fetch@0.6.3
a8e7184
Thanks @ardatan! - Handle falsy and non-object additional parameters while building the server context correctly
- #280
5ee9169
Thanks @hansottowirtz! - Copy non-enumerable properties to server context e.g. CF Workers' env and context
- Updated dependencies
[
802cb96
]:- @whatwg-node/fetch@0.6.2
- Updated dependencies
[
9752cca
]:- @whatwg-node/fetch@0.6.1
-
#234
fba62c4
Thanks @enisdenjo! - Adapt types for Node http2 -
Updated dependencies [
166102f
]:- @whatwg-node/fetch@0.5.4
- Updated dependencies
[
188ac01
]:- @whatwg-node/fetch@0.5.3
- Updated dependencies
[
3297c87
]:- @whatwg-node/fetch@0.5.2
- Updated dependencies
[
a8a7cfc
]:- @whatwg-node/fetch@0.5.1
- Updated dependencies
[
ab5fb52
]:- @whatwg-node/fetch@0.5.0
608943b
Thanks @enisdenjo! - Calling req.text() before req.json() is not necessary for Bun anymore
-
e59cbb6
Thanks @ardatan! - Do not patch global Headers if it is native, and support URL as a first parameter offetch
-
Updated dependencies [
e59cbb6
]:- @whatwg-node/fetch@0.4.7
-
#148
eb10500
Thanks @ardatan! - - On Node 14, fix the return method of Response.body's AsyncIterator to close HTTP connection correctly- On Node 14, handle ReadableStream's cancel correctly if Response.body is a ReadableStream
- Do not modify ReadableStream.cancel's behavior but handle it internally
- On Node 18, do not combine Response.body's return and AbortController which causes a memory leak
-
#149
519d42a
Thanks @ardatan! - Force stop connection after Response.body is done -
Updated dependencies [
c918527
,eb10500
]:- @whatwg-node/fetch@0.4.6
5a884ee
Thanks @ardatan! - Ensure ReadableStream is also cancelled after Reader cancelled if Response.body is ReadableStream
- #142
a8071f7
Thanks @ardatan! - Handle Node requests correctly if Response.body is a native ReadableStream
-
#134
ed098ba
Thanks @enisdenjo! - Improved types -
Updated dependencies [
5d151df
]:- @whatwg-node/fetch@0.4.5
a91ef16
Thanks @ardatan! - - Set ServerContext to an empty object by default for .fetch method- Do not call request handler twice which causes an error
disturbed
- Do not call request handler twice which causes an error
48bdf61
Thanks @ardatan! - Set an empty object if there is no server context sent by the environment
-
#121
a67f447
Thanks @ardatan! - Improvements;createServerAdapter
can now accept the request handler itself.
createServerAdapter((req) => { return new Response(`I got ${req.url}`); });
Breaking Changes;
baseObject
in the configuration has been removed! Now you can passbaseObject
itself butbaseObject
needs to implement ahandle
method that is exactly same withhandleRequest
.
- const myServerBaseObject = {...} + const myServerBaseObject = { + handle(req) {/*...*/} + } - const adapter = createServerAdapter({ - baseObject: myServerBaseObject, - handleRequest(req) {/*...*/} - }) + const adapter = createServerAdapter(myServerBaseObject)
handleRequest
has been renamed tohandle
which has the same signature.
createServerAdapter({ - handleRequest(request) { + handle(request) { })
Request
in the configuration needs to be passed as a second argument.
createServerAdapter({ - handleRequest(request) { + handle(request) { - Request: MyRequestCtor - }) + }, MyRequestCtor)
- #78
415b0a5
Thanks @ardatan! - Iffetch
is called with multiple arguments likefetch(request, env, ctx)
(for example CF Workers do that), the parameters afterrequest
will be merged and passed as aServerContext
to the providedhandleRequest
function.
- #78
415b0a5
Thanks @ardatan! - Since Node 18 starts returning IPv6 insocket.localAddress
, the generated URL was broken likehttp://0.0.0.1:3000
. Now it generates the URL ofRequest
on Node 18 correctly. First we respecthost
header as recommended in Node.js documentation. - Updated dependencies
[
9a8d873
]:- @whatwg-node/fetch@0.2.9
- 310c21a: Use "webworker" reference for "FetchEvent" type
- Updated dependencies [486c35d]
- @whatwg-node/fetch@0.2.0
- Updated dependencies [b83d7f3]
- Updated dependencies [b83d7f3]
- Updated dependencies [b83d7f3]
- Updated dependencies [b83d7f3]
- @whatwg-node/fetch@0.1.0
- 6aaa591: Use '.originalUrl' if possible to get
Request.url
properly because some frameworks like Express are sending/
tourl
- Updated dependencies [3207383]
- @whatwg-node/fetch@0.0.2
- 889eccf: NEW RELEASES
- Updated dependencies [889eccf]
- @whatwg-node/fetch@0.0.1