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(node): load ES modules defined as CJS #22945

Merged
merged 10 commits into from
Mar 21, 2024

Conversation

dsherret
Copy link
Member

Changes the behaviour in Deno to just always load ES modules in npm packages even if they're defined as CJS.

Closes #22818

cli/node.rs Outdated
Comment on lines 40 to 45
Esm,
Cjs {
exports: Vec<String>,
reexports: Vec<String>,
},
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add some docstrings to explain these variants? CliCjsAnalysis::Esm is confusing at first glance.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added.

@dsherret dsherret merged commit 9abc722 into denoland:main Mar 21, 2024
17 checks passed
@dsherret dsherret deleted the handle_esm_files_defined_as_cjs branch March 21, 2024 18:35
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.

Consider unstable flag to make cjs files be treated as esm
2 participants