Skip to content

feat: use smarter proxy for interopDefault - #318

Merged
pi0 merged 4 commits into
mainfrom
fix/interop
Oct 4, 2024
Merged

pi0 merged 4 commits into
mainfrom
fix/interop

Conversation

@pi0

@pi0 pi0 commented Oct 4, 2024

Copy link
Copy Markdown
Member

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