From 85666c11ac4f5ad4b366256d34a82ee9ec41a53f Mon Sep 17 00:00:00 2001 From: Yusuke Wada Date: Mon, 27 Nov 2023 17:39:40 +0900 Subject: [PATCH 1/2] fix(types): fix the type mismatch between DOM and `undici` --- package.json | 2 +- src/globals.ts | 4 ++-- yarn.lock | 14 +++++++++++++- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 8384f9f..4640b66 100644 --- a/package.json +++ b/package.json @@ -62,7 +62,7 @@ "dependencies": {}, "devDependencies": { "@types/jest": "^29.5.3", - "@types/node": "^18.7.16", + "@types/node": "^20.10.0", "@types/supertest": "^2.0.12", "hono": "^3.9.2", "jest": "^29.6.1", diff --git a/src/globals.ts b/src/globals.ts index 31cd8c7..5a8d0ed 100644 --- a/src/globals.ts +++ b/src/globals.ts @@ -20,5 +20,5 @@ global.fetch = (info, init?) => { ...init, } as RequestInit - return webFetch(info, init) -} \ No newline at end of file + return webFetch(info as RequestInfo, init) +} diff --git a/yarn.lock b/yarn.lock index d6c2af6..0f9cfce 100644 --- a/yarn.lock +++ b/yarn.lock @@ -869,11 +869,18 @@ resolved "https://registry.yarnpkg.com/@types/minimist/-/minimist-1.2.2.tgz#ee771e2ba4b3dc5b372935d549fd9617bf345b8c" integrity sha512-jhuKLIRrhvCPLqwPcx6INqmKeiA5EWrsCOPhrlFSrbrmU4ZMPjj5Ul/oLCMDO98XRUIwVm78xICz4EPCektzeQ== -"@types/node@*", "@types/node@^18.7.16": +"@types/node@*": version "18.7.16" resolved "https://registry.yarnpkg.com/@types/node/-/node-18.7.16.tgz#0eb3cce1e37c79619943d2fd903919fc30850601" integrity sha512-EQHhixfu+mkqHMZl1R2Ovuvn47PUw18azMJOTwSZr9/fhzHNGXAJ0ma0dayRVchprpCj0Kc1K1xKoWaATWF1qg== +"@types/node@^20.10.0": + version "20.10.0" + resolved "https://registry.yarnpkg.com/@types/node/-/node-20.10.0.tgz#16ddf9c0a72b832ec4fcce35b8249cf149214617" + integrity sha512-D0WfRmU9TQ8I9PFx9Yc+EBHw+vSpIub4IDvQivcp26PtPrdMGAq5SDcpXEo/epqa/DXotVpekHiLNTg3iaKXBQ== + dependencies: + undici-types "~5.26.4" + "@types/normalize-package-data@^2.4.0": version "2.4.1" resolved "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.1.tgz#d3357479a0fdfdd5907fe67e17e0a85c906e1301" @@ -4538,6 +4545,11 @@ typescript@^5.3.2: resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.3.2.tgz#00d1c7c1c46928c5845c1ee8d0cc2791031d4c43" integrity sha512-6l+RyNy7oAHDfxC4FzSJcz9vnjTKxrLpDG5M2Vu4SHRVNg6xzqZp6LYSR9zjqQTu8DU/f5xwxUdADOkbrIX2gQ== +undici-types@~5.26.4: + version "5.26.5" + resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617" + integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA== + unique-string@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/unique-string/-/unique-string-2.0.0.tgz#39c6451f81afb2749de2b233e3f7c5e8843bd89d" From 72c73e38e41d5b60eb802b2a9b6e095c02cb9bb9 Mon Sep 17 00:00:00 2001 From: Yusuke Wada Date: Mon, 27 Nov 2023 17:44:01 +0900 Subject: [PATCH 2/2] remove a line --- package.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/package.json b/package.json index 4640b66..b4aa664 100644 --- a/package.json +++ b/package.json @@ -59,7 +59,6 @@ "engines": { "node": ">=18.14.1" }, - "dependencies": {}, "devDependencies": { "@types/jest": "^29.5.3", "@types/node": "^20.10.0", @@ -73,4 +72,4 @@ "tsup": "^7.2.0", "typescript": "^5.3.2" } -} +} \ No newline at end of file