Skip to content

Commit

Permalink
2024-03-26, Version 18.20.0 'Hydrogen' (LTS)
Browse files Browse the repository at this point in the history
Notable changes:

Added support for import attributes:

Support has been added for import attributes, to replace the old import
assertions syntax. This will aid migration by making the new syntax
available across all currently supported Node.js release lines.

For more details, see

* [#50134](#50134)
* [#51622](#51622)

Doc deprecation for `dirent.path`:

Please use newly added `dirent.parentPath` instead.

Experimental node-api feature flags

Introduces an experimental feature to segregate finalizers that affect GC state.
A new type called `node_api_nogc_env` has been introduced as the const version
of `napi_env` and `node_api_nogc_finalize` as a variant of `napi_finalize` that
accepts a `node_api_nogc_env` as its first argument.

This feature can be turned off by defining
`NODE_API_EXPERIMENTAL_NOGC_ENV_OPT_OUT`.

Root certificates updated to NSS 3.98:

Certificates added:

* Telekom Security TLS ECC Root 2020
* Telekom Security TLS RSA Root 2023

Certificates removed:

* Security Communication Root CA

Updated dependencies:

* ada updated to 2.7.6.
* base64 updated to 0.5.2.
* c-ares updated to 1.27.0.
* corepack updated to 0.25.2.
* ICU updated to 74.2. Includes CLDR 44.1 and Unicode 15.1.
* npm updated to 10.5.0. Fixes a regression in signals not being passed onto child processes.
* simdutf8 updated to 4.0.8.
* Timezone updated to 2024a.
* zlib updated to 1.3.0.1-motley-40e35a7.

vm: fix V8 compilation cache support for vm.Script:

Previously repeated compilation of the same source code using `vm.Script`
stopped hitting the V8 compilation cache after v16.x when support for
`importModuleDynamically` was added to `vm.Script`, resulting in a performance
regression that blocked users (in particular Jest users) from upgrading from
v16.x.

The recent fixes allow the compilation cache to be hit again
for `vm.Script` when `--experimental-vm-modules` is not used even in the
presence of the `importModuleDynamically` option, so that users affected by the
performance regression can now upgrade. Ongoing work is also being done to
enable compilation cache support for `vm.CompileFunction`.

PR-URL: #52165
  • Loading branch information
richardlau committed Mar 22, 2024
1 parent 32906dd commit 62838ee
Show file tree
Hide file tree
Showing 7 changed files with 184 additions and 10 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ release.
</tr>
<tr>
<td valign="top">
<b><a href="doc/changelogs/CHANGELOG_V18.md#18.19.1">18.19.1</a></b><br/>
<b><a href="doc/changelogs/CHANGELOG_V18.md#18.20.0">18.20.0</a></b><br/>
<a href="doc/changelogs/CHANGELOG_V18.md#18.19.1">18.19.1</a><br/>
<a href="doc/changelogs/CHANGELOG_V18.md#18.19.0">18.19.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V18.md#18.18.2">18.18.2</a><br/>
<a href="doc/changelogs/CHANGELOG_V18.md#18.18.1">18.18.1</a><br/>
Expand Down
2 changes: 1 addition & 1 deletion doc/api/deprecations.md
Original file line number Diff line number Diff line change
Expand Up @@ -3337,7 +3337,7 @@ In a future version of Node.js, [`message.headers`][],

<!-- YAML
changes:
- version: REPLACEME
- version: v18.20.0
pr-url: https://github.com/nodejs/node/pull/51020

Check warning on line 3341 in doc/api/deprecations.md

View workflow job for this annotation

GitHub Actions / lint-pr-url

pr-url doesn't match the URL of the current PR.
description: Documentation-only deprecation.
-->
Expand Down
4 changes: 2 additions & 2 deletions doc/api/esm.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<!-- YAML
added: v8.5.0
changes:
- version: REPLACEME
- version: v18.20.0
pr-url: https://github.com/nodejs/node/pull/50140

Check warning on line 11 in doc/api/esm.md

View workflow job for this annotation

GitHub Actions / lint-pr-url

pr-url doesn't match the URL of the current PR.
description: Add experimental support for import attributes.
- version: v18.19.0
Expand Down Expand Up @@ -246,7 +246,7 @@ added:
- v17.1.0
- v16.14.0
changes:
- version: REPLACEME
- version: v18.20.0
pr-url: https://github.com/nodejs/node/pull/50140
description: Switch from Import Assertions to Import Attributes.
-->
Expand Down
4 changes: 2 additions & 2 deletions doc/api/fs.md
Original file line number Diff line number Diff line change
Expand Up @@ -6441,7 +6441,7 @@ value is determined by the `options.encoding` passed to [`fs.readdir()`][] or
<!-- YAML
added:
- REPLACEME
- v18.20.0
-->
> Stability: 1 – Experimental
Expand All @@ -6454,7 +6454,7 @@ The path to the parent directory of the file this {fs.Dirent} object refers to.
<!-- YAML
added: v18.17.0
deprecated: REPLACEME
deprecated: v18.20.0
-->
> Stability: 0 - Deprecated: Use [`dirent.parentPath`][] instead.
Expand Down
2 changes: 1 addition & 1 deletion doc/api/n-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -773,7 +773,7 @@ handle and/or callback scope inside a `napi_callback` is not necessary.
#### `node_api_nogc_finalize`

<!-- YAML
added: REPLACEME
added: v18.20.0
-->

> Stability: 1 - Experimental
Expand Down
173 changes: 173 additions & 0 deletions doc/changelogs/CHANGELOG_V18.md

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions src/node_version.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@
#define SRC_NODE_VERSION_H_

#define NODE_MAJOR_VERSION 18
#define NODE_MINOR_VERSION 19
#define NODE_PATCH_VERSION 2
#define NODE_MINOR_VERSION 20
#define NODE_PATCH_VERSION 0

#define NODE_VERSION_IS_LTS 1
#define NODE_VERSION_LTS_CODENAME "Hydrogen"

#define NODE_VERSION_IS_RELEASE 0
#define NODE_VERSION_IS_RELEASE 1

#ifndef NODE_STRINGIFY
#define NODE_STRINGIFY(n) NODE_STRINGIFY_HELPER(n)
Expand Down

0 comments on commit 62838ee

Please sign in to comment.