Adventures in Nodeland logo

Adventures in Nodeland

Subscribe
Archives
May 2, 2022

Fastify scoped modules, Node.js v18 and other Adventures in Nodeland - Issue #57

Hi Everyone! In the last two weeks I have been traveling in the South of France with my family - I really needed a break. I’ve quickly assembled this edition composed of a few important releases and a lot of interesting articles. As usual, let me know what you think!

Fastify

Many developers ask the same question when joining the Fastify community: how do we know which modules are core and which one are ecosystem? We have listened and migrated all core modules to use the @fastify scope on npm. Read more at:

Core Modules Renamed · Issue #3856 · fastify/fastify · GitHub
Core Modules Renamed · Issue #3856 · fastify/fastify · GitHub
We have renamed all of the core Fastify plugins that were prefixed with fastify-. We renamed them to be listed under the @fastify scope. For example, fastify-cookie is now @fastify/cookie. When you try to use latest version of the old pa…
github.com
Core Modules Renamed · Issue #3856 · fastify/fastify · GitHub
Core Modules Renamed · Issue #3856 · fastify/fastify · GitHub
We have renamed all of the core Fastify plugins that were prefixed with fastify-. We renamed them to be listed under the @fastify scope. For example, fastify-cookie is now @fastify/cookie. When you try to use latest version of the old pa…
github.com

Following up the massive release of all core modules, the Fastify team shipped all the module updates, including fastify v3.29.0.

Pino

Pino v7.11.0 ships with full TypeScript support for transports. sonic-boom@v2.8.0 ships a few improvements to help Damien implement file rotation for pino.

Node.js

Node.js 18 is now available! | Node.js
We’re excited to announce that Node.js 18 was released today! Highlights include the update of the V8 JavaScript engine to 10.1, global fetch enabled by default, and a core test runner module.
nodejs.org

Node.js v18 also fixes a few important performance problems in using class fields. Read the article Joyee wrote at

Fixing snapshot support of class fields in V8
Up until V8 10.0, the class field initializers had been broken in the V8 startup snapshot - a feature used by embedders like Node.js and Deno to speed up the bootstrapping of themselves or user applications.
joyeecheung.github.io

…and the longer explanation within V8:

Faster initialization of instances with new class features · V8
Published · Tagged with internals Class fields have been shipped in V8 since v7.2 and private class methods have been shipped since v8.4. After the proposals reached stage 4 in 2021, work had begun to improve the support of the new class features in V8 - until then, there had been two main issues affecting their adoption:
v8.dev

A big news of the last two weeks has been the OpenSSF selecting Node.js for Project Alpha - they will fund the OpenJS Foundation and in turn NearForm to help improve the security of Node.js. Read more at:

OpenSSF Selects Node.js as Initial Project to Improve Supply Chain Security - Open Source Security Foundation
OpenSSF Selects Node.js as Initial Project to Improve Supply Chain Security - Open Source Security Foundation
Authors: Brian Behlendorf, OpenSSF, and Robin Bender Ginn, OpenJS Foundation Today, we’re excited to announce that Node.js is the first open source community to be supported by OpenSSF’s Alpha-Omega Project.
openssf.org

Undici v5.1.0 (and v5.1.1) has shipped improving fetch and mocks! Check them out.

News

Amazon Aurora is one of the game-changing tools to help developer serverless applications. The newly updated v2 enable to autoscale the capacity of the database on demand! Check out the announcement:

Amazon Aurora Serverless v2 is Generally Available: Instant Scaling for Demanding Workloads | Amazon Web Services
Today we are very excited to announce that Amazon Aurora Serverless v2 is generally available for both Aurora PostgreSQL and MySQL.
aws.amazon.com

One of the biggest themes of the great resignation are people leaving their jobs to start new businesses. The abundance of VC capital makes this even easier. Should you?

Should I start a SaaS startup?
Just do it. Start. Launch. Stop thinking about it and planning, just do it.
joelennon.com

What is Hydration? It’s the technique that makes modern frameworks be able to server-side render and reconstruct the same state in the browser, too. Read up:

Hydration is Pure Overhead
Hydration is Pure Overhead
Why hydration is a workaround, not the solution.
www.builder.io

The response to this blog post is the following thread from Sebastian:

Should you use Marko? It’s hyper-performant framework for building sites:

Marko: Compiling Fine-Grained Reactivity
Reactivity has been all the buzz in frontend frameworks the last couple of years. It is being celebrated both for its automatic handling of complex updates and for its performance.
dev.to

…and then use Solid for apps!

Marko for Sites, Solid for Apps
I’ve been sitting on writing this article for 2 years. In my heart this was the article I was going to write even before I read @swyx’s quintessential Svelte for Sites, React for Apps.
dev.to

Jest 28 was released to support Node v18 and improving a lot of things! Note that I normally do not recommend using Jest to test your Node.js applications - however most of you use it anyway. Check it out:

Jest 28: Shedding weight and improving compatibility 🫶 · Jest
Jest 28 is finally here, and it comes with some long requested features such as support for sharding a test run across multiple machines, package exports and the ability to customize the behavior of fake timers.
jestjs.io

Most of the time startups fails into oblivion without no explanation. It’s really good to read up Zaplib post-mortem. I find the article really interesting because it shows that JavaScript (or TypeScript) are to dominate the frontend world for a long time and will not be replaced by Wasm/Rust/AssemblyScript. Check it out:

Zaplib post-mortem - Zaplib docs
Welp, this is a weird blog post! Very unexpectedly, we quickly invalidated some of the core hypothesis that make Zaplib work as a startup.
zaplib.com

Partners

  • This Week in React: the best of React & React Native news. Sebastien filters the noise, and you save time.
Don't miss what's next. Subscribe to Adventures in Nodeland:
GitHub X YouTube LinkedIn