#​530 — April 30, 2024

Read on the Web

Node.js 22.0 (Current) Released — The latest major version of Node is here. Note that it’s a ‘Current’ release for now, so gets all the newest features first, but is due to become Node’s main active LTS release this October. As an even numbered release, Node 22 should be around and maintained for a long time, most likely out to 2027 or so (see image above).

We’ll dig into some of what’s new with Node 22 in just a moment..

Stytch: Auth0 Alternative for AuthN, AuthZ, Fraud Prevention — Use Stytch for enterprise-grade multi-tenant B2B auth with SSO, RBAC, and SCIM. Use pre-built UIs, go headless, or integrate directly with the API. Plus, Stytch has device fingerprinting built-in to detect bots and prevent abuse. Get started free.

Stytch sponsor

So what’s new in Node 22?

Native Support for CJS/ESM Interoperability Begins in Node 22 — An overview of a new era for Node when working with both CommonJS and ECMAScript modules.

Zachary Lee

TypeScript 5.5 Beta — There’s a lot going on here (like inferred type predicates) but we’ll be focusing on it more in JavaScript Weekly. On the Node side, if you’re writing an ECMAScript module, you can now use named imports from TypeScript’s npm package.

Microsoft

JSR is Not ‘Another Package Manager’ — Node, npm and CommonJS brought a packaging standard to JavaScript, and while tools like Yarn or pnpm added their own twists to the process, Ryan says it’s time for a transformation. JSR is not ‘a new npm’ but a reshaping of how packages are distributed, designed for the ESM era.

Ryan Dahl

You Might Not Need

1
dotenv

: Node Now Natively Supports

1
.env

File Loading — This isn’t a super new feature (it’s existed since Node 20.6.0) but a handy reminder that you can trim another dependency if you have basic

1
.env

environment variable reading requirements.

Zachary Lee

📄 Web Scraping Like a Pro: Unlocking the Power of Impersonation – As well as some useful technical tips, ethics and responsibilities are also covered. Lev Gelfenbuim

🛠 Code & Tools

📺 YouTube.js: An Unofficial YouTube API Client Library — ‘InnerTube’ is an API used by YouTube’s clients, and you can use it too, although they might not like it. It runs on Node.js, Deno, and modern browsers.

LuanRT

get-windows: Get Metadata About Active and Open Windows — Get titles, ids, bounds, etc. for windows on a desktop system. Works on macOS 10.14+, Linux (though not Wayland), and Windows 7 and up.

Sindre Sorhus

browser-or-node 3.0: Figure Out Where Your Code is Running — Provides a simple way to tell if your code is currently running in a browser, in Node, in a Web Worker, or in Deno. Works with both ESM and CJS imports.

Dinesh Pandiyan

cron-schedule 5.0: Cron Parser and Scheduler — Parse and query cron style expressions in the browser, Node or Deno.

Pascal Sthamer

Odiff: A Fast Pixel-by-Pixel Image Diffing Tool and Library — Claims to provide results in milliseconds. You can use it as a CLI tool or from Node (though it’s written in OCaml, primarily). It supports PNG, JPG, and BMP, including cross-file comparisons.

Dmitriy Kovalenko

⚙️ rcompat – JS interoperability and runtime compatibility layer for servers. Terrablue

⚙️ TsumiLink – A Lava/NodeLink compatible client. Fyphen

⚙️ x-crawl – AI-assisted Web crawler library. CoderHXL


0 Comments

Leave a Reply

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