Node.js

Node.js: Modernizing the Stack - REPL Gets a Major Overhaul

Node.js takes a big step toward modernization with a complete REPL overhaul that removes the deprecated domain module dependency, plus improvements to crypto options and web compression streams. Matteo Collina leads a significant architectural change while the team continues strengthening spec compliance and welcomes a new triager to the community.

Duration: PT3M54S

https://podlog.io/listen/node-js-c43ec36a/episode/node-js-modernizing-the-stack-repl-gets-a-major-overhaul-6c2044ab

Transcript

Hey there, Node developers! Welcome back to another episode of the Node.js podcast. I'm so excited to chat with you today because we've got some really fascinating changes that just landed. It's March 7th, 2026, and the Node.js core team has been busy with some pretty significant architectural improvements.

Let's dive right into the big story of the day - and honestly, this one's a doozy. Matteo Collina just merged a massive pull request that completely transforms how the REPL handles errors. We're talking about removing the REPL's dependency on the deprecated domain module - and this is huge for the future health of Node.js.

Here's why this matters: domains have been deprecated for years, but the REPL was still using them for error handling. Matteo's solution is elegant - instead of domains, the REPL now uses AsyncLocalStorage to track which REPL instance owns an async context, and it leverages setUncaughtExceptionCaptureCallback for catching async errors. The beautiful part? All the existing behavior you love about the REPL stays exactly the same. Your sync errors, async errors, promises, top-level await - everything still works perfectly, but now it's built on modern, stable APIs.

This change touched 26 files and added over 400 lines of new code, but it's the kind of foundational work that makes Node.js stronger for the long term. It's like renovating the plumbing in your house - you might not see the difference day to day, but you'll appreciate it for years to come.

Speaking of modernization, we've got another great improvement from Aditi who worked on making the `--use-system-ca` flag work per-environment instead of per-process. This means worker threads can now individually choose whether to use system certificate authorities. It's one of those changes that might seem small, but it gives developers so much more flexibility when working with multiple environments.

And I have to give a shoutout to Filip Skokan for his incredible work on web compression streams. He's been methodically improving Node.js's compliance with web standards, and this latest batch of commits fixes brotli error handling and makes sure we properly reject garbage data after compressed payloads end. These kinds of spec compliance improvements might not make headlines, but they make Node.js more reliable and predictable for everyone.

We also have some great community news - efekrskl has joined as a new triager! It's always exciting to see community members step up to help with the project. The triager role is so important for keeping issues organized and helping contributors get their work reviewed and merged.

Anna Henningsen contributed some really thoughtful improvements to AsyncWrap's memory management, converting a potential memory leak source into a more robust internal field approach. It's the kind of careful, preventative work that keeps Node.js running smoothly at scale.

And just to show that even the most experienced developers are human, we had a quick one-line fix for a copy-paste error in the Nix shell configuration. It's a good reminder that thorough code review catches these little things before they cause problems.

Today's Focus: If you're working on any projects that use the REPL programmatically, this is a great time to test your code against the latest changes. The behavior should be identical, but it's always smart to verify. And if you've been hesitant to remove domains from your own code because you thought Node.js core still relied on them heavily, this REPL change is another signal that it's safe to modernize your error handling patterns.

That's a wrap for today's episode! The Node.js core team continues to balance innovation with stability, and these changes show just how thoughtfully they approach modernization. Keep building amazing things, and I'll catch up with you next time with more updates from the Node.js world. Happy coding!