Posted on Leave a comment

Node.js 19: What’s New Improvements in Quality and Performance

The Node.js project has released a new version of their JavaScript platform, bringing with it a number of improvements in quality and performance. Notable among these changes are an update to the V8 JavaScript engine, improvements to the diagnostics system, and a new release of the npm package manager.

In this article, you’ll find out what’s new in Node.js 19.

Excited that Node.js 19 was released today! Highlights include the update of the V8 JavaScript engine to 10.7, and HTTP(s)/1.1 KeepAlive enabled by default.

1. ❯ No more nodemon?!

$ node –watch (experimental) 🌱

❯ No more nodemon?!

An exciting recent feature addition to the runtime is support for running in ‘watch’ mode using the node –watch option.

Running in ‘watch’ mode restarts the process when an imported file is changed. 🥳

2. HTTP(S)/1.1 KeepAlive by default

Starting with this release, Node.js sets keepAlive to true by default.

This means that any outgoing HTTP(s) requests will automatically use HTTP 1.1 Keep-Alive (5 secs).

Experience a better throughput/perf by default.

3. Stable WebCrypto

The WebCrypto API is now stable.

Use globalThis.crypto or require(‘node:crypto’).webcrypto to access this module.

P.S. (with the exception of the following algorithms: Ed25519, Ed448, X25519, and X448)

4. Custom ESM Resolution Adjustments

Node.js has removed the –experimental-specifier-resolution flag. Its functionality can now be achieved via custom loaders.

5. DTrace/SystemTap/ETW Support

Support for DTrace/SystemTap/ETW was removed in v19.0.0.

The main reason is the prioritization of resources.

The complexity to keep the support up-to-date has proved not worth it without a clear plan to support these tools.

6. V8 10.7 ❯ dep update

The V8 engine is updated to version 10.7, which is part of Chromium 107.

This version includes a new feature to the JavaScript API: Intl.NumberFormat.

Intl.NumberFormat v3 API is a new TC39 ECMA402 stage 3 proposal extending the pre-existing one.

7. npm ❯ dep update

Node.js 19 ships with [email protected]

Conclusion

There are many new features in Node.js 19 that improve quality and performance. Some of my favorites include the watch feature and new ECMAScript module support, better debugging tools, and improved Promise API support. What’s your favorite new feature of Node.js 19? Let me know in the comments!

Leave a Reply

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