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

fix(npm): align Node esm code importing cjs with Node #15838

Merged
merged 8 commits into from
Sep 10, 2022

Conversation

dsherret
Copy link
Member

@dsherret dsherret commented Sep 9, 2022

This more aligns Node ESM importing CJS to have the same behaviour as Node, but keeps the current __esModule check that Deno does when importing CJS from npm. Essentially, this allows the Node ESM code to be comptabile with Node and the Deno code can be more comptable with what's done in the JS/TS ecosystem. That said, I suspect we may run into issues doing this though and may want to eventually align Deno's interop with Node's behaviour...

cli/module_loader.rs Outdated Show resolved Hide resolved
@dsherret dsherret merged commit dee9f0a into denoland:main Sep 10, 2022
@dsherret dsherret deleted the fix_node_esm_to_cjs branch September 10, 2022 19:00
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.

2 participants