Update all dependencies #10
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "renovate/all"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This PR contains the following updates:
18.8.5
->22.10.2
^3.0.1
->^5.0.0
1.0.0
->2.0.0
16-alpine
->22-alpine
16-alpine
->22-alpine
4.8.4
->5.7.2
Release Notes
hashicorp/next-mdx-remote (next-mdx-remote)
v5.0.0
Compare Source
Major Changes
67a221f
Thanks @dstaley! - Update to MDX v3 and add support for React 19. Fix various TypeScript errors. Remove usage of Rollup.v4.4.1
Compare Source
What's Changed
Full Changelog: https://github.com/hashicorp/next-mdx-remote/compare/v4.4.0...v4.4.1
v4.4.0
Compare Source
This release includes a few fixes for frontmatter types, as well as a way to provide a frontmatter type to
serialize
orcompileMDX
and have it propagate through to the returnedfrontmatter
property. See the documentation for an example.serialize
:compileMDX
:What's Changed
New Contributors
Full Changelog: https://github.com/hashicorp/next-mdx-remote/compare/v4.3.0...v4.4.0
v4.3.0
: - Server Components Support (experimental)Compare Source
next-mdx-remote
now has experimental support for React Server Components! 🎉 Access the new API by importing fromnext-mdx-remote/rsc
, and head to the documentation for usage instructions and additional examples.Big thanks to @timneutkens for his contribution!
What's Changed
New Contributors
Full Changelog: https://github.com/hashicorp/next-mdx-remote/compare/v4.2.1...v4.3.0
v4.2.1
Compare Source
What's Changed
jsx-dev-runtime
in development mode by @imtsuki in https://github.com/hashicorp/next-mdx-remote/pull/323New Contributors
Full Changelog: https://github.com/hashicorp/next-mdx-remote/compare/v4.2.0...v4.2.1
v4.2.0
Compare Source
What's Changed
New Contributors
Full Changelog: https://github.com/hashicorp/next-mdx-remote/compare/v4.1.0...v4.2.0
v4.1.0
Compare Source
What's Changed
frontmatter
type and make it configurable by @joemckenney in https://github.com/hashicorp/next-mdx-remote/pull/283New Contributors
Full Changelog: https://github.com/hashicorp/next-mdx-remote/compare/v4.0.3...v4.1.0
v4.0.3
Compare Source
What's Changed
frontmatter
prop. by @MatthijsMud in https://github.com/hashicorp/next-mdx-remote/pull/252New Contributors
Full Changelog: https://github.com/hashicorp/next-mdx-remote/compare/v4.0.2...v4.0.3
v4.0.2
Compare Source
v4.0.1
Compare Source
What's Changed
New Contributors
Full Changelog: https://github.com/hashicorp/next-mdx-remote/compare/v4.0.0...4.0.1
v4.0.0
Compare Source
next-mdx-remote
has been upgraded to use MDX v2 under the hood, which comes with improved performance and a whole list of other enhancements. Due to the improved code generated from MDX, we've also been able to remove our usage ofesbuild
. If you're using Next v12, no changes should be required to upgrade! Users on Next v11.1 might need to setexperimental: { esmExternals: true }
innext.config.js
.Note that some of the underlying changes in MDX v2 may require you to adjust some of your MDX content or custom components.
Take it for a spin and let us know if you run into any issues. 🙏
Breaking Changes
Features
{ parseFrontmatter: true }
toserialize()
. Frontmatter is then available in your MDX:{frontmatter.page_title}
Hello world!
hashicorp/next-remote-watch (next-remote-watch)
v2.0.0
Compare Source
Introduces support for next@12!
What's Changed
New Contributors
Full Changelog: https://github.com/hashicorp/next-remote-watch/compare/1.0.0...2.0.0
nodejs/node (node)
v22.12.0
: 2024-12-03, Version 22.12.0 'Jod' (LTS), @ruyadornoCompare Source
Notable Changes
require(esm) is now enabled by default
Support for loading native ES modules using require() had been available on v20.x and v22.x under the command line flag --experimental-require-module, and available by default on v23.x. In this release, it is now no longer behind a flag on v22.x.
This feature is still experimental, and we are looking for user feedback to make more final tweaks before fully stabilizing it. For this reason, on v22.x, when the Node.js instance encounters a native ES module in require() for the first time, it will emit an experimental warning unless
require()
comes from a path that containsnode_modules
. If there happens to be any regressions caused by this feature, users can report it to the Node.js issue tracker. Meanwhile this feature can also be disabled using--no-experimental-require-module
as a workaround.With this feature enabled, Node.js will no longer throw
ERR_REQUIRE_ESM
ifrequire()
is used to load a ES module. It can, however, throwERR_REQUIRE_ASYNC_MODULE
if the ES module being loaded or its dependencies contain top-levelawait
. When the ES module is loaded successfully byrequire()
, the returned object will either be a ES module namespace object similar to what's returned byimport()
, or what gets exported as"module.exports"
in the ES module.Users can check
process.features.require_module
to see whetherrequire(esm)
is enabled in the current Node.js instance. For packages, the"module-sync"
exports condition can be used as a way to detectrequire(esm)
support in the current Node.js instance and allow bothrequire()
andimport
to load the same native ES module. See the documentation for more details about this feature.Contributed by Joyee Cheung in #55085
Added resizable
ArrayBuffer
support inBuffer
When a
Buffer
is created using a resizableArrayBuffer
, theBuffer
length will now correctly change as the underlyingArrayBuffer
size is changed.Contributed by James Snell in #55377
Update root certificates to NSS 3.104
This is the version of NSS that shipped in Firefox 131.0 on 2024-10-01.
Certificates added:
Contributed by Richard Lau in #55681
Other Notable Changes
Commits
v22.11.0
: 2024-10-29, Version 22.11.0 'Jod' (LTS), @richardlauCompare Source
Notable Changes
This release marks the transition of Node.js 22.x into Long Term Support (LTS)
with the codename 'Jod'. The 22.x release line now moves into "Active LTS"
and will remain so until October 2025. After that time, it will move into
"Maintenance" until end of life in April 2027.
Other than updating metadata, such as the
process.release
object, to reflectthat the release is LTS, no further changes from Node.js 22.10.0 are included.
OpenSSL 3.x
Official binaries for Node.js 22.x currently include OpenSSL 3.0.x (more
specifically, the quictls OpenSSL fork).
OpenSSL 3.0.x is the currently designated long term support version that is
scheduled to be supported until 7th September 2026, which is within the expected
lifetime of Node.js 22.x. We are expecting upstream OpenSSL to announce a
successor long term support version prior to that date and since OpenSSL now
follows a semantic versioning-like versioning scheme we expect to be able to
update to the next long term supported version of OpenSSL during the lifetime of
Node.js 22.x.
v22.10.0
: 2024-10-16, Version 22.10.0 (Current), @aduh95Compare Source
Notable Changes
New
"module-sync"
exports conditionThis release introduces a
"module-sync"
exports condition that's enabled whenrequire(esm)
is enabled, so packages can supply a synchronous ES module to theNode.js module loader, no matter if it's being required or imported. This is
similar to the
"module"
condition that bundlers have been using to supportrequire(esm)
in Node.js, and allows dual-package authors to opt into ESM-firstonly on newer versions of Node.js that supports
require(esm)
to avoid thedual-package hazard.
Or if the package is only meant to be run on Node.js and wants to fallback to
CJS on older versions that don't have
require(esm)
:For package authors: this only serves as a feature-detection mechanism for
packages that wish to support both CJS and ESM users during the period when some
active Node.js LTS versions support
require(esm)
while some older ones don't.When all active Node.js LTS lines support
require(esm)
, packages can simplifytheir distributions by bumping the major version, dropping their CJS exports,
and removing the
module-sync
exports condition (with onlymain
ordefault
targetting the ESM exports). If the package needs to support both bundlers and
being run unbundled on Node.js during the transition period, use both
module-sync
andmodule
and point them to the same ESM file. If the packagealready doesn't want to support older versions of Node.js that doesn't support
require(esm)
, don't use this export condition.For bundlers/tools: they should avoid implementing this stop-gap condition.
Most existing bundlers implement the de-facto bundler standard
module
exports condition, and that should be enough to support users who want to bundle
ESM from CJS consumers. Users who want both bundlers and Node.js to recognize
the ESM exports can use both
module
/module-sync
conditions during thetransition period, and can drop
module-sync
+module
when they no longer needto support older versions of Node.js. If tools do want to support this
condition, it's recommended to make the resolution rules in the graph pointed by
this condition match the Node.js native ESM rules to avoid divergence.
We ended up implementing a condition with a different name instead of reusing
"module"
, because existing code in the ecosystem using the"module"
condition sometimes also expect the module resolution for these ESM files to
work in CJS style, which is supported by bundlers, but the native Node.js loader
has intentionally made ESM resolution different from CJS resolution (e.g.
forbidding
import './noext'
orimport './directory'
), so it would bebreaking to implement a
"module"
condition without implementing the forbiddenESM resolution rules. For now, this just implements a new condition as
semver-minor so it can be backported to older LTS.
Contributed by Joyee Cheung in #54648.
node --run
is now stableThis CLI flag runs a specified command from a
package.json
's"scripts"
object.For the following
package.json
:You can run
node --run test
and that would start the test suite.Contributed by Yagiz Nizipli in #53763.
Other notable changes
Commits
v22.9.0
: 2024-09-17, Version 22.9.0 (Current), @RafaelGSSCompare Source
New API to retrieve execution Stack Trace
A new API
getCallSite
has been introduced to theutil
module. This API allows usersto retrieve the stacktrace of the current execution. Example:
Thanks to Rafael Gonzaga for making this work on #54380.
Disable V8 Maglev
We have seen several crashes/unexpected JS behaviors with maglev on v22
(which ships V8 v12.4). The bugs lie in the codegen so it would be difficult for
users to work around them or even figure out where the bugs are coming from.
Some bugs are fixed in the upstream while some others probably remain.
As v22 will get stuck with V8 v12.4 as LTS, it will be increasingly difficult to
backport patches for them even if the bugs are fixed. So disable it by default
on v22 to reduce the churn and troubles for users.
Thanks to Joyee Cheung for making this work on #54384
Exposes X509_V_FLAG_PARTIAL_CHAIN to tls.createSecureContext
This releases introduces a new option to the API
tls.createSecureContext
. Fornow on users can use
tls.createSecureContext({ allowPartialTrustChain: true })
to treat intermediate (non-self-signed) certificates in the trust CA certificate
list as trusted.
Thanks to Anna Henningsen for making this work on #54790
Other Notable Changes
Deprecations
Commits
v22.8.0
: 2024-09-03, Version 22.8.0 (Current), @RafaelGSSCompare Source
New JS API for compile cache
This release adds a new API
module.enableCompileCache()
that can be used to enable on-disk code caching of all modules loaded after this API is called.Previously this could only be enabled by the
NODE_COMPILE_CACHE
environment variable, so it could only set by end-users.This API allows tooling and library authors to enable caching of their own code.
This is a built-in alternative to the v8-compile-cache/v8-compile-cache-lib packages,
but have better performance and supports ESM.
Thanks to Joyee Cheung for working on this.
New option for vm.createContext() to create a context with a freezable globalThis
Node.js implements a flavor of
vm.createContext()
and friends that creates a context without contextifying its globalobject when vm.constants.DONT_CONTEXTIFY is used. This is suitable when users want to freeze the context
(impossible when the global is contextified i.e. has interceptors installed) or speed up the global access if they
don't need the interceptor behavior.
Thanks to Joyee Cheung for working on this.
Support for coverage thresholds
Node.js now supports requiring code coverage to meet a specific threshold before the process exits successfully.
To use this feature, you need to enable the
--experimental-test-coverage
flag.You can set thresholds for the following types of coverage:
--test-coverage-branches=<threshold>
--test-coverage-functions=<threshold>
--test-coverage-lines=<threshold>
<threshold>
should be an integer between 0 and 100. If an invalid value is provided, aTypeError
will be thrown.If the code coverage fails to meet the specified thresholds for any category, the process will exit with code
1
.For instance, to enforce a minimum of 80% line coverage and 60% branch coverage, you can run:
Thanks Aviv Keller for working on this.
Other Notable Changes
Commits
v22.7.0
: 2024-08-22, Version 22.7.0 (Current), @RafaelGSSCompare Source
Experimental transform types support
With the new flag
--experimental-transform-types
it is possible to enable thetransformation of TypeScript-only syntax into JavaScript code.
This feature allows Node.js to support TypeScript syntax such as
Enum
andnamespace
.Thanks to Marco Ippolito for making this work on #54283.
Module syntax detection is now enabled by default.
Module syntax detection (the
--experimental-detect-module
flag) is nowenabled by default. Use
--no-experimental-detect-module
to disable it ifneeded.
Syntax detection attempts to run ambiguous files as CommonJS, and if the module
fails to parse as CommonJS due to ES module syntax, Node.js tries again and runs
the file as an ES module.
Ambiguous files are those with a
.js
or no extension, where the nearest parentpackage.json
has no"type"
field (either"type": "module"
or"type": "commonjs"
).Syntax detection should have no performance impact on CommonJS modules, but it
incurs a slight performance penalty for ES modules; add
"type": "module"
tothe nearest parent
package.json
file to eliminate the performance cost.A use case unlocked by this feature is the ability to use ES module syntax in
extensionless scripts with no nearby
package.json
.Thanks to Geoffrey Booth for making this work on #53619.
Performance Improvements to Buffer
Performance of Node.js Buffers have been optimized through multiple PR's with significant
improvements to the
Buffer.copy
andBuffer.write
methods. These are used throughoutthe codebase and should give a nice boost across the board.
Thanks to Robert Nagy for making this work on #54311,
#54324, and #54087.
Other Notable Changes
Commits
v22.6.0
: 2024-08-06, Version 22.6.0 (Current), @RafaelGSSCompare Source
Experimental TypeScript support via strip types
Node.js introduces the
--experimental-strip-types
flag for initial TypeScript support.This feature strips type annotations from .ts files, allowing them to run
without transforming TypeScript-specific syntax. Current limitations include:
enums
ornamespaces
.Thanks Marco Ippolito for working on this.
Experimental Network Inspection Support in Node.js
This update introduces the initial support for network inspection in Node.js.
Currently, this is an experimental feature, so you need to enable it using the
--experimental-network-inspection
flag.With this feature enabled, you can inspect network activities occurring within a JavaScript application.
To use network inspection, start your Node.js application with the following command:
Please note that the network inspection capabilities are in active development.
We are actively working on enhancing this feature and will continue to expand its functionality in future updates.
http
andhttps
modules only.feature request on the Chrome DevTools side is addressed.
Thanks Kohei Ueno for working on this.
Other Notable Changes
Commits
v22.5.1
: 2024-07-19, Version 22.5.1 (Current), @richardlauCompare Source
Notable Changes
This release fixes a regression introduced in Node.js 22.5.0. The problem is known to display the following symptoms:
FATAL ERROR: v8::Object::GetCreationContextChecked No creation context available
#53902npm error Exit handler never called!
npm/cli#7657Usage Error: Couldn't find the node_modules state file - running an install might help (findPackageLocation)
yarnpkg/berry#6398Commits
v22.5.0
: 2024-07-17, Version 22.5.0 (Current), @RafaelGSS prepared by @aduh95Compare Source
Notable Changes
Commits
v22.4.1
: 2024-07-08, Version 22.4.1 (Current), @RafaelGSSCompare Source
This is a security release.
Notable Changes
Commits
v22.4.0
: 2024-07-02, Version 22.4.0 (Current), @targosCompare Source
Notable Changes
Experimental Web Storage API
API stability updates
Other Notable Changes
Commits
v22.3.0
: 2024-06-11, Version 22.3.0 (Current), @RafaelGSSCompare Source
Notable Changes
Commits
v22.2.0
: 2024-05-15, Version 22.2.0 (Current), @targosCompare Source
Notable Changes
Commits
v22.1.0
: 2024-05-02, Version 22.1.0 (Current), @targos prepared by @aduh95Compare Source
module: implement
NODE_COMPILE_CACHE
for automatic on-disk code cachingThis patch implements automatic on-disk code caching that can be enabled
via an environment variable
NODE_COMPILE_CACHE=/path/to/cache/dir
.When set, whenever Node.js compiles a CommonJS or a ECMAScript Module,
it will use on-disk V8 code cache
persisted in the specified directory
to speed up the compilation. This may slow down the first load of a
module graph, but subsequent loads of the same module graph may get
a significant speedup if the contents of the modules do not change.
Locally, this speeds up loading of
test/fixtures/snapshot/typescript.js
from ~130ms to ~80ms.
To clean up the generated code cache, simply remove the directory.
It will be recreated the next time the same directory is used for
NODE_COMPILE_CACHE
.Compilation cache generated by one version of Node.js may not be used
by a different version of Node.js. Cache generated by different versions
of Node.js will be stored separately if the same directory is used
to persist the cache, so they can co-exist.
Caveat: currently when using this with V8 JavaScript code coverage, the
coverage being collected by V8 may be less precise in functions that are
deserialized from the code cache. It's recommended to turn this off when
running tests to generate precise coverage.
Contributed by Joyee Cheung in #52535.
Other Notable Changes
Commits
v22.0.0
: 2024-04-24, Version 22.0.0 (Current), @RafaelGSS and @marco-ippolitoCompare Source
We're excited to announce the release of Node.js 22!
Highlights include require()ing ESM graphs, WebSocket client, updates of the V8 JavaScript engine, and more!
As a reminder, Node.js 22 will enter long-term support (LTS) in October, but until then, it will be the "Current" release for the next six months.
We encourage you to explore the new features and benefits offered by this latest release and evaluate their potential impact on your applications.
Other Notable Changes
Semver-Major Commits
Semver-Minor Commits
Semver-Patch Commits
v20.18.1
: 2024-11-20, Version 20.18.1 'Iron' (LTS), @marco-ippolitoCompare Source
Notable Changes
Commits
v20.18.0
: 2024-10-03, Version 20.18.0 'Iron' (LTS), @targosCompare Source
Notable Changes
Experimental Network Inspection Support in Node.js
This update introduces the initial support for network inspection in Node.js.
Currently, this is an experimental feature, so you need to enable it using the
--experimental-network-inspection
flag.With this feature enabled, you can inspect network activities occurring within a JavaScript application.
To use network inspection, start your Node.js application with the following command:
Please note that the network inspection capabilities are in active development.
We are actively working on enhancing this feature and will continue to expand its functionality in future updates.
http
andhttps
modules only.feature request on the Chrome DevTools side is addressed.
Contributed by Kohei Ueno in #53593 and #54246
Exposes X509_V_FLAG_PARTIAL_CHAIN to tls.createSecureContext
This releases introduces a new option to the API
tls.createSecureContext
. Fromnow on,
tls.createSecureContext({ allowPartialTrustChain: true })
can be usedto treat intermediate (non-self-signed) certificates in the trust CA certificate
list as trusted.
Contributed by Anna Henningsen in #54790
New option for vm.createContext() to create a context with a freezable globalThis
Node.js implements a flavor of
vm.createContext()
and friends that creates a context without contextifying its globalobject when vm.constants.DONT_CONTEXTIFY is used. This is suitable when users want to freeze the context
(impossible when the global is contextified i.e. has interceptors installed) or speed up the global access if they
don't need the interceptor behavior.
Contributed by Joyee Cheung in #54394
Deprecations
Other Notable Changes
Commits
v20.17.0
: 2024-08-21, Version 20.17.0 'Iron' (LTS), @marco-ippolitoCompare Source
module: support require()ing synchronous ESM graphs
This release adds
require()
support for synchronous ESM graphs underthe flag
--experimental-require-module
.If
--experimental-require-module
is enabled, and the ECMAScriptmodule being loaded by
require()
meets the following requirements:require()
will load the requested module as an ES Module, and returnthe module name space object. In this case it is similar to dynamic
import()
but is run synchronously and returns the name space objectdirectly.
Contributed by Joyee Cheung in #51977
path: add
matchesGlob
methodGlob 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: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
Commits
v20.16.0
: 2024-07-24, Version 20.16.0 'Iron' (LTS), @marco-ippolitoCompare Source
process: add process.getBuiltinModule(id)
process.getBuiltinModule(id)
provides a way to load built-in modulesin a globally available function. ES Modules that need to support
other environments can use it to conditionally load a Node.js built-in
when it is run in Node.js, without having to deal with the resolution
error that can be thrown by
import
in a non-Node.js environment orhaving to use dynamic
import()
which either turns the module intoan asynchronous module, or turns a synchronous API into an asynchronous one.
If
id
specifies a built-in module available in the current Node.js process,process.getBuiltinModule(id)
method returns the corresponding built-inmodule. If
id
does not correspond to any built-in module,undefined
is returned.
process.getBuiltinModule(id)
accepts built-in module IDs that are recognizedby
module.isBuiltin(id)
.The references returned by
process.getBuiltinModule(id)
always point tothe built-in module corresponding to
id
even if users modifyrequire.cache
so thatrequire(id)
returns something else.Contributed by Joyee Cheung in #52762
doc: doc-only deprecate OpenSSL engine-based APIs
OpenSSL 3 deprecated support for custom engines with a recommendation to switch to its new provider model.
The
clientCertEngine
option forhttps.request()
,tls.createSecureContext()
, andtls.createServer()
; theprivateKeyEngine
andprivateKeyIdentifier
fortls.createSecureContext();
andcrypto.setEngine()
all depend on this functionality from OpenSSL.Contributed by Richard Lau in #53329
inspector: fix disable async hooks on Debugger.setAsyncCallStackDepth
Debugger.setAsyncCallStackDepth
was previously calling the enable function by mistake. As a result, when profiling using Chrome DevTools, the async hooks won't be turned off properly after receivingDebugger.setAsyncCallStackDepth
with depth 0.Contributed by Joyee Cheung in #53473
Other Notable Changes
Commits
v20.15.1
: 2024-07-08, Version 20.15.1 'Iron' (LTS), @RafaelGSSCompare Source
This is a security release.
Notable Changes
Commits
v20.15.0
: 2024-06-20, Version 20.15.0 'Iron' (LTS), @marco-ippolitoCompare Source
test_runner: support test plans
It is now possible to count the number of assertions and subtests that are expected to run within a test. If the number of assertions and subtests that run does not match the expected count, the test will fail.
Contributed by Colin Ihrig in #52860
inspector: introduce the
--inspect-wait
flagThis release introduces the
--inspect-wait
flag, which allows debugger to wait for attachement. This flag is useful when you want to debug the code from the beginning. Unlike--inspect-brk
, which breaks on the first line, this flag waits for debugger to be connected and then runs the code as soon as a session is established.Contributed by Kohei Ueno in #52734
zlib: expose zlib.crc32()
This release exposes the crc32() function from zlib to user-land.
It computes a 32-bit Cyclic Redundancy Check checksum of data. If
value is specified, it is used as the starting value of the checksum,
otherwise, 0 is used as the starting value.
The CRC algorithm is designed to compute checksums and to detect error
in data transmission. It's not suitable for cryptographic authentication.
Contributed by Joyee Cheung in #52692
cli: allow running wasm in limited vmem with --disable-wasm-trap-handler
By default, Node.js enables trap-handler-based WebAssembly bound
checks. As a result, V8 does not need to insert inline bound checks
int the code compiled from WebAssembly which may speedup WebAssembly
execution significantly, but this optimization requires allocating
a big virtual memory cage (currently 10GB). If the Node.js process
does not have access to a large enough virtual memory address space
due to system configurations or hardware limitations, users won't
be able to run any WebAssembly that involves allocation in this
virtual memory cage and will see an out-of-memory error.
--disable-wasm-trap-handler
disables this optimization so thatusers can at least run WebAssembly (with a less optimial performance)
when the virtual memory address space available to their Node.js
process is lower than what the V8 WebAssembly memory cage needs.
Contributed by Joyee Cheung in #52766
Other Notable Changes
Commits
v20.14.0
: 2024-05-28, Version 20.14.0 'Iron' (LTS), @marco-ippolitoCompare Source
Notable Changes
Commits
v20.13.1
: 2024-05-09, Version 20.13.1 'Iron' (LTS), @marco-ippolitoCompare Source
2024-05-09, Version 20.13.1 'Iron' (LTS), @marco-ippolito
Revert "tools: install npm PowerShell scripts on Windows"
Due to a regression in the npm installation on Windows, this commit reverts the change that installed npm PowerShell scripts on Windows.
Commits
v20.13.0
: 2024-05-07, Version 20.13.0 'Iron' (LTS), @marco-ippolitoCompare Source
2024-05-07, Version 20.13.0 'Iron' (LTS), @marco-ippolito
buffer: improve
base64
andbase64url
performanceThe performance of the
base64
andbase64url
encoding and decoding functions has been improved significantly.Contributed by Yagiz Nizipli in #52428
crypto: deprecate implicitly shortened GCM tags
This release, introduces a doc-only deprecation of using GCM authentication tags that are shorter than the cipher's block size, unless the user specified the
authTagLength
option.Contributed by Tobias Nießen in #52345
events,doc: mark CustomEvent as stable
From this release
CustomEvent
has been marked stable.Contributed by Daeyeon Jeong in #52618
fs: add stacktrace to fs/promises
Sync functions in fs throwed an error with a stacktrace which is helpful for debugging. But functions in fs/promises throwed an error without a stacktrace. This commit adds stacktraces by calling
Error.captureStacktrace
and re-throwing the error.Contributed by 翠 / green in #49849
report: add
--report-exclude-network
optionNew option
--report-exclude-network
, also available asreport.excludeNetwork
, enables the user to exclude networking interfaces in their diagnostic report. On some systems, this can cause the report to take minutes to generate so this option can be used to optimize that.Contributed by Ethan Arrowood in #51645
src: add uv_get_available_memory to report and process
From this release it is possible to get the available memory in the system by calling
process.getAvailableMemory()
.Contributed by theanarkh #52023
stream: support typed arrays
This commit adds support for typed arrays in streams.
Contributed by IlyasShabi #51866
util: support array of formats in util.styleText
It is now possible to pass an array of format strings to
util.styleText
to apply multiple formats to the same text.Contributed by Marco Ippolito in #52040
v8: implement v8.queryObjects() for memory leak regression testing
This is similar to the queryObjects() console API provided by the Chromium DevTools console. It can be used to search for objects that have the matching constructor on its prototype chain in the heap after a full garbage collection, which can be useful for memory leak regression tests.
To avoid surprising results, users should avoid using this API on constructors whose implementation they don't control, or on constructors that can be invoked by other parties in the application.
To avoid accidental leaks, this API does not return raw references to the objects found. By default, it returns the count of the objects found. If options.format is 'summary', it returns an array containing brief string representations for each object. The visibility provided in this API is similar to what the heap snapshot provides, while users can save the cost of serialization and parsing and directly filer the target objects during the search.
We have been using this API internally for the test suite, which has been more stable than any other leak regression testing strategies in the CI. With a public implementation we can now use the public API instead.
Contributed by Joyee Cheung in #51927
watch: mark as stable
From this release Watch Mode is considered stable.
When in watch mode, changes in the watched files cause the Node.js process to restart.
Contributed by Moshe Atlow in #52074
Other Notable Changes
Commits
v20.12.2
: 2024-04-10, Version 20.12.2 'Iron' (LTS), @RafaelGSSCompare Source
This is a security release.
Notable Changes
child_process.spawn
without shell option enabled on WindowsCommits
v20.12.1
: 2024-04-03, Version 20.12.1 'Iron' (LTS), @RafaelGSSCompare Source
This is a security release
Notable Changes
Commits
v20.12.0
: 2024-03-26, Version 20.12.0 'Iron' (LTS), @richardlauCompare Source
Notable Changes
crypto: implement crypto.hash()
This patch introduces a helper crypto.hash() that computes
a digest from the input at one shot. This can be 1.2-2x faster
than the object-based createHash() for smaller inputs (<= 5MB)
that are readily available (not streamed) and incur less memory
overhead since no intermediate objects will be created.
Contributed by Joyee Cheung in #51044.
Loading and parsing environment variables
process.loadEnvFile(path)
:.env
file. If no path is specified, it automatically loads the .env file in the current directory. Example:process.loadEnvFile()
.process.loadEnvFile('./development.env')
.util.parseEnv(content)
:require('node:util').parseEnv('HELLO=world')
.Contributed by Yagiz Nizipli in #51476.
New connection attempt events
Three new events were added in the
net.createConnection
flow:connectionAttempt
: Emitted when a new connection attempt is established. In case of Happy Eyeballs, this might emitted multiple times.connectionAttemptFailed
: Emitted when a connection attempt failed. In case of Happy Eyeballs, this might emitted multiple times.connectionAttemptTimeout
: Emitted when a connection attempt timed out. In case of Happy Eyeballs, this will not be emitted for the last attempt. This is not emitted at all if Happy Eyeballs is not used.Additionally, a previous bug has been fixed where a new connection attempt could have been started after a previous one failed and after the connection was destroyed by the user.
This led to a failed assertion.
Contributed by Paolo Insogna in #51045.
Permission Model changes
Node.js 20.12.0 comes with several fixes for the experimental permission model and two new semver-minor commits.
We're adding a new flag
--allow-addons
to enable addon usage when using the Permission Model.Contributed by Rafael Gonzaga in #51183
And relative paths are now supported through the
--allow-fs-*
flags.Therefore, with this release one can use:
To give only read access to the entrypoint of the application.
Contributed by Rafael Gonzaga and Carlos Espa in #50758.
sea: support embedding assets
Users can now include assets by adding a key-path dictionary
to the configuration as the
assets
field. At build time, Node.jswould read the assets from the specified paths and bundle them into
the preparation blob. In the generated executable, users can retrieve
the assets using the
sea.getAsset()
andsea.getAssetAsBlob()
API.The single-executable application can access the assets as follows:
Contributed by Joyee Cheung in #50960.
Support configurable snapshot through
--build-snapshot-config
flagWe are adding a new flag
--build-snapshot-config
to configure snapshots through a custom JSON configuration file.When using this flag, additional script files provided on the command line will
not be executed and instead be interpreted as regular command line arguments.
These changes were contributed by Joyee Cheung and Anna Henningsen in #50453
Text Styling
util.styleText(format, text)
: This function returns a formatted text considering theformat
passed.A new API has been created to format text based on
util.inspect.colors
, enabling you to style text in different colors (such as red, blue, ...) and emphasis (italic, bold, ...).Contributed by Rafael Gonzaga in #51850.
vm: support using the default loader to handle dynamic import()
This patch adds support for using
vm.constants.USE_MAIN_CONTEXT_DEFAULT_LOADER
as theimportModuleDynamically
option in all vm APIs that take this option exceptvm.SourceTextModule
. This allows users to have a shortcut to support dynamicimport()
in the compiled code without missing the compilation cache if they don't need customization of the loading process. We emit an experimental warning when theimport()
is actually handled by the default loader through this option instead of requiring--experimental-vm-modules
.Contributed by Joyee Cheung in #51244.
Root certificates updated to NSS 3.98
Certificates added:
Certificates removed:
Updated dependencies
Other notable changes
Commits
v20.11.1
: 2024-02-14, Version 20.11.1 'Iron' (LTS), @RafaelGSS prepared by @marco-ippolitoCompare Source
Notable changes
This is a security release.
Notable changes
Commits
v20.11.0
: 2024-01-09, Version 20.11.0 'Iron' (LTS), @UlisesGasconCompare Source
Notable Changes
Commits
v20.10.0
: 2023-11-22, Version 20.10.0 'Iron' (LTS), @targosCompare Source
Notable Changes
--experimental-default-type
flag to flip module defaultsThe new flag
--experimental-default-type
can be used to flip the defaultmodule system used by Node.js. Input that is already explicitly defined as ES
modules or CommonJS, such as by a
package.json
"type"
field or.mjs
/.cjs
file extension or the
--input-type
flag, is unaffected. What is currentlyimplicitly CommonJS would instead be interpreted as ES modules under
--experimental-default-type=module
:String input provided via
--eval
or STDIN, if--input-type
is unspecified.Files ending in
.js
or with no extension, if there is nopackage.json
filepresent in the same folder or any parent folder.
Files ending in
.js
or with no extension, if the nearest parentpackage.json
field lacks atype
field; unless the folder is inside anode_modules
folder.In addition, extensionless files are interpreted as Wasm if
--experimental-wasm-modules
is passed and the file contains the "magic bytes"Wasm header.
Contributed by Geoffrey Booth in #49869.
Detect ESM syntax in ambiguous JavaScript
The new flag
--experimental-detect-module
can be used to automatically run ESmodules when their syntax can be detected. For “ambiguous” files, which are
.js
or extensionless files with nopackage.json
with atype
field, Node.jswill parse the file to detect ES module syntax; if found, it will run the file
as an ES module, otherwise it will run the file as a CommonJS module. The same
applies to string input via
--eval
orSTDIN
.We hope to make detection enabled by default in a future version of Node.js.
Detection increases startup time, so we encourage everyone—especially package
authors—to add a
type
field topackage.json
, even for the default"type": "commonjs"
. The presence of atype
field, or explicit extensionssuch as
.mjs
or.cjs
, will opt out of detection.Contributed by Geoffrey Booth in #50096.
New
flush
option in file system functionsWhen writing to files, it is possible that data is not immediately flushed to
permanent storage. This allows subsequent read operations to see stale data.
This PR adds a
'flush'
option to thefs.writeFile
family of functions whichforces the data to be flushed at the end of a successful write operation.
Contributed by Colin Ihrig in #50009 and #50095.
Experimental WebSocket client
Adds a
--experimental-websocket
flag that adds aWebSocket
global, as standardized by WHATWG.
Contributed by Matthew Aitken in #49830.
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 tovm.Script
, resulting in a performanceregression 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 thepresence of the
importModuleDynamically
option, so that users affected by theperformance 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.
Other notable changes
Commits
v20.9.0
: 2023-10-24, Version 20.9.0 'Iron' (LTS), @richardlauCompare Source
Notable Changes
This release marks the transition of Node.js 20.x into Long Term Support (LTS)
with the codename 'Iron'. The 20.x release line now moves into "Active LTS"
and will remain so until October 2024. After that time, it will move into
"Maintenance" until end of life in April 2026.
Known issue
Collecting code coverage via the
NODE_V8_COVERAGE
environment variable maylead to a hang. This is not thought to be a regression in Node.js 20 (some
reports are on Node.js 18). For more information, including some potential
workarounds, see issue #49344.
v20.8.1
: 2023-10-13, Version 20.8.1 (Current), @RafaelGSSCompare Source
This is a security release.
Notable Changes
The following CVEs are fixed in this release:
nghttp2
Security Release (High)undici
Security Release (High)More detailed information on each of the vulnerabilities can be found in October 2023 Security Releases blog post.
Commits
v20.8.0
: 2023-09-28, Version 20.8.0 (Current), @ruyadornoCompare Source
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 theimportModuleDynamically
optionThis 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
Commits
v20.7.0
: 2023-09-18, Version 20.7.0 (Current), @UlisesGasconCompare Source
Notable Changes
Commits
v20.6.1
: 2023-09-08, Version 20.6.1 (Current), @ruyadorno and @RafaelGSSCompare Source
Commit
v20.6.0
: 2023-09-04, Version 20.6.0 (Current), @juanarbol prepared by @UlisesGasconCompare Source
Notable changes
built-in
.env
file supportStarting 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: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 yourpackage.json
.This feature was contributed by Yagiz Nizipli in #48890.
import.meta.resolve
unflaggedIn ES modules,
import.meta.resolve(specifier)
can be used to get an absolute URL string to whichspecifier
resolves, similar torequire.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
APIregister
for module customization hooks; newinitialize
hookThere is a new API
register
available onnode: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 callingregister
from the main thread and passing data, includingMessageChannel
instances.We encourage users to migrate to an approach that uses
--import
withregister
, such as: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 CommonJSAuthors of module customization hooks can how handle both ES module and CommonJS sources in the
load
hook. This works for CommonJS modules referenced via eitherimport
orrequire
, 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 asrequire.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 thev8::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 tonode.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
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.
This PR has been generated by Renovate Bot.
97a09b43ac
toc3f5332001
c3f5332001
to0c3e6036fa
0c3e6036fa
toea563ded29
ea563ded29
to9ff4f7f827
9ff4f7f827
toa7733b2abc
a7733b2abc
toc32ca3c737
c32ca3c737
to2651b844e4
2651b844e4
toa701aef7bf
a701aef7bf
toe87ae3afd3
e87ae3afd3
to9b8f1d9b2a
9b8f1d9b2a
tof8a0757dd5
f8a0757dd5
todf91775b99
df91775b99
tofca48bd45e
fca48bd45e
to992570923b
992570923b
to00f2ed271f
00f2ed271f
to169466b27c
169466b27c
toa8c76206ad
a8c76206ad
toe52e740aeb
e52e740aeb
to33c2335df5
33c2335df5
tobac187338f
bac187338f
toe344c7e263
e344c7e263
to4f4a44e60b
4f4a44e60b
to433bc64e7b
433bc64e7b
tof135bcbd6d
f135bcbd6d
to7900f7fff8
7900f7fff8
to13f51c475b
13f51c475b
toe79676e1f9
e79676e1f9
toe713fc7f64
e713fc7f64
to35caf24a3e
35caf24a3e
to9cd075fdfa
9cd075fdfa
tob55f033b73
b55f033b73
to090189593b
090189593b
to39546fdc3f
39546fdc3f
toaa2d3646d5
aa2d3646d5
to09152d01f4
09152d01f4
to20cc539082
20cc539082
to5201116526
5201116526
to9c4f46af45
9c4f46af45
toa3086b5c06
a3086b5c06
to8d3502ef19
8d3502ef19
toad13d7cf21
ad13d7cf21
to293737f519
293737f519
to26faa7bb8b
26faa7bb8b
tod74d258520
d74d258520
toaa990180df
aa990180df
to5da2324e8c
5da2324e8c
to1ee481adef
1ee481adef
toa3608ba68f
a3608ba68f
tofd9c41a721
fd9c41a721
to7d8b2c191a
7d8b2c191a
to9e8c3a64cb
9e8c3a64cb
to261b635cf6
261b635cf6
toa8640d52d3
a8640d52d3
toec6a53547a
ec6a53547a
todcf9054aaa
dcf9054aaa
to963d67dfbe
963d67dfbe
to8b32c7743d
8b32c7743d
to9fd6e32fbd
9fd6e32fbd
to6aab4109e9
6aab4109e9
tof4f67bc5f2
f4f67bc5f2
to0e73b0aba2
0e73b0aba2
to8e7b61d270
8e7b61d270
to41fee98ac3
41fee98ac3
toe9b56e91f6
e9b56e91f6
to3090f7be2e
3090f7be2e
tobc1b16dd87
bc1b16dd87
tofb1bf0e65b
fb1bf0e65b
to0c2b41e4fe
0c2b41e4fe
to9527b6e717
9527b6e717
to5b862f3c42
5b862f3c42
to5262119341
5262119341
tof05e93bf21
f05e93bf21
to178f5fecc9
178f5fecc9
to67d76d4277
67d76d4277
tocab44c2c15
cab44c2c15
to627b1665b1
627b1665b1
to0d85ba136d
0d85ba136d
to060387e135
060387e135
to3f7f0d6428
3f7f0d6428
tobbd44e6645
bbd44e6645
toa71c99ceab
a71c99ceab
to019b1c4b04
019b1c4b04
toa19e2e0d52
a19e2e0d52
to924bae9d68
924bae9d68
to1a14329bb6
1a14329bb6
toae3e157f35
ae3e157f35
to89c7951183
89c7951183
to78af2b1557
78af2b1557
tob54d322743
b54d322743
to5bd08c3d80
5bd08c3d80
to724a834d13
724a834d13
tof7e9d3feb2
f7e9d3feb2
to4c794f08d4
4c794f08d4
to8c4764c3bf
8c4764c3bf
to79637c0ce0
79637c0ce0
toa703a04a07
a703a04a07
tof58b092133
f58b092133
tocb898747e4
cb898747e4
tob33ee7bc84
b33ee7bc84
tod43abcf9a7
d43abcf9a7
to9662caf4d5
9662caf4d5
toc34e4cec7e
c34e4cec7e
to62aac7b4cc
62aac7b4cc
to7f3a60ad14
7f3a60ad14
toc308009d1f
c308009d1f
to8a49de4a0a
8a49de4a0a
to2af6178bc2
2af6178bc2
tocf12fc83e8
cf12fc83e8
to41ffceb29c
41ffceb29c
to5a521b4e40
5a521b4e40
to5bd4375c44
5bd4375c44
tobfa4f86b01
bfa4f86b01
toaa9a4ead13
aa9a4ead13
toed2192a8fb
ed2192a8fb
to8344811ccd
8344811ccd
to0984a17b8c
0984a17b8c
to0eb30ff57e
0eb30ff57e
to997c12862f
997c12862f
toa8e4252349
a8e4252349
tod625c26973
d625c26973
to51d90cc332
51d90cc332
to1e57a27e1b
1e57a27e1b
to17f13cbccd
17f13cbccd
tod0ec8c505b
d0ec8c505b
to2ac4a37699
2ac4a37699
todd36e88e38
dd36e88e38
toe6f8f3030c
e6f8f3030c
to4db2eb5b05
4db2eb5b05
to907d4f1a73
907d4f1a73
toa059218b5d
a059218b5d
to1351fd2bc5
1351fd2bc5
toea94a8916f
ea94a8916f
to1485cb5bb3
1485cb5bb3
toa6f0a76176
a6f0a76176
to2cca0e02e8
2cca0e02e8
to5007c4ecdf
5007c4ecdf
to0301442dbd
0301442dbd
to1280a8a715
1280a8a715
to61217de39f
61217de39f
to1498c8256e
1498c8256e
toa3a916cd4c
a3a916cd4c
to2bb7f70a5a
2bb7f70a5a
to2ca96aefab
2ca96aefab
tof6655654e1
f6655654e1
to0eb25d5ba4
0eb25d5ba4
tob035e9fdbd
b035e9fdbd
tod4804bc300
d4804bc300
to36eb2365de
36eb2365de
tobff28e8721
bff28e8721
to3335a5ccae
3335a5ccae
to8597a047db
8597a047db
to5f7db91ee5
5f7db91ee5
to88fa1d7db8
88fa1d7db8
tob0d99ef85a
b0d99ef85a
to5cf07e7b4c
5cf07e7b4c
to10533e07de
10533e07de
to0117d7271b
0117d7271b
to02cabae968
02cabae968
to4aec6b2964
4aec6b2964
toe51a6db556
e51a6db556
to40345e2cd2
40345e2cd2
to5c2c9bf17d
5c2c9bf17d
to5691851f2d
5691851f2d
to9405e7c3be
9405e7c3be
to96c2285677
96c2285677
to78a7b6c674
78a7b6c674
toefcce3a6b1
efcce3a6b1
to18155515b3
18155515b3
to576469b143
576469b143
to39847a2fe9
39847a2fe9
toee431b6932
ee431b6932
to458ae3b9a5
458ae3b9a5
to7560dfabc4
7560dfabc4
to19ab5854f2
19ab5854f2
to446826a2df
446826a2df
to89d1b3590c
89d1b3590c
toc1b05ab525
c1b05ab525
toa256b1d072
a256b1d072
tobca544d788
bca544d788
to70118392b2
70118392b2
to76653a186f
76653a186f
to40d190149b
40d190149b
to452eff7b74
452eff7b74
to3928a98eb8
3928a98eb8
to0b6a9c4970
0b6a9c4970
to0b5e438412
0b5e438412
toe55c64c8d4
e55c64c8d4
toc4e977cb87
c4e977cb87
to5c7d6ee9ac
5c7d6ee9ac
tob815b2d5ee
b815b2d5ee
toeadfc64ab6
eadfc64ab6
to2923448658
2923448658
tocedf1891e8
cedf1891e8
to7220586f48
7220586f48
to85638af441
85638af441
to1da63cb2f5
1da63cb2f5
toa13a4a89ad
a13a4a89ad
to39185afbcd
39185afbcd
to1783e36d8f
1783e36d8f
toabccb38797
abccb38797
to643cc2a870
643cc2a870
to3038b664b6
3038b664b6
to6e06a697e9
6e06a697e9
toef0ada368f
ef0ada368f
to59607f81f6
59607f81f6
tod545848e62
d545848e62
toe45a4bdac5
e45a4bdac5
to7e846cf47e
7e846cf47e
toce0e2b1728
Checkout
From your project repository, check out a new branch and test the changes.