Skip to content
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

Make the package ESM-only? #164

Closed
penberg opened this issue Jan 26, 2024 · 4 comments
Closed

Make the package ESM-only? #164

penberg opened this issue Jan 26, 2024 · 4 comments
Labels
help wanted Extra attention is needed question Further information is requested

Comments

@penberg
Copy link
Contributor

penberg commented Jan 26, 2024

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.

@penberg penberg added help wanted Extra attention is needed question Further information is requested labels Jan 26, 2024
@netroy
Copy link
Contributor

netroy commented Jan 29, 2024

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) 🙏🏽

@penberg
Copy link
Contributor Author

penberg commented Jan 29, 2024

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: libsql/isomorphic-ts#6

@netroy
Copy link
Contributor

netroy commented Jan 29, 2024

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:

  • improving CI workflows (including automatic releasing to NPM via github releases)
  • migrating to pnpm workspaces
  • setting up Typescript project references to make working with the multiple packages easier during development
  • improving linting/formatting
  • stricter type-safety

@penberg
Copy link
Contributor Author

penberg commented Feb 6, 2024

Let's keep CommonJS support in and switch to Node 18.

@penberg penberg closed this as completed Feb 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants