View profile

GraphQL Cache invalidations, HorseJS, Pino and other in Nodeland - Issue #43 - You can now sponsor me on GitHub sponsors!

Matteo Collina
Matteo Collina
Hi Everyone, this edition covers a couple of personal milestones for me: being cited by HorseJS and opening up my GitHub sponsor account. We also include several releases ranging from Mercurius Cache to Pino.

My biggest milestone of this week is that… I been “horsed”! I’m so proud about it and it shows my greatest commitment to the JavaScript community in these years.
Horse JS
I will remove __proto__ from JavaScript.
Matteo Collina
If I would ever be allowed to break the web once, I will remove __proto__ from JavaScript.
I decided to open up GitHub Sponsors because while a lot of my OSS is funded by @NearForm, I very often receive requests for bug fixes etc from people/companies that for different reasons cannot hire NearForm and yet they cannot fix bugs themselves.
Sponsor @mcollina on GitHub Sponsors · GitHub
Do you remember this hall? This was part of a famous film! I took this picture myself!
Do you remember this hall? This was part of a famous film! I took this picture myself!
Mercurius
This week marks a massive milestone for Mercurius. The cache plugin now support invalidations both for local memory and Redis. This feature has been result of the collaboration between Simone Sanfratello and myself
Release v1.0.0 · mercurius-js/cache · GitHub
You can read more about it in the long PR that implemented it for the mercurius-cache module.
How does the cache works? The “magic” is all encapsulated in the async-cache-dedupe module. You can use it standalone and add it to your REST APIs too. Check out the PR that implemented invalidations to learn more of our tradeoffs.
feat: storage and invalidation by simone-sanfratello · Pull Request #48 · mercurius-js/cache · GitHub
..as well as learning how this was implemented generically for the async-cache-dedupe module.
Finally get
Pino
We also shipped a new release of Pino to fix a race condition during the start up phase that lead to the loss of a few lines. Specifically we did not close the ThreadStream if it was not ready yet.
Release v7.6.3 · pinojs/pino · GitHub
During last week we exposed a way to let our pino users create files with different permission modes.
Solving this problem (and writing tests for it) was quite a deep dive on the Unix permission system. It’s very important to know what a umask is and this article on Askubuntu was really on the spot:
Node.js
On January 10th there has been a new release of Node.js core. This release include a few critical fixes to how we validate X509 certificates (TLS). It’s really import that you upgrade your Node.js version.
January 10th 2022 Security Releases | Node.js
Have you ever had to solve a performance issue with Node.js? If so you probably had to use one of our diagnostics tool. The Node.js project is trying to model the user journey of a user just like yourself. Could you help us by filling our survey?
User Journey tracking documentation · Issue #502 · nodejs/diagnostics · GitHub
Benjamin is adding quite a lot of methods to Readable to greatly simplify the stream consumption, check them out:
stream: add map method to Readable: by benjamingr · Pull Request #40815 · nodejs/node · GitHub
stream: add filter method to readable by benjamingr · Pull Request #41354 · nodejs/node · GitHub
stream: add forEach method by benjamingr · Pull Request #41445 · nodejs/node · GitHub
News
Over the holiday break we worked in updating the old “The Cost of Logging” I wrote in 2016 to the latest versions of our modules. Read up new article:
The Cost of Logging in 2022 - NearForm
Following up from the previous write up from Moxie, read up Mikeal response:
Are you using the Undici http client? Have you ever tried to implement some mocking? Read up on our embedded mock implementation:
Mocking With Undici Like a Pro
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.