MyGit

v18.20.0

nodejs/node

版本发布时间: 2024-03-27 02:00:46

nodejs/node最新发布版本:v20.13.0(2024-05-07 23:53:05)

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.

This adds the with keyword which should be used in place of the previous assert keyword, which will be removed in a future semver-major Node.js release.

For example,

import "foo" assert { ... }

should be replaced with

import "foo" with { ... }

For more details, see

Contributed by Nicolò Ribaudo in #51136 and Antoine du Hamel in #50140.

Doc deprecation for dirent.path

Please use newly added dirent.parentPath instead.

Contributed by Antoine du Hamel in #50976 and #51020.

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.

Contributed by Gabriel Schulhof in #50060.

Root certificates updated to NSS 3.98

Certificates added:

Certificates removed:

Updated dependencies

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.

Contributed by Joyee Cheung in #49950 and #50137.

Commits

相关地址:原始地址 下载(tar) 下载(zip)

查看:2024-03-27发行的版本