View profile

Adventures in Nodeland - Issue #44

Matteo Collina
Matteo Collina
Hi Everyone! This edition includes a massive list of changes that have been worked on in the last weeks in Fastify and Pino. Thanks to our fantastic community, we have been able to ship all this work! This edition also feature a few articles covering OSS sustainability, Remix, and a few other very interesting takes. Enjoy!

This week I will be speaking at JS Poland about Fastify! Tune in at:
Next week I will be part of the GraphQL meetup hosted by Prisma, join up:
GraphQL Berlin Meetup #25 - an online event + a raffle! 🎁 | Meetup
Fastify
We have recently added the go-to guide for Prototype Poisoning to Fastify docs. This is an old article from Eran Hammer. It is a must read for all JS developers.
Prototype-Poisoning
[email protected] include a new test helper that was developed by Manuel Spigolon. Check it out:
Release v2.15.0 · fastify/fastify-cli
As with every new releases, our users have found a significant regression in fast-json-stringify v3 (which will be part of Fastify v4): a memory leak due to some internal changes in Ajv. Fellow collaborator Mohamed Edrah diagnosed the problem and fixed it fairly quickly with a brilliant solution that also yield significant performance increase for that use case.
Use `ajv.addSchema` to load validation schemas at build by MSE99 · Pull Request #382 · fastify/fast-json-stringify · GitHub
A few weeks ago, AWS shipped a new feature that enables Lamba Functions written in JavaScript to leverage the asynchronous initialization of ESM modules to massively reduce cold start for lambdas with provisioned capacity (-94%). Check it out:
Have you ever heard of Turborepo? It’s an all-in-one solution to reduce the install time of modules in monorepos. Interestingly, they were acquired by Vercel which made the client Open Source while there is a server counterpart that is so proprietary. Fastify collaborator Maksim recently built an open source version of it using your favorite framework… check it out!
Fastify v3.26.0 is out! We have a few new features, including a typescript regression fix, better support for the plugin names and many docs updates and other fixes.
Shortly after Fastify v3.26.0 was released, I realized I released too soon as the PR from James Sumners got finished. This change add a new option to Fastify to make the .close method automatically destroy all connected sockets. This behavior is very useful because it allows a very quick shutdown of the server. It’s not enabled by default because it introduces some overhead when in use. Check it out:
This new feature was then released as the only change in v3.27.0. Integers are cheap, so I just released a new minor version straight away. You can safely skip v3.26.0.
Pino
Following up on a huge demand from Jest users, we added a sync flag to pino-pretty so it could be configured to make all its logging synchronous. Why it benefits Jest? Because it tracks all open handles and any asynchronous logging would result in a warning ⚠️. Enjoy!
We shipped the above new feature together with the additional prettifiers metadata https://github.com/pinojs/pino-pretty/pull/283 and many others
Release v7.4.0 · pinojs/pino-pretty · GitHub
We
Release v7.5.0 · pinojs/pino-pretty · GitHub
I shipped a new release of thread-stream - the utility that pino uses to implement fast, cross thread streaming. This new version fixes a bug when used in conjunction with Yarn PnP.
Release v0.13.1 · pinojs/thread-stream · GitHub
We shipped a release of the standard pino serializers to support the new AggregateError that are now part of JavaScript. Check it out!
Release v5.1.0 · pinojs/pino-std-serializers · GitHub
We shipped a new fix about the caller recognition in pino that improves the reusability of transport modules, check it out:
Release v7.6.4 · pinojs/pino · GitHub
We also shipped a new version of pino-http that implement access to custom properties in the response:
Release v6.6.0 · pinojs/pino-http · GitHub
Last but not least, we landed a change adding multi wildcard support to fast-redact, the library that pino uses to perform data redaction (it’s critical for managing private data according to the various laws). Enjoy:
Multi wildcard support finalization by lrecknagel · Pull Request #40 · davidmarkclements/fast-redact · GitHub
News
Read up this twitter thread from my friend Bryan English on tracking asynchronous context through multiple libraries:
Bryan English (💉💉💉)
PSA: If your Node.js library breaks asynchronous context via userland queueing or other means, fix it with AsyncResource.

In the rest of this thread, I'll show you how you can test for this, and how to fix it in easy cases.
Another very interesting twitter thread is from Tobie, take a look at his opinion on Color.js and Faker.js.
Tobie Langel
Much has already been said about the self-sabotage of two open source projects by their developer in order to protest not being paid for developing and maintaining them. https://t.co/WHtSjgJaHH
What does have the maintainer of CURL to say about OSS sustainability? Daniel maintains a very important piece of the ecosystem.
Enforcing the pyramid of Open Source | daniel.haxx.se
If you have not heard about Remix, it’s a new React metaframework that is taking over all the buzz in the JS world. Here is a long comparison with Next.js. Read up:
Remix vs Next.js
If you are a leader in a technology organisation, you should read this must-read article on how to integrate technology and business. This is the most important part of the article. Enjoy
✨IF YOU CAN’T MAKE IT PROFITABLE✨
✨YOUR DESTINY WILL INEVITABLY BE✨
✨TAKEN OUT OF YOUR HANDS✨
✨AND GIVEN TO SOMEONE ELSE.✨
How “Engineering-Driven” Leads to “Engineering-Supremacy”
Want to learn how Amazon sped up the latency of their e-commerce platform, improving sales? Follow this twitter feed:
Amila Welihinda
At amazon, every 100ms of latency costed us 1% in sales

My team's goal was to cut https://t.co/GWQmrk4aI3's load time in half

Here's what we did 🧵
Did you enjoy this issue? Yes No
Matteo Collina
Matteo Collina @matteocollina

I write about my journey as a core contributor of Node.js, as an author and a maintainer of many modules - including Fastify and Pino. In addition, I speak at conferences, and I will add links to all my talks in case you missed one.

In order to unsubscribe, click here.
If you were forwarded this newsletter and you like it, you can subscribe here.
Created with Revue by Twitter.