Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: use node-mock-http instead of unenv v1 for local fetch #3069

Merged
merged 4 commits into from
Feb 6, 2025

Conversation

pi0
Copy link
Member

@pi0 pi0 commented Feb 5, 2025

This PR migrates direct fetch implementation from unenv v1 to node-mock-http.

This unblocks nitro v2 to migrate to unenv v2 which has breaking changes for HTTP (unjs/unenv#364).

One other benefit of node-mock-http is that it leverages Node.js node:buffer and node:events (downside is temporary polyfill duplicate in environments without native Buffer/Events support -- cloudflare does support now)

Complementry h3 (v1) PR: unjs/h3#970

@pi0 pi0 merged commit 0f7c3ea into v2 Feb 6, 2025
4 checks passed
@pi0 pi0 deleted the refactor/node-mock-http branch February 6, 2025 18:47
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