Type-Safe Fastify, JavaScript sandboxing and other Adventures in Nodeland
Hi Folks, Last week I have been traveling to visit one of the first companies to adopt Platformatic. I'm excited! Nevertheless, this issue covers the usual batch of releases and articles. Check them out!
Videos
What if I told you Fastify has first-class typescript support, allowing for typed requests and replies? And you could use those types to validate the incoming data, avoiding potential security and consistency issues.
In my latest youtube tutorial, Type-Safe Fastify I show how to integrate @sinclair/typebox with Fastify using @fastify/type-provider-typebox!
In Part 12 of the "Building the Unscalable Queue System" series, we finished the remaining tasks in the README. We also started making it scalable by using PostgreSQL instead of SQLite and electing a leader. Check it out at https://youtu.be/h2EITPom6AM.
Releases
- fastify v4.14.0 logs requests refused before processing starts, includes origin error message into serialization error, adds
onRequestAbort
hook, and many other fixes. v4.14.1 fixes the inevitable regression. - async-cache-dedupe v1.10.0 adds the
transformer
option. - hapi-pino v12.0.0 supports Hapi v21.
- @fastify/csr-protection v6.2.0 updates the
generateCsrf
return type. - @fastify/rate-limit v8.0.0 does not set the reply code automatically anymore.
- mercurius-integration-testing v7.0.0 upgrates to mercurius v12.
- 0x v5.5.0 adds support for Node.js v19 kernel traces.
Articles
-
The JavaScript Site Generator Review - a review from the author of Eleventy on the state of static site generators.
-
Sandboxing JavaScript Code - This document discusses creating viable JavaScript sandboxes to run untrusted code in your application, from Firecracker VM to Deno.
-
Learn how to use Firecracker to start a VM in less than a second.
Upcoming Events
If you would like to meet me in person, you will find me at these upcoming events:
- Open Source Day - Florence, Italy, 24th of March
- CityJS - London, UK - 31st of March
- JSDay 2023 - Verona, Italy - 12-14th of April
- Node Congress - Berlin, Germany - 14th of April
- Open Source Summit / OpenJS World / OpenJS Collaborators' Summit - Vancouver, Canada - 9-12th of May