With the release of Node.js 24, JavaScript developers receive a more powerful and modern tool for developing web applications and asynchronous code. The new version focuses on speed optimizations, expanded functionalities, and improved compatibility with current JavaScript standards.
A core element of the improvements in Node.js 24 is the update of the V8 JavaScript engine to version 13.6. This update, also used in the Google Chrome browser, brings several important new features:
RegExp.escape: Simplifies the escaping of characters for regular expressions and increases security.
Float16Array: A new Typed Array for 16-bit floating-point numbers, specifically designed for graphics-intensive applications, machine learning, and other scenarios with high memory and performance requirements.
Atomics.pause: Enables more precise control of threads and improves the possibilities for low-level concurrency with workers.
WebAssembly Memory64: Support for 64-bit memory in WebAssembly, which increases the performance of demanding, near-native tasks.
"Explicit Resource Management await using": Ensures the automatic cleanup of resources such as files or network connections.
Error.isError: A practical function to check if an object is an error object, making error handling more robust.
These V8 improvements bring Node.js closer to the current JavaScript standards in the browser and the latest specification drafts. The result is an improved developer experience, less boilerplate code, and a more powerful toolkit.
The experimental Permission Model, introduced in Node.js 20, is being further developed. The command-line flag has changed from --experimental-permission
to --permission
. This signals increasing stability and readiness for broader use. The Permission Model allows restricting access of Node.js applications to resources like the file system or network connections, increasing security.
The URLPattern API, used to define patterns for comparison with URLs, is now globally available. Developers can now directly use patterns like /users/:id
for routing logic without having to import them. This simplifies routing, URL matching, and the development of URL processing tools.
The integrated test runner has also been improved and now automatically waits for the completion of subtests. Previously, an await
statement had to be used manually for each subtest to ensure it was completed before the main test ended. Node.js 24 now handles this task automatically, simplifying test writing and reducing the risk of errors.
Node.js 24 includes Undici 7.0.0, the modern HTTP client for Node.js. This upgrade provides better support for the latest HTTP standards and optimizes the processing of HTTP requests. npm has also been updated to version 11, enabling faster installations, improved security checks, and better compatibility with modern package ecosystems.
As Node.js evolves, some older features are being deprecated or removed. url.parse()
is deprecated in favor of the WHATWG URL API. Functions like SlowBuffer
and tls.createSecurePair
are also deprecated. Older file system constants like fs.F_OK
are also being phased out.
Node.js 24 represents a significant advance in terms of performance, security, and developer friendliness. The new features and improvements provide practical tools that make the daily work of JavaScript developers easier.
Bibliografie: https://www.developer-tech.com/news/nodejs-24-a-faster-sleeker-javascript-experience/ https://nodesource.com/blog/Node.js-version-24 https://twitter.com/Gadget_Ry/status/1920065222166896937 https://medium.com/@ashabb/node-js-24-features-whats-new-what-s-cool-and-why-i-m-excited-0c286a0e31a9 https://www.redhat.com/en/blog/introduction-nodejs-24-from-red-hat https://www.reddit.com/r/node/comments/1k71vnd/whats_new_in_nodejs_24/ https://snyk.io/blog/10-modern-node-js-runtime-features/ https://javascript.plainenglish.io/everything-you-need-to-know-about-node-24-3b267d7e716d https://radixweb.com/blog/nodejs-usage-statistics http://nodesource.com/blog/State-of-Nodejs-Performance-2024/