From ae0cca0753fb3889a7e00ba0408b873cd244c6d4 Mon Sep 17 00:00:00 2001 From: Ben Hollis Date: Thu, 28 Mar 2024 00:05:12 -0700 Subject: [PATCH] Remove node-fetch --- generator/generate-manifest.ts | 1 - package.json | 1 - tests/manifest-fetcher.test.ts | 2 -- tests/test-manifest.js | 1 - yarn.lock | 25 ------------------------- 5 files changed, 30 deletions(-) diff --git a/generator/generate-manifest.ts b/generator/generate-manifest.ts index 83894e69..bbc04795 100644 --- a/generator/generate-manifest.ts +++ b/generator/generate-manifest.ts @@ -1,6 +1,5 @@ import { DefInfo } from './util.js'; import { OpenAPIObject } from 'openapi3-ts'; -import fetch from 'node-fetch'; import { writeOutFile } from './generate-common.js'; const httpClientType = `import { HttpClient, get } from '../http.js';`; diff --git a/package.json b/package.json index e2c9d93f..1d67b48a 100644 --- a/package.json +++ b/package.json @@ -54,7 +54,6 @@ "jest": "^29.3.1", "lodash": "^4.17.21", "mkdirp": "^2.1.3", - "node-fetch": "2.6.6", "openapi3-ts": "^2.0.1", "prettier": "^2.8.1", "ts-jest": "^29.0.3", diff --git a/tests/manifest-fetcher.test.ts b/tests/manifest-fetcher.test.ts index cdfe94de..f35d4e6e 100644 --- a/tests/manifest-fetcher.test.ts +++ b/tests/manifest-fetcher.test.ts @@ -2,8 +2,6 @@ import { getDestinyManifest } from '../generated-src/destiny2/api'; import { getDestinyManifestSlice } from '../generated-src/destiny2/manifest'; import { HttpClientConfig } from '../generated-src/http'; -import fetch from 'node-fetch'; - async function httpClient(config: HttpClientConfig) { return (fetch as any)(config.url, config) .then((res: Response) => res.json()) diff --git a/tests/test-manifest.js b/tests/test-manifest.js index 4e6bd628..fdecbee4 100644 --- a/tests/test-manifest.js +++ b/tests/test-manifest.js @@ -1,4 +1,3 @@ -import { fetch } from 'node-fetch'; import { getDestinyManifest } from '../lib/destiny2/index.js'; import { getDestinyManifestSlice } from '../lib/destiny2/manifest.js'; async function httpClient(config) { diff --git a/yarn.lock b/yarn.lock index 4905c040..10859b1a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2593,13 +2593,6 @@ natural-compare@^1.4.0: resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" integrity sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw== -node-fetch@2.6.6: - version "2.6.6" - resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.6.tgz#1751a7c01834e8e1697758732e9efb6eeadfaf89" - integrity sha512-Z8/6vRlTUChSdIgMa51jxQ4lrw/Jy5SOW10ObaA47/RElsAN2c5Pn8bTgFGWn/ibwzXTE8qwr1Yzx28vsecXEA== - dependencies: - whatwg-url "^5.0.0" - node-int64@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b" @@ -2999,11 +2992,6 @@ to-regex-range@^5.0.1: dependencies: is-number "^7.0.0" -tr46@~0.0.3: - version "0.0.3" - resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" - integrity sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw== - ts-jest@^29.0.3: version "29.0.5" resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-29.0.5.tgz#c5557dcec8fe434fcb8b70c3e21c6b143bfce066" @@ -3080,19 +3068,6 @@ walker@^1.0.8: dependencies: makeerror "1.0.12" -webidl-conversions@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" - integrity sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ== - -whatwg-url@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-5.0.0.tgz#966454e8765462e37644d3626f6742ce8b70965d" - integrity sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw== - dependencies: - tr46 "~0.0.3" - webidl-conversions "^3.0.0" - which@^2.0.1: version "2.0.2" resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1"