這是舊版本,目前最新版本為20.20.2。 Node.js 20 20.20.2 · 發行日期:
安裝檔 20.17.0
| 架構 | 類型 | 安裝範圍 | 檔案大小 | 下載 | SHA256 |
|---|---|---|---|---|---|
| 64位元 | MSI | 所有使用者 | — | nodejs.org | VirusTotal |
| ARM64 | MSI | 所有使用者 | — | nodejs.org | VirusTotal |
| 32位元 | MSI | 所有使用者 | — | nodejs.org | VirusTotal |
下載連結與SHA256取自Windows套件管理員(winget)的社群資訊清單。執行前請先核對下載檔案的雜湊值。
更新紀錄
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