Earlier quoted context omitted.
Why more secure? I see that Deno has WebSockets, but I've never used them: https://docs.deno.com/api/web/~/WebSocket
"ws" is regularly the only package in my package.json
Node.js 26.0.0 (Now with Temporal)
51–60 of 63 posts
Re: Node.js 26.0.0 (Now with Temporal)
#52Tangent: 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.)
Re: Node.js 26.0.0 (Now with Temporal)
#53Earlier quoted context omitted.
https://nodejs.org/en/blog/release/v26.1.0 is particularly cool as it added initial FFI support.
This API is inherently unsafe. Invalid pointers, incorrect signatures, or accessing memory after it has been freed can crash the process or corrupt memory. Absolutely great idea to expose such "features" to the web dev world! All the JS devs that are already struggling with mildly complicated language features will love the giant new field of bugs they only dreamed of. The arrival of the first very hyped tool that wi…
I doubt we'll see this go into mainstream dependencies likely to be used by such developers – it hasn't in Ruby which has had easily accessible FFI mechanisms for years.
Though, there is already a fun experiment using it: https://blog.platformatic.dev/destino-doom-terminal-nodejs-f...
Re: Node.js 26.0.0 (Now with Temporal)
#54Re: Node.js 26.0.0 (Now with Temporal)
#55Earlier quoted context omitted.
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/
At this point we should really prompt all the AI power in the world we have to create a TS replacement. It seems grotesque.
Re: Node.js 26.0.0 (Now with Temporal)
#56Off-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
if (!globalThis.Temporal) {
// await import('temporal-polyfill/global');
await import('https://cdn.jsdelivr.net/npm/temporal-polyfill@0.3.0/global.min.js');
}Re: Node.js 26.0.0 (Now with Temporal)
#57> 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
what is the value of an "update or insert" call on `Map`? is that not just set? `getOrInsert` here seems to be the Python "set_default" method on dicts, which is very useful at avoiding tedium in some basic data munging
Example:
update(store, (draft) => {
if (!draft.alertConfigurations.has(req.params.clusterId))
draft.alertConfigurations.set(req.params.clusterId, new Map());
const clusterAlerts = draft.alertConfigurations.get(req.params.clusterId);
req.body.forEach((alert) => clusterAlerts.set(alert.id, { ...alert, predefined: false }));
});Re: Node.js 26.0.0 (Now with Temporal)
#58Node v26 doesn't ship with corepack anymore. Annoying, it was a decent way to get pnpm in-band.
Re: Node.js 26.0.0 (Now with Temporal)
#59Tangent: 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.)
Kind of difficult to install, especially in the enterprise business environment. At least they kept it free for everyone.
Re: Node.js 26.0.0 (Now with Temporal)
#60Earlier quoted context omitted.
Kind of difficult to install, especially in the enterprise business environment. At least they kept it free for everyone.
Difficult how?