Just curious if this is planned to happen, or is it something no one is thinking about yet?
@nodejs/modules has probably discussed this extensively, and so have many other project members.
Sharing my opinion on this: deprecation and removal of CommonJS would be extremely disruptive to the entire ecosystem, and would cause more pain to our users than Python users experienced with migrating to Python 3. As such, deprecation is unlikely to happen in the mid-term future, if at all.
I don’t see any point in ever doing that - CJS isn’t legacy, it’s just one of two first-class module systems in node.
I think it’s too early to come up with a clear timeline for this. We’re just approaching the first non-trivial module based apps being possible (without compiling from something else, at least rewriting imports). And there’s a huge amount of code in the ecosystem and even more so in various companies that’s based on CJS - much of which may be non-trivial to convert to ESM (since ESM lacks certain features and is fully async).
So - I wouldn’t go as far as Jordan and say “never” but I’d say “long enough that it could as well be never at this point”.
Still way too early to even consider, especially given that ESM is still experimental
Seems answered, closing
Most helpful comment
Still way too early to even consider, especially given that ESM is still experimental