Migrate to ES modules
With node 10 officially entering maintenance mode, There's no good reason for anyone being on a version of node below 10 now. Converting this to use ES modules would be forward looking, and make this module easier to consume for typescript and Node 10+ users who prefer ESM.
While the community TS project is nice, most people would loathe to diverge too far from the officially supported API interface. Switching this module to ESM would be relatively straightforward as well, and I'd be happy to throw out a PR if the community is bought into this. This would allow us to write a good index.d.ts file as well, which will provide great IDE support without a synthetic default export
@shlomikushchi - curious on your thoughts on this.
let's talk. can you contact me on the alpaca slack channels?
Hi, is this moving forward? If not I'll be forking and implementing myself.
btw have you seen this?
https://github.com/117/alpaca
@neeschit I haven't, I'm going to move forward with that. Thank you!
Out of curiosity, what versions of Node does this library support? @shlomikushchi
let's talk. can you contact me on the alpaca slack channels?
To summarize what we spoke offline, maintaining backwards compatibility takes priority over migrating to ESM. We will need to publish a hybrid npm package.
The approach I was looking to use is somewhat detailed here:
https://2ality.com/2019/10/hybrid-npm-packages.html#option-2%3A-bare-import-commonjs%2C-deep-import-esm-(maximum-backward-compatibility)
I will try to create a PR when I have time
@neeschit I am unaware of any limitations right now, but if you are - let me know so we could document it.
Ok, it would be great if we could limit support to Node 12+ or even better, Node 14+ which is now LTS/Default recommended on https://nodejs.org/en/.
If we are comfortable doing that @shlomikushchi, I can cut a PR to migrate to ES modules, building on the work by @anonrose to tweak the package.json to support both CJS and ESM

node 10 eol is in a few months, so that makes sense moving forward. node 12 has more than a year, so it is better to keep that