From 3c0abb55f57306537de7dda4c4008fd3212b7ff1 Mon Sep 17 00:00:00 2001 From: marco-ippolito Date: Wed, 17 Apr 2024 18:00:22 +0200 Subject: [PATCH 01/11] announce: Node.js 22 release announcement --- .../announcements/v22-release-announce.md | 96 +++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100644 pages/en/blog/announcements/v22-release-announce.md diff --git a/pages/en/blog/announcements/v22-release-announce.md b/pages/en/blog/announcements/v22-release-announce.md new file mode 100644 index 000000000000..1355c3ab9c1e --- /dev/null +++ b/pages/en/blog/announcements/v22-release-announce.md @@ -0,0 +1,96 @@ +--- +date: '2024-04-17T15:45:00.000Z' +category: announcements +title: 'Node.js 22 is now available!' +layout: blog-post +author: The Node.js Project +--- + +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. + +The project continues to make progress across a number of areas, with many new features and fixes flowing into existing LTS releases. +For that reason, the changes outlined in the [changelog][CHANGELOG] for Node.js 22 only represent a small subset of the features and +work since the last major release. This blog post will add some additional context on the larger body of work in relation to those changes. + +You can read more about our release policy at . + +To download Node.js 22.0.0, visit: [https://nodejs.org/download/current/](/download/current/). You can find the release post at [https://nodejs.org/blog/release/v22.0.0](/blog/release/v22.0.0), +which contains the full list of commits included in this release. + +### Notable Changes + +#### glob and globSync + +This release introduces `glob` and `globSync` functions for pattern matching. +Developers can now utilize these functions for matching file paths based on specified patterns. + +Contributed by Moshe Atlow [#51912](https://github.com/nodejs/node/pull/51912) + +#### Maglev + +V8's Maglev Compiler is now enabled by default on supported architectures (). +Maglev improves CPU performance for short-lived CLI programs. +Contributed by Keyhan Vakil in [#51360](https://github.com/nodejs/node/pull/51360) + +#### Support require()ing synchronous ESM graphs + +This release adds `require()` support for synchronous ESM graphs under +the flag `--experimental-require-module`. + +If `--experimental-require-module` is enabled, and the ECMAScript +module being loaded by `require()` meets the following requirements: + +- Explicitly marked as an ES module with a "type": "module" field in the closest package.json or a .mjs extension. +- Fully synchronous (contains no top-level await). + +`require()` will load the requested module as an ES Module, and return +the module name space object. In this case it is similar to dynamic +`import()` but is run synchronously and returns the name space object +directly. + +Contributed by Joyee Cheung in [#51977](https://github.com/nodejs/node/pull/51977) + +#### Running package.json scripts + +Node.js 22 includes a new experimental feature for the execution of scripts from the `package.json` with the cli flag `node --run `. +It also supports `node run test` which executes the test command inside `package.json` scripts. +Contributed by Yagiz Nizipli [#52190](https://github.com/nodejs/node/pull/52190) + +#### Stream default High Water Mark + +Increased the default High Water Mark for streams from 16KiB to 64KiB. +This provides a performance boost across the board at the cost of slightly higher memory usage. +Users in memory sensitive environments are encouraged to explicitly set `setDefaultHighWaterMark`. +Contributed by Robert Nagy in [#52037](https://github.com/nodejs/node/pull/52037) + +#### Watch Mode (node --watch) + +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 [#52074](https://github.com/nodejs/node/pull/52074) + +#### Websocket + +The browser-compatible implementation of WebSocket, previously behind the flag `--experimental-websocket`, will be enabled by default. +This provides a WebSocket client to Node.js without external dependencies. + +Contributed by the Undici team and Aras Abbasi in [#51594](https://github.com/nodejs/node/pull/51594) + +### Improve performance of AbortSignal creation + +This release enhances the efficiency of creating `AbortSignal` instances, leading to significantly improved performance in `fetch` and the test runner. + +Contributed by Raz Luvaton in [#52505](https://github.com/nodejs/node/pull/52505) + +## Call to action + +Try out the new Node.js 22 release! We’re always happy to hear your feedback. Testing your applications and modules with Node.js 22 helps to ensure the future compatibility of your project with the latest Node.js changes and features. + +Also of note is that Node.js 18 will go End-of-Life in April 2025, so we advise you to start planning to upgrade to Node.js 20 (LTS) or Node.js 22 (soon to be LTS). + +[CHANGELOG]: https://github.com/nodejs/node/releases/tag/v22.0.0 From cd95e01da4def7ec46672e27b9246e4f46c9a5f3 Mon Sep 17 00:00:00 2001 From: Marco Ippolito Date: Thu, 18 Apr 2024 18:11:56 +0200 Subject: [PATCH 02/11] Update pages/en/blog/announcements/v22-release-announce.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Tobias Nießen Signed-off-by: Marco Ippolito --- pages/en/blog/announcements/v22-release-announce.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/en/blog/announcements/v22-release-announce.md b/pages/en/blog/announcements/v22-release-announce.md index 1355c3ab9c1e..c9cfdeacfc0e 100644 --- a/pages/en/blog/announcements/v22-release-announce.md +++ b/pages/en/blog/announcements/v22-release-announce.md @@ -7,7 +7,7 @@ author: The Node.js Project --- 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! +Highlights include require()ing ESM graphs, a 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. From fa4b396c1af00d7626032a428b0176a03a4d456b Mon Sep 17 00:00:00 2001 From: Marco Ippolito Date: Thu, 18 Apr 2024 18:12:06 +0200 Subject: [PATCH 03/11] Update pages/en/blog/announcements/v22-release-announce.md Co-authored-by: Joyee Cheung Signed-off-by: Marco Ippolito --- pages/en/blog/announcements/v22-release-announce.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pages/en/blog/announcements/v22-release-announce.md b/pages/en/blog/announcements/v22-release-announce.md index c9cfdeacfc0e..ac7e9072c991 100644 --- a/pages/en/blog/announcements/v22-release-announce.md +++ b/pages/en/blog/announcements/v22-release-announce.md @@ -51,7 +51,8 @@ module being loaded by `require()` meets the following requirements: the module name space object. In this case it is similar to dynamic `import()` but is run synchronously and returns the name space object directly. - +We intend to eventually enable `require(esm)` by default in the future, without +the flag. Contributed by Joyee Cheung in [#51977](https://github.com/nodejs/node/pull/51977) #### Running package.json scripts From 63021917751a98a1e3a166e1f6ce4a89c96e5ddf Mon Sep 17 00:00:00 2001 From: marco-ippolito Date: Thu, 18 Apr 2024 18:14:27 +0200 Subject: [PATCH 04/11] fix: remove CPU perf --- pages/en/blog/announcements/v22-release-announce.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pages/en/blog/announcements/v22-release-announce.md b/pages/en/blog/announcements/v22-release-announce.md index ac7e9072c991..e65447469b2c 100644 --- a/pages/en/blog/announcements/v22-release-announce.md +++ b/pages/en/blog/announcements/v22-release-announce.md @@ -25,7 +25,7 @@ which contains the full list of commits included in this release. #### glob and globSync -This release introduces `glob` and `globSync` functions for pattern matching. +This release adds to the `node:fs`module the functions `glob` and `globSync` for pattern matching. Developers can now utilize these functions for matching file paths based on specified patterns. Contributed by Moshe Atlow [#51912](https://github.com/nodejs/node/pull/51912) @@ -33,7 +33,7 @@ Contributed by Moshe Atlow [#51912](https://github.com/nodejs/node/pull/51912) #### Maglev V8's Maglev Compiler is now enabled by default on supported architectures (). -Maglev improves CPU performance for short-lived CLI programs. +Maglev improves performance for short-lived CLI programs. Contributed by Keyhan Vakil in [#51360](https://github.com/nodejs/node/pull/51360) #### Support require()ing synchronous ESM graphs @@ -53,6 +53,7 @@ the module name space object. In this case it is similar to dynamic directly. We intend to eventually enable `require(esm)` by default in the future, without the flag. + Contributed by Joyee Cheung in [#51977](https://github.com/nodejs/node/pull/51977) #### Running package.json scripts From a544e4d230de584686578a1edab6da70b57e4ce4 Mon Sep 17 00:00:00 2001 From: Marco Ippolito Date: Fri, 19 Apr 2024 10:24:22 +0200 Subject: [PATCH 05/11] Update pages/en/blog/announcements/v22-release-announce.md Co-authored-by: Geoffrey Booth Signed-off-by: Marco Ippolito --- pages/en/blog/announcements/v22-release-announce.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/en/blog/announcements/v22-release-announce.md b/pages/en/blog/announcements/v22-release-announce.md index e65447469b2c..f4db17188292 100644 --- a/pages/en/blog/announcements/v22-release-announce.md +++ b/pages/en/blog/announcements/v22-release-announce.md @@ -7,7 +7,7 @@ author: The Node.js Project --- We're excited to announce the release of Node.js 22! -Highlights include require()ing ESM graphs, a WebSocket client, updates of the V8 JavaScript engine, and more! +Highlights include require()ing ES modules, a 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. From af90bd2ed6462e402fa998c83ea8e0f1dd2e93f6 Mon Sep 17 00:00:00 2001 From: Marco Ippolito Date: Fri, 19 Apr 2024 10:24:27 +0200 Subject: [PATCH 06/11] Update pages/en/blog/announcements/v22-release-announce.md Co-authored-by: Geoffrey Booth Signed-off-by: Marco Ippolito --- pages/en/blog/announcements/v22-release-announce.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/en/blog/announcements/v22-release-announce.md b/pages/en/blog/announcements/v22-release-announce.md index f4db17188292..de6d8b781b35 100644 --- a/pages/en/blog/announcements/v22-release-announce.md +++ b/pages/en/blog/announcements/v22-release-announce.md @@ -59,7 +59,7 @@ Contributed by Joyee Cheung in [#51977](https://github.com/nodejs/node/pull/5197 #### Running package.json scripts Node.js 22 includes a new experimental feature for the execution of scripts from the `package.json` with the cli flag `node --run `. -It also supports `node run test` which executes the test command inside `package.json` scripts. +It also supports `node --run test` which executes the test command inside `package.json` scripts. Contributed by Yagiz Nizipli [#52190](https://github.com/nodejs/node/pull/52190) #### Stream default High Water Mark From 5c461d7d3f42a082f4b81a8143952484288edc2d Mon Sep 17 00:00:00 2001 From: Marco Ippolito Date: Fri, 19 Apr 2024 10:24:32 +0200 Subject: [PATCH 07/11] Update pages/en/blog/announcements/v22-release-announce.md Co-authored-by: Geoffrey Booth Signed-off-by: Marco Ippolito --- .../announcements/v22-release-announce.md | 20 +++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/pages/en/blog/announcements/v22-release-announce.md b/pages/en/blog/announcements/v22-release-announce.md index de6d8b781b35..34b97048bd10 100644 --- a/pages/en/blog/announcements/v22-release-announce.md +++ b/pages/en/blog/announcements/v22-release-announce.md @@ -9,7 +9,7 @@ author: The Node.js Project We're excited to announce the release of Node.js 22! Highlights include require()ing ES modules, a 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. +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. The project continues to make progress across a number of areas, with many new features and fixes flowing into existing LTS releases. @@ -23,12 +23,11 @@ which contains the full list of commits included in this release. ### Notable Changes -#### glob and globSync +#### V8 Update to 12.4 -This release adds to the `node:fs`module the functions `glob` and `globSync` for pattern matching. -Developers can now utilize these functions for matching file paths based on specified patterns. +The V8 release 12.4 includes new features like WebAssembly Garbage Collection, [Array.fromAsync](https://tc39.es/proposal-array-from-async/), [Set methods](https://tc39.es/proposal-set-methods/) and [iterator helpers](https://tc39.es/proposal-iterator-helpers/). -Contributed by Moshe Atlow [#51912](https://github.com/nodejs/node/pull/51912) +Contributed by Michaël Zasso [#52465](https://github.com/nodejs/node/pull/52465) #### Maglev @@ -76,13 +75,20 @@ When in watch mode, changes in the watched files cause the Node.js process to re Contributed by Moshe Atlow [#52074](https://github.com/nodejs/node/pull/52074) -#### Websocket +#### WebSocket The browser-compatible implementation of WebSocket, previously behind the flag `--experimental-websocket`, will be enabled by default. This provides a WebSocket client to Node.js without external dependencies. Contributed by the Undici team and Aras Abbasi in [#51594](https://github.com/nodejs/node/pull/51594) +#### glob and globSync + +This release adds to the `node:fs`module the functions `glob` and `globSync` for pattern matching. +Developers can now utilize these functions for matching file paths based on specified patterns. + +Contributed by Moshe Atlow [#51912](https://github.com/nodejs/node/pull/51912) + ### Improve performance of AbortSignal creation This release enhances the efficiency of creating `AbortSignal` instances, leading to significantly improved performance in `fetch` and the test runner. @@ -95,4 +101,6 @@ Try out the new Node.js 22 release! We’re always happy to hear your feedback. Also of note is that Node.js 18 will go End-of-Life in April 2025, so we advise you to start planning to upgrade to Node.js 20 (LTS) or Node.js 22 (soon to be LTS). +Looking to the future, the [Next-10](https://github.com/nodejs/next-10) team is running a survey to gather info from the ecosystem. Help shape the future of Node.js by participating. Submit your feedback [here](TBD). + [CHANGELOG]: https://github.com/nodejs/node/releases/tag/v22.0.0 From 3d664ca862a60be361e653c22e25a42a3a46c31f Mon Sep 17 00:00:00 2001 From: Marco Ippolito Date: Tue, 23 Apr 2024 11:30:54 +0100 Subject: [PATCH 08/11] Update pages/en/blog/announcements/v22-release-announce.md Signed-off-by: Marco Ippolito --- pages/en/blog/announcements/v22-release-announce.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/en/blog/announcements/v22-release-announce.md b/pages/en/blog/announcements/v22-release-announce.md index 34b97048bd10..c448d9cbe859 100644 --- a/pages/en/blog/announcements/v22-release-announce.md +++ b/pages/en/blog/announcements/v22-release-announce.md @@ -27,7 +27,7 @@ which contains the full list of commits included in this release. The V8 release 12.4 includes new features like WebAssembly Garbage Collection, [Array.fromAsync](https://tc39.es/proposal-array-from-async/), [Set methods](https://tc39.es/proposal-set-methods/) and [iterator helpers](https://tc39.es/proposal-iterator-helpers/). -Contributed by Michaël Zasso [#52465](https://github.com/nodejs/node/pull/52465) +Contributed by Michaël Zasso in [#52465](https://github.com/nodejs/node/pull/52465) #### Maglev From 4bfb8638131a423e7acc0759d8319d0793cfab43 Mon Sep 17 00:00:00 2001 From: Marco Ippolito Date: Wed, 24 Apr 2024 17:46:57 +0100 Subject: [PATCH 09/11] Update pages/en/blog/announcements/v22-release-announce.md Signed-off-by: Marco Ippolito --- pages/en/blog/announcements/v22-release-announce.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/en/blog/announcements/v22-release-announce.md b/pages/en/blog/announcements/v22-release-announce.md index c448d9cbe859..c4f336cb8eff 100644 --- a/pages/en/blog/announcements/v22-release-announce.md +++ b/pages/en/blog/announcements/v22-release-announce.md @@ -101,6 +101,6 @@ Try out the new Node.js 22 release! We’re always happy to hear your feedback. Also of note is that Node.js 18 will go End-of-Life in April 2025, so we advise you to start planning to upgrade to Node.js 20 (LTS) or Node.js 22 (soon to be LTS). -Looking to the future, the [Next-10](https://github.com/nodejs/next-10) team is running a survey to gather info from the ecosystem. Help shape the future of Node.js by participating. Submit your feedback [here](TBD). +Looking to the future, the [Next-10](https://github.com/nodejs/next-10) team is running a survey to gather info from the ecosystem. Help shape the future of Node.js by participating. Submit your feedback [here](https://linuxfoundation.surveymonkey.com/r/nodenext10survey24). [CHANGELOG]: https://github.com/nodejs/node/releases/tag/v22.0.0 From 1adc5f5f277b1e21610c31473e8afed721436d62 Mon Sep 17 00:00:00 2001 From: Marco Ippolito Date: Wed, 24 Apr 2024 17:47:28 +0100 Subject: [PATCH 10/11] Update pages/en/blog/announcements/v22-release-announce.md Signed-off-by: Marco Ippolito --- pages/en/blog/announcements/v22-release-announce.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/en/blog/announcements/v22-release-announce.md b/pages/en/blog/announcements/v22-release-announce.md index c4f336cb8eff..1328b49262d0 100644 --- a/pages/en/blog/announcements/v22-release-announce.md +++ b/pages/en/blog/announcements/v22-release-announce.md @@ -1,5 +1,5 @@ --- -date: '2024-04-17T15:45:00.000Z' +date: '2024-04-24T17:45:00.000Z' category: announcements title: 'Node.js 22 is now available!' layout: blog-post From d77ead992cf8e9e1c8912f0949566a25f31043c9 Mon Sep 17 00:00:00 2001 From: marco-ippolito Date: Wed, 24 Apr 2024 19:34:25 +0100 Subject: [PATCH 11/11] feat: banner --- site.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/site.json b/site.json index 82e115222387..898d2b0f2742 100644 --- a/site.json +++ b/site.json @@ -28,10 +28,10 @@ ], "websiteBanners": { "index": { - "startDate": "2024-04-10T03:00:00.000Z", - "endDate": "2024-04-17T17:30:00.000Z", - "text": "Security releases are now available!", - "link": "https://nodejs.org/en/blog/vulnerability/april-2024-security-releases-2/", + "startDate": "2024-04-24T03:00:00.000Z", + "endDate": "2024-05-17T17:30:00.000Z", + "text": "Node.js v22 is now available!", + "link": "https://nodejs.org/en/blog/announcements/v22-release-announce", "type": "warning" } },