Closed penberg closed 7 months ago
I'm currently trying to migrate a large nodejs application to libSQL, and if this package wasn't available as CommonJS, I would have to abandon those efforts. I know that we should all be slowly migrating our projects to ESM, but unfortunately it's quite a chore to move large projects to ESM. If it's not a hassle, I'd request to keep including CJS in the builds for another year (if possible) 🙏🏽
Thanks for the feedback, @netroy, very helpful! I definitely prefer to keep CommonJS support around. The problem we're starting to face is that the rest of the ecosystem is moving to ESM. Specifically, the latest node-fetch
is ESM-only. However, I think we can solve this by just requiring Node 18 as discussed in: https://github.com/libsql/isomorphic-ts/issues/6
Node 16 went EOL last year. So, you folks should migrate to Node 18 anyways.
btw, Let me know if you need any help with the tooling on the repo. I can help with:
Let's keep CommonJS support in and switch to Node 18.
We currently support both ESM and CommonJS, but some of our dependencies, like
node-fetch
, has become ESM-only. Let's think about making the libSQL client ESM-only.