Personally I dont see any reason to continue to support this legacy commonjs anymore. Existing in two worlds sucks. ESM is the official standard, not some homegrown node.js baggage. It's time. Personally Im celebrating.
There's plenty of old releases available for those unable to exit their legacy world, unable to make the change. But please, just do it. Find a codemod to rewrite your code-base. Spend a couple hours tangling with your build toolchain. Stop being a burden on maintainers with limited resources & limited lifetimes available, respect yourself & others & use this 2015 era tech standard, please.
Before emiting output, you have to run them in the same package. Themselves they (and the whole ecosystem around) are not ready for that. Of course it’s not an issue if all you do is emitting a frontend, which doesn’t share runtime with package.json directory. But if you’re using webpack for node, for which these authors maintain so many modules, things are fucked up. I advise you to try to webpack a typescripted “type”:”module” project before celebrating.
Existing in two worlds sucks
So does existing in zero worlds. I’m not arguing against ESM. I’m arguing against actions which break half of workflows of those who have no choice and can not control whether ESM to be possible or not, for no good reason. To the point I wish NPM had a username filter so I could skip packages which wouldn’t work for a while no matter what I do or like personally. I don’t mind ESM, but it’s not there yet.
OP push for ESM is absolutly annoying. There is big disconnect between node.js modules working group, library authors, tooling projects and reality of node.js projects.
At work, I simply see no migration path. People that push for node.js broken ESM version have no idea.