ECMA instead of commonJS
Currently this is only usable with commonJS. We need ECMA as well or ONLY ECMA
instead const Table = require('..');
import ConsoleTablePrinter from 'con..'l
@ayonious The lib takes care of ensuring that it still works with quite a few no longer supported Node versions (14, 16, 18, 20).
Is this still a requirement?
Another potential approach would be to narrow that done to 20.19+
Indeed, since Node 20.19+, it's now possible to "require()" an ESM module.
Which would allow to switch to ESM and still allow commonjs based consumer to require the lib.
Do you have any kind of view of the % of users of this lib per Nodejs version? How much would it hurt to stop supporting 14/16/18?
Relevant:
- https://joyeecheung.github.io/blog/2024/03/18/require-esm-in-node-js/
- https://socket.dev/blog/require-esm-backported-to-node-js-20