Skip to content

refactor: serve over @comapeo/node-server instead of @whatwg-node/server - #83

Merged
gmaclennan merged 1 commit into
mainfrom
refactor/comapeo-node-server
Oct 23, 2026
Merged

gmaclennan merged 1 commit into
mainfrom
refactor/comapeo-node-server

Conversation

@gmaclennan

Copy link
Copy Markdown
Member

Replaces @whatwg-node/server with @comapeo/node-server, and removes the patch-package patch for it along with patch-package itself and the bundleDependencies entry that shipped the patched copy.

The patch stripped the bundled fetch ponyfill and made the adapter reset the socket when a handler errored a streaming response with an AbortError. @comapeo/node-server uses Node's own fetch classes and resets the socket in that case without patching, so src/lib/fetch-api.ts goes too. Local and remote requests now each get their own adapter, with the per-request context coming from getContext.

@whatwg-node/server was also pulling DOM lib types into the build, which made Response.json() return any. With Node's types it returns unknown, so a few call sites, mostly in tests, now annotate the result.

Drops the patch-package patch for @whatwg-node/server and the bundled dependency that carried it. The new adapter uses Node's own fetch classes and resets the socket when a handler errors a streaming response, which is what the patch did.
@socket-security

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Added@​comapeo/​node-server@​1.0.07510010091100

View full report

@gmaclennan
gmaclennan merged commit 09c1933 into main Oct 23, 2026
8 checks passed
@gmaclennan
gmaclennan deleted the refactor/comapeo-node-server branch October 23, 2026 14:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant