-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
doc: esm: improve dual package hazard docs #30345
Conversation
f0ed938
to
ea9f231
Compare
What I'm looking for specifically is a note like -
|
The problem specifically is that the break is not visible in testing, and will only become obvious much further down the line. |
0ba8715
to
68ab812
Compare
68ab812
to
1f7b577
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor wording suggestions.
db5a875
to
6c7e610
Compare
6c7e610
to
4b75b64
Compare
Co-Authored-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> PR-URL: #30345 Reviewed-By: Guy Bedford <guybedford@gmail.com> Reviewed-By: Jan Krems <jan.krems@gmail.com>
landed in d9efc7d |
Co-Authored-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> PR-URL: #30345 Reviewed-By: Guy Bedford <guybedford@gmail.com> Reviewed-By: Jan Krems <jan.krems@gmail.com>
Co-Authored-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> PR-URL: #30345 Reviewed-By: Guy Bedford <guybedford@gmail.com> Reviewed-By: Jan Krems <jan.krems@gmail.com>
Co-Authored-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> PR-URL: #30345 Reviewed-By: Guy Bedford <guybedford@gmail.com> Reviewed-By: Jan Krems <jan.krems@gmail.com>
This updates the ES modules docs regarding hazards related to dual packages per the findings in nodejs/modules#409. Basically, the hazard that we previously thought was isolated to divergent specifiers (e.g.
'pkg'
resolving toindex.cjs
for CommonJS andindex.mjs
for ESM) happens for all dual packages even if the two entry points are at different specifiers (e.g.'pkg'
and'pkg/module'
). Therefore the section on writing dual packages applies not just to conditional exports but to the ES modules implementation generally.Follow up to #30051.
cc @guybedford @MylesBorins @nodejs/modules-active-members
Checklist