113

Node.js 26.0.0 (Now with Temporal)

> Upsert (https://github.com/tc39/proposal-upsert): [Weak]Map.prototype.getOrInsert(), [Weak]Map.prototype.getOrInsertComputed()

Their usage of upsert appears different than I was used to:

Me: Upsert = Update or Insert

Them: Upsert = Get or Insert

an hour agojdthedisciple

The proposal used to do more thing and we didn't change the URL after we ultimately arrived at this set of APIs.

an hour agobakkoting

26.2.0 is already out, why link to the previous release?

https://nodejs.org/en/blog/release/v26.2.0

What I would expect with the inclusion of temporal, is having a section on nodejs docs about Rust addons, alongside the C and C++ sections.

3 hours agopjmlp

That's on me - I saw v26 was released, but didn't realize they'd already done a point release in the ensuing 2-3 weeks!

3 hours agoaarestad

I'm really looking forward to the temporal api being universally available. Moment and Luxon are fairly good but sensible date/time handling is something that really ought to be baked into the platform ootb.

4 hours agonoodlesUK

I always thought the old Date is kind of elegant... increment anything with an overflow and it all wraps around correctly, like `d.setDate(d.getDate() + 100)` to advance a date 100 days. "March 208th" is interpreted like you'd expect, as are the hours and minutes and such.

Of course, complete lack of non-local non-GMT time zones is a huge downside.

3 hours agojpsimons

i'm pretty sure all that stuff works w/ Temporal... Temporal is extremely well-designed, in my experience. the js date object, on the other hand, has insane pitfalls, and i say this as someone who thinks not understanding JS ASI is a "skill issue", among other happily-un-"ergonomic" worldviews...

3 hours agokeeganpoppen

That's how you get date bugs.

17 minutes agokaoD

Until then, a solid backfill has been available for quite some time

4 hours agoculi

Tangent: if you use Node.js at build time you should check out VitePlus https://viteplus.dev

(No affiliation, just a fan of VoidZero's consistently excellent tools.)

2 hours agochrisweekly

Oh hey, they're the people behind Oxlint and Oxfmt: https://oxc.rs/

I moved some projects over to those from ESLint + Prettier and while the compatibility isn't 100% (I didn't need that), and the time to process a codebase went from like way over a minute with the old tools to a few seconds with theirs.

2 hours agoKronisLV

Looks interesting, what's their revenue model? Or how do we know it won't be abandoned in the near future?

2 hours agorumblefrog

The same as any other dev tool startup, once money gets tight they will monetize and users will rightfully revolt.

Evan You won't break the cycle, tale as old as time.

an hour agoshimman

After getting burned so many times on libraries, frameworks, services and platforms, even entire languages - one learns to be wary of critical dependencies. Every new project offers convenience in exchange for you giving up control of part of the software stack, and the power dynamic is often exploited sooner or later as revenue source. You can't trust anything that becomes irreplaceable, or that you can't write it (or at least understand it) yourself.

5 minutes agolioeters

VoidZero's business model is in Void, their deployment platform. Open source projects will always stay open source. This was announced at the very beginning.

an hour agomanniL

Yes, nothing different from any other VC dev tool startup. When the community fractures people simply move on to something else. See rome -> biome for a very recent example.

4 minutes agoshimman

Also the release that drops typescript transforms: https://github.com/nodejs/typescript/issues/51

(I’m not disagreeing to remove it. It just took me a while to find out what happened to it)

2 hours agojauco

Initially it didn't make sense to me... but it looks like type striping is really the way to go for future TS.

There's the "types as comments" proposal[1] which could even land on browsers one day.

I started using the erasableSyntaxOnly setting in my tsconfig to get ready for this.

[1] https://tc39.es/proposal-type-annotations/

2 hours agopier25

I thought this was the release where the built in sqlite got its experimental tag removed, but I don't see it in the release notes. THAT'S got me excited more than Temporal. A stable API, huge utility and one less dependency.

3 hours agotorgoguys

Off-topic but, Safari seems to be the only browser that doesn't support Temporal yet. It looks like the only blocker for adopting it on web.

https://caniuse.com/?search=Temporal

2 hours agosedatk

No but Google wants to control the Web (they do).

37 minutes agoowebmaster

(Now with Malware) I joke! It already had malware.

29 minutes agojollymonATX

It's so sad that node refuses to add websocket server support.

Adding websocket would simplify stuff tremendously, as well as make deployments much, much more secure.

2 hours agoemilfihlman

Why more secure?

I see that Deno has WebSockets, but I've never used them: https://docs.deno.com/api/web/~/WebSocket

an hour agoskybrian

"ws" is regularly the only package in my package.json

37 minutes agoowebmaster

Node JS team should look into bun and make progress. They are somewhat stable, but bun have lot of features and is more performant than Node.

3 hours agocute_boi

/s ? Bun is not yet (ever?) compatible with Node. I'm sure if Node JS could trim the fat with breaking changes they'd be fast too

3 hours agoHatchedLake721

Honest question, what isn't compatible? Where I work we've simply replaced node with bun across a lot of overcomplicated + crappy projects, and on my work+personal computers I alias bun/bunx to node/npx with seemingly no issues at all

an hour agoxkcd-sucks

In my testing Bun wasn't much faster most of the time, usually on par for all non-IO related stuff, and there were some cases with scheduling where Bun was noticable slower.

2 hours agonotnullorvoid

I expect bun to run almost everything that node runs these days. They have an extensive test suit to ensure that.

Even the complicated NextJS runs with Bun: https://nextjs.org/conf/session/nextjs-bun

Do you have a source for your claim?

3 hours agobel8

Maybe if you start from scratch with a new project, but when migrating an old project it's definitely not a drop-in replacement. I try once or twice per year, but it's not worth the effort when the upside isn't that big.

3 hours agovichle
[deleted]
an hour ago

They should the unexpected and vibe code node to zig. Or Odin for the kicks.

3 hours agopostepowanieadm

I see no reason to leave node in what concerns JavaScript runtimes.

an hour agopjmlp

they should rewrite their whole stack by AI from one language to another language, it seems fun.