Skip to content

Releases: nodejs/node

2023-10-13, Version 18.18.2 'Hydrogen' (LTS), @RafaelGSS

13 Oct 21:08
v18.18.2
8a01b3d
Compare
Choose a tag to compare

This is a security release.

Notable Changes

The following CVEs are fixed in this release:

More detailed information on each of the vulnerabilities can be found in October 2023 Security Releases blog post.

Commits

2023-10-10, Version 18.18.1 'Hydrogen' (LTS), @richardlau

10 Oct 17:11
v18.18.1
7615798
Compare
Choose a tag to compare

Notable Changes

This release addresses some regressions that appeared in Node.js 18.18.0:

  • (Windows) FS can not handle certain characters in file name #48673
  • 18 and 20 node images give error - Text file busy (after re-build images) nodejs/docker-node#1968
  • libuv update in 18.18.0 breaks webpack's thread-loader #49911

The libuv 1.45.0 and 1.46.0 updates that were released in Node.js 18.18.0 have been temporarily reverted.

Commits

2023-09-28, Version 20.8.0 (Current), @ruyadorno

29 Sep 03:44
v20.8.0
a86c2ca
Compare
Choose a tag to compare

Notable Changes

Stream performance improvements

Performance improvements to writable and readable streams, improving the creation and destruction by ยฑ15% and reducing the memory overhead each stream takes in Node.js

Contributed by Benjamin Gruenbaum in #49745 and Raz Luvaton in #49834.

Performance improvements for readable webstream, improving readable stream async iterator consumption by ยฑ140% and improving readable stream pipeTo consumption by ยฑ60%

Contributed by Raz Luvaton in #49662 and #49690.

Rework of memory management in vm APIs with the importModuleDynamically option

This rework addressed a series of long-standing memory leaks and use-after-free issues in the following APIs that support importModuleDynamically:

  • vm.Script
  • vm.compileFunction
  • vm.SyntheticModule
  • vm.SourceTextModule

This should enable affected users (in particular Jest users) to upgrade from older versions of Node.js.

Contributed by Joyee Cheung in #48510.

Other notable changes

  • [32d4d29d02] - deps: add v8::Object::SetInternalFieldForNodeCore() (Joyee Cheung) #49874
  • [0e686d096b] - doc: deprecate fs.F_OK, fs.R_OK, fs.W_OK, fs.X_OK (Livia Medeiros) #49683
  • [a5dd057540] - doc: deprecate util.toUSVString (Yagiz Nizipli) #49725
  • [7b6a73172f] - doc: deprecate calling promisify on a function that returns a promise (Antoine du Hamel) #49647
  • [1beefd5f16] - esm: set all hooks as release candidate (Geoffrey Booth) #49597
  • [b0ce78a75b] - module: fix the leak in SourceTextModule and ContextifySript (Joyee Cheung) #48510
  • [4e578f8ab1] - module: fix leak of vm.SyntheticModule (Joyee Cheung) #48510
  • [69e4218772] - module: use symbol in WeakMap to manage host defined options (Joyee Cheung) #48510
  • [14ece0aa76] - (SEMVER-MINOR) src: allow embedders to override NODE_MODULE_VERSION (Cheng Zhao) #49279
  • [9fd67fbff0] - stream: use bitmap in writable state (Raz Luvaton) #49834
  • [0ccd4638ac] - stream: use bitmap in readable state (Benjamin Gruenbaum) #49745
  • [7c5e322346] - stream: improve webstream readable async iterator performance (Raz Luvaton) #49662
  • [80b342cc38] - (SEMVER-MINOR) test_runner: accept testOnly in run (Moshe Atlow) #49753
  • [17a05b141d] - (SEMVER-MINOR) test_runner: add junit reporter (Moshe Atlow) #49614

Commits

  • [4879e3fbbe] - benchmark: add a benchmark for read() of ReadableStreams (Debadree Chatterjee) #49622
  • [78a6c73157] - benchmark: shorten pipe-to by reducing number of chunks (Raz Luvaton) #49577
  • [4126a6e4c9] - benchmark: fix webstream pipe-to (Raz Luvaton) #49552
  • [6010a91825] - bootstrap: do not expand argv1 for snapshots (Joyee Cheung) #49506
  • [8480280c4b] - bootstrap: only use the isolate snapshot when compiling code cache (Joyee Cheung) #49288
  • [b30754aa87] - build: run embedtest using node executable (Joyee Cheung) #49506
  • [31db0b8e2b] - build: add --write-snapshot-as-array-literals to configure.py (Joyee Cheung) #49312
  • [6fcb51d3ba] - debugger: use internal/url.URL instead of url.parse (LiviaMedeiros) #49590
  • [32d4d29d02] - deps: add v8::Object::SetInternalFieldForNodeCore() (Joyee Cheung) #49874
  • [ad37cadc3f] - deps: V8: backport de9a5de2274f (Joyee Cheung) #49703
  • [cdd1c66222] - deps: V8: cherry-pick b33bf2dfd261 (Joyee Cheung) #49703
  • [61d18d6473] - deps: update undici to 5.24.0 (Node.js GitHub Bot) #49559
  • [b8a4fef393] - deps: remove pthread-fixes.c from uv.gyp (Ben Noordhuis) #49744
  • [6c86c0683c] - deps: update googletest to d1467f5 (Node.js GitHub Bot) #49676
  • [1424404742] - deps: update nghttp2 to 1.56.0 (Node.js GitHub Bot) #49582
  • [15b54ff95d] - deps: update googletest to 8a6feab (Node.js GitHub Bot) #49463
  • [2ceab877c2] - deps: update corepack to 0.20.0 (Node.js GitHub Bot) #49464
  • [4814872ddc] - doc: fix DEP0176 number (LiviaMedeiros) #49858
  • [0e686d096b] - doc: deprecate fs.F_OK, fs.R_OK, fs.W_OK, fs.X_OK (Livia Medeiros) #49683
  • [5877c403a2] - doc: add mertcanaltin as a triager (mert.altin) #49826
  • [864fe56432] - doc: add git node backport way to the backporting guide (Raz Luvaton) #49760
  • [e0f93492d5] - doc: improve documentation about ICU data fallback (Joyee Cheung) #49666
  • [a5dd057540] - doc: deprecate util.toUSVString (Yagiz Nizipli) #49725
  • [774c1cfd52] - doc: add missing function call to example for util.promisify (Jungku Lee) #49719
  • [fe78a34845] - doc: update output of example in mimeParams.set() (Deokjin Kim) #49718
  • [4175ea33bd] - doc: add missed inspect with numericSeparator to example (Deokjin Kim) #49717
  • [3a88571972] - doc: fix history comments (Antoine du Hamel) #49701
  • [db4ab1ccbb] - doc: add missing history info for import.meta.resolve (Antoine du Hamel) #49700
  • [a304d1ee19] - doc: link maintaining deps to pull-request.md (Marco Ippolito) #49716
  • [35294486ad] - doc: fix print results in events (Jungku Lee) #49548
  • [9f0b0e15c9] - doc: alphabetize cli.md sections (Geoffrey Booth) #49668
  • [[7b6a73172f](7b6a731...
Read more

2023-09-18, Version 20.7.0 (Current), @UlisesGascon

18 Sep 19:01
v20.7.0
a71037e
Compare
Choose a tag to compare

Notable Changes

  • [022f1b70c1] - src: support multiple --env-file declarations (Yagiz Nizipli) #49542
  • [4a1d1cad61] - crypto: update root certificates to NSS 3.93 (Node.js GitHub Bot) #49341
  • [a1a65f593c] - deps: upgrade npm to 10.1.0 (npm team) #49570
  • [6c2480cad9] - (SEMVER-MINOR) deps: upgrade npm to 10.0.0 (npm team) #49423
  • [bef900e56b] - doc: move and rename loaders section (Geoffrey Booth) #49261
  • [db4ce8a593] - doc: add release key for Ulises Gascon (Ulises Gascรณn) #49196
  • [11c85ffa98] - (SEMVER-MINOR) lib: add api to detect whether source-maps are enabled (็ฟ  / green) #46391
  • [ec51e25ed7] - src,permission: add multiple allow-fs-* flags (Carlos Espa) #49047
  • [efdc95fbc0] - (SEMVER-MINOR) test_runner: expose location of tests (Colin Ihrig) #48975

Commits

  • [e84515594e] - benchmark: use tmpdir.resolve() (Livia Medeiros) #49137
  • [f37444e896] - bootstrap: build code cache from deserialized isolate (Joyee Cheung) #49099
  • [af6dc1754d] - bootstrap: do not generate code cache in an unfinalized isolate (Joyee Cheung) #49108
  • [cade5716df] - build: add symlink to compile_commands.json file if needed (Juan Josรฉ) #49260
  • [34a2590b05] - build: expand when we run internet tests (Michael Dawson) #49218
  • [f637fd46ab] - build: fix typo libray -> library (configure.py) (michalbiesek) #49106
  • [ef3d8dd493] - crypto: remove webcrypto EdDSA key checks and properties (Filip Skokan) #49408
  • [4a1d1cad61] - crypto: update root certificates to NSS 3.93 (Node.js GitHub Bot) #49341
  • [7eb10a38ea] - crypto: remove getDefaultEncoding() (Tobias NieรŸen) #49170
  • [772496c030] - crypto: remove default encoding from DiffieHellman (Tobias NieรŸen) #49169
  • [c795083232] - crypto: remove default encoding from Hash/Hmac (Tobias NieรŸen) #49167
  • [08197aa010] - crypto: remove default encoding from sign/verify (Tobias NieรŸen) #49145
  • [a1a65f593c] - deps: upgrade npm to 10.1.0 (npm team) #49570
  • [6c2480cad9] - (SEMVER-MINOR) deps: upgrade npm to 10.0.0 (npm team) #49423
  • [84195d9584] - deps: add missing thread-common.c in uv.gyp (Santiago Gimeno) #49410
  • [5b70b68b3d] - deps: V8: cherry-pick eadaef581c29 (Adam Majer) #49401
  • [fe34d632e8] - deps: update zlib to 1.2.13.1-motley-f5fd0ad (Node.js GitHub Bot) #49252
  • [db4ce8a593] - doc: add release key for Ulises Gascon (Ulises Gascรณn) #49196
  • [e5f3a694cf] - doc: fix node-api call example (Chengzhong Wu) #49395
  • [021345a724] - doc: add news issue for Diagnostics WG (Michael Dawson) #49306
  • [f82347266b] - doc: clarify policy expectations (Rafael Gonzaga) #48947
  • [73cfd9c895] - doc: add print results for examples in StringDecoder (Jungku Lee) #49326
  • [63ab591416] - doc: update outdated reference to NIST SP 800-131A (Tobias NieรŸen) #49316
  • [935dfe2afd] - doc: use cjs as block code's type in MockTimers (Deokjin Kim) #49309
  • [7c0cd2fb87] - doc: update options.filter description for fs.cp (Shubham Pandey) #49289
  • [f72e79ea67] - doc: add riscv64 to list of architectures (Stewart X Addison) #49284
  • [d19c710064] - doc: avoid "not currently recommended" (Tobias NieรŸen) #49300
  • [ae656101c0] - doc: update module hooks docs (Geoffrey Booth) #49265
  • [fefbdb92f2] - doc: modify param description for end(),write() in StringDecoder (Jungku Lee) #49285
  • [59e66a1ebe] - doc: use NODE_API_SUPPORTED_VERSION_MAX in release doc (Cheng Zhao) #49268
  • [ac3b88449b] - doc: fix typo in stream.finished documentation (Antoine du Hamel) #49271
  • [7428ebf6c3] - doc: update description for percent_encode sets in WHATWG API (Jungku Lee) #49258
  • [bef900e56b] - doc: move and rename loaders section (Geoffrey Booth) #49261
  • [a22e0d9696] - doc: clarify use of Uint8Array for n-api (Fedor Indutny) #48742
  • [1704f24cb9] - doc: add signature for module.register (Geoffrey Booth) #49251
  • [5a363bb01b] - doc: caveat unavailability of import.meta.resolve in custom loaders (Jacob Smith) #49242
  • [8101f2b259] - doc: use same name in the doc as in the code (Hyunjin Kim) #49216
  • [edf278d60d] - doc: add notable-change label mention to PR template (Rafael Gonzaga) #49188
  • [3df2251a6a] - doc: add h1 summary to security release process (Rafael Gonzaga) #49112
  • [9fcd99a744] - doc: update to semver-minor releases by default (Rafael Gonzaga) #49175
  • [777931f499] - doc: fix wording in napi_async_init (Tobias NieรŸen) #49180
  • [f45c8e10c0] - doc,test: add known path resolution issue in permission model (Tobias NieรŸen) #49155
  • [a6cfea3f74] - esm: align sync and async load implementations (Antoine du Hamel) [#49152](https://github.com/nodejs/node...
Read more

2023-09-18, Version 18.18.0 'Hydrogen' (LTS), @ruyadorno

18 Sep 22:00
v18.18.0
ab5fa2a
Compare
Choose a tag to compare

Notable Changes

  • [7dc731d4bf] - build: sync libuv header change (Jiawen Geng) #48078
  • [490fc004b0] - crypto: update root certificates to NSS 3.93 (Node.js GitHub Bot) #49341
  • [dd8cd97d4d] - crypto: update root certificates to NSS 3.90 (Node.js GitHub Bot) #48416
  • [ea23870bec] - deps: add missing thread-common.c in uv.gyp (Santiago Gimeno) #48078
  • [88855e0b1b] - deps: upgrade to libuv 1.46.0 (Santiago Gimeno) #48078
  • [fb2b80fca0] - deps: upgrade to libuv 1.45.0 (Santiago Gimeno) #48078
  • [249879e46c] - doc: add atlowChemi to collaborators (atlowChemi) #48757
  • [e8dc7bde6a] - doc: add vmoroz to collaborators (Vladimir Morozov) #48527
  • [a30f2fbcc1] - doc: add kvakil to collaborators (Keyhan Vakil) #48449
  • [c39b7c240e] - (SEMVER-MINOR) esm: add --import flag (Moshe Atlow) #43942
  • [a68a67f54d] - (SEMVER-MINOR) events: allow safely adding listener to abortSignal (Chemi Atlow) #48596
  • [3a8586bee2] - fs, stream: initial Symbol.dispose and Symbol.asyncDispose support (Moshe Atlow) #48518
  • [863bdb785d] - net: add autoSelectFamily global getter and setter (Paolo Insogna) #45777
  • [c59ae86ba0] - (SEMVER-MINOR) url: add value argument to has and delete methods (Sankalp Shubham) #47885

Commits

Read more

2023-09-08, Version 20.6.1 (Current), @ruyadorno and @RafaelGSS

08 Sep 16:49
v20.6.1
Compare
Choose a tag to compare

Commit

  • [8acbe6d8e8] - esm: fix loading of CJS modules from ESM (Antoine du Hamel) #49500

2023-09-04, Version 20.6.0 (Current), @juanarbol prepared by @UlisesGascon

04 Sep 20:30
9700344
Compare
Choose a tag to compare

Notable changes

built-in .env file support

Starting from Node.js v20.6.0, Node.js supports .env files for configuring environment variables.

Your configuration file should follow the INI file format, with each line containing a key-value pair for an environment variable.
To initialize your Node.js application with predefined configurations, use the following CLI command: node --env-file=config.env index.js.

For example, you can access the following environment variable using process.env.PASSWORD when your application is initialized:

PASSWORD=nodejs

In addition to environment variables, this change allows you to define your NODE_OPTIONS directly in the .env file, eliminating the need to include it in your package.json.

This feature was contributed by Yagiz Nizipli in #48890.

import.meta.resolve unflagged

In ES modules, import.meta.resolve(specifier) can be used to get an absolute URL string to which specifier resolves, similar to require.resolve in CommonJS. This aligns Node.js with browsers and other server-side runtimes.

This feature was contributed by Guy Bedford in #49028

New node:module API register for module customization hooks; new initialize hook

There is a new API register available on node:module to specify a file that exports module customization hooks, and pass data to the hooks, and establish communication channels with them. The โ€œdefine the file with the hooksโ€ part was previously handled by a flag --experimental-loader, but when the hooks moved into a dedicated thread in 20.0.0 there was a need to provide a way to communicate between the main (application) thread and the hooks thread. This can now be done by calling register from the main thread and passing data, including MessageChannel instances.

We encourage users to migrate to an approach that uses --import with register, such as:

node --import ./file-that-calls-register.js ./app.js

Using --import ensures that the customization hooks are registered before any application code runs, even the entry point.

This feature was contributed by Izaak Schroeder in #48842 and #48559

Module customization load hook can now support CommonJS

Authors of module customization hooks can how handle both ES module and CommonJS sources in the load hook. This works for CommonJS modules referenced via either import or require, so long as the main entry point of the application is handled by the ES module loader (such as because the entry point is an ES module file, or if the --import flag is passed). This should simplify the customization of the Node.js module loading process, as package authors can customize more of Node.js without relying on deprecated APIs such as require.extensions.

This feature was contributed by Antoine du Hamel in #47999

Node.js C++ addons now have experimental support for cppgc (Oilpan), a C++ garbage collection library in V8.

Now when Node.js starts up, it makes sure that there is a v8::CppHeap attached to the V8 isolate. This enables users to allocate in the v8::CppHeap using <cppgc/*> headers from V8, which are now also included into the Node.js headers available to addons. Note that since Node.js only bundles the cppgc library coming from V8, the ABI stability of cppgc is currently not guaranteed in semver-minor and -patch updates, but we do not expect the ABI to break often, as it has been stable and battle-tested in Chromium for years. We may consider including cppgc into the ABI stability guarantees when it gets enough adoption internally and externally.

To help addon authors create JavaScript-to-C++ references of which V8's garbage collector can be aware, a helper function node::SetCppgcReference(isolate, js_object, cppgc_object) has been added to node.h. V8 may provide a native alternative in the future, which could then replace this Node.js-specific helper. In the mean time, users can use this API to avoid having to hard-code the layout of JavaScript wrapper objects. An example of how to create garbage-collected C++ objects in the unified heap and wrap it in a JavaScript object can be found in the Node.js addon tests.

The existing node::ObjectWrap helper would continue to work, while cppgc-based object management serves as an alternative with some advantages mentioned in the V8 blog post about Oilpan.

This feature was contributed by Daryl Haresign and Joyee Cheung in #48660 and #45704.

Other notable changes

Commits

Read more

2023-08-09, Version 20.5.1 (Current), @RafaelGSS

09 Aug 17:58
v20.5.1
Compare
Choose a tag to compare

This is a security release.

Notable Changes

The following CVEs are fixed in this release:

More detailed information on each of the vulnerabilities can be found in August 2023 Security Releases blog post.

Commits

2023-08-09, Version 18.17.1 'Hydrogen' (LTS), @RafaelGSS

09 Aug 17:58
v18.17.1
Compare
Choose a tag to compare

This is a security release.

Notable Changes

The following CVEs are fixed in this release:

More detailed information on each of the vulnerabilities can be found in August 2023 Security Releases blog post.

Commits

2023-08-09, Version 16.20.2 'Gallium' (LTS), @RafaelGSS

09 Aug 17:57
v16.20.2
Compare
Choose a tag to compare

This is a security release.

Notable Changes

The following CVEs are fixed in this release:

More detailed information on each of the vulnerabilities can be found in August 2023 Security Releases blog post.

Commits