From 557a8882939063fad0c365c4480bbfcb245c9c54 Mon Sep 17 00:00:00 2001 From: icepeng Date: Sat, 17 Dec 2022 22:50:11 +0900 Subject: [PATCH] fix(sdk): remove node-fetch type dependency --- .changeset/clever-badgers-cross.md | 5 +++++ packages/sdk/package.json | 1 - packages/sdk/src/sdk.ts | 8 +------- yarn.lock | 1 - 4 files changed, 6 insertions(+), 9 deletions(-) create mode 100644 .changeset/clever-badgers-cross.md diff --git a/.changeset/clever-badgers-cross.md b/.changeset/clever-badgers-cross.md new file mode 100644 index 0000000..ee72d9d --- /dev/null +++ b/.changeset/clever-badgers-cross.md @@ -0,0 +1,5 @@ +--- +"@mokoko/sdk": patch +--- + +remove node-fetch type dependency diff --git a/packages/sdk/package.json b/packages/sdk/package.json index e275501..cb825d8 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -25,7 +25,6 @@ "dev": "tsup src/index.ts --format esm,cjs --watch --dts" }, "devDependencies": { - "node-fetch": "^3.3.0", "tsup": "^6.5.0", "typescript": "4.9.3" }, diff --git a/packages/sdk/src/sdk.ts b/packages/sdk/src/sdk.ts index bc2c0ef..503d43e 100644 --- a/packages/sdk/src/sdk.ts +++ b/packages/sdk/src/sdk.ts @@ -17,10 +17,6 @@ import { MarketList } from "./models/MarketList"; import { MarketOption } from "./models/MarketOption"; import { RequestAuctionItems } from "./models/RequestAuctionItems"; import { RequestMarketItems } from "./models/RequestMarketItems"; -import type { - RequestInit as NodeRequestInit, - Response as NodeResponse, -} from "node-fetch"; import { Semaphore } from "@shopify/semaphore"; import { Reporter } from "./reporter"; @@ -30,9 +26,7 @@ export interface SdkProps { /** * Fetch function for isomorphic usage. */ - fetchFn: - | ((url: string, init?: RequestInit) => Promise) - | ((url: string, init?: NodeRequestInit) => Promise); + fetchFn: (url: string, init?: RequestInit) => Promise; /** * API Key from Lostark Open API Developer Portal. diff --git a/yarn.lock b/yarn.lock index 535dc6f..6ab5c80 100644 --- a/yarn.lock +++ b/yarn.lock @@ -360,7 +360,6 @@ __metadata: resolution: "@mokoko/sdk@workspace:packages/sdk" dependencies: "@shopify/semaphore": ^3.0.1 - node-fetch: ^3.3.0 tsup: ^6.5.0 typescript: 4.9.3 languageName: unknown