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

Migrate cht-conf to ESM #627

Open
m5r opened this issue Jul 24, 2024 · 0 comments
Open

Migrate cht-conf to ESM #627

m5r opened this issue Jul 24, 2024 · 0 comments
Labels
Type: Technical issue Improve something that users won't notice

Comments

@m5r
Copy link
Member

m5r commented Jul 24, 2024

Describe the issue
ESM is the standard way of packaging code in Node (and in the browser, but not relevant to cht-conf). Packages we depend on are becoming ESM-only and we need to move away from CJS if we don't want to fall behind again.

Describe the improvement you'd like
Needs double-checking but end users of cht-conf won't see a difference since it's a CLI and not a module they import in their code. So it shouldn't need to be a new major version.

Migration path:
https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c#how-can-i-move-my-commonjs-project-to-esm
https://tsmx.net/convert-existing-nodejs-project-from-commonjs-to-esm/

Describe alternatives you've considered
Stick to CJS and await import("module") ESM-only code. That doesn't scale very well.

@m5r m5r added the Type: Technical issue Improve something that users won't notice label Jul 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Technical issue Improve something that users won't notice
Projects
Status: Todo
Development

No branches or pull requests

1 participant