Skip to content

Commit

Permalink
fix(fetch): remove reference to node-fetch
Browse files Browse the repository at this point in the history
  • Loading branch information
jonluca committed Mar 5, 2024
1 parent e20a35f commit a4f02d2
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 62 deletions.
Binary file modified .yarn/install-state.gz
Binary file not shown.
9 changes: 0 additions & 9 deletions lib/resolvers/http.ts
Expand Up @@ -113,15 +113,6 @@ async function get(u: RequestInfo | URL, httpOptions: HTTPResolverOptions) {
timeoutId = setTimeout(() => controller.abort(), httpOptions.timeout);
}

if (!global.fetch) {
const { default: fetch, Request, Headers } = await import("node-fetch");
// @ts-ignore
global.fetch = fetch;
// @ts-ignore
global.Request = Request;
// @ts-ignore
global.Headers = Headers;
}
const response = await fetch(u, {
method: "GET",
headers: httpOptions.headers || {},
Expand Down
1 change: 0 additions & 1 deletion package.json
Expand Up @@ -82,7 +82,6 @@
"eslint-plugin-promise": "^6.1.1",
"eslint-plugin-unused-imports": "^3.1.0",
"jsdom": "^24.0.0",
"node-fetch": "^3.3.2",
"prettier": "^3.2.5",
"rimraf": "^5.0.5",
"typescript": "^5.3.3",
Expand Down
52 changes: 0 additions & 52 deletions yarn.lock
Expand Up @@ -44,7 +44,6 @@ __metadata:
eslint-plugin-unused-imports: "npm:^3.1.0"
js-yaml: "npm:^4.1.0"
jsdom: "npm:^24.0.0"
node-fetch: "npm:^3.3.2"
prettier: "npm:^3.2.5"
rimraf: "npm:^5.0.5"
typescript: "npm:^5.3.3"
Expand Down Expand Up @@ -1256,13 +1255,6 @@ __metadata:
languageName: node
linkType: hard

"data-uri-to-buffer@npm:^4.0.0":
version: 4.0.1
resolution: "data-uri-to-buffer@npm:4.0.1"
checksum: 10c0/20a6b93107597530d71d4cb285acee17f66bcdfc03fd81040921a81252f19db27588d87fc8fc69e1950c55cfb0bf8ae40d0e5e21d907230813eb5d5a7f9eb45b
languageName: node
linkType: hard

"data-urls@npm:^5.0.0":
version: 5.0.0
resolution: "data-urls@npm:5.0.0"
Expand Down Expand Up @@ -1936,16 +1928,6 @@ __metadata:
languageName: node
linkType: hard

"fetch-blob@npm:^3.1.2, fetch-blob@npm:^3.1.4":
version: 3.2.0
resolution: "fetch-blob@npm:3.2.0"
dependencies:
node-domexception: "npm:^1.0.0"
web-streams-polyfill: "npm:^3.0.3"
checksum: 10c0/60054bf47bfa10fb0ba6cb7742acec2f37c1f56344f79a70bb8b1c48d77675927c720ff3191fa546410a0442c998d27ab05e9144c32d530d8a52fbe68f843b69
languageName: node
linkType: hard

"file-entry-cache@npm:^6.0.1":
version: 6.0.1
resolution: "file-entry-cache@npm:6.0.1"
Expand Down Expand Up @@ -2022,15 +2004,6 @@ __metadata:
languageName: node
linkType: hard

"formdata-polyfill@npm:^4.0.10":
version: 4.0.10
resolution: "formdata-polyfill@npm:4.0.10"
dependencies:
fetch-blob: "npm:^3.1.2"
checksum: 10c0/5392ec484f9ce0d5e0d52fb5a78e7486637d516179b0eb84d81389d7eccf9ca2f663079da56f761355c0a65792810e3b345dc24db9a8bbbcf24ef3c8c88570c6
languageName: node
linkType: hard

"fs-minipass@npm:^2.0.0":
version: 2.1.0
resolution: "fs-minipass@npm:2.1.0"
Expand Down Expand Up @@ -3110,24 +3083,6 @@ __metadata:
languageName: node
linkType: hard

"node-domexception@npm:^1.0.0":
version: 1.0.0
resolution: "node-domexception@npm:1.0.0"
checksum: 10c0/5e5d63cda29856402df9472335af4bb13875e1927ad3be861dc5ebde38917aecbf9ae337923777af52a48c426b70148815e890a5d72760f1b4d758cc671b1a2b
languageName: node
linkType: hard

"node-fetch@npm:^3.3.2":
version: 3.3.2
resolution: "node-fetch@npm:3.3.2"
dependencies:
data-uri-to-buffer: "npm:^4.0.0"
fetch-blob: "npm:^3.1.4"
formdata-polyfill: "npm:^4.0.10"
checksum: 10c0/f3d5e56190562221398c9f5750198b34cf6113aa304e34ee97c94fd300ec578b25b2c2906edba922050fce983338fde0d5d34fcb0fc3336ade5bd0e429ad7538
languageName: node
linkType: hard

"node-gyp@npm:latest":
version: 10.0.1
resolution: "node-gyp@npm:10.0.1"
Expand Down Expand Up @@ -4427,13 +4382,6 @@ __metadata:
languageName: node
linkType: hard

"web-streams-polyfill@npm:^3.0.3":
version: 3.3.3
resolution: "web-streams-polyfill@npm:3.3.3"
checksum: 10c0/64e855c47f6c8330b5436147db1c75cb7e7474d924166800e8e2aab5eb6c76aac4981a84261dd2982b3e754490900b99791c80ae1407a9fa0dcff74f82ea3a7f
languageName: node
linkType: hard

"webidl-conversions@npm:^7.0.0":
version: 7.0.0
resolution: "webidl-conversions@npm:7.0.0"
Expand Down

0 comments on commit a4f02d2

Please sign in to comment.