From e863a116747bf84cd1d78c46b047b0bc2177ff11 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 | 4 ++-- 2 files changed, 3 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..16140b13 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,8 @@ if (globalThis.fetch === undefined) { To disable this warning, add SAGIRI_DISABLE_NODE_FETCH_WARNING="true" in your environment variable. `) - fetchFn = nodeFetch.default; + + fetchFn = (await import("node-fetch")).default; } else { fetchFn = globalThis.fetch; }