Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@whatwg-node/node-fetch

Package Overview
Dependencies
Maintainers
1
Versions
620
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@whatwg-node/node-fetch - npm Package Compare versions

Comparing version 0.7.6-alpha-20250107153812-2b7cc1f8c195a23bdaa804e863be3032890ab3c1 to 0.7.6-alpha-20250107210838-55d5cc33b082b1962ee6ef7a42c21f20e2767b1c

24

cjs/fetchCurl.js

@@ -66,15 +66,14 @@ "use strict";

let streamResolved;
function onAbort() {
if (curlHandle.isOpen) {
try {
curlHandle.pause(CurlPause.Recv);
if (fetchRequest['_signal']) {
fetchRequest['_signal'].onabort = () => {
if (curlHandle.isOpen) {
try {
curlHandle.pause(CurlPause.Recv);
}
catch (e) {
deferredPromise.reject(e);
}
}
catch (e) {
deferredPromise.reject(e);
}
}
};
}
if (fetchRequest['_signal']) {
fetchRequest['_signal'].addEventListener('abort', onAbort, { once: true });
}
curlHandle.once('end', function endListener() {

@@ -87,5 +86,2 @@ try {

}
if (fetchRequest['_signal']) {
fetchRequest['_signal'].removeEventListener('abort', onAbort);
}
});

@@ -92,0 +88,0 @@ curlHandle.once('error', function errorListener(error) {

@@ -63,15 +63,14 @@ import { PassThrough, Readable } from 'node:stream';

let streamResolved;
function onAbort() {
if (curlHandle.isOpen) {
try {
curlHandle.pause(CurlPause.Recv);
if (fetchRequest['_signal']) {
fetchRequest['_signal'].onabort = () => {
if (curlHandle.isOpen) {
try {
curlHandle.pause(CurlPause.Recv);
}
catch (e) {
deferredPromise.reject(e);
}
}
catch (e) {
deferredPromise.reject(e);
}
}
};
}
if (fetchRequest['_signal']) {
fetchRequest['_signal'].addEventListener('abort', onAbort, { once: true });
}
curlHandle.once('end', function endListener() {

@@ -84,5 +83,2 @@ try {

}
if (fetchRequest['_signal']) {
fetchRequest['_signal'].removeEventListener('abort', onAbort);
}
});

@@ -89,0 +85,0 @@ curlHandle.once('error', function errorListener(error) {

{
"name": "@whatwg-node/node-fetch",
"version": "0.7.6-alpha-20250107153812-2b7cc1f8c195a23bdaa804e863be3032890ab3c1",
"version": "0.7.6-alpha-20250107210838-55d5cc33b082b1962ee6ef7a42c21f20e2767b1c",
"description": "Fetch API implementation for Node",

@@ -5,0 +5,0 @@ "sideEffects": false,

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc