Skip Navigation

Node v22.6.0 (Current)

Rafael Gonzaga

2024-08-06, Version 22.6.0 (Current), @RafaelGSS

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:

  • Supports only inline type annotations, not features like enums or namespaces.
  • Requires explicit file extensions in import and require statements.
  • Enforces the use of the type keyword for type imports to avoid runtime errors.
  • Disabled for TypeScript in node_modules by default.

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:

$ node --inspect-wait --experimental-network-inspection index.js

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.

Thanks Kohei Ueno for working on this.

Other Notable Changes

  • [15a94e67b1] - lib,src: drop --experimental-network-imports (Rafael Gonzaga) #53822
  • [68e444d2d8] - (SEMVER-MINOR) http: add diagnostics channel http.client.request.error (Kohei Ueno) #54054
  • [2d982d3dee] - (SEMVER-MINOR) deps: V8: backport 7857eb34db42 (Stephen Belanger) #53997
  • [15816bd0dd] - (SEMVER-MINOR) stream: expose DuplexPair API (Austin Wright) #34111
  • [893c864542] - (SEMVER-MINOR) test_runner: fix support watch with run(), add globPatterns option (Matteo Collina) #53866
  • [048d421ad1] - meta: add jake to collaborators (jakecastelli) #54004
  • [6ad6e01bf3] - (SEMVER-MINOR) test_runner: refactor snapshots to get file from context (Colin Ihrig) #53853
  • [698e44f8e7] - (SEMVER-MINOR) test_runner: add context.filePath (Colin Ihrig) #53853

Commits

  • [063f46dc2a] - assert: use isError instead of instanceof in innerOk (Pietro Marchini) #53980
  • [10bea42f81] - build: update gcovr to 7.2 and codecov config (Benjamin E. Coe) #54019
  • [7c417c6cf4] - build: avoid compiling with VS v17.10 (Hüseyin Açacak) #53863
  • [ee97c045b4] - build: ensure v8_pointer_compression_sandbox is enabled on 64bit (Shelley Vohr) #53884
  • [bfbed0afd5] - build: fix conflict gyp configs (Chengzhong Wu) #53605
  • [0f1fe63e32] - build: trigger coverage ci when updating codecov (Yagiz Nizipli) #53929
  • [ad62b945f0] - build: update codecov coverage build count (Yagiz Nizipli) #53929
  • [3c40868fd3] - build: disable test-asan workflow (Michaël Zasso) #53844
  • [2a62d6ca57] - build, tools: drop leading / from r2dir (Richard Lau) #53951
  • [9c7b009f47] - build,tools: simplify upload of shasum signatures (Michaël Zasso) #53892
  • [057bd44f9f] - child_process: fix incomplete prototype pollution hardening (Liran Tal) #53781
  • [66f7c595c7] - cli: document --inspect port 0 behavior (Aviv Keller) #53782
  • [fad3e74b47] - console: fix issues with frozen intrinsics (Vinicius Lourenço) #54070
  • [e685ecd7ae] - deps: update corepack to 0.29.3 (Node.js GitHub Bot) #54072
  • [e5f7250e6d] - deps: update amaro to 0.0.6 (Node.js GitHub Bot) #54199
  • [2c1e9082e8] - deps: update amaro to 0.0.5 (Node.js GitHub Bot) #54199
  • [2d982d3dee] - (SEMVER-MINOR) deps: V8: backport 7857eb34db42 (Stephen Belanger) #53997
  • [1061898462] - deps: update c-ares to v1.32.3 (Node.js GitHub Bot) #54020
  • [f4a7ac5e18] - deps: V8: cherry-pick 35888fee7bba (Joyee Cheung) #53728
  • [1176310226] - deps: add gn build files for ncrypto (Cheng) #53940
  • [7a1d5a4f84] - deps: update c-ares to v1.32.2 (Node.js GitHub Bot) #53865
  • [66f6a2aec9] - deps: V8: cherry-pick 9812cb486e2b (Michaël Zasso) #53966
  • [8e66a18ef0] - deps: start working on ncrypto dep (James M Snell) #53803
  • [c114082b12] - deps: fix include_dirs of nbytes (Cheng) #53862
  • [b7315281be] - doc: move numCPUs require to top of file in cluster CJS example (Alfredo González) #53932
  • [8e7c30c2a4] - doc: update security-release process to automated one (Rafael Gonzaga) #53877
  • [52a4206be2] - doc: fix typo in technical-priorities.md (YoonSoo_Shin) #54094
  • [30e18a04a3] - doc: fix typo in diagnostic tooling support tiers document (Taejin Kim) #54058
  • [58aebfd31e] - doc: move GeoffreyBooth to TSC regular member (Geoffrey Booth) #54047
  • [c1634c7213] - doc: correct typescript stdin support (Marco Ippolito) #54036
  • [64812d5c22] - doc: fix typo in recognizing-contributors (Marco Ippolito) #53990
  • [6b35994b6f] - doc: fix documentation for --run (Aviv Keller) #53976
  • [04d203a233] - doc: update boxstarter README (Aviv Keller) #53785
  • [86fa46db1c] - doc: add info about prefix-only modules to module.builtinModules (Grigory) #53954
  • [defdc3c568] - doc: remove scroll-behavior: smooth; (Cloyd Lau) #53942
  • [e907236dd9] - doc: move --test-coverage-{ex,in}clude to proper location (Colin Ihrig) #53926
  • [8bf9960b98] - doc: add --experimental-sqlite note (Aviv Keller) #53907
  • [d7615004d8] - doc: update api_assets README for new files (Aviv Keller) #53676
  • [63cf715aa0] - doc: add MattiasBuelens to collaborators (Mattias Buelens) #53895
  • [5b8dd78112] - doc: fix release date for 22.5.0 (Antoine du Hamel) #53889
  • [dd2c0f349a] - doc: fix casing of GitHub handle for two collaborators (Antoine du Hamel) #53857
  • [b47c2308e1] - doc: update release-post nodejs.org script (Rafael Gonzaga) #53762
  • [88539527d5] - doc, test: tracing channel hasSubscribers getter (Thomas Hunter II) #52908
  • [44a08f75b0] - doc,tools: enforce use of node: prefix (Antoine du Hamel) #53950
  • [87bab76df2] - doc,tty: add documentation for ReadStream and WriteStream (jakecastelli) #53567
  • [dcca9ba560] - esm: refactor get_format (Antoine du Hamel) #53872
  • [5e03c17aae] - fs: optimize fs.cpSync js calls (Yagiz Nizipli) #53614
  • [e0054ee0a7] - fs: ensure consistency for mkdtemp in both fs and fs/promises (YieldRay) #53776
  • [8086337ea9] - fs: remove unnecessary option argument validation (Jonas) #53861
  • [b377b93a3f] - fs: correctly pass dirent to exclude withFileTypes (RedYetiDev) #53823
  • [68e444d2d8] - (SEMVER-MINOR) http: add diagnostics channel http.client.request.error (Kohei Ueno) #54054
  • [de1fbc292f] - (SEMVER-MINOR) inspector: add initial support for network inspection (Kohei Ueno) #53593
  • [744df0be24] - lib: support dynamic trace events on debugWithTimer (Vinicius Lourenço) #53913
  • [546dab29c1] - lib: optimize copyError with ObjectAssign in primordials (HEESEUNG) #53999
  • [494df9835a] - lib: improve cluster/primary code (Ehsan Khakifirooz) #53756
  • [03f353293b] - lib: improve error message when index not found on cjs (Vinicius Lourenço) #53859
  • [d8375d6236] - lib: decorate async stack trace in source maps (Chengzhong Wu) #53860
  • [15a94e67b1] - lib,src: drop --experimental-network-imports (Rafael Gonzaga) #53822
  • [a6eedc401d] - meta: add sqlite to js subsystems (Alex Yang) #53911
  • [21098856de] - meta: move tsc member to emeritus (Michael Dawson) #54029
  • [048d421ad1] - meta: add jake to collaborators (jakecastelli) #54004
  • [20a8c96c41] - meta: remove license for hljs (Aviv Keller) #53970
  • [2fd4ac4859] - meta: make more bug-report information required (Aviv Keller) #53718
  • [b312ec0b0c] - meta: reword linter messages (Aviv Keller) #53949
  • [d2526126a9] - meta: store actions secrets in environment (Aviv Keller) #53930
  • [1688f00dce] - meta: move anonrig to tsc voting members (Yagiz Nizipli) #53888
  • [c20e8418de] - module: fix strip-types interaction with detect-module (Marco Ippolito) #54164
  • [ab1f0b415f] - module: fix extensionless typescript in cjs loader (Marco Ippolito) #54062
  • [92439fc160] - (SEMVER-MINOR) module: add --experimental-strip-types (Marco Ippolito) #53725
  • [f755d31bec] - node-api: add property keys benchmark (Chengzhong Wu) #54012
  • [7382eefae5] - node-api: rename nogc to basic (Gabriel Schulhof) #53830
  • [2c4470625b] - process: unify experimental warning messages (Aviv Keller) #53704
  • [98a7ad2e0d] - src: expose LookupAndCompile with parameters (Shelley Vohr) #53886
  • [dd3c66be0a] - src: simplify AESCipherTraits::AdditionalConfig (Tobias Nießen) #53890
  • [ee82f224ff] - src: remove redundant RsaPointer (use RSAPointer) (James M Snell) #54003
  • [2d77bd2929] - src: fix -Wshadow warning (Shelley Vohr) #53885
  • [bd4a9ffe8c] - src: start using ncrypto for CSPRNG calls (James M Snell) #53984
  • [3fdcf7a47d] - src: return undefined if no rows are returned in SQLite (Deokjin Kim) #53981
  • [ca6854443d] - src: fix slice of slice of file-backed Blob (Josh Lee) #53972
  • [c457f9ed5a] - src: cache invariant code motion (Rafael Gonzaga) #53879
  • [fd0da6c2cf] - src: avoid strcmp in ImportJWKAsymmetricKey (Tobias Nießen) #53813
  • [fbf74bcf99] - src: switch from ToLocalChecked to ToLocal in node_webstorage (James M Snell) #53959
  • [04bb6778e5] - src: move ToNamespacedPath call of webstorage (Yagiz Nizipli) #53875
  • [9ffaf763e9] - src: use Maybe<void> in SecureContext (Tobias Nießen) #53883
  • [a94c3ae06f] - src: replace ToLocalChecked uses with ToLocal in node-file (James M Snell) #53869
  • [55461be05f] - src: refactor webstorage implementation (Yagiz Nizipli) #53876
  • [c53cf449a6] - src: fix env-file flag to ignore spaces before quotes (Mohit Malhotra) #53786
  • [bac3a485f6] - src: fix potential segmentation fault in SQLite (Tobias Nießen) #53850
  • [df5083e5f9] - src,lib: expose getCategoryEnabledBuffer to use on node.http (Vinicius Lourenço) #53602
  • [8664b9ad60] - src,test: disallow unsafe integer coercion in SQLite (Tobias Nießen) #53851
  • [15816bd0dd] - (SEMVER-MINOR) stream: expose DuplexPair API (Austin Wright) #34111
  • [718f6bc78c] - test: do not swallow uncaughtException errors in exit code tests (Meghan Denny) #54039
  • [c6656c9251] - test: move shared module to test/common (Rich Trott) #54042
  • [e471e32d46] - test: skip sea tests with more accurate available disk space estimation (Chengzhong Wu) #53996
  • [61971ec929] - test: remove unnecessary console log (KAYYY) #53812
  • [1344bd2d6f] - test: add comments and rename test for timer robustness (Rich Trott) #54008
  • [da3573409c] - test: add test for one arg timers to increase coverage (Carlos Espa) #54007
  • [fc67abd97e] - test: mark 'test/parallel/test-sqlite.js' as flaky (Colin Ihrig) #54031
  • [aa0ac3b57c] - test: mark test-pipe-file-to-http as flaky (jakecastelli) #53751
  • [52bc8ec360] - test: compare paths on Windows without considering case (Early Riser) #53993
  • [7e8a609579] - test: skip sea tests in large debug builds (Chengzhong Wu) #53918
  • [30a94ca0c4] - test: skip --title check on IBM i (Abdirahim Musse) #53952
  • [5cea7ed706] - test: reduce flakiness of test-assert-esm-cjs-message-verify (Antoine du Hamel) #53967
  • [58cb0dd8a6] - test: use PYTHON executable from env in assertSnapshot (Antoine du Hamel) #53938
  • [c247582591] - test: deflake test-blob-file-backed (Luigi Pinca) #53920
  • [3999021653] - test_runner: switched to internal readline interface (Emil Tayeb) #54000
  • [3fb97a90ee] - test_runner: remove redundant bootstrap boolean (Colin Ihrig) #54013
  • [edd80e2bdc] - test_runner: do not throw on mocked clearTimeout() (Aksinya Bykova) #54005
  • [893c864542] - (SEMVER-MINOR) test_runner: fix support watch with run(), add globPatterns option (Matteo Collina) #53866
  • [4887213f2e] - test_runner: added colors to dot reporter (Giovanni) #53450
  • [c4848c53e6] - test_runner: cleanup global event listeners after run (Eddie Abbondanzio) #53878
  • [876e7b3226] - test_runner: refactor coverage to pass in config options (Colin Ihrig) #53931
  • [f45edb4b5e] - test_runner: refactor and simplify internals (Colin Ihrig) #53921
  • [6ad6e01bf3] - (SEMVER-MINOR) test_runner: refactor snapshots to get file from context (Colin Ihrig) #53853
  • [698e44f8e7] - (SEMVER-MINOR) test_runner: add context.filePath (Colin Ihrig) #53853
  • [97da7ca11b] - test_runner: consolidate option parsing (Colin Ihrig) #53849
  • [43afcbf9dd] - tools: fix SLACK_TITLE in invalid commit workflow (Antoine du Hamel) #53912
  • [eed0963391] - typings: apply lint (1ilsang) #54065
  • [e8ea49b256] - typings: fix typo on quic onSessionDatagram (1ilsang) #54064

Windows 32-bit Installer: https://nodejs.org/dist/v22.6.0/node-v22.6.0-x86.msi
Windows 64-bit Installer: https://nodejs.org/dist/v22.6.0/node-v22.6.0-x64.msi
Windows ARM 64-bit Installer: https://nodejs.org/dist/v22.6.0/node-v22.6.0-arm64.msi
Windows 32-bit Binary: https://nodejs.org/dist/v22.6.0/win-x86/node.exe
Windows 64-bit Binary: https://nodejs.org/dist/v22.6.0/win-x64/node.exe
Windows ARM 64-bit Binary: https://nodejs.org/dist/v22.6.0/win-arm64/node.exe
macOS 64-bit Installer: https://nodejs.org/dist/v22.6.0/node-v22.6.0.pkg
macOS Apple Silicon 64-bit Binary: https://nodejs.org/dist/v22.6.0/node-v22.6.0-darwin-arm64.tar.gz
macOS Intel 64-bit Binary: https://nodejs.org/dist/v22.6.0/node-v22.6.0-darwin-x64.tar.gz
Linux 64-bit Binary: https://nodejs.org/dist/v22.6.0/node-v22.6.0-linux-x64.tar.xz
Linux PPC LE 64-bit Binary: https://nodejs.org/dist/v22.6.0/node-v22.6.0-linux-ppc64le.tar.xz
Linux s390x 64-bit Binary: https://nodejs.org/dist/v22.6.0/node-v22.6.0-linux-s390x.tar.xz
AIX 64-bit Binary: https://nodejs.org/dist/v22.6.0/node-v22.6.0-aix-ppc64.tar.gz
ARMv7 32-bit Binary: https://nodejs.org/dist/v22.6.0/node-v22.6.0-linux-armv7l.tar.xz
ARMv8 64-bit Binary: https://nodejs.org/dist/v22.6.0/node-v22.6.0-linux-arm64.tar.xz
Source Code: https://nodejs.org/dist/v22.6.0/node-v22.6.0.tar.gz
Other release files: https://nodejs.org/dist/v22.6.0/
Documentation: https://nodejs.org/docs/v22.6.0/api/

SHASUMS

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

44b711d9e66224e7dc684c0de1d92bcac8fedbb64cb0b18768fd483967d5ea7c  node-v22.6.0-aix-ppc64.tar.gz
ffe2bb889a6b49d0d23c1357723d482c8848bb530fcbe967f4b3c1105994b7a7  node-v22.6.0-arm64.msi
9ea60766807cd3c3a3ad6ad419f98918d634a60fe8dea5b9c07507ed0f176d4c  node-v22.6.0-darwin-arm64.tar.gz
b7cd7a999705db5c1fa90496000f3fe5be58abcdb3d704003d64d7565ad53b25  node-v22.6.0-darwin-arm64.tar.xz
8766c5968ca22d20fc6237c54c7c5d12ef12e15940d6119a79144ccb163ea737  node-v22.6.0-darwin-x64.tar.gz
0bc3362c63cf316be9e85f2fddf9624e194d73b9d43369b883739a78c2a0cb75  node-v22.6.0-darwin-x64.tar.xz
43de81f4034a9e84950e8c13dc7404717539fea653e3945a4ecd4b55ff5128bc  node-v22.6.0-headers.tar.gz
df83842c4ffd3871b7510ec23ea813b1546e0cf59bc83ba3ae88d527ecf035fc  node-v22.6.0-headers.tar.xz
c6c7ee62de3637401c15df9a022afaa248d236d59ceca8c188944cf97d0be372  node-v22.6.0-linux-arm64.tar.gz
0053ee0426c4daaa65c44f2cef87be45135001c3145cfb840aa1d0e6f2619610  node-v22.6.0-linux-arm64.tar.xz
934990b8f2c66853ccefb6a0aa7e7534d9fcc3d5b79cb8034e4fd3120b5c2ae6  node-v22.6.0-linux-armv7l.tar.gz
36e349bec393c37f8ab16667e94ef8356db18d97f76e2a88b99d641a0c1c7144  node-v22.6.0-linux-armv7l.tar.xz
fd462a633976c680dc37d822c0d820166ca8e0c2aa0257acbf6b04ffcba47a01  node-v22.6.0-linux-ppc64le.tar.gz
6d35a07f3623ca6c0787ce849485596cf5524b723895af6b286ccd5fb4622ae4  node-v22.6.0-linux-ppc64le.tar.xz
b623fdd2e04ec0a38c5676dc24f9d8e556df4407649f71fef3b70a9be15e340a  node-v22.6.0-linux-s390x.tar.gz
323f2d94506e83dd9223d3f2157f83aa90ee28722f8bc7ce26967f8af1adffd5  node-v22.6.0-linux-s390x.tar.xz
f2f4ccbcbc0a443e5fadebd1149a22f96087ec09cef52ff343a15ee835206d96  node-v22.6.0-linux-x64.tar.gz
acbbe539edc33209bb3e1b25f7545b5ca5d70e6256ed8318e1ec1e41e7b35703  node-v22.6.0-linux-x64.tar.xz
2c71aa9eaffb1e7c567fa4451fe8a09691518ce5745a0cce87ddc24dc81b1751  node-v22.6.0.pkg
af4a8747651385515163db5da0d2e217da15cf7c832672b234128ed5118f086d  node-v22.6.0.tar.gz
37259d618d5565ca55acc2585045c7e1c5b9965a3d4eb44c0a237fdae84b9d44  node-v22.6.0.tar.xz
c17433d0efdd6ca8e14af168b6301a992d2bfeeab83c1fb11efa0c8e7f275d91  node-v22.6.0-win-arm64.7z
86d148c83f85d7dc23b85da6d8152a74ad1e77cab987df839d7b29d33d653ff2  node-v22.6.0-win-arm64.zip
3d280cd238e4010b862f5668ea84741d17e014c834ba2e12616a0c3effdda2eb  node-v22.6.0-win-x64.7z
1fdb0b8e59c98157ba927d51ef7eb050f9459beddc64ebc5a8897b90fd1f46f6  node-v22.6.0-win-x64.zip
d6da737a1029c7ca9bc507727b841bf37dde104e5bce6e9e9d3fdf1c256abf3e  node-v22.6.0-win-x86.7z
62ed8a8ab8cbba4d9a54a070047e025cc64a084ee8abd8557a67e655837ef83b  node-v22.6.0-win-x86.zip
63ad62a983dac5e1648f84093a9c7175c736b2186bca6c7be7d515d4a2fad133  node-v22.6.0-x64.msi
4d34a59794bec64ab4f5c012656b877bb0d14634b47e86ba3ccc908e934df1f8  node-v22.6.0-x86.msi
9a52e1de0c7b3cbc703f70bde3704444c9e1edd58303cf4322a8811212e5f500  win-arm64/node.exe
30e63a6726cda6539eeb37c311adf915bccd5c1462723b97a6c07ac91e8ae728  win-arm64/node.lib
13b325deec12ebe20166bfd5809426027b12b1a5791ea05594b0043378ce403a  win-arm64/node_pdb.7z
ceeac02e9ab0d77bf1647c1c51da609539253a1ee2ea30c7c9897146dbf887e1  win-arm64/node_pdb.zip
59ceb9e78a1db169b4e05da49a4c7268c31ac994db7a4100cab76bb2897c82d5  win-x64/node.exe
c4d08d45267da3625a30730bf5c8e41518f25d9809179feb267f1b393f5c5f05  win-x64/node.lib
d102fe1ff9269e19ca0aeeea7a91557c3fcaed747d46f2a71ad487b418cf2cd6  win-x64/node_pdb.7z
c2a89466ed73c2466709d52f25f9216b7d585a01382920f0108458b6b00c1c5d  win-x64/node_pdb.zip
671272281949e32ce8cf38eb7291cf5e664d608a8c200a21658eb6e130183e6f  win-x86/node.exe
fc3bf3c1e561da1e1c152be9aa5ed1bce8d263a5124841a4ba41ebc37c727f3e  win-x86/node.lib
f6747bdb45fade9d9385e65e9dffcd959bc891c5d98754f997fe347ee0c34ac4  win-x86/node_pdb.7z
53d3bf976fbfb1cea1635dd8975f5d9b34342735d5e03d9850ddfca065b8ce33  win-x86/node_pdb.zip
-----BEGIN PGP SIGNATURE-----

iQGzBAEBCAAdFiEEiQwI24V5Fi/uDfnbi+q0389VXvQFAmayWBYACgkQi+q0389V
XvQfbAv/UwbbW/cBnjm7cxjtF5Wtkf1mj3vnB0UMUhrIRLG9uIUNtTICFfK0+xoA
AP3O5KVunG73/6yk6TSq7hoeUzcVYyM1mwkl8S68/MwkWAVAKXFE3zjiTN9rHEDB
m/7xZUc5j2I/rR3MRY1cLLW8Hf/LRvuIEQ8Z9yL/91LG/m357MjsUK1Dx/lPhhiS
jkdurgzE5W+fqm0kW8/J9HuY29bAyEWxM5W67mLNeeDp76LsEpceoMQZ54WzVOmg
6WaLV4KOfe6moThE5Qw6NqX7SiUhhfgiOoEZWo0ilu8jeVPlMVeAZ4byMBHY/gld
dahLEDbgWu5UIpiifoRHbjm3s9LsToxhQEkBAXCPRDraDzkleQSTr+spcjKDW2CR
aPEXlZKzdNQQQpUH++eOD7RzGmg2S7L/qvafYyr5Laq3qLMMsqfP46EGJoL6Ge9z
SUjLvuszG85zannizqbtOzwS6v8zDEfcjiFMn19xelrTeKuPfoAF578z2VS+8Y5Z
Acyx0lcb
=8r7j
-----END PGP SIGNATURE-----