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

feat: migrate from unenv v1 to node-mock-http #970

Merged
merged 2 commits into from
Feb 5, 2025
Merged

Conversation

pi0
Copy link
Member

@pi0 pi0 commented Feb 5, 2025

This PR migrates from unenv (for Workers support) to node-mock-http which is extracted from codebase of unenv v1.

The reason for migration is that unenv v2 will have breaking changes for node:http (unjs/unenv#364) and ecosystem migration is not easy.

One temporarily downside is that this causes duplicate polyfills for Nitro users however nitro (v2) will also migrate.

One benefit of this new extracted package is that we can avoid polyfills for node:buffer and node:events in Node.js runtimes (using export conditions in node-mock-http)

@pi0 pi0 merged commit 301cb17 into v1 Feb 5, 2025
3 checks passed
@pi0 pi0 deleted the feat/node-mock-http branch February 5, 2025 18:25
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