-
Notifications
You must be signed in to change notification settings - Fork 93
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
[v3] export modules from index #131
Conversation
Not a big fan of this. Let's keep it the same way other modules are kept. We can revisit after full transition to ESM. |
Not exporting is fine, I guess!
Hmm, is this planned anytime soon and would that mean not exposing CJS builds? As ESM can not be used by CJS code, I would hope that CJS support can be maintained in the long-term <3 |
that’s not true anymore for nodejs v22. Overall, people need to transition to esm at some point. It’s natively supported im browsers and allows to load packages without any bundlers, which is a big deal. It also allows us to simplify working with deno, bun, deno’s esm only package manager, etc. I wouldn’t want to start doing that until nodejs v18 is deprecated. And I wouldn’t do that unless the community is okay with it in general. |
Got it, thank you for explaining the rationale! Might be worth considering that extended support for Node.js v18 will be provided for users of among others:
So for these users, Node.js v18 will not actually be deprecated during 2025 and some users will expect to keep using their supported runtime versions beyond the upstream maintenance window. Not meaning to imply that Footnotes
|
Thanks for the info, it's quite useful for future planning. One thing to keep in mind is that even if we decide to do ESM-only stuff, the old hybrid versions would still be working. Just like eth-crypto v0.1 is still used by legacy systems. |
If there's going to be declarations and stuff for an entrypoint in the manifest, might as well export the modules from it?
index.ts
.import { aes } from ethereum-cryptography