The release of Node.js 25.0.0 has taken place, a platform for executing network applications in JavaScript. Node.js 25.0 is classified as an intermediate branch, which will be maintained for 7 months (until June 2026). In the coming days, the stabilization of Node.js 24 will be completed, which will receive LTS status at the end of October and will be supported until April 2028. Support for previous LTS branches Node.js 22.x and 20.x will continue until April 2027 and 2026, respectively.
Key Improvements:
- The V8 engine has been updated to version 14.1, used in Chromium 141. Improvements compared to the previous release of Node.js include a significant performance boost for the JSON.stringify method, optimization of WebAssembly and JIT, and the implementation of methods for converting between Uint8Array and data in base64 or hexadecimal format.
- The Permission Model mechanism, which allows restricting access to certain resources during execution, has been enhanced with the option "—allow-net" to ensure network access (if the option "—allow-net" is not specified, launching Node.js in "—permission" mode will produce an ERR_ACCESS_DENIED error when attempting to perform network operations).
- Enabled by default browser-compatible The Web Storage API, designed for persistent (localStorage class) or temporary (sessionStorage class) storage of key/value data. The experimental label has been removed from the Web Storage API.
- The ErrorEvent class, which provides a browser-compatible interface for handling events containing error information, has been moved to the globally available category (can be used without explicit import).
- For WebAssembly, support for the JSPI (JavaScript Promise Integration) API has been enabled, allowing access to asynchronous Web APIs from sequentially executed code compiled in WebAssembly.
- The option "NODE_COMPILE_CACHE_RELATIVE_PATH" has been added for portable work with the cache of compiled objects. In this mode, hashes for identifying objects are calculated using relative file paths, enabling the movement and embedding of the code directory content along with the cache.
- The ability to profile CPU load has been added.
- The NPM package manager has been updated to version 11.6.2.
- Support for Python 3.14 has been added.
- Clang 19 and Xcode 16.4 have been declared the minimum supported versions.
- Support for the SlowBuffer object has been discontinued, as it was previously declared deprecated due to potential security issues. Instead, the Buffer.allocUnsafeSlow() method should be used.
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
