diff --git a/package.json b/package.json index 44dfe167..7467604c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "sagiri", - "version": "4.2.3", + "version": "4.3.0", "description": "A simple, lightweight and actually good JS wrapper for the SauceNAO API.", "license": "MIT", "main": "./dist/sagiri.cjs", diff --git a/src/sagiri.ts b/src/sagiri.ts index 1908b028..9adb2430 100644 --- a/src/sagiri.ts +++ b/src/sagiri.ts @@ -1,4 +1,3 @@ -import * as nodeFetch from "node-fetch"; import type { IOptions } from "./interfaces"; import { env } from "node:process"; import { Buffer } from "node:buffer"; @@ -24,7 +23,9 @@ if (globalThis.fetch === undefined) { To disable this warning, add SAGIRI_DISABLE_NODE_FETCH_WARNING="true" in your environment variable. `) - fetchFn = nodeFetch.default; + + // eslint-disable-next-line @typescript-eslint/no-require-imports + fetchFn = require("node-fetch"); } else { fetchFn = globalThis.fetch; }