I hope you realize no disrespect, this will greatly improve the daily work for me since I use node at work every day.
I hope you realize no disrespect, this will greatly improve the daily work for me since I use node at work every day.
> I just wonder how come features like this that kind of seems obvious to include in the ecosystem takes quite some time to land?
I answered that below (check it out) but note how expensive adding a bad API is vs. asking people for one more `npm install` :) There is more discussion in https://github.com/nodejs/node/issues/19393 and in https://docs.google.com/document/d/1tn_-0S_FG_sla81wFohi8Sc8... a discussion from 2018 we had on it
Last question I have is will this be included in the next version of the LTS version or how do experimental features usually progress for someone who are unfamiliar?
Can't wait until I can use fetch in my codebase without any additional dependencies!
Node uses undici JS library. Undici includes a C HTTP parser that is used via webassembly. The parser is generated from rules that are implemented in JS/TS using llparse framework.
A native C binary there in the middle is quite surprising.
They could have built a fetch interface on top of http, but they probably saw an opportunity to make more drastic improvements.
And with every public API: Once you add it, you can't really hope to ever change it and even bug-fixes could be breaking some user's code (because they relied on the bug), so you have to be very careful to ship your public API as bug-free as possible.
But I can't help to feel like Node is progressing kind of slow compared to other languages / tools. This is just a personal impression from a bystander who is not really into the actual progression though. I have a feeling that node used to push new features all the time but in last couple of years have stagnated somewhat. Stuff like imports etc is still not really here.
I understand that developing an api that has such huge userbase as node is a massive undertaking that probably has issues that I can't imagine but it doesn't really help me in my day-to-day experience with it.
Node also isn’t actually a language, so there’s a lot of stuff that Node developers get in new version, but it’s actually being done in the V8 project.
And this is no obscure corner case, ts-node is huge