@whatwg-node/node-fetch 0.7.15-alpha-20250324185339-daa21e16c396158104a59781d00308c832a5948a → 0.7.15-alpha-20250324200606-efaaa73129f4da815d67e073947d9ea91de55e6c

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/cjs/Body.js CHANGED
@@ -409,6 +409,9 @@ function processBodyInit(bodyInit, signal) {
409
409
  }), {
410
410
  end: true,
411
411
  });
412
+ if (signal) {
413
+ (0, node_stream_1.addAbortSignal)(signal, passThrough);
414
+ }
412
415
  return {
413
416
  bodyType: BodyInitType.Readable,
414
417
  contentType: null,
package/cjs/Response.js CHANGED
@@ -18,6 +18,7 @@ class PonyfillResponse extends Body_js_1.PonyfillBody {
18
18
  this.url = init?.url || '';
19
19
  this.redirected = init?.redirected || false;
20
20
  this.type = init?.type || 'default';
21
+ this.signal = init?.signal || null;
21
22
  this.handleContentLengthHeader();
22
23
  }
23
24
  get ok() {
@@ -106,6 +106,7 @@ function fetchNodeHttp(fetchRequest) {
106
106
  statusText,
107
107
  headers: nodeResponse.headers,
108
108
  url: fetchRequest.url,
109
+ signal: fetchRequest.signal,
109
110
  });
110
111
  resolve(ponyfillResponse);
111
112
  });
package/esm/Body.js CHANGED
@@ -404,6 +404,9 @@ function processBodyInit(bodyInit, signal) {
404
404
  }), {
405
405
  end: true,
406
406
  });
407
+ if (signal) {
408
+ addAbortSignal(signal, passThrough);
409
+ }
407
410
  return {
408
411
  bodyType: BodyInitType.Readable,
409
412
  contentType: null,
package/esm/Response.js CHANGED
@@ -15,6 +15,7 @@ export class PonyfillResponse extends PonyfillBody {
15
15
  this.url = init?.url || '';
16
16
  this.redirected = init?.redirected || false;
17
17
  this.type = init?.type || 'default';
18
+ this.signal = init?.signal || null;
18
19
  this.handleContentLengthHeader();
19
20
  }
20
21
  get ok() {
@@ -103,6 +103,7 @@ export function fetchNodeHttp(fetchRequest) {
103
103
  statusText,
104
104
  headers: nodeResponse.headers,
105
105
  url: fetchRequest.url,
106
+ signal: fetchRequest.signal,
106
107
  });
107
108
  resolve(ponyfillResponse);
108
109
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@whatwg-node/node-fetch",
3
- "version": "0.7.15-alpha-20250324185339-daa21e16c396158104a59781d00308c832a5948a",
3
+ "version": "0.7.15-alpha-20250324200606-efaaa73129f4da815d67e073947d9ea91de55e6c",
4
4
  "description": "Fetch API implementation for Node",
5
5
  "sideEffects": false,
6
6
  "dependencies": {