@whatwg-node/node-fetch 0.7.16 → 0.7.17-alpha-20250325145529-58232171d1f56e9f26b72ecd5acfffe6680802dc
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 +5 -9
- package/esm/Body.js +5 -9
- package/package.json +1 -1
package/cjs/Body.js
CHANGED
@@ -402,17 +402,13 @@ function processBodyInit(bodyInit, signal) {
|
|
402
402
|
};
|
403
403
|
}
|
404
404
|
if (bodyInit instanceof node_http_1.IncomingMessage) {
|
405
|
-
const passThrough = new node_stream_1.PassThrough(
|
405
|
+
const passThrough = new node_stream_1.PassThrough();
|
406
|
+
(0, promises_1.pipeline)(bodyInit, passThrough, {
|
406
407
|
signal,
|
408
|
+
end: true,
|
409
|
+
}).catch(e => {
|
410
|
+
passThrough.destroy(e);
|
407
411
|
});
|
408
|
-
if (signal) {
|
409
|
-
(0, promises_1.pipeline)(bodyInit, passThrough, {
|
410
|
-
signal,
|
411
|
-
end: true,
|
412
|
-
}).catch(e => {
|
413
|
-
passThrough.destroy(e);
|
414
|
-
});
|
415
|
-
}
|
416
412
|
return {
|
417
413
|
bodyType: BodyInitType.Readable,
|
418
414
|
contentType: null,
|
package/esm/Body.js
CHANGED
@@ -397,17 +397,13 @@ function processBodyInit(bodyInit, signal) {
|
|
397
397
|
};
|
398
398
|
}
|
399
399
|
if (bodyInit instanceof IncomingMessage) {
|
400
|
-
const passThrough = new PassThrough(
|
400
|
+
const passThrough = new PassThrough();
|
401
|
+
pipeline(bodyInit, passThrough, {
|
401
402
|
signal,
|
403
|
+
end: true,
|
404
|
+
}).catch(e => {
|
405
|
+
passThrough.destroy(e);
|
402
406
|
});
|
403
|
-
if (signal) {
|
404
|
-
pipeline(bodyInit, passThrough, {
|
405
|
-
signal,
|
406
|
-
end: true,
|
407
|
-
}).catch(e => {
|
408
|
-
passThrough.destroy(e);
|
409
|
-
});
|
410
|
-
}
|
411
407
|
return {
|
412
408
|
bodyType: BodyInitType.Readable,
|
413
409
|
contentType: null,
|
package/package.json
CHANGED