Closed cdata closed 4 years ago
ESM is still experimental in Node and will be for a long time. You can import CJS using ESM today (see the node docs).
Once it goes unexperimental in LTS we can revisit. Feel free to open an issue on our community repo if you want to track that.
Thank you for your considerate feedback @mafintosh , and thanks also for your work on these projects.
Although it is technically true that ESM is still labeled experimental in the current Node.js (LTS), the following points are worthy of consideration as well:
I will file a corresponding issue on your community repo.
Thanks again,
Chris
This is a follow-up to a related discussion in the downstream DAT SDK project repo: https://github.com/datproject/sdk/issues/55
TL;DR Please consider distributing this module (and others in the Hypercore ecosystem) as an ES Module, and prefer documentation that demonstrates how to use it as an ES Module.
In discussing this topic in the downstream project, it was suggested that I seek feedback from maintainers of these core projects that the DAT SDK is built upon. I am grateful for whatever feedback you core maintainers can offer.
The rationale from the downstream issue is copy/pasted here for your convenience:
And one suggestion for incrementally moving packages in this direction was also offered: