| ▲ | domh 5 days ago | |||||||
That's a fair criticism... they move slower but mostly because they were the first. They would have to build a new Server and Request/Response primitives from scratch, or deprecate what they already have, or somehow shoehorn the existing types into the new ones. They do seem to have just merged in support for Web Workers though, which I've been following for a while: https://github.com/nodejs/node/issues/43583 So I don't think they're opposed to standardising, but it's trickier when you have some past cruft built up. Lets not forget that the fetch() standard was built for browsers, and is a bit of a stretch to make it work on servers at all. You have to diverge from the fetch spec to even make it make sense in a server environment (with things like Cookies handling off the top of my head). | ||||||||
| ▲ | domh 5 days ago | parent [-] | |||||||
Same thing can be said about Streams in Node.js as well. They had a working streams implementation before the Web Streams API was in browsers (iirc). So implementing the standard now means removing what's already there, or breaking a lot of existing code. Which leads to confusing things like the fact that there are two streams APIs in Node now: Streams: https://nodejs.org/docs/latest/api/stream.html Web Streams: https://nodejs.org/docs/latest/api/webstreams.html And they have to support going back and forth between the two: https://nodejs.org/docs/latest/api/webstreams.html#nodejs-st... It's exactly the same story for crypto as well. Node created it's own standard, Web standards emerged, Node has to support both: https://nodejs.org/docs/latest/api/crypto.html https://nodejs.org/docs/latest/api/webcrypto.html Fwiw I think it's good they're not removing the legacy code, but they should probably do a big cleanup major release and lean into the modern standards and remove the old stuff. But there's obviously push back in doing so... and probably stuff you can do in the old modules that you can't do in the new and vice versa. | ||||||||
| ||||||||