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

@stepzen/fetch

Package Overview
Dependencies
Maintainers
8
Versions
207
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@stepzen/fetch - npm Package Compare versions

Comparing version 0.44.0 to 0.45.0-experimental.32a4304

16

lib/index.js

@@ -1,9 +0,7 @@

"use strict";
// Copyright IBM Corp. 2020, 2024
Object.defineProperty(exports, "__esModule", { value: true });
const http = require("http");
const https = require("https");
const node_fetch_1 = require("node-fetch");
import { Agent as HttpAgent } from 'node:http';
import { Agent as HttpsAgent } from 'node:https';
import fetchCJSModule from 'node-fetch';
// workaround for https://github.com/steprz/stepzen-cli/issues/934
const httpAgent = new http.Agent({
const httpAgent = new HttpAgent({
keepAlive: true,

@@ -13,3 +11,3 @@ scheduling: 'lifo',

});
const httpsAgent = new https.Agent({
const httpsAgent = new HttpsAgent({
keepAlive: true,

@@ -30,3 +28,3 @@ scheduling: 'lifo',

}
return (0, node_fetch_1.default)(url, {
return fetchCJSModule.default(url, {
agent: urlstr.startsWith('https:') ? httpsAgent : httpAgent,

@@ -36,3 +34,3 @@ ...init,

};
exports.default = fetch;
export default fetch;
//# sourceMappingURL=index.js.map
{
"name": "@stepzen/fetch",
"description": "StepZen implementation of the fetch() API for NodeJS",
"version": "0.44.0",
"version": "0.45.0-experimental.32a4304",
"author": "StepZen Ltd",

@@ -11,2 +11,3 @@ "license": "MIT",

],
"type": "module",
"main": "lib/index.js",

@@ -46,3 +47,3 @@ "types": "lib/index.d.ts",

},
"gitHead": "9afcacbee765998d29795896f8969fd9e4e29926"
"gitHead": "32a43047da221d51d7680e769ed11f766dcaaba5"
}
// Copyright IBM Corp. 2020, 2024
import * as http from 'http'
import * as https from 'https'
import fetch0 from 'node-fetch'
import {Agent as HttpAgent} from 'node:http'
import {Agent as HttpsAgent} from 'node:https'
import fetchCJSModule from 'node-fetch'
import {RequestInfo, RequestInit, Response} from 'node-fetch'
// workaround for https://github.com/steprz/stepzen-cli/issues/934
const httpAgent = new http.Agent({
const httpAgent = new HttpAgent({
keepAlive: true,

@@ -15,3 +15,3 @@ scheduling: 'lifo',

const httpsAgent = new https.Agent({
const httpsAgent = new HttpsAgent({
keepAlive: true,

@@ -35,3 +35,3 @@ scheduling: 'lifo',

return fetch0(url, {
return fetchCJSModule.default(url, {
agent: urlstr.startsWith('https:') ? httpsAgent : httpAgent,

@@ -38,0 +38,0 @@ ...init,

Sorry, the diff of this file is not supported yet

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