@stepzen/fetch
Advanced tools
Comparing version 0.45.0-experimental.8333304 to 0.45.0-experimental.199b9ab
@@ -1,4 +0,4 @@ | ||
import type { RequestInfo, RequestInit, Response } from 'node-fetch'; | ||
declare const fetch: (url: RequestInfo | URL, init?: RequestInit) => Promise<Response>; | ||
import { RequestInfo, RequestInit, Response } from 'node-fetch'; | ||
declare const fetch: (url: RequestInfo, init?: RequestInit) => Promise<Response>; | ||
export default fetch; | ||
//# sourceMappingURL=index.d.ts.map |
// Copyright IBM Corp. 2020, 2024 | ||
import { Agent as HttpAgent } from 'node:http'; | ||
import { Agent as HttpsAgent } from 'node:https'; | ||
import fetch0 from 'node-fetch'; | ||
import fetchCJSModule from 'node-fetch'; | ||
// workaround for https://github.com/steprz/stepzen-cli/issues/934 | ||
@@ -27,3 +27,3 @@ const httpAgent = new HttpAgent({ | ||
} | ||
return fetch0(url, { | ||
return fetchCJSModule.default(url, { | ||
agent: urlstr.startsWith('https:') ? httpsAgent : httpAgent, | ||
@@ -30,0 +30,0 @@ ...init, |
{ | ||
"name": "@stepzen/fetch", | ||
"description": "StepZen implementation of the fetch() API for NodeJS", | ||
"version": "0.45.0-experimental.8333304", | ||
"version": "0.45.0-experimental.199b9ab", | ||
"author": "StepZen Ltd", | ||
@@ -26,3 +26,3 @@ "license": "MIT", | ||
"debug": "^4.3.4", | ||
"node-fetch": "^3.3.2" | ||
"node-fetch": "^2.6.9" | ||
}, | ||
@@ -34,2 +34,3 @@ "devDependencies": { | ||
"@types/mocha": "^10.0.9", | ||
"@types/node-fetch": "^2.6.2", | ||
"chai": "^4.3.10", | ||
@@ -50,3 +51,3 @@ "fancy-test": "^1.4.10", | ||
}, | ||
"gitHead": "83333044828d7a82d7dd0ad61a462be8eee23522" | ||
"gitHead": "199b9abe643fdf9b00776cd13d02cec593f3f5ea" | ||
} |
// Copyright IBM Corp. 2020, 2024 | ||
import type {RequestInfo, RequestInit, Response} from 'node-fetch' | ||
import {Agent as HttpAgent} from 'node:http' | ||
import {Agent as HttpsAgent} from 'node:https' | ||
import fetch0 from 'node-fetch' | ||
import fetchCJSModule from 'node-fetch' | ||
import {RequestInfo, RequestInit, Response} from 'node-fetch' | ||
@@ -23,3 +22,3 @@ // workaround for https://github.com/steprz/stepzen-cli/issues/934 | ||
const fetch = async ( | ||
url: RequestInfo | URL, | ||
url: RequestInfo, | ||
init?: RequestInit, | ||
@@ -36,3 +35,3 @@ ): Promise<Response> => { | ||
return fetch0(url, { | ||
return fetchCJSModule.default(url, { | ||
agent: urlstr.startsWith('https:') ? httpsAgent : httpAgent, | ||
@@ -39,0 +38,0 @@ ...init, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6272
15
+ Addednode-fetch@2.7.0(transitive)
+ Addedtr46@0.0.3(transitive)
+ Addedwebidl-conversions@3.0.1(transitive)
+ Addedwhatwg-url@5.0.0(transitive)
- Removeddata-uri-to-buffer@4.0.1(transitive)
- Removedfetch-blob@3.2.0(transitive)
- Removedformdata-polyfill@4.0.10(transitive)
- Removednode-domexception@1.0.0(transitive)
- Removednode-fetch@3.3.2(transitive)
- Removedweb-streams-polyfill@3.3.3(transitive)
Updatednode-fetch@^2.6.9