-
-
Notifications
You must be signed in to change notification settings - Fork 221
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
Switch from CommonJS to ES Modules #9770
Comments
Thank you for summarizing this and flagging all dependencies that are ESM only. I agree that this will require a titanic effort to convert everything. But, for some of these dependencies that you have listed: -> @octokit/core These are only used in our release notes script, which we could independently switch to ESM. -> @types/chai Testing frameworks are not high priority in terms of upgrading, unless there are some serious security concerns. Putting it this much effort for syntactic sugar or small improvements in the framework seems like a bad deal to me. -> node-fetch Afaik only PouchDb uses this, so it's not our direct dependency, and Pouch locks to the CommonJS version. -> url-join This is only used in |
100% agree with your assessment here! The current ESM dependency list does not provide any pressing need to upgrade. My main purpose for raising this ticket now was just to give a convenient ESM sticky to link to from the dependency upgrade docs so we can easily track a running list of dependencies that devs do not need to bother trying to upgrade. It will be interesting to see where the ecosystem goes from here. I worry that more and more projects will do the |
If/when this is ever addressed, we need to remove the dependencies tagged with this issue from the dependabot ignore list. |
Describe the issue
For better or worse it seems that ES Modules are not going to go away. Various parts of the JS ecosystem have started dropping support for CommonJS modules (which is what we are using currently).
These are the currently known dependency packages whose latest versions only support ESM:
Describe the improvement you'd like
Unfortunately, I expect converting to ESM to be very painful. I did this recently with CHToolbox and documented the experience. The main issue for cht-core is probably going to be the same
sinon
troubles. I thinkesmock
is a reasonable solution here, but it will still involve a lot of changes to the test setup code....Describe alternatives you've considered
We could just give up on any dependencies that are ESM only.
The text was updated successfully, but these errors were encountered: