chore(deps): update node.js to v22 #26
Open
+1
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
21.7.3-bookworm
->22.13.0-bookworm
Release Notes
nodejs/node (node)
v22.13.0
: 2025-01-07, Version 22.13.0 'Jod' (LTS), @ruyadornoCompare Source
Notable Changes
Stabilize Permission Model
Upgrades the Permission Model status from Active Development to Stable.
Contributed by Rafael Gonzaga #56201
Graduate WebCryptoAPI
Ed25519
and X25519 algorithms as stableFollowing the merge of Curve25519 into the Web Cryptography API Editor's Draft the
Ed25519
andX25519
algorithm identifiers are now stable and will no longer emit an ExperimentalWarning upon use.Contributed by (Filip Skokan) #56142
Other Notable Changes
05d6227a88
] - (SEMVER-MINOR) assert: add partialDeepStrictEqual (Giovanni Bucci) #54630a933103499
] - (SEMVER-MINOR) cli: implement --trace-env and --trace-env-[js|native]-stack (Joyee Cheung) #55604ba9d5397de
] - (SEMVER-MINOR) dgram: support blocklist in udp (theanarkh) #56087f6d0c01303
] - doc: stabilize util.styleText (Rafael Gonzaga) #5626534c68827af
] - doc: move typescript support to active development (Marco Ippolito) #55536dd14b80350
] - doc: add LJHarb to collaborators (Jordan Harband) #561325263086169
] - (SEMVER-MINOR) doc: add report version and history section (Chengzhong Wu) #561308cb3c2018d
] - (SEMVER-MINOR) doc: sort --report-exclude alphabetically (Rafael Gonzaga) #5578855239a48b6
] - (SEMVER-MINOR) doc,lib,src,test: unflag sqlite module (Colin Ihrig) #558907cbe3de1d8
] - (SEMVER-MINOR) module: only emit require(esm) warning under --trace-require-module (Joyee Cheung) #561946575b76042
] - (SEMVER-MINOR) module: add module.stripTypeScriptTypes (Marco Ippolito) #55282bacfe6d5c9
] - (SEMVER-MINOR) net: support blocklist in net.connect (theanarkh) #56075b47888d390
] - (SEMVER-MINOR) net: support blocklist for net.Server (theanarkh) #56079566f0a1d25
] - (SEMVER-MINOR) net: add SocketAddress.parse (James M Snell) #56076ed7eab1421
] - (SEMVER-MINOR) net: add net.BlockList.isBlockList(value) (James M Snell) #56078ea4891856d
] - (SEMVER-MINOR) process: deprecatefeatures.{ipv6,uv}
andfeatures.tls_*
(René) #5554501eb308f26
] - (SEMVER-MINOR) report: fix typos in report keys and bump the version (Yuan-Ming Hsu) #5606897c38352d0
] - (SEMVER-MINOR) sqlite: aggregate constants in a single property (Edigleysson Silva (Edy)) #56213b4041e554a
] - (SEMVER-MINOR) sqlite: addStatementSync.prototype.iterate
method (tpoisseau) #542132e3ca1bbdd
] - (SEMVER-MINOR) src: add cli option to preserve env vars on diagnostic reports (Rafael Gonzaga) #55697bcfe9c80fc
] - (SEMVER-MINOR) util: add sourcemap support to getCallSites (Marco Ippolito) #55589Commits
e9024779c0
] - assert: make Maps be partially compared in partialDeepStrictEqual (Giovanni Bucci) #561954c13d8e587
] - assert: make partialDeepStrictEqual work with ArrayBuffers (Giovanni Bucci) #56098a4fa31a86e
] - assert: optimize partial comparison of twoSet
s (Antoine du Hamel) #5597005d6227a88
] - (SEMVER-MINOR) assert: add partialDeepStrictEqual (Giovanni Bucci) #546305e1321abd7
] - buffer: document concat zero-fill (Duncan) #55562be5ba7c648
] - build: set DESTCPU correctly for 'make binary' on loongarch64 (吴小白) #5627138cf37ee2d
] - build: fix missing fp16 dependency in d8 builds (Joyee Cheung) #56266dbb7557455
] - build: add major release action (Rafael Gonzaga) #5619927cc90f3be
] - build: fix C string encoding forPRODUCT_DIR_ABS
(Anna Henningsen) #56111376561c2b4
] - build: use variable for simdutf path (Shelley Vohr) #56196126ae15000
] - build: allow overriding clang usage (Shelley Vohr) #5601697bb8f7c76
] - build: remove defaults for create-release-proposal (Rafael Gonzaga) #56042a8fb1a06f3
] - build: set node_arch to target_cpu in GN (Shelley Vohr) #559679f48ca27f1
] - build: use variable for crypto dep path (Shelley Vohr) #55928e47ccd2287
] - build: fix GN build for sqlite (Cheng) #559128d70b99a5a
] - build: compile bundled simdutf conditionally (Jakub Jirutka) #55886826fd35242
] - build: compile bundled simdjson conditionally (Jakub Jirutka) #558861015b22085
] - build: compile bundled ada conditionally (Jakub Jirutka) #5588677e2869ca6
] - build: use glob for dependencies of out/Makefile (Richard Lau) #55789a933103499
] - (SEMVER-MINOR) cli: implement --trace-env and --trace-env-[js|native]-stack (Joyee Cheung) #5560472e8e0684e
] - crypto: graduate WebCryptoAPIEd25519
and X25519 algorithms as stable (Filip Skokan) #56142fe2b344ddb
] - crypto: ensure CryptoKey usages and algorithm are cached objects (Filip Skokan) #561089ee9f524a7
] - crypto: allow non-multiple of 8 in SubtleCrypto.deriveBits (Filip Skokan) #5529676f242d993
] - deps: update nghttp3 to 1.6.0 (Node.js GitHub Bot) #56258c7ff2ea6b5
] - deps: update simdutf to 5.6.4 (Node.js GitHub Bot) #5625504230be1ef
] - deps: update libuv to 1.49.2 (Luigi Pinca) #5622488589b85b7
] - deps: update c-ares to v1.34.4 (Node.js GitHub Bot) #562565c2e0618f3
] - deps: define V8_PRESERVE_MOST as no-op on Windows (Stefan Stojanovic) #562389f8f3c9658
] - deps: update sqlite to 3.47.2 (Node.js GitHub Bot) #5617817b6931d3b
] - deps: update ngtcp2 to 1.9.1 (Node.js GitHub Bot) #5609522b453b619
] - deps: upgrade npm to 10.9.2 (npm team) #56135d7eb41b382
] - deps: update sqlite to 3.47.1 (Node.js GitHub Bot) #56094669c722aa9
] - deps: update zlib to 1.3.0.1-motley-82a5fec (Node.js GitHub Bot) #55980f61a0454d2
] - deps: update corepack to 0.30.0 (Node.js GitHub Bot) #55977d98bf0b891
] - deps: update ngtcp2 to 1.9.0 (Node.js GitHub Bot) #55975fc362624bf
] - deps: update simdutf to 5.6.3 (Node.js GitHub Bot) #55973f61dcc4df4
] - deps: upgrade npm to 10.9.1 (npm team) #55951bfe7982491
] - deps: update zlib to 1.3.0.1-motley-7e2e4d7 (Node.js GitHub Bot) #54432d714367ef8
] - deps: update simdjson to 3.10.1 (Node.js GitHub Bot) #54678ccc9b105ec
] - deps: update simdutf to 5.6.2 (Node.js GitHub Bot) #55889ba9d5397de
] - (SEMVER-MINOR) dgram: support blocklist in udp (theanarkh) #560877ddbf94849
] - dgram: check udp buffer size to avoid fd leak (theanarkh) #56084360d68de0f
] - doc: fix color contrast issue in light mode (Rich Trott) #56272f6d0c01303
] - doc: stabilize util.styleText (Rafael Gonzaga) #562659436c3c949
] - doc: clarify util.aborted resource usage (Kunal Kumar) #55780b1cec2cef9
] - doc: add esm examples to node:repl (Alfredo González) #55432d6a84cf781
] - doc: add esm examples to node:readline (Alfredo González) #55335a11ac1c0f2
] - doc: fix 'which' to 'that' and add commas (Selveter Senitro) #562165331df7911
] - doc: fix winget config path (Alex Yang) #562337a8071b43c
] - doc: add esm examples to node:tls (Alfredo González) #562297d8c1e72d5
] - doc: add esm examples to node:perf_hooks (Alfredo González) #55257ea53c4b1ae
] - doc:sea.getRawAsset(key)
always returns an ArrayBuffer (沈鸿飞) #562067a94100a3e
] - doc: update announce documentation for releases (Rafael Gonzaga) #5620044c4e57e32
] - doc: update blog link to /vulnerability (Rafael Gonzaga) #561985e5b4b0cbd
] - doc: call out import.meta is only supported in ES modules (Anton Kastritskii) #56186a83de32d35
] - doc: add ambassador message - benefits of Node.js (Michael Dawson) #56085bb880dd21a
] - doc: fix incorrect link to style guide (Yuan-Ming Hsu) #5618139ce902e58
] - doc: fix c++ addon hello world sample (Edigleysson Silva (Edy)) #5617219c72c4acc
] - doc: update blog release-post link (Ruy Adorno) #56123b667cc4669
] - doc: fix module.md headings (Chengzhong Wu) #5613134c68827af
] - doc: move typescript support to active development (Marco Ippolito) #55536c4a97d810b
] - doc: mention-a
flag for the release script (Ruy Adorno) #56124dd14b80350
] - doc: add LJHarb to collaborators (Jordan Harband) #561322feb0781ed
] - doc: add create-release-action to process (Rafael Gonzaga) #5599371f6263942
] - doc: rename file to advocacy-ambassador-program.md (Tobias Nießen) #560468efa240500
] - doc: remove unused import from sample code (Blended Bram) #55570e64cef8bf4
] - doc: add FAQ to releases section (Rafael Gonzaga) #559924bb0f30f92
] - doc: move history entry to class description (Luigi Pinca) #559916d02bd6873
] - doc: add history entry for textEncoder.encodeInto() (Luigi Pinca) #55990e239382ed8
] - doc: improve GN build documentation a bit (Shelley Vohr) #5596878b6aef6bc
] - doc: fix deprecation codes (Filip Skokan) #56018474bf80a44
] - doc: remove confusing and outdated sentence (Luigi Pinca) #5598857381076c5
] - doc: deprecate passing invalid types infs.existsSync
(Carlos Espa) #55892e529cf6b26
] - doc: add doc for PerformanceObserver.takeRecords() (skyclouds2001) #55786a6ef0f6f6e
] - doc: add vetted courses to the ambassador benefits (Matteo Collina) #5593463526049f2
] - doc: ordernode:crypto
APIs alphabetically (Julian Gassner) #5583136080b7b61
] - doc: doc how to add message for promotion (Michael Dawson) #5584312b2ad4287
] - doc: add esm example for zlib (Leonardo Peixoto) #55946352daac296
] - doc: fix typo (Alex Yang) #561256e7e9a126d
] - doc: document approach for building wasm in deps (Michael Dawson) #559400b3ac05422
] - doc: remove RedYetiDev from triagers team (Aviv Keller) #5594720be5e2f80
] - doc: add esm examples to node:timers (Alfredo González) #558573ba9b57436
] - doc: fix relative path mention in --allow-fs (Rafael Gonzaga) #557913e6b3a9a8b
] - doc: include git node release --promote to steps (Rafael Gonzaga) #558355bdfde8dc6
] - doc: add history entry for import assertion removal (Antoine du Hamel) #55883c842146c05
] - doc: add a note on console stream behavior (Gireesh Punathil) #556165263086169
] - (SEMVER-MINOR) doc: add report version and history section (Chengzhong Wu) #561308cb3c2018d
] - (SEMVER-MINOR) doc: sort --report-exclude alphabetically (Rafael Gonzaga) #5578855239a48b6
] - (SEMVER-MINOR) doc,lib,src,test: unflag sqlite module (Colin Ihrig) #5589004d7c7a349
] - fs: make mutatingoptions
in Callbackreaddir()
not affect results (LiviaMedeiros) #5605792bcd528e7
] - fs: make mutatingoptions
in Promisesreaddir()
not affect results (LiviaMedeiros) #560573a55bd9448
] - fs: lazily load ReadFileContext (Gürgün Dayıoğlu) #559980331b3fdd3
] - fs,win: fix readdir for named pipe (Hüseyin Açacak) #5611079152b54e9
] - http: add setDefaultHeaders option to http.request (Tim Perry) #5611219782855a8
] - http: don't emit error after destroy (Robert Nagy) #554578494512c17
] - http2: remove duplicate codeblock (Vitaly Aminev) #55915d2f82223d1
] - http2: support ALPNCallback option (ZYSzys) #561872616f1247a
] - http2: fix memory leak caused by premature listener removing (ywave620) #55966598fe048f2
] - lib: remove redundant global regexps (Gürgün Dayıoğlu) #56182a3c8739530
] - lib: clean up persisted signals when they are settled (Edigleysson Silva (Edy)) #5600111144ab158
] - lib: handle Float16Array in node:v8 serdes (Bartek Iwańczuk) #5599681c94a32e4
] - lib: disable default memory leak warning for AbortSignal (Lenz Weber-Tronic) #5581668dda61420
] - lib: add validation for options in compileFunction (Taejin Kim) #56023d2007aec28
] - lib: fixfs.readdir
recursive async (Rafael Gonzaga) #560410571d5556f
] - lib: avoid excluding symlinks in recursive fs.readdir with filetypes (Juan José) #55714843943d0ce
] - meta: bump github/codeql-action from 3.27.0 to 3.27.5 (dependabot[bot]) #561031529027f03
] - meta: bump actions/checkout from 4.1.7 to 4.2.2 (dependabot[bot]) #561028e265de9f5
] - meta: bump step-security/harden-runner from 2.10.1 to 2.10.2 (dependabot[bot]) #561010fba3a3b9b
] - meta: bump actions/setup-node from 4.0.3 to 4.1.0 (dependabot[bot]) #561002e3fdfdb19
] - meta: add releasers as CODEOWNERS to proposal action (Rafael Gonzaga) #560437cbe3de1d8
] - (SEMVER-MINOR) module: only emit require(esm) warning under --trace-require-module (Joyee Cheung) #561948a5429c9b3
] - module: prevent main thread exiting before esm worker ends (Shima Ryuhei) #561836575b76042
] - (SEMVER-MINOR) module: add module.stripTypeScriptTypes (Marco Ippolito) #552820794861bc3
] - module: simplify ts under node_modules check (Marco Ippolito) #5544028a11adf14
] - module: mark evaluation rejection in require(esm) as handled (Joyee Cheung) #56122bacfe6d5c9
] - (SEMVER-MINOR) net: support blocklist in net.connect (theanarkh) #56075566f0a1d25
] - (SEMVER-MINOR) net: add SocketAddress.parse (James M Snell) #56076ed7eab1421
] - (SEMVER-MINOR) net: add net.BlockList.isBlockList(value) (James M Snell) #56078b47888d390
] - (SEMVER-MINOR) net: support blocklist for net.Server (theanarkh) #56079481770a38f
] - node-api: allow napi_delete_reference in finalizers (Chengzhong Wu) #556202beb4f1f8c
] - permission: ignore internalModuleStat on module loading (Rafael Gonzaga) #55797ea4891856d
] - (SEMVER-MINOR) process: deprecatefeatures.{ipv6,uv}
andfeatures.tls_*
(René) #55545c907b2f358
] - quic: update more QUIC implementation (James M Snell) #5598643c25e2e0d
] - quic: multiple updates to quic impl (James M Snell) #5597101eb308f26
] - (SEMVER-MINOR) report: fix typos in report keys and bump the version (Yuan-Ming Hsu) #560681cfa31fb82
] - sea: only assert snapshot main function for main threads (Joyee Cheung) #5612097c38352d0
] - (SEMVER-MINOR) sqlite: aggregate constants in a single property (Edigleysson Silva (Edy)) #562132268c1ea8b
] - sqlite: add support for custom functions (Colin Ihrig) #55985f5c6955722
] - sqlite: supportdb.loadExtension
(Alex Yang) #539009a60bea6b7
] - sqlite: deps includesqlite3ext.h
(Alex Yang) #56010b4041e554a
] - (SEMVER-MINOR) sqlite: addStatementSync.prototype.iterate
method (tpoisseau) #542132889e8da04
] - src: fix outdated js2c.cc references (Chengzhong Wu) #561335ce020b0c9
] - src: use spaceship operator in SocketAddress (James M Snell) #56059a32fa30847
] - src: add missing qualifiers to env.cc (Yagiz Nizipli) #56062974b7b61ef
] - src: use std::string_view for process emit fns (Yagiz Nizipli) #560864559fac862
] - src: remove dead code in async_wrap (Gerhard Stöbich) #56065e42e4b20be
] - src: avoid copy on getV8FastApiCallCount (Yagiz Nizipli) #56081c188660e8b
] - src: fix check fd (theanarkh) #56000d894cb76ff
] - src: safely remove the last line from dotenv (Shima Ryuhei) #559822ca9f4b65a
] - src: fix kill signal on Windows (Hüseyin Açacak) #555142e3ca1bbdd
] - (SEMVER-MINOR) src: add cli option to preserve env vars on dr (Rafael Gonzaga) #55697359fff1c4e
] - src,build: add no user defined deduction guides of CTAD check (Chengzhong Wu) #5607157bb983215
] - (SEMVER-MINOR) src,lib: stabilize permission model (Rafael Gonzaga) #56201d352b0465a
] - stream: commit pull-into descriptors after filling from queue (Mattias Buelens) #56072eef9bd1bf6
] - test: remove test-sqlite-statement-sync flaky designation (Luigi Pinca) #560518718135a5d
] - test: use --permission over --experimental-permission (Rafael Gonzaga) #562399c68d4f180
] - test: remove exludes for sea tests on PPC (Michael Dawson) #56217c5d0472968
] - test: fix test-abortsignal-drop-settled-signals flakiness (Edigleysson Silva (Edy)) #561974adf518689
] - test: move localizationd data fromtest-icu-env
to external file (Livia Medeiros) #5561802383b4267
] - test: update WPT for url to6fa3fe8
(Node.js GitHub Bot) #561360e24eebf24
] - test: removehasOpenSSL3x
utils (Antoine du Hamel) #56164381e705385
] - test: update streams wpt (Mattias Buelens) #56072ad107ca0d9
] - test: remove test-fs-utimes flaky designation (Luigi Pinca) #56052e15c5dab79
] - test: ensurecli.md
is in alphabetical order (Antoine du Hamel) #56025d0302e7d2d
] - test: update WPT for WebCryptoAPI to3e3374e
(Node.js GitHub Bot) #56093a0b1e8f400
] - test: update WPT for WebCryptoAPI to76dfa54
(Node.js GitHub Bot) #56093211f058a12
] - test: move test-worker-arraybuffer-zerofill to parallel (Luigi Pinca) #56053c52bc5d71c
] - test: update WPT for url to67880a4
(Node.js GitHub Bot) #559991a78bde8d4
] - test: make HTTP/1.0 connection test more robust (Arne Keller) #55959ff7b1445a0
] - test: convert readdir test to use test runner (Thomas Chetwin) #55750b296b5a4e4
] - test: make x509 crypto tests work with BoringSSL (Shelley Vohr) #5592797458ad74b
] - test: fix determining lower priority (Livia Medeiros) #55908bb4aa7a296
] - test,crypto: update WebCryptoAPI WPT (Filip Skokan) #55997fb98fa4967
] - test_runner: refactor Promise chain in run() (Colin Ihrig) #5595818c94961f8
] - test_runner: refactor build Promise in Suite() (Colin Ihrig) #55958bf3967fd3a
] - test_runner: simplify hook running logic (Colin Ihrig) #559638c065dc61e
] - test_runner: mark context.plan() as stable (Colin Ihrig) #558958ff082cf48
] - test_runner: mark snapshot testing as stable (Colin Ihrig) #558977ae125cef4
] - tools: fixnode:
enforcement for docs (Antoine du Hamel) #562840b489116a3
] - tools: update github_reporter to 1.7.2 (Node.js GitHub Bot) #562055306819fac
] - tools: add REPLACEME check to workflow (Mert Can Altin) #562514e3cab44cb
] - tools: usegithub.actor
instead of bot username for release proposals (Antoine du Hamel) #562323e8938463a
] - Revert "tools: disable automated libuv updates" (Luigi Pinca) #5622398ea499e36
] - tools: update gyp-next to 0.19.1 (Anna Henningsen) #561112e76cd2a8b
] - tools: fix release proposal linter to support more than 1 folk preparing (Antoine du Hamel) #562039fa0e41665
] - tools: enable linter fortools/icu/**
(Livia Medeiros) #56176d6e1efcc59
] - tools: use commit title as PR title when creating release proposal (Antoine du Hamel) #56165a88e4ce55e
] - tools: update gyp-next to 0.19.0 (Node.js GitHub Bot) #56158bd0760efbc
] - tools: bump the eslint group in /tools/eslint with 4 updates (dependabot[bot]) #56099c5b1cf4b12
] - tools: improve release proposal PR opening (Antoine du Hamel) #5616112baefb13d
] - tools: updatecreate-release-proposal
workflow (Antoine du Hamel) #56054e6e1495f1a
] - tools: fix update-undici script (Michaël Zasso) #56069ed635c90da
] - tools: allow dispatch oftools.yml
from forks (Antoine du Hamel) #560081e628d1f37
] - tools: fix nghttp3 updater script (Antoine du Hamel) #560071af3599b7e
] - tools: filter release keys to reduce interactivity (Antoine du Hamel) #559501893be4a9c
] - tools: update WPT updater (Antoine du Hamel) #56003f89bd2ba8a
] - tools: add WPT updater for specific subsystems (Mert Can Altin) #5446061901372d5
] - tools: use tokenless Codecov uploads (Michaël Zasso) #55943312bb4dff8
] - tools: lint js indoc/**/*.md
(Livia Medeiros) #559047b476f637c
] - tools: add linter for release commit proposals (Antoine du Hamel) #5592322d7017191
] - tools: fix riscv64 build failed (Lu Yahan) #52888f4f777f4d2
] - tools: bump cross-spawn from 7.0.3 to 7.0.5 in /tools/eslint (dependabot[bot]) #55894a648e4c44a
] - util: harden more built-in classes against prototype pollution (Antoine du Hamel) #562254a1b51b5a9
] - util: fix Latin1 decoding to return string output (Mert Can Altin) #562229e98e86604
] - util: do not rely on mutableObject
andFunction
'constructor
prop (Antoine du Hamel) #56188374eb415fd
] - util: add fast path for Latin1 decoding (Mert Can Altin) #55275bcfe9c80fc
] - (SEMVER-MINOR) util: add sourcemap support to getCallSites (Marco Ippolito) #555892aa77c8a8f
] - v8,tools: expose experimental wasm revectorize feature (Yolanda-Chen) #54896bfd11d7661
] - worker: fix crash when a worker joins after exit (Stephen Belanger) #56191v22.12.0
Compare Source
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
f0b441230a
] - (SEMVER-MINOR) crypto: addKeyObject.prototype.toCryptoKey
(Filip Skokan) #55262349d2ed07b
] - (SEMVER-MINOR) crypto: add Date fields forvalidTo
andvalidFrom
(Andrew Moon) #54159bebc95ed58
] - doc: add abmusse to collaborators (Abdirahim Musse) #55086914db60159
] - (SEMVER-MINOR) http2: exposenghttp2_option_set_stream_reset_rate_limit
as an option (Maël Nison) #54875f7c3b03759
] - (SEMVER-MINOR) lib: propagate aborted state to dependent signals before firing events (jazelly) #5482632261fc98a
] - (SEMVER-MINOR) module: support loading entrypoint as url (RedYetiDev) #5493306957ff355
] - (SEMVER-MINOR) module: implementflushCompileCache()
(Joyee Cheung) #549712dcf70c347
] - (SEMVER-MINOR) module: throw when invalid argument is passed toenableCompileCache()
(Joyee Cheung) #54971f9b19d7c44
] - (SEMVER-MINOR) module: write compile cache to temporary file and then rename it (Joyee Cheung) #54971e95163b170
] - (SEMVER-MINOR) process: addprocess.features.require_module
(Joyee Cheung) #552414050f68e5d
] - (SEMVER-MINOR) process: addprocess.features.typescript
(Aviv Keller) #5429586f7cb802d
] - (SEMVER-MINOR) test_runner: support custom arguments inrun()
(Aviv Keller) #55126b62f2f8259
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 was generated by Mend Renovate. View the repository job log.