Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Impressed with what Node is doing the last years, deno and bun has really made Node focus and improve. It was stuck for a while




What are the recent improvements in node itself?

Last actually note-worthy improvement I heard of was properly supporting import/export (although do you still need to use the .mjs hack?), but I've been out of the loop here for sometime so would be nice to know what they've added since.


Here’s a nice overview:

https://kashw1n.com/blog/nodejs-2025/

It doesn’t cover everything, but as an old-school Node user I found several interesting features I didn’t know about.


That is a nice article. It does a great job summing thing up with real examples too.

Small but lovely addition for me is the ability to load .env files natively. There’s more like this; small, focused, real-world-improving features.

> (although do you still need to use the .mjs hack?)

Syntax detection is enabled by default in v22.7.0, v20.19.0:

https://nodejs.org/api/packages.html#syntax-detection

Sounds like the obvious correct solution, making .cjs and .mjs obsolete - unless of course someone uses import() statements exclusively, in which case I need to ask: why?


It is surprising for me to see these features finally being added to Node after such a long time. Especially so when I remember reading discussion after discussion about how something like this wasn't possible. I touched on this in a blog post some time ago [1]. Glad Node is catching up.

[1] https://kilo.bytesize.xyz/an-incorrect-specification


I don't see in your blogpost any sources cited regarding anyone saying that ES modules were infeasible.

Additionally, io.js actually forked off due to internal drama which started with Ben Noordhuis having changed some pronouns here and there and people wanting to cancel him for that, to which he picked up his toys and left the sandbox.

It so happened that aside from being competent himself, he had competent people on his side, which eventually forced those governing Node.js to concede.

Bun is just a cash grab in comparison.


And for a few earlier versions `type: module` in package.json was all that was needed for .js files to be treated as ESM.

using, memory64, undici, async local storage, ESM import improvements, type stripping, local storage / session storage, env file support, built in file watching. Those are just the ones I mainly remember. There is a lot more.

Adding to the list: permissions, CLI styling/colouring, require(esm), globs, test runner.

Do you mean.. node-worthy?

They added type striping, not full TS support.

And the biggest issue with Node IMO is that the standard lib still forces you to rely on endless npm dependencies.

Node is still very much stuck.


> the standard lib still forces you to rely on endless npm dependencies

How? We have async/await file access, a async/await test runner, and even async/await sleep built in. What are you missing?


> What are you missing?

Everything else needed to make a backend app.

At the very least, Node should provide fundamental pieces like database drivers. Currently the best PG driver[1] depends on a single guy.

Bun already provides its own PG driver [2] and Jarred has written they will keep investing into more built-in APIs.

[1] https://github.com/porsager/postgres

[2] https://bun.com/docs/api/sql


> Currently the best PG driver[1] depends on a single guy.

Definitely a problem, but funding good Postgres/MongoDB/SQLite should be handled by AWS, Microsoft, Google, and other orgs that sell database services.


>> Currently the best PG driver[1] depends on a single guy.

> Definitely a problem, but funding good Postgres/MongoDB/SQLite should be handled by AWS, Microsoft, Google, and other orgs that sell database services.

A good chunk of PG development is done by employees of those companies (*). Of course they could (and probably should) always do more. But even if they invest more, it's not obvious that the marginal effort is best invested in some language's drivers...

Disclaimer: I'm paid by one of those big companies.


I’d argue that JS/TS is more popular than ‘some language’ would suggest. If there’s a problem that affects 19% of customers it should be fixed.

I am not saying this problem exists and 19% is a made up number, the grandparent post seems to think there is some kind of problem.


You don't think depending on dozens or even hundreds of NPM packages with a single maintainer is an issue?

Just as an example, Express depends on 25 modules with a single maintainer.

https://npmgraph.js.org/?q=express

Obviously a router is a fraction of what's needed for any non trivial backend project.


It's an issue, but not a new issue and not an issue introduced by NPM or introduced by package managers.

People were cuddling and pasting code from random people on the Internet they didn't understand for many years before package managers where there were zero maintainers. Many people that don't properly understand supply chain issues still are.


Maybe. Doesn't change the fact that the problem is there.

Have them though?

On the projects I am involved, they could even not exist, only node LTS releases matter, and the most recent projects are still node 20.


As a quick aside, “them” is an object pronoun, not a subject pronoun. The correct word you needed is “they”.

You couldn’t phrase your original question as a statement “Them have though.” That’s often a quick test for valid English grammar. With the correct pronoun, it makes more sense: “They have though.”

As another example, take this sentence: “Have you seen them though?”

“You” is the subject of that sentence, and “them” is the object.


Them is fine.

It's short for "Have them [Node bozos improved it], though?"

Or, equally likely it, refers to deno and bun ("deno and bun has really made Node focus and improve", "Have them (deno and bun) really made Node focus and improve, though?")


Your expanded version is also incorrect.

It's a common idiom used in slang and "urban" dialects for decades...

(Also the expansion was meant as a joke in case it went woooosh - I don't mind-read to know what the OP meant)


That is nonstandard English, at best. It's found in some uncommon dialects.

Without the expansion I don't know of any native English speaker who would say it.


22 is LTS. The future is now.

All even versions are LTS btw, maybe what you mean is that version 22 entered in maintenance mode (hence stable) and new features will not be added.

Sure, who is going to budget project upgrade effort of ensuring all dependencies work equally as well?

There is a reason why so many Java, Python, .NET/C#, C, C++,.. projects are stuck several versions behind.


No one said developing software wasn't going to be work.

Work isn't free beer in most places.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: