From 192ceb56a190bdd286a9815278553096fc498db3 Mon Sep 17 00:00:00 2001 From: Ayase Minori Date: Fri, 3 Jan 2025 13:05:30 +0000 Subject: [PATCH] 4.3.0 Signed-off-by: GitHub --- package.json | 2 +- src/sagiri.ts | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) 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; }