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: use smarter proxy for interopDefault #318

Merged
merged 4 commits into from
Oct 4, 2024
Merged

feat: use smarter proxy for interopDefault #318

merged 4 commits into from
Oct 4, 2024

Conversation

pi0
Copy link
Member

@pi0 pi0 commented Oct 4, 2024

Resolves #317

With jiti v2.0.0 we have introduced native ESM import support which added a new kind of mixed export handling syntax. Early testing showed jiti v2 is broken with packages like mime without interop in mixed cases so in v2.1.0 we have enabled interopDefault by default to support out of the box.

Issues like #317 indicate that dependencies like zod will now be broken (because zod's default export is not expandable)

This PR introduces a new method for interopDefault using a Proxy which at least covers all of our current test fixtures and can be used to cover more of similar cases if reported in the future on proxy layer instead of modify default exports.

@pi0 pi0 self-assigned this Oct 4, 2024
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.

zod is broken with 2.1+
1 participant