r/node • • Feb 01 '22

Fetch API has landed into Node.js

https://github.com/nodejs/node/commit/6ec225392675c92b102d3caad02ee3a157c9d1b7
280 Upvotes

31 comments sorted by

View all comments

Show parent comments

4

u/Bloodsucker_ Feb 01 '22

Yeah, what's the problem with ESM? That's the way to go from now on, people. Just do it. If you use typescript you don't even have to do anything.

13

u/matthewsilas Feb 01 '22

Any app built before esm can’t justify the expense to refactor to esm.

3

u/Solonotix Feb 01 '22 edited Feb 01 '22

This was exactly the same mindset for Python2 to Python3. Honestly, it's a lot less painful if people just adopt the new standard, rather than continuing to borrow against the technical debt of staying on a platform that has officially been identified discussed as a potential target for deprecation (maybe).

Edit: clarified it is not official. The core Node team has not made an official statement as of this date.

6

u/matthewsilas Feb 01 '22

source? I’d prefer not to start rumors. AFAIK cjs is not targeted for deprecation.

1

u/Solonotix Feb 01 '22

Good call, it isn't official. Discussion can be found here. It's a hot topic, and there's a lot of mentions of libraries or frameworks ditching support for CJS, but Node.js has been neutral on the topic so far.