Aquesta és una versió anterior. La versió actual és la 20.20.2. Node.js 20 20.20.2 · Data de publicació:
Fitxers d’instal·lació 20.17.0
| Arquitectura | Tipus | Àmbit | Mida del fitxer | Baixa | SHA256 |
|---|---|---|---|---|---|
| 64 bits | MSI | Tots els usuaris | — | nodejs.org | VirusTotal |
| ARM64 | MSI | Tots els usuaris | — | nodejs.org | VirusTotal |
| 32 bits | MSI | Tots els usuaris | — | nodejs.org | VirusTotal |
L’enllaç i l’SHA256 provenen del manifest comunitari del Gestor de paquets del Windows. Convé comparar el hash del fitxer baixat abans d’executar-lo.
Notes de la versió
module: support require()ing synchronous ESM graphs
This release adds require() support for synchronous ESM graphs under the flag --experimental-require-module.
If --experimental-require-module is enabled, and the ECMAScript module being loaded by require() meets the following requirements:
- Explicitly marked as an ES module with a "type": "module" field in the closest package.json or a .mjs extension.
- Fully synchronous (contains no top-level await).
require() will load the requested module as an ES Module, and return the module name space object. In this case it is similar to dynamic import() but is run synchronously and returns the name space object directly.
Contributed by Joyee Cheung in #51977
path: add matchesGlob method
Glob patterns can now be tested against individual paths via the path.matchesGlob(path, pattern) method.
Contributed by Aviv Keller in #52881
stream: expose DuplexPair API
The function duplexPair returns an array with two items, each being a Duplex stream connected to the other side:
const [ sideA, sideB ] = duplexPair();
Whatever is written to one stream is made readable on the other. It provides behavior analogous to a network connection, where the data written by the client becomes readable by the server, and vice-versa.
Contributed by Austin Wright in #34111
Other Notable Changes
- [8e64c02b19] - (SEMVER-MINOR) http: add diagnostics channel http.client.request.error (Kohei Ueno) #54054
- [ae30674991] - meta: add jake to collaborators (jakecastelli) #54004
- [4a3ecbfc9b] - (SEMVER-MINOR) stream: implement min option for ReadableStreamBYOBReader.read (Mattias Buelens) #50888