@whatwg-node/node-fetch 0.7.15-alpha-20250324114328-290d8363ab5adbcacb8cd300791dcd5694b9669d → 0.7.15-alpha-20250324114941-a4f8cfea938b66f893b1401a217715f2e5d80dd1

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
@@ -407,19 +407,16 @@ function processBodyInit(bodyInit, signal) {
407
407
  };
408
408
  }
409
409
  if (bodyInit instanceof node_http_1.IncomingMessage) {
410
- const originalStream = bodyInit;
411
- const passthrough = (bodyInit = bodyInit.pipe(new node_stream_1.PassThrough({
410
+ const passthrough = new node_stream_1.PassThrough({
412
411
  signal,
413
- }), {
414
- end: true,
415
- }));
416
- (0, promises_1.pipeline)(originalStream, passthrough, {
412
+ });
413
+ (0, promises_1.pipeline)(bodyInit, passthrough, {
417
414
  end: true,
418
415
  signal,
419
416
  })
420
417
  .then(() => {
421
- if (!originalStream.destroyed) {
422
- originalStream.resume();
418
+ if (!bodyInit.destroyed) {
419
+ bodyInit.resume();
423
420
  }
424
421
  })
425
422
  .catch(e => {
package/cjs/fetchCurl.js CHANGED
@@ -102,9 +102,7 @@ function fetchCurl(fetchRequest) {
102
102
  }
103
103
  });
104
104
  curlHandle.once('stream', function streamListener(stream, status, headersBuf) {
105
- const outputStream = new node_stream_1.PassThrough({
106
- signal: fetchRequest.signal,
107
- });
105
+ const outputStream = new node_stream_1.PassThrough();
108
106
  (0, promises_1.pipeline)(stream, outputStream, {
109
107
  end: true,
110
108
  signal: fetchRequest.signal,
package/esm/Body.js CHANGED
@@ -402,19 +402,16 @@ function processBodyInit(bodyInit, signal) {
402
402
  };
403
403
  }
404
404
  if (bodyInit instanceof IncomingMessage) {
405
- const originalStream = bodyInit;
406
- const passthrough = (bodyInit = bodyInit.pipe(new PassThrough({
405
+ const passthrough = new PassThrough({
407
406
  signal,
408
- }), {
409
- end: true,
410
- }));
411
- pipeline(originalStream, passthrough, {
407
+ });
408
+ pipeline(bodyInit, passthrough, {
412
409
  end: true,
413
410
  signal,
414
411
  })
415
412
  .then(() => {
416
- if (!originalStream.destroyed) {
417
- originalStream.resume();
413
+ if (!bodyInit.destroyed) {
414
+ bodyInit.resume();
418
415
  }
419
416
  })
420
417
  .catch(e => {
package/esm/fetchCurl.js CHANGED
@@ -99,9 +99,7 @@ export function fetchCurl(fetchRequest) {
99
99
  }
100
100
  });
101
101
  curlHandle.once('stream', function streamListener(stream, status, headersBuf) {
102
- const outputStream = new PassThrough({
103
- signal: fetchRequest.signal,
104
- });
102
+ const outputStream = new PassThrough();
105
103
  pipeline(stream, outputStream, {
106
104
  end: true,
107
105
  signal: fetchRequest.signal,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@whatwg-node/node-fetch",
3
- "version": "0.7.15-alpha-20250324114328-290d8363ab5adbcacb8cd300791dcd5694b9669d",
3
+ "version": "0.7.15-alpha-20250324114941-a4f8cfea938b66f893b1401a217715f2e5d80dd1",
4
4
  "description": "Fetch API implementation for Node",
5
5
  "sideEffects": false,
6
6
  "dependencies": {