Node.js version 24.0.0 has been released

Node.js 24.0.0 has been released, a platform for running network applications in JavaScript. Node.js 24.0 is categorized under long-term support branches, but this status will only be assigned in October after stabilization. Support for Node.js 24.x will be provided until April 30, 2028. Support for the previous LTS branch, Node.js 22.x, will last until April 2027, while the earlier LTS branch, 20.x, will be supported until April 2026. Support for the LTS branch 18.x ended on April 30, 2025, and the intermediate branch Node.js 23.x will be discontinued on June 1, 2025.

Key improvements:

  • The AsyncLocalStorage API now defaults to using the AsyncContextFrame class, which is marked stable. AsyncContextFrame implements a more efficient tracking mechanism for asynchronous contexts, significantly improving performance.
  • The URLPattern API is now available as a global object, which can be used without explicit importing. URLPattern offers capabilities for matching URLs against specific patterns, which can be applied for parsing links, for example.
  • The Permission Model mechanism has been enhanced and stabilized, allowing for restricted access to certain resources during execution (e.g., prohibiting the creation of child processes, limiting write or read access to specific parts of the filesystem, and disabling add-ons). Instead of the experimental flag '—experimental-permission' to enable the Permission Model, you can now use the '—permission' flag.
  • The capabilities of the node:test module (test_runner), intended for creating and running JavaScript tests that return results in TAP (Test Anything Protocol) format, have been expanded. The module now automatically waits for nested tests to complete without needing to use await.
  • The HTTP client undici has been updated to branch 7.x, which enhances performance and adds support for new HTTP features.
  • The V8 engine has been updated to version 13.6, used in Chromium 136. Among the new features compared to the previous release of Node.js are support for typed arrays Float16Array, manual resource management, the RegExp.escape method (for escaping strings for RegExp), 64-bit pointers (Memory64) in WebAssembly, and the Error.isError method.
  • The NPM package manager has been updated to version 11.
  • Support for the MSVC compiler has been discontinued. To compile on the Windows platform, you must use ClangCL.

The Node.js platform can be used for both server-side support of web applications and for creating standard client and server network applications. A large collection of modules has been prepared to extend the functionality of Node.js applications, where modules with implementations can be found. servers and clients for HTTP, SMTP, XMPP, DNS, FTP, IMAP, POP3, modules for integration with various web frameworks, WebSocket and Ajax handlers, connectors to databases (MySQL, PostgreSQL, SQLite, MongoDB), templating engines, CSS engines, implementations of cryptographic algorithms and authorization systems (OAuth), XML parsers.

To handle a large number of simultaneous requests, Node.js employs an asynchronous model for code execution based on event-driven, non-blocking I/O and callback handlers. Multiplexing connections is supported by methods such as epoll, kqueue, /dev/poll, and select. The library used for connection multiplexing is libuv, which is a layer over libev on Unix systems and over IOCP on Windows. The thread pool is managed using the libeio library, and for non-blocking DNS queries, c-ares is integrated. All system calls that block are executed within the thread pool and then, like signal handlers, pass their results back through an unnamed pipe.

JavaScript code execution is facilitated by the V8 engine developed by Google (Microsoft also develops a version of Node.js with the Chakra-Core engine). Essentially, Node.js is similar to the Perl AnyEvent, Ruby Event Machine, Python Twisted frameworks, and event implementations in Tcl, but the event loop in Node.js is abstracted away from the developer and resembles event handling in a web application running in a browser.

Source: opennet.ru

Buy reliable website hosting with DDoS protection, VPS VDS servers 🔥 Buy reliable website hosting with DDoS protection, VPS VDS servers | ProHoster