From 7f4e5701c1276d20d7ef29c7137d6b1ab3bb1aae Mon Sep 17 00:00:00 2001 From: chad Date: Mon, 6 Nov 2023 10:27:47 -0500 Subject: [PATCH 1/2] deps: remove undici as peer dep --- package.json | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 2e084e7..0ab854a 100644 --- a/package.json +++ b/package.json @@ -135,10 +135,9 @@ "docs": "aegir docs" }, "dependencies": { - "debug": "^4.3.1", + "debug": "^4.3.4", "native-fetch": "^4.0.2", - "receptacle": "^1.3.2", - "undici": "^5.12.0" + "receptacle": "^1.3.2" }, "devDependencies": { "@types/debug": "^4.1.7", From 05561e761b5cf6c8ebbe6d3a90cf198c8bf34f8d Mon Sep 17 00:00:00 2001 From: chad Date: Mon, 6 Nov 2023 11:46:18 -0500 Subject: [PATCH 2/2] fix!: utilize native fetch api --- package.json | 1 - src/utils.ts | 4 +--- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/package.json b/package.json index 0ab854a..bdfa67a 100644 --- a/package.json +++ b/package.json @@ -136,7 +136,6 @@ }, "dependencies": { "debug": "^4.3.4", - "native-fetch": "^4.0.2", "receptacle": "^1.3.2" }, "devDependencies": { diff --git a/src/utils.ts b/src/utils.ts index c14df30..75661f0 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -1,5 +1,3 @@ -import { fetch as nativeFetch, Headers } from 'native-fetch' - /** * Build fetch resource for request */ @@ -28,7 +26,7 @@ interface Answer { * Use fetch to find the record */ export async function request (resource: string, signal: AbortSignal): Promise { - const req = await nativeFetch(resource, { + const req = await fetch(resource, { headers: new Headers({ accept: 'application/dns-json' }),