Node.js platform version 24.0.0 has been released

The release of Node.js 24.0.0 has taken place, a platform for executing network applications written in JavaScript. Node.js 24.0 is classified under the long-term support branches, but this status will only be assigned in October after stabilization. Support for Node.js 24.x will continue until April 30, 2028. The maintenance of the previous LTS branch, Node.js 22.x, will last until April 2027, and the branch before that, 20.x, until April 2026. Support for the LTS branch 18.x was discontinued 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 as stable. AsyncContextFrame implements a more efficient mechanism for tracking asynchronous context, significantly enhancing performance.
  • The URLPattern API is now available as a global object that can be used without explicit import. URLPattern provides capabilities for matching a URL against a specific pattern, which can be applied for parsing links, for example.
  • The Permission Model mechanism has been improved and stabilized, allowing restrictions on access to specific resources during execution (for example, it can prevent the creation of child processes or limit read/write access to certain parts of the filesystem, as well as disable add-ons). Instead of the experimental flag ‘—experimental-permission’ to enable the Permission Model, you can now use the flag ‘—permission’.
  • The node:test (test_runner) module has expanded its capabilities, designed for creating and running tests in JavaScript that return results in TAP (Test Anything Protocol) format. The module now automatically waits for the completion of nested tests without the need for using await.
  • The HTTP client undici has been updated to version 7.x, which improves 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 is 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 package manager NPM has been updated to version 11.
  • Support for the MSVC compiler has been discontinued. To compile on the Windows platform, you must use ClangCL.

Node.js-platformen kan bruges til både server-side drift af webapplikationer og til at skabe almindelige klient- og serverbaserede netværksprogrammer. Der er forberedt en stor samling af moduler til at udvide funktionaliteten af applikationer til Node.js, hvor man kan finde moduler med implementeringer servere og HTTP, SMTP, XMPP, DNS, FTP, IMAP, POP3 klienter, moduler til integration med forskellige web-rammer, WebSocket- og Ajax-håndterere, forbindelser til DBMS (MySQL, PostgreSQL, SQLite, MongoDB), templating-motorer, CSS-motorer, implementeringer af kryptografi-algoritmer og autorisationssystemer (OAuth), XML-parsere.

For at håndtere et stort antal parallelle anmodninger anvender Node.js en asynkron kodeudviklingsmodel baseret på begivenhedsbehandling i ikke-blokerende tilstand og bestemmelse af callback-håndterere. Metoder som epoll, kqueue, /dev/poll og select understøttes til multiplexing af forbindelser. Biblioteket libuv, som er bygget over libev i Unix-systemer og over IOCP i Windows, bruges til multiplexing af forbindelser. Et tråd-pool oprettes ved hjælp af biblioteket libeio, mens integrationen af c-ares muliggør ikke-blokerende DNS-anmodninger. Alle systemopkald, der medfører blokering, udføres inden for tråd-poolen og sender derefter deres resultater tilbage gennem en uspecificeret kanal (pipe), ligesom signalhåndtererne.

Udførelsen af JavaScript-kode understøttes af Googles udviklede V8-motor (Microsoft udvikler desuden en version af Node.js med Chakra-Core-motoren). I sin essens ligner Node.js frameworks som Perl AnyEvent, Ruby Event Machine, Python Twisted og eventhåndtering i Tcl, men event loop'en i Node.js er skjult for udvikleren og minder om begivenhedshåndtering i en webapplikation, der kører i en browser.

Kilde: opennet.ru

Køb pålidelig webhosting med DDoS-beskyttelse, VPS VDS-servere 🔥 Køb pålidelig webhosting med DDoS-beskyttelse, VPS VDS-servere | ProHoster