Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions .changeset/@whatwg-node_node-fetch-3694-dependencies.md

This file was deleted.

9 changes: 0 additions & 9 deletions .changeset/drain-native-https-unread-body.md

This file was deleted.

7 changes: 0 additions & 7 deletions .changeset/native-request-subclasses.md

This file was deleted.

7 changes: 0 additions & 7 deletions .changeset/readable-cancel-pending-read.md

This file was deleted.

2 changes: 1 addition & 1 deletion benchmarks/server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"test": "start-server-and-test start http://127.0.0.1:4000/ping loadtest"
},
"dependencies": {
"@whatwg-node/server": "0.13.0"
"@whatwg-node/server": "0.13.1"
},
"devDependencies": {
"start-server-and-test": "3.0.13"
Expand Down
2 changes: 1 addition & 1 deletion e2e/shared-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
"private": true,
"dependencies": {
"@whatwg-node/fetch": "0.12.1",
"@whatwg-node/server": "0.13.0"
"@whatwg-node/server": "0.13.1"
}
}
23 changes: 23 additions & 0 deletions packages/node-fetch/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,28 @@
# @whatwg-node/node-fetch

## 0.9.2

### Patch Changes

- [#3694](https://github.com/ardatan/whatwg-node/pull/3694)
[`f927bd2`](https://github.com/ardatan/whatwg-node/commit/f927bd2cf77b2e4b5eaf62dce374c976412b7527)
Thanks [@dependabot](https://github.com/apps/dependabot)! - dependencies
updates:
- Updated dependency
[`@fastify/busboy@^3.2.3` ↗︎](https://www.npmjs.com/package/@fastify/busboy/v/3.2.3)
(from `^3.1.1`, in `dependencies`)

- [#3715](https://github.com/ardatan/whatwg-node/pull/3715)
[`06e7013`](https://github.com/ardatan/whatwg-node/commit/06e70134287cc0b624a73b3d783a8ea9aab9ca7c)
Thanks [@ardatan](https://github.com/ardatan)! - Fulfill pending
`reader.read()` as `{ done: true }` when `cancel(reason)` runs, matching the
WHATWG ReadableStream cancel algorithm (and native undici).

Previously `cancel()` called `readable.destroy()` without ending the stream
first, so an in-flight `read()` rejected with `ERR_STREAM_PREMATURE_CLOSE` /
`Premature close` instead of settling as done. The cancel `reason` still
reaches `underlyingSource.cancel(reason)`.

## 0.9.1

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/node-fetch/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@whatwg-node/node-fetch",
"version": "0.9.1",
"version": "0.9.2",
"type": "module",
"description": "Fetch API implementation for Node",
"repository": {
Expand Down
39 changes: 39 additions & 0 deletions packages/server/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,44 @@
# @whatwg-node/server

## 0.13.1

### Patch Changes

- [#3672](https://github.com/ardatan/whatwg-node/pull/3672)
[`978ebed`](https://github.com/ardatan/whatwg-node/commit/978ebed6e45d7ff94c56711c140d8698e009c7f6)
Thanks [@renovate](https://github.com/apps/renovate)! - Drain unread request
bodies correctly when the adapter uses the platform (native undici) `Request`
on Node.js HTTPS.

`discardUnreadNodeRequestBody` previously only called
`IncomingMessage#resume()`. That is enough for the `@whatwg-node/node-fetch`
ponyfill and for plain `node:http`, but native undici keeps an unused
`IncomingMessage` body **paused**. On `node:https` the TLS upload then stalls
mid-response: `readableFlowing` stays false, buffered unread bytes remain, and
keep-alive / early-response paths hang or fail Node 26 unit coverage
(`discard-unread-request-body`).

For `fetchAPI.Request === globalThis.Request` on **HTTPS**
(`socket.encrypted`), `normalizeNodeRequest` wraps the socket stream in a
platform `ReadableStream` (via `fetchAPI.ReadableStream`). Listeners attach on
first pull; discard runs a sync drain helper (detach +
`IncomingMessage#resume`) instead of `body.cancel()`, so unread TLS bytes
drain without destroying keep-alive and without a runtime `node:stream` /
`PassThrough` import or a floating cancel promise. Plain HTTP and ponyfill
paths are unchanged (`IncomingMessage` + `resume()` only). Paths that reuse
`request.body` as the response body still skip discard via the existing
identity checks.

- [#3717](https://github.com/ardatan/whatwg-node/pull/3717)
[`02e1834`](https://github.com/ardatan/whatwg-node/commit/02e1834c9645283bee9594d1ab6d16f138c6d133)
Thanks [@ardatan](https://github.com/ardatan)! - Pick the native Fetch API for
`Request` subclasses and proxies of them, such as Next.js `NextRequest`.

Constructor identity treated those requests as the ponyfill, so
`useLimitRequestBodySize` piped a native body through
`PonyfillTransformStream` and Node threw
`The "transform.readable" property must be an instance of ReadableStream`.

## 0.13.0

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/server/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@whatwg-node/server",
"version": "0.13.0",
"version": "0.13.1",
"type": "module",
"description": "Fetch API compliant HTTP Server adapter",
"repository": {
Expand Down
Loading