Hi Folks,
A couple of weeks have passed since the last issue of Adventures in Nodeland. I’m sorry I could not send you an update sooner. I have been traveling to Verona for JSDay and Berlin for NodeCongress. I overextended myself - I should have known better after many years of travel. As a result, this newsletter slipped for almost two weeks and a half. It’s now packed with information and links!
Node.js 20 is now available!, and it’s packed with new features:
Personally, the feature that excites me the most is the stable test runner:
import { test, mock } from 'node:test';
import assert from 'node:assert';
import fs from 'node:fs';
mock.method(fs, 'readFile', async () => "Hello World");
test('synchronous passing test', async (t) => {
// This test passes because it does not throw an exception.
assert.strictEqual(await fs.readFile('a.txt'), "Hello World");
});
If you are still running Node.js v14 or v16, start planning your update to Node.js v18 or v20 as soon as possible because Node.js v14 reaches end-of-life at the end of this month (April 2023), while Node.js v16 at the end September 2023.
At NodeCongress, I presented my talk “Building a modular monolith with Fastify,” - demonstrating the flexibility of Fastify and how you can achieve a project structure that can withstand the test of time.
Learn Fastify workshop on JSDay was a blast!
In this one-day session, we covered everything Fastify: from writing your first route to using Platformatic to speed up your API development. My most-loved part was the section on how to metaprogram Fastify! I hope to create a few videos soon.
As you might have known, I’ve authored a couple of chapters of the upcoming “Accelerating Server-Side Development with Fastify”, edited by Packt!
The book is almost ready and will be released in June 2023.
What do you think of Platformatic? Rafael Gonzaga used Platformatic in a recent stream, and I interviewed him about his experience. Watch the video on youtube:
My talk at OSS Day 2023 dropped on youtube “Why are there no incentives for security in Open Source.”.
In the last few weeks I have also been streaming quite a bit. In these two videos, I’ll be working on implementing a simple connection pool on top of SQLite, in TypeScript! Here are the relevant links:
In this live stream, we work on refactoring the start logic of Platformatic, removing quite a few lines of code, and simplifying things. You can see the progress on: https://github.com/platformatic/platformatic/pull/886.
clientClose
option when specifying an external connection.Build a secure web application with Platformatic, Auth0 and Next.js
SQLite builds for WASI since 3.41.0. This is an impressive result and I can’t wait to see SQLite running on Node.js without an addon.
While 10x engineers are mythical beings, -10x engineers exist and are everywhere: they nullify the work of 10 engineers per week. Read up on how to be a -10x Engineer. (This is often called bad management).
“Who profits from open source maintainers’ work?” is a good write-up on the status of Open Source funding and the role each actor plays.
Express vs Fastify: JSON processing provides an independent analysis on the performance of Fastify: “You can get about twice the request per second with fastify”.
WebAssembly tail calls · V8 - impressive to see that V8 has started to ship tail call optimization. When would we see a language or library leveraging tail call optimizations to speed up the web?
The Secrets Behind High Performance With Node.js - In this article, Manuel Spigolon explores a few tips-and-tricks on how we made Fastify… fast!
Introducing npm package provenance - GitHub has shipped a fantastic feature I have been dreaming for a few years. I beta testing this feature for a few months.. and it works like a charm! Once everything is set up correctly, you will have automated and secured releases from GitHub Actions to the npm registry!
If you would like to meet me in person, you will find me at these upcoming events: