Skip to content

Latest commit

 

History

History
200 lines (121 loc) · 6.94 KB

CHANGELOG.md

File metadata and controls

200 lines (121 loc) · 6.94 KB

@whatwg-node/server

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