Skip to content

Latest commit

 

History

History
985 lines (629 loc) · 33.4 KB

CHANGELOG.md

File metadata and controls

985 lines (629 loc) · 33.4 KB

@whatwg-node/server

0.9.34

Patch Changes

  • 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

0.9.33

Patch Changes

  • #1246 4717be5 Thanks @ardatan! - Ensure unique context objects are sent per each request.

    For example in CloudFlare Workers, fetch receives env and ctx, and env 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.

0.9.32

Patch Changes

  • #1224 d6bec0a Thanks @ardatan! - Introduce handleRequestFromResponse method for a better Fastify integration

0.9.31

Patch Changes

0.9.30

Patch Changes

  • #1218 1443f93 Thanks @ardatan! - Set `reason` in `ServerAdapterRequestAbortSignal` to get a proper error when the request got aborted by the client

0.9.29

Patch Changes

  • #1190 c6f93ee Thanks @ardatan! - Remove node: protocol which is not supported still in some Node versions and ESM mode

0.9.28

Patch Changes

  • 3f31f2d Thanks @ardatan! - Handle errors from async request handlers correctly in case of AbortSignal

0.9.27

Patch Changes

0.9.26

Patch Changes

0.9.25

Patch Changes

0.9.24

Patch Changes

0.9.23

Patch Changes

  • f775c41 Thanks @ardatan! - If protocol is not available, use socket.encrypted correctly

0.9.22

Patch Changes

0.9.21

Patch Changes

0.9.20

Patch Changes

0.9.19

Patch Changes

  • #997 0c28ae9 Thanks @ardatan! - Avoid mutating the static context

    For 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.

0.9.18

Patch Changes

0.9.17

Patch Changes

0.9.16

Patch Changes

  • e4061de Thanks @ardatan! - If Response.error is not implemented, use Response ctor directly

0.9.15

Patch Changes

0.9.14

Patch Changes

  • #806 9b6911a Thanks @ardatan! - Return Buffer instead of ArrayBuffer 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

0.9.13

Patch Changes

0.9.12

Patch Changes

  • #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.

0.9.11

Patch Changes

0.9.10

Patch Changes

  • #753 10db17b Thanks @ardatan! - Handle errors thrown in the request handlers as Internal Server Error

0.9.9

Patch Changes

  • 11fb356 Thanks @ardatan! - Avoid wrapping handleRequest if there is no hook

0.9.8

Patch Changes

  • #741 427b829 Thanks @ardatan! - Avoid promise usages while handling hooks for performance optimizations

0.9.7

Patch Changes

  • #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

0.9.6

Patch Changes

  • 5136050 Thanks @ardatan! - For uWebSockets, call res.onAborted only if response is a stream

0.9.5

Patch Changes

  • 633655d Thanks @ardatan! - Cork the response once for status codes and headers with the static response in uWS handler

0.9.4

Patch Changes

0.9.3

Patch Changes

0.9.2

Patch Changes

  • bc955e0 Thanks @ardatan! - Optimizations for setting headers to ServerResponse

0.9.1

Patch Changes

0.9.0

Minor Changes

  • 124bbe5 Thanks @ardatan! - BREAKING: splitSetCookieHeader has been removed. Use Headers.getSetCookie instead

Patch Changes

  • Updated dependencies [124bbe5]:
    • @whatwg-node/fetch@0.9.7

0.8.12

Patch Changes

0.8.11

Patch Changes

0.8.10

Patch Changes

0.8.9

Patch Changes

0.8.8

Patch Changes

0.8.7

Patch Changes

0.8.6

Patch Changes

0.8.5

Patch Changes

0.8.4

Patch Changes

0.8.3

Patch Changes

0.8.2

Patch Changes

0.8.1

Patch Changes

0.7.6

Patch Changes

0.7.5

Patch Changes

0.7.4

Patch Changes

0.7.3

Patch Changes

  • 3bac7e3 Thanks @ardatan! - Fix regression on handling methods from base object

0.7.2

Patch Changes

  • #380 0df1ac7 Thanks @ardatan! - If a method returns the object itself, return the adapter object

  • Updated dependencies [0df1ac7]:

    • @whatwg-node/fetch@0.8.2

0.7.1

Patch Changes

0.7.0

Minor Changes

  • #264 f5fa2d7 Thanks @ardatan! - Plugin System

  • 720b6ab Thanks @ardatan! - BREAKING: withCors and withErrorHandling are removed in server and plugins option is removed in router

Patch Changes

  • 7d94f60 Thanks @ardatan! - If the first parameter's request property throws, consider it as a Request

0.6.7

Patch Changes

  • c7b9c8a Thanks @ardatan! - Fix handling search parameters

  • Updated dependencies []:

    • @whatwg-node/fetch@0.8.1

0.6.6

Patch Changes

  • Updated dependencies [ea5d252]:
    • @whatwg-node/fetch@0.8.0

0.6.5

Patch Changes

0.6.4

Patch Changes

0.6.3

Patch Changes

  • Updated dependencies []:
    • @whatwg-node/fetch@0.6.8

0.6.2

Patch Changes

  • #311 8edd68d Thanks @ardatan! - Performance improvements

  • Updated dependencies []:

    • @whatwg-node/fetch@0.6.7

0.6.1

Patch Changes

0.6.0

Minor Changes

Patch Changes

  • Updated dependencies []:
    • @whatwg-node/fetch@0.6.6

0.5.11

Patch Changes

  • Updated dependencies [63c96f5]:
    • @whatwg-node/fetch@0.6.5

0.5.10

Patch Changes

  • Updated dependencies [2ce7122]:
    • @whatwg-node/fetch@0.6.4

0.5.9

Patch Changes

0.5.8

Patch Changes

  • a8e7184 Thanks @ardatan! - Handle falsy and non-object additional parameters while building the server context correctly

0.5.7

Patch Changes

0.5.6

Patch Changes

  • Updated dependencies [802cb96]:
    • @whatwg-node/fetch@0.6.2

0.5.5

Patch Changes

  • b68dd96 Thanks @ardatan! - Align waitUntil signature with the original FetchEvent.waitUntil

0.5.4

Patch Changes

  • #245 273a30e Thanks @ardatan! - Listen for 'close' event to resolve instead of 'end' callback

0.5.3

Patch Changes

  • Updated dependencies [9752cca]:
    • @whatwg-node/fetch@0.6.1

0.5.2

Patch Changes

0.5.1

Patch Changes

0.5.0

Minor Changes

0.4.17

Patch Changes

0.4.16

Patch Changes

  • Updated dependencies [188ac01]:
    • @whatwg-node/fetch@0.5.3

0.4.15

Patch Changes

  • Updated dependencies [3297c87]:
    • @whatwg-node/fetch@0.5.2

0.4.14

Patch Changes

  • Updated dependencies [a8a7cfc]:
    • @whatwg-node/fetch@0.5.1

0.4.13

Patch Changes

  • Updated dependencies [ab5fb52]:
    • @whatwg-node/fetch@0.5.0

0.4.12

Patch Changes

  • 608943b Thanks @enisdenjo! - Calling req.text() before req.json() is not necessary for Bun anymore

0.4.11

Patch Changes

  • e59cbb6 Thanks @ardatan! - Do not patch global Headers if it is native, and support URL as a first parameter of fetch

  • Updated dependencies [e59cbb6]:

    • @whatwg-node/fetch@0.4.7

0.4.10

Patch Changes

  • #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

0.4.9

Patch Changes

  • 5a884ee Thanks @ardatan! - Ensure ReadableStream is also cancelled after Reader cancelled if Response.body is ReadableStream

0.4.8

Patch Changes

  • #142 a8071f7 Thanks @ardatan! - Handle Node requests correctly if Response.body is a native ReadableStream

0.4.7

Patch Changes

0.4.6

Patch Changes

0.4.5

Patch Changes

  • 16fdfb9 Thanks @ardatan! - Use fixed version of fetch package instead of ranged version

0.4.4

Patch Changes

  • 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

0.4.3

Patch Changes

0.4.2

Patch Changes

  • 48bdf61 Thanks @ardatan! - Set an empty object if there is no server context sent by the environment

0.4.1

Patch Changes

0.4.0

Minor Changes

  • #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 pass baseObject itself but baseObject needs to implement a handle method that is exactly same with handleRequest.
    - const myServerBaseObject = {...}
    + const myServerBaseObject = {
    +   handle(req) {/*...*/}
    + }
    
    - const adapter = createServerAdapter({
    -   baseObject: myServerBaseObject,
    -   handleRequest(req) {/*...*/}
    - })
    + const adapter = createServerAdapter(myServerBaseObject)
    • handleRequest has been renamed to handle 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)

0.3.0

Minor Changes

0.2.0

Minor Changes

Patch Changes

0.1.2

Patch Changes

0.1.1

Patch Changes

  • fd179aa Thanks @ardatan! - Fix the signature of the server adapter's fetch

0.1.0

Minor Changes

  • #78 415b0a5 Thanks @ardatan! - If fetch is called with multiple arguments like fetch(request, env, ctx) (for example CF Workers do that), the parameters after request will be merged and passed as a ServerContext to the provided handleRequest function.

Patch Changes

  • #78 415b0a5 Thanks @ardatan! - Since Node 18 starts returning IPv6 in socket.localAddress, the generated URL was broken like http://0.0.0.1:3000. Now it generates the URL of Request on Node 18 correctly. First we respect host header as recommended in Node.js documentation.
  • Updated dependencies [9a8d873]:
    • @whatwg-node/fetch@0.2.9

0.0.6

Patch Changes

  • 310c21a: Use "webworker" reference for "FetchEvent" type

0.0.5

Patch Changes

  • Updated dependencies [486c35d]
    • @whatwg-node/fetch@0.2.0

0.0.4

Patch Changes

  • Updated dependencies [b83d7f3]
  • Updated dependencies [b83d7f3]
  • Updated dependencies [b83d7f3]
  • Updated dependencies [b83d7f3]
    • @whatwg-node/fetch@0.1.0

0.0.3

Patch Changes

  • 6aaa591: Use '.originalUrl' if possible to get Request.url properly because some frameworks like Express are sending / to url

0.0.2

Patch Changes

  • Updated dependencies [3207383]
    • @whatwg-node/fetch@0.0.2

0.0.1

Patch Changes

  • 889eccf: NEW RELEASES
  • Updated dependencies [889eccf]
    • @whatwg-node/fetch@0.0.1