Update Node.js to v21 #260
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "renovate/node-21.x"
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:
20.18.1-bullseye
->21.7.3-bullseye
Release Notes
nodejs/node (node)
v21.7.3
: 2024-04-10, Version 21.7.3 (Current), @RafaelGSSCompare Source
This is a security release.
Notable Changes
child_process.spawn
without shell option enabled on WindowsCommits
v21.7.2
: 2024-04-03, Version 21.7.2 (Current), @RafaelGSS prepared by @marco-ippolitoCompare Source
This is a security release.
Notable changes
Commits
v21.7.1
: 2024-03-08, Version 21.7.1 (Current), @targosCompare Source
Notable Changes
This release reverts #51389, which
landed in Node.js 21.7.0. It is a documented feature that
t.after()
hooks arerun even if a test has no subtests. The hook can be used to clean up the test
itself.
Commits
v21.7.0
: 2024-03-06, Version 21.7.0 (Current), @RafaelGSS prepared by @marco-ippolitoCompare Source
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 and Hemanth HM in #51850.
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
Support for multi-line values for
.env
fileNode.js 21.7.0 will now support multi-line values in the .env file:
Contributed by Ilyas Shabi #51289
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
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
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
Other Notable Changes
Commits
v21.6.2
: 2024-02-14, Version 21.6.2 (Current), @RafaelGSSCompare Source
Notable changes
This is a security release.
Notable changes
Commits
v21.6.1
: 2024-01-22, Version 21.6.1 (Current), @RafaelGSSCompare Source
Notable Changes
This release fixes a bug in
undici
using WebStreamsCommits
v21.6.0
: 2024-01-15, Version 21.6.0 (Current), @RafaelGSSCompare Source
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.
Changes to the Permission Model
Node.js 21.6.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
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
Other Notable Changes
Commits
v21.5.0
: 2023-12-19, Version 21.5.0 (Current), @RafaelGSSCompare Source
Notable Changes
Deprecations
Commits
v21.4.0
: 2023-12-05, Version 21.4.0 (Current), @targosCompare Source
Notable Changes
This release fixes a regression introduced in v21.3.0 that caused the
fs.writeFileSync
method to throw when called with
'utf8'
encoding, no flag option, and if the target file didn't exist yet.Commits
v21.3.0
: 2023-11-30, Version 21.3.0 (Current), @RafaelGSSCompare Source
Notable Changes
New
--disable-warning
flagThis version adds a new
--disable-warning
option that allows users to disable specific warnings either by code(i.e. DEP0025) or type (i.e. DeprecationWarning, ExperimentalWarning).
This option works alongside existing
--warnings
and--no-warnings
.For example, the following script will not emit DEP0025
require('node:sys')
when executed withnode --disable-warning=DEP0025
:Contributed by Ethan-Arrowood in #50661
Update Root Certificates to NSS 3.95
This is the certdata.txt from NSS 3.95, released on 2023-11-16.
This is the version of NSS that will ship in Firefox 121 on
2023-12-19.
Certificates added:
Certificates removed:
A626340
Fast fs.writeFileSync with UTF-8 Strings
Enhanced writeFileSync functionality by implementing a highly efficient fast path primarily in C++ for UTF8-encoded string data.
Additionally, optimized the
appendFileSync
method by leveraging the improvedwriteFileSync
functionality.For simplicity and performance considerations, the current implementation supports only string data,
as benchmark results raise concerns about the efficacy of using Buffer for this purpose.
Future optimizations and expansions may be explored, but for now, the focus is on maximizing efficiency for string data operations.
Contributed by CanadaHonk in #49884.
Other Notable Changes
Commits
v21.2.0
: 2023-11-14, Version 21.2.0 (Current), @targosCompare Source
Notable Changes
Commits
v21.1.0
: 2023-10-24, Version 21.1.0 (Current), @targosCompare Source
Notable Changes
Automatically detect and run ESM syntax
The new flag
--experimental-detect-module
can be used to automatically runES modules 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.
Other Notable Changes
Commits
v21.0.0
: 2023-10-17, Version 21.0.0 (Current), @RafaelGSS and @targosCompare Source
We're excited to announce the release of Node.js 21! Highlights include updates of the V8 JavaScript engine to 11.8,
stable
fetch
andWebStreams
, a new experimental flag to change the interpretation of ambiguous codefrom CommonJS to ES modules (
--experimental-default-type
), many updates to our test runner, and more!Node.js 21 will replace Node.js 20 as our ‘Current’ release line when Node.js 20 enters long-term support (LTS) later this month.
As per the release schedule, Node.js 21 will be ‘Current' release for the next 6 months, until April 2024.
Other Notable Changes
Semver-Major Commits
Semver-Minor Commits
Semver-Patch Commits
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Renovate Bot.
baaf9cee98
to69a160e1f7
69a160e1f7
tob739f42817
b739f42817
to6b22e89723
6b22e89723
to7b8b1ae06e
7b8b1ae06e
to41c0c07e0f
41c0c07e0f
to74f542bfa7
74f542bfa7
to0961ed421d
0961ed421d
toa1448d8f1e
a1448d8f1e
to228fc50ed5
228fc50ed5
to8875becb6c
8875becb6c
to9a910b7e8d
9a910b7e8d
to69859a5e63
69859a5e63
to22137bc409
22137bc409
toc629790c9f
c629790c9f
tofe74dff98f
fe74dff98f
to90defe89dc
90defe89dc
to2a297f107e
2a297f107e
to7edf44dfd4
7edf44dfd4
toacce1b784f
acce1b784f
to8d8cded2b6
8d8cded2b6
to6bce7718eb
6bce7718eb
to6949d27ab8
6949d27ab8
to397c26293b
397c26293b
to5ea555819c
5ea555819c
to48948ba1e2
48948ba1e2
toed3a849274
ed3a849274
todbdd16cf9c
dbdd16cf9c
to77bd0b7181
77bd0b7181
to03c20b4cf8
03c20b4cf8
to78b54b6f95
78b54b6f95
to747038199d
747038199d
to5e699e61c2
5e699e61c2
tof6b9f24e20
f6b9f24e20
to6ed48ba14b
6ed48ba14b
to6e03022bd0
6e03022bd0
to824def9a0f
824def9a0f
to11375c695a
11375c695a
to30b6306474
30b6306474
to676d04f763
676d04f763
todfecc6ecf4
4aa4a76923
to35e98cb75c
35e98cb75c
to7503da5aa2
7503da5aa2
tof4c2e933f5
f4c2e933f5
tob4db648284
b4db648284
toefd5663667
efd5663667
to3b4b678e6f
3b4b678e6f
to6187e93066
6187e93066
to885a522c1b
885a522c1b
to7cbd5d4115
7cbd5d4115
to1ed0b0db90
1ed0b0db90
to733fb3c8db
733fb3c8db
to2b62568377
2b62568377
toe8e4b52d80
e8e4b52d80
to8e77140397
8e77140397
to9d7b325bf2
9d7b325bf2
to9add295a5e
9add295a5e
to24ced1200d
24ced1200d
toa815cc6409
a815cc6409
to793719f305
793719f305
to406f7e68a9
406f7e68a9
toba4109b583
ba4109b583
to85436a50a6
85436a50a6
to6ffe9c7c16
6ffe9c7c16
tof5b2052b59
f5b2052b59
to6f25bb68f3
6f25bb68f3
to136ba8bd7b
136ba8bd7b
toa753cc2b38
a753cc2b38
to00f7dbbbdc
00f7dbbbdc
tobb6e508a1d
bb6e508a1d
toa672b02478
a672b02478
to9ccec9c43f
9ccec9c43f
to92d87a6deb
92d87a6deb
to44e8ead2c7
44e8ead2c7
tof8618e96a4
f8618e96a4
toe4fa877ad8
e4fa877ad8
toa9cfe3d790
a9cfe3d790
to8e59e84877
8e59e84877
tof562a85888
f562a85888
to07924340f6
07924340f6
to79e946b70d
79e946b70d
to296a47951d
296a47951d
toaefc101d02
aefc101d02
tof90948455c
f90948455c
tobfb0e2d610
bfb0e2d610
tocc368299db
cc368299db
toee2a00eb00
ee2a00eb00
to4f0f3a9e62
4f0f3a9e62
to0661d0a20c
0661d0a20c
tod96a14da25
d96a14da25
toc49a249cfd
c49a249cfd
to9d600c6ed5
Update Node.js to v21to Update node Docker tag to v21Update node Docker tag to v21to Update Node.js to v219d600c6ed5
to24865d8daa
24865d8daa
to63a67593cf
63a67593cf
toc68e1cf309
c68e1cf309
to6f00843f80
6f00843f80
tofaddd2b6e1
faddd2b6e1
to5892dd3c44
5892dd3c44
to0682c7cbed
0682c7cbed
to942f1642c8
942f1642c8
toc2e198d446
Checkout
From your project repository, check out a new branch and test the changes.