Node.js 23: Major Updates, Experimental Features, and Improved Performance

Node.js 23 is here, and it’s bringing some exciting changes and improvements to the runtime. With this release, Node.js 23 takes over as the ‘Current’ version, replacing Node.js 22, which is moving into Long-Term Support (LTS) later this month.

What’s New in Node.js 23

Default ESM in require()

One of the biggest updates in Node.js 23 is the ability to use require() for native ES modules by default. In the past, you’d need to use the --experimental-require-module flag, but now it’s baked right in. This makes working with ES modules more straightforward, eliminating extra steps. Keep in mind that this feature is still experimental. If you run into trouble, you can always disable it with the --no-experimental-require-module flag.

Want to check if require(esm) is enabled? Just use process.features.require_module. This change is meant to help bridge the gap between CommonJS and ES modules, so you can work across both seamlessly. Package authors can also use the “module-sync” exports condition to ensure compatibility between require() and import.

Dropping Windows 32-bit Support

With Node.js 23, support for 32-bit Windows systems is officially gone. This change helps the team focus on modern, widely-used platforms and simplify ongoing development. If you’re still using a 32-bit system, you’ll need to stay on an older version of Node.js or upgrade your environment to continue receiving updates.

Stable node --run Command

The node --run command is now stable, allowing you to run JavaScript directly from the command line. This is great for quick scripts or testing out small bits of code. For example, you can quickly try something like node --run 'console.log("Hello, Node.js 23!")'. Making this feature stable adds more flexibility for everyday tasks and developer experiments.

Enhanced Test Runner

The built-in test runner got some nice updates in Node.js 23. You can now use glob patterns when specifying coverage files, making it easier to include or exclude specific files. This is especially helpful if you’re working on larger projects with multiple test suites—no more manual listing of every file.

Experimental TypeScript Support

If you’re a TypeScript developer, Node.js 23 has something new for you: the --experimental-strip-types and --experimental-transform-types options. These experimental flags let you run TypeScript directly in Node.js, cutting down the steps needed to work with your TypeScript code. It’s still early, but if you’re experimenting with TypeScript, these options could make your life a lot easier.

Experimental Web Storage API

Another cool addition is the experimental implementation of localStorage and sessionStorage APIs. These are familiar tools for web developers, and now they’re available in Node.js too. This makes it easier to use the same storage approach across your client and server environments, bringing more consistency to your projects.

Experimental SQLite Integration

Node.js 23 also introduces an experimental API for working with SQLite. This is perfect for developers who need a simple, lightweight database solution without the overhead of a full-scale database. It’s especially handy for small projects, prototyping, or applications where SQLite just makes sense.

Performance Boosts

Performance-wise, Node.js 23 has some great improvements. On-disk code caching is now available, which helps reduce startup times. You’ll also notice improvements in buffer and file system performance, which makes many common operations a bit faster and the runtime overall more efficient.

Summary

Node.js 23 is full of updates that make the developer experience better, including default support for ES modules with require(), new experimental tools like TypeScript support, Web Storage API, and SQLite integration, along with stability improvements like the node --run command. These changes simplify workflows and make Node.js more powerful and versatile. The Node.js team encourages everyone to test these new capabilities and provide feedback, especially for experimental features, so they can keep refining them.

Share this post

Twitter
Facebook
LinkedIn
Reddit

Related posts

Node.js 21 is here with Websocket

The latest major version of Node.js has just released with a few new interesting experimental features and a lot of fixes and optimization. You can find our highlights from the release notes. Built-in WebSocket client A browser-compatible WebSocket implementation has

Read More »

Node.js
Experts

Learn more at risingstack.com

Node.js Experts