Node turns v20, book updates, conferences, videos and other Adventures in Nodeland
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 v20 is now available
Node.js 20 is now available!, and it's packed with new features:
- Permission Model
- Custom ESM loader hooks nearing stable
- Stable Test Runner
- V8 11.3
- Single Executable Applications
- ARM64 support for Windows
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.
NodeCongress
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.
JsDay
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.
Book
https://content.packt.com/B16496/cover_image_small.jpegAs 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.
Videos
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.
Releases
- close-with-grace v1.2.0 improves the types.
- @fastify/multipart v7.6.0 bind original request to onFile function this.
- @fastify/swagger-ui v1.8.0
- undici v5.21.1 and v5.21.2 provides many bug fixes and performance improvements.
- @fastify/type-provider-typebox v3.1.0 upgrades to typebox v0.28.
- @fastify/static v6.10.1 - converts root parameters with URL object type to a path.
- @fastify/send v2.1.0 contains multiple performance improvements.
- @fastify/redis v6.1.1 fixes the
clientClose
option when specifying an external connection. - @fastify/secure-session v6.1.0 adds support for custom session key and multiple sessions.
- pino-std-serializers v6.2.0 implements "error with cause" serializer.
- @fastify/session v10.2.1 separates an actual path from url search part before verification.
Articles
- 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!
Upcoming Events
If you would like to meet me in person, you will find me at these upcoming events:
- Open Source Summit / OpenJS World / OpenJS Collaborators' Summit - Vancouver, Canada - 9-12th of May
- JSNation - Amsterdam, Netherlands - 1st of June
- GraphQL Conf - San Francisco, California, USA - 19-22nd of September