Pure ESM Package
gist.github.comThis is one of github usernames I could infer without even looking at the link, so many workflows it broke with no one being able to fix it. I know that the state of modules in node is on an off side, but at this point, just fuck ESM. And fuck these bold moves that break things without waiting for big players (e.g. webpack, typescript, which are real software trying to fix the web and cannot change overnight) to catch up. This is delusional. I’m cleaning my repos from these toyish deps weekly.
Typescript & webpack support esm input and or output.
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.
Typescript & webpack support esm input and or output.
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.
The thing is that you cannot use ESM in normal project. Typescript and jest still do not support many features and node.js today have important features marked as experimental.
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.