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
509
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.5.20-rc-20240730143614-76ddb4acc63b332024d20ffa18898cf86b707623 to 0.5.20-rc-20240730145649-3d326c64a43b48290c8c30454172053ce6c74732

14

cjs/Request.js

@@ -78,6 +78,12 @@ "use strict";

}
if (requestInit?.agent != null &&
requestInit?.agent !== http_1.globalAgent &&
requestInit?.agent !== https_1.globalAgent) {
this._agent = requestInit?.agent;
if (requestInit?.agent != null) {
if (requestInit?.agent === false) {
this._agent = false;
}
if (this.url.startsWith('http:/') && this._agent instanceof http_1.Agent) {
this._agent = requestInit?.agent;
}
else if (this.url.startsWith('https:/') && this._agent instanceof https_1.Agent) {
this._agent = requestInit?.agent;
}
}

@@ -84,0 +90,0 @@ }

@@ -1,3 +0,3 @@

import { globalAgent as httpGlobalAgent } from 'http';
import { globalAgent as httpsGlobalAgent } from 'https';
import { Agent as HTTPAgent, globalAgent as httpGlobalAgent } from 'http';
import { Agent as HTTPSAgent, globalAgent as httpsGlobalAgent } from 'https';
import { PonyfillBody } from './Body.js';

@@ -75,6 +75,12 @@ import { isHeadersLike, PonyfillHeaders } from './Headers.js';

}
if (requestInit?.agent != null &&
requestInit?.agent !== httpGlobalAgent &&
requestInit?.agent !== httpsGlobalAgent) {
this._agent = requestInit?.agent;
if (requestInit?.agent != null) {
if (requestInit?.agent === false) {
this._agent = false;
}
if (this.url.startsWith('http:/') && this._agent instanceof HTTPAgent) {
this._agent = requestInit?.agent;
}
else if (this.url.startsWith('https:/') && this._agent instanceof HTTPSAgent) {
this._agent = requestInit?.agent;
}
}

@@ -81,0 +87,0 @@ }

{
"name": "@whatwg-node/node-fetch",
"version": "0.5.20-rc-20240730143614-76ddb4acc63b332024d20ffa18898cf86b707623",
"version": "0.5.20-rc-20240730145649-3d326c64a43b48290c8c30454172053ce6c74732",
"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