chore: remove undici in favor of global fetch (#5168)
Before adoption: this commit came in with the history the project adopted, so no landing records it.
authored by Nurbek · committed by GitHub · parent 224d2f5 · Browse files · 3 files·+3 added−8 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
3 files+3 added−8 removed
- tests:+2 added−3 removed
- other:+1 added−5 removed
Provenance
- Commit
aed1463- Tree
03cbcfe- Author
Nurbek <98427000+volukren@users.noreply.github.com>- Committer
GitHub <noreply@github.com>- Parent
224d2f5
3 files changed+3 added−8 removed
modified:runtime-tests/node/index.test.ts+2 added-3 removed
1 import { createAdaptorServer, serve } from '@hono/node-server'2-import * as undici from 'undici'2 import { once } from 'node:events'3 import type { Server } from 'node:http'4 import type { AddressInfo } from 'node:net'5 import { Hono } from '../../src'270 unmodified lines276 const server = createAdaptorServer(app)277 const listening = once(server.listen(), 'listening')278 279 return {281- async get(path: string, init?: undici.RequestInit) {280+ async get(path: string, init?: RequestInit) {281 await listening282 const url = new URL(path, getOrigin())284- return undici.fetch(url, init)283+ return fetch(url, init)284 },285 }286 287 function getOrigin(): string {9 unmodified linesmodified:bun.lock+1 added-4 removed
22 unmodified lines23 "pkg-pr-new": "^0.0.53",24 "prettier": "3.7.4",25 "publint": "0.3.15",26 "typescript": "^6.0.3",27- "undici": "^6.27.0",27 "vite-plugin-fastly-js-compute": "^0.4.2",28 "vitest": "^4.1.9",29 "wrangler": "4.107.0",30 "ws": "^8.21.0",1429 unmodified lines1460 "ufo": ["ufo@1.6.1", "", {}, "sha512-9a4/uxlTWJ4+a5i0ooc1rU7C7YOw3wT+UGqdeNNHWnOF9qcMBgLRS+4IYUqbczewFx4mLEig6gawh7X6mFlEkA=="],1461 1462 "unbzip2-stream": ["unbzip2-stream@1.4.3", "", { "dependencies": { "buffer": "^5.2.1", "through": "^2.3.8" } }, "sha512-mlExGW4w71ebDJviH16lQLtZS32VKqsSfk80GCfUlwT/4/hNRFsoscrF/c++9xinkMzECL1uL9DDwXqFWkruPg=="],1463 1465- "undici": ["undici@6.27.0", "", {}, "sha512-YmfV3YnEDzXRC5lZ2jWtWWHKGUm1zIt8AhesR1tens+HTNv+YZlN/dp6G727LOvMJ8xjP9Be7Y2Sdr96LDm+pg=="],1464+ "undici": ["undici@6.21.3", "", {}, "sha512-gBLkYIlEnSp8pFbT64yFgGE6UIB9tAkhukC23PmMDCe5Nd+cRqKxSjw5y54MK2AZMgZfJWMaNE4nYUHgi1XEOw=="],1465 1466 "undici-types": ["undici-types@7.10.0", "", {}, "sha512-t5Fy/nfn+14LuOc2KNYg75vZqClpAiqscVvMygNnlsHBFpSXdJaYtXMcdNLpl/Qvc3P2cB3s6lOV51nqsFq4ag=="],1467 1468 "unenv": ["unenv@2.0.0-rc.24", "", { "dependencies": { "pathe": "^2.0.3" } }, "sha512-i7qRCmY42zmCwnYlh9H2SvLEypEFGye5iRmEMKjcGi7zk9UquigRjFtTLz0TYqr0ZGLZhaMHl/foy1bZR+Cwlw=="],189 unmodified lines1658 "@jsdevtools/ez-spawn/cross-spawn": ["cross-spawn@7.0.3", "", { "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", "which": "^2.0.1" } }, "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w=="],1659 1660 "@napi-rs/lzma-wasm32-wasi/@napi-rs/wasm-runtime": ["@napi-rs/wasm-runtime@0.2.4", "", { "dependencies": { "@emnapi/core": "^1.1.0", "@emnapi/runtime": "^1.1.0", "@tybys/wasm-util": "^0.9.0" } }, "sha512-9zESzOO5aDByvhIAsOy9TbpZ0Ur2AJbUI7UT73kcUTS2mxAMHOBaa1st/jAymNoCtvrit99kkzT1FZuXVcgfIQ=="],1661 1663- "@octokit/action/undici": ["undici@6.21.3", "", {}, "sha512-gBLkYIlEnSp8pFbT64yFgGE6UIB9tAkhukC23PmMDCe5Nd+cRqKxSjw5y54MK2AZMgZfJWMaNE4nYUHgi1XEOw=="],1664-1662 "@octokit/auth-action/@octokit/types": ["@octokit/types@13.10.0", "", { "dependencies": { "@octokit/openapi-types": "^24.2.0" } }, "sha512-ifLaO34EbbPj0Xgro4G5lP5asESjwHracYJvVaPIyXMuiuXLlhic3S47cBdTb+jfODkTE5YtGCLt3Ay3+J97sA=="],1663 1664 "@octokit/core/@octokit/types": ["@octokit/types@13.10.0", "", { "dependencies": { "@octokit/openapi-types": "^24.2.0" } }, "sha512-ifLaO34EbbPj0Xgro4G5lP5asESjwHracYJvVaPIyXMuiuXLlhic3S47cBdTb+jfODkTE5YtGCLt3Ay3+J97sA=="],1665 733 unmodified linesmodified:package.json-1 removed
683 unmodified lines684 "pkg-pr-new": "^0.0.53",685 "prettier": "3.7.4",686 "publint": "0.3.15",687 "typescript": "^6.0.3",688- "undici": "^6.27.0",688 "vite-plugin-fastly-js-compute": "^0.4.2",689 "vitest": "^4.1.9",690 "wrangler": "4.107.0",691 "ws": "^8.21.0",7 unmodified lines