Repository navigation
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
commit: |
Adds a generic
unixserver option (next toport/hostname) that maps to each runtime's native unix socket listener:server.listen({ path })(also accepts Windows named pipes)Bun.serve({ unix })Deno.serve({ transport: "unix", path })Behavior
unixis set,port/hostnameandPORT/HOSTare not resolved. Runtime-specific listen options (node.path,bun.unix,deno.path, …) still take precedence.server.url: the socket path on all three runtimes. Node already did this; Bun and Deno now match. Linux abstract sockets (\0name) work on all three and print as@name.unix: true: picks a random socket (inspired by get-port-please):EADDRINUSE.EADDRINUSE, so successful listens are unaffected.cleanSocket(), which runsrm -rfon the path.Hostheader on a unix socket now becomehttp://localhost/...:http://undefined:80/....http+unix://(a non-special scheme, sooriginis"null"). The adapter now rewrites it tohttp://<host>by overridingurlin place, with no request rebuild and norequest.signallegacy warning.cert/keyon a unix socket and serves plaintext, sounixcombined withtlsnow throws instead of downgrading.unixexported by the entry yields to explicit--port/--hostflags. Dev-mode--watchrestarts work thanks to the stale cleanup.Tests
test/_unix-socket.tsis a shared suite run under Node, Bun and Deno (test/{node,bun,deno}-unix-socket.test.ts) throughfixtures/unix-socket-server.ts. It checks:url/origin;unix: true;The Bun and Deno test files are added to their CI jobs. Verified locally on Node 24, Bun 1.4.2, and Deno 2.9.6 plus the CI-pinned 2.7.12. Deno before 2.9 reports
path: nullfor abstract sockets, which is handled.Known limitations / follow-ups
unix: trueon Windows with Bun or Deno is untested; named-pipe support in their unix transports is unknown.request.url(e.g./bar) for Host-less requests on TCP as well. This is an existing issue, not specific to unix sockets.trustProxy: "loopback"never matches. This is documented (usetrustProxy: true).--unixCLI flag.🤖 Generated with AI assistant
Summary by CodeRabbit
New Features
Bug Fixes
Documentation
Tests