#​566 — February 11, 2025

Read on the Web

🏖️ We’re taking next week off, so the next issue will be on Tuesday, February 25. Feel free to hit reply and send in any submissions!
__
Peter Cooper, your editor.

How to Publish ESM-Based npm Packages with TypeScript — Now that you can use the ES modules (almost) everywhere, it’s worth understanding how to package them up for use with npm. Axel digs into everything you need to know and shares some useful tools too.

Dr. Axel Rauschmayer

Node v22.14.0 (LTS) Released — The latest stable/LTS release of Node gets the usual raft of bug fixes and tweaks. Among the more notable ones are TypeScript support for code evalled via

1
stdin

, a new

1
--disable-sigusr1

flag,

1
assert.register()

, and

1
t.assert.fileSnapshot()

.

Antoine du Hamel

Troubleshoot Node.js App Performance with Datadog APM — Datadog’s distributed tracing provides end-to-end visibility into requests wherever they go, across hosts, containers, and service boundaries. With rich dashboards, and algorithmic alerts, Datadog provides your team with the tools they need to optimize modern applications.

Datadog sponsor

IN BRIEF:

Why to Move On to ‘ESM-Only’ — The march to using ES modules has been going on for years now and if you’re still holding out, there’s probably a good reason why. While you can maintain packages that support both ESM and CommonJS approaches, Anthony thinks it’s finally time to go ‘ESM only’ and explains why here.

Anthony Fu

Node v20.18.3 (LTS) Released — The main update is the backporting of import attributes and JSON modules is now considered stable.

Marco Ippolito

Want to Roll Your Own Autoscaling? Here Are Our Secrets 🤫 — Does it make sense for us to write this guide? No! Did we do it anyway? Yes! We did it for you ❤️

Judoscale sponsor

📄 A Checklist for Your

1
tsconfig.json

Dr. Axel Rauschmayer

📄 Do I Need This Node Dependency? Brian Muenzenmeyer

📄 How to Write Cypress Tests That Don’t Suck Jonathan Chaffer

🛠 Code & Tools

import-in-the-middle: A Module Loading Interceptor — Back in my day Malcolm was in the middle, but now you can intercept the loading of ES modules in Node with this – handy if you want to modify them in some way. There’s also require-in-the-middle if you’re a bit more oldschool.

Node.js Team

ffast: An Experimental Node.js FFI Library — A proof of concept for bringing all the low level bindings necessary into JS-land for creating FFI wrappers from JavaScript itself, without needing things like libffi. Works (with many caveats, the author says) on Linux x64/ARM64 and macOS/ARM64.

Billy Whizz

Human Regex: Human-Friendly Regular Expression Builder with English-Like Syntax — After 8 years of Perl, regexes are my bread and butter, but I’d say most developers aren’t big fans 😉 This library offers a more natural fluent-style option. Magic Regexp and Super Expressive are other options in this space.

Ridwan Ajibola

Pundit-TS: Organize Your Authorization Logic with Full Type-Safety — Inspired by Ruby’s Pundit library, Pundit-TS offers a TypeScript flavored way to implement role-based and attribute-based access control models in your app.

Fatih Kaya

web-worker 1.5: Consistent Web Workers for the Browser and Node — Want to publish npm modules that use Web Workers and that work in both Node anbd client-side? In Node, it works as a web-compatible Worker implementation atop

1
worker_threads

. In the browser, it’s an alias for

1
Worker

.

Jason Miller

fast-folder-size: Calculate the Total Size of a Directory — Works as both a CLI app or Node module.

Simone Busoli

ioredis 5.5: Robust, Performant, Full-Featured Redis Client for Node

Zihua Li

remove-unused-vars — An experimental new tool for removing unused variables from code.

Lars Kappert

📰 Classifieds

Start selling to enterprise faster with WorkOS by Adding SSO, SCIM, and RBAC to your B2B SaaS app in minutes—not months.

📈 Is your app facing a traffic spike (e.g. fintechs facing the upcoming tax season)? Join Matteo Collina for tips on scaling Node.js apps during high-pressure periods.

Register your badge for Node Congress! Learn Fullstack, JS backends & DevOps from top Node.js experts, including TSC members & 15+ speakers!

  • pnpm 10.3 – The fast, efficiency-focused package manager adds a

    1
    strict-dep-builds

    option to exit with a non-zero exit code if any dependencies have unreviewed build scripts.

  • Express Zod API 22.8 – Quick schema validation and custom middleware.

  • Mongoose 8.10 – Popular MongoDB object modeling library.

  • Typegoose 12.11 – Define Mongoose 8.10 models as TypeScript classes.

  • Jasmine 5.6 – Testing framework for browsers & Node.

  • Globby 14.1 – User-friendly glob matching.

📢  Elsewhere in JavaScript

A quick roundup of some of other interesting stories in the broader JavaScript landscape, in case you’ve missed them:


0 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *