Skip to content

Commit f1e11dc

Browse files
committed
2025-10-20, Version 22.21.0 'Jod' (LTS)
Notable changes: http: * (SEMVER-MINOR) add shouldUpgradeCallback to let servers control HTTP upgrades (Tim Perry) #59824 src: * (SEMVER-MINOR) add percentage support to --max-old-space-size (Asaf Federman) #59082 PR-URL: #60230
1 parent 660d573 commit f1e11dc

File tree

14 files changed

+2345
-16
lines changed

14 files changed

+2345
-16
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ release.
3737
</tr>
3838
<tr>
3939
<td valign="top">
40-
<b><a href="doc/changelogs/CHANGELOG_V22.md#22.20.0">22.20.0</a></b><br/>
40+
<b><a href="doc/changelogs/CHANGELOG_V22.md#22.21.0">22.21.0</a></b><br/>
41+
<a href="doc/changelogs/CHANGELOG_V22.md#22.20.0">22.20.0</a><br/>
4142
<a href="doc/changelogs/CHANGELOG_V22.md#22.19.0">22.19.0</a><br/>
4243
<a href="doc/changelogs/CHANGELOG_V22.md#22.18.0">22.18.0</a><br/>
4344
<a href="doc/changelogs/CHANGELOG_V22.md#22.17.1">22.17.1</a><br/>

bisect.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/bin/sh
2+
#! nix-shell --argstr ncu-path "$HOME/Documents/node-core-utils" -i bash
3+
4+
set -eo pipefail
5+
6+
# make build-ci -j12
7+
# tools/test.py test/parallel/test-inspector-network-http.js test/parallel/test-worker-data-url.js
8+
make -j12
9+
tools/test.py test/parallel/test-util-inspect.js

diff

Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
diff --git a/lib/internal/http2/core.js b/lib/internal/http2/core.js
2+
index cf7b06d987..369133dafb 100644
3+
--- a/lib/internal/http2/core.js
4+
+++ b/lib/internal/http2/core.js
5+
@@ -30,2 +30,4 @@ const {
6+
promisify,
7+
+ deprecate,
8+
+ deprecateProperty,
9+
SymbolAsyncDispose,
10+
@@ -713,2 +715,7 @@ function onGoawayData(code, lastStreamID, buf) {
11+
12+
+// TODO(aduh95): remove this in future semver-major
13+
+const deprecateWeight = deprecateProperty('weight',
14+
+ 'Priority signaling has been deprecated as of RFC 1993.',
15+
+ 'DEP0194');
16+
+
17+
// When a ClientHttp2Session is first created, the socket may not yet be
18+
@@ -741,2 +748,4 @@ function requestOnConnect(headers, options) {
19+
20+
+ deprecateWeight(options);
21+
+
22+
// `ret` will be either the reserved stream ID (if positive)
23+
@@ -746,3 +755,3 @@ function requestOnConnect(headers, options) {
24+
options.parent | 0,
25+
- options.weight | 0,
26+
+ NGHTTP2_DEFAULT_WEIGHT,
27+
!!options.exclusive);
28+
@@ -785,7 +794,3 @@ function requestOnConnect(headers, options) {
29+
const setAndValidatePriorityOptions = hideStackFrames((options) => {
30+
- if (options.weight === undefined) {
31+
- options.weight = NGHTTP2_DEFAULT_WEIGHT;
32+
- } else {
33+
- validateNumber.withoutStackTrace(options.weight, 'options.weight');
34+
- }
35+
+ deprecateWeight(options);
36+
37+
@@ -845,21 +850,2 @@ function submitSettings(settings, callback) {
38+
39+
-// Submits a PRIORITY frame to be sent to the remote peer
40+
-// Note: If the silent option is true, the change will be made
41+
-// locally with no PRIORITY frame sent.
42+
-function submitPriority(options) {
43+
- if (this.destroyed)
44+
- return;
45+
- this[kUpdateTimer]();
46+
-
47+
- // If the parent is the id, do nothing because a
48+
- // stream cannot be made to depend on itself.
49+
- if (options.parent === this[kID])
50+
- return;
51+
-
52+
- this[kHandle].priority(options.parent | 0,
53+
- options.weight | 0,
54+
- !!options.exclusive,
55+
- !!options.silent);
56+
-}
57+
-
58+
// Submit a GOAWAY frame to be sent to the remote peer.
59+
@@ -2255,21 +2241,2 @@ class Http2Stream extends Duplex {
60+
61+
- priority(options) {
62+
- if (this.destroyed)
63+
- throw new ERR_HTTP2_INVALID_STREAM();
64+
-
65+
- assertIsObject(options, 'options');
66+
- options = { ...options };
67+
- setAndValidatePriorityOptions(options);
68+
-
69+
- const priorityFn = submitPriority.bind(this, options);
70+
-
71+
- // If the handle has not yet been assigned, queue up the priority
72+
- // frame to be sent as soon as the ready event is emitted.
73+
- if (this.pending) {
74+
- this.once('ready', priorityFn);
75+
- return;
76+
- }
77+
- priorityFn();
78+
- }
79+
-
80+
sendTrailers(headers) {
81+
@@ -2431,2 +2398,8 @@ class Http2Stream extends Duplex {
82+
83+
+// TODO(aduh95): remove this in future semver-major
84+
+Http2Stream.prototype.priority = deprecate(function priority(options) {
85+
+ if (this.destroyed)
86+
+ throw new ERR_HTTP2_INVALID_STREAM();
87+
+}, 'http2Stream.priority is longer supported after priority signalling was deprecated in RFC 1993', 'DEP0194');
88+
+
89+
function callTimeout(self, session) {
90+
diff --git a/lib/internal/util.js b/lib/internal/util.js
91+
index 254791eb48..2f12f5a3f1 100644
92+
--- a/lib/internal/util.js
93+
+++ b/lib/internal/util.js
94+
@@ -135,2 +135,13 @@ function isPendingDeprecation() {
95+
96+
+function deprecateProperty(key, msg, code, isPendingDeprecation) {
97+
+ const emitDeprecationWarning = getDeprecationWarningEmitter(
98+
+ code, msg, undefined, false, isPendingDeprecation,
99+
+ );
100+
+ return (options) => {
101+
+ if (key in options) {
102+
+ emitDeprecationWarning();
103+
+ }
104+
+ };
105+
+}
106+
+
107+
// Internal deprecator for pending --pending-deprecation. This can be invoked
108+
@@ -911,2 +922,3 @@ module.exports = {
109+
deprecate,
110+
+ deprecateProperty,
111+
emitExperimentalWarning,

doc/api/cli.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -802,7 +802,7 @@ node --entry-url 'data:text/javascript,console.log("Hello")'
802802
<!-- YAML
803803
added: v22.9.0
804804
changes:
805-
- version: REPLACEME
805+
- version: v22.21.0
806806
pr-url: https://github.com/nodejs/node/pull/59925
807807
description: The `--env-file-if-exists` flag is no longer experimental.
808808
-->
@@ -815,7 +815,7 @@ does not exist.
815815
<!-- YAML
816816
added: v20.6.0
817817
changes:
818-
- version: REPLACEME
818+
- version: v22.21.0
819819
pr-url: https://github.com/nodejs/node/pull/59925
820820
description: The `--env-file` flag is no longer experimental.
821821
- version:

doc/api/http.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1649,7 +1649,7 @@ per connection (in the case of HTTP Keep-Alive connections).
16491649
<!-- YAML
16501650
added: v0.1.94
16511651
changes:
1652-
- version: REPLACEME
1652+
- version: v22.21.0
16531653
pr-url: https://github.com/nodejs/node/pull/59824
16541654
description: Whether this event is fired can now be controlled by the
16551655
`shouldUpgradeCallback` and sockets will be destroyed
@@ -3528,7 +3528,7 @@ Found'`.
35283528
<!-- YAML
35293529
added: v0.1.13
35303530
changes:
3531-
- version: REPLACEME
3531+
- version: v22.21.0
35323532
pr-url: https://github.com/nodejs/node/pull/59824
35333533
description: The `shouldUpgradeCallback` option is now supported.
35343534
- version:

doc/api/n-api.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3294,7 +3294,7 @@ Specification.
32943294
added: v8.0.0
32953295
napiVersion: 1
32963296
changes:
3297-
- version: REPLACEME
3297+
- version: v22.21.0
32983298
pr-url: https://github.com/nodejs/node/pull/59071
32993299
description: Added support for `SharedArrayBuffer`.
33003300
-->
@@ -4278,7 +4278,7 @@ Specification.
42784278
### `node_api_is_sharedarraybuffer`
42794279

42804280
<!-- YAML
4281-
added: REPLACEME
4281+
added: v22.21.0
42824282
-->
42834283

42844284
> Stability: 1 - Experimental
@@ -4298,7 +4298,7 @@ This API checks if the Object passed in is a `SharedArrayBuffer`.
42984298
### `node_api_create_sharedarraybuffer`
42994299

43004300
<!-- YAML
4301-
added: REPLACEME
4301+
added: v22.21.0
43024302
-->
43034303

43044304
> Stability: 1 - Experimental

doc/api/process.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2751,7 +2751,7 @@ added:
27512751
- v21.7.0
27522752
- v20.12.0
27532753
changes:
2754-
- version: REPLACEME
2754+
- version: v22.21.0
27552755
pr-url: https://github.com/nodejs/node/pull/59925
27562756
description: This API is no longer experimental.
27572757
-->

doc/api/util.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2138,7 +2138,7 @@ added:
21382138
- v21.7.0
21392139
- v20.12.0
21402140
changes:
2141-
- version: REPLACEME
2141+
- version: v22.21.0
21422142
pr-url: https://github.com/nodejs/node/pull/59925
21432143
description: This API is no longer experimental.
21442144
-->

doc/api/vm.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -921,7 +921,7 @@ the ECMAScript specification.
921921
### `sourceTextModule.instantiate()`
922922
923923
<!-- YAML
924-
added: REPLACEME
924+
added: v22.21.0
925925
-->
926926
927927
* Returns: {undefined}
@@ -939,7 +939,7 @@ modules in the cycle before calling this method.
939939
### `sourceTextModule.linkRequests(modules)`
940940
941941
<!-- YAML
942-
added: REPLACEME
942+
added: v22.21.0
943943
-->
944944
945945
* `modules` {vm.Module\[]} Array of `vm.Module` objects that this module depends on.
@@ -1091,7 +1091,7 @@ added:
10911091
- v13.0.0
10921092
- v12.16.0
10931093
changes:
1094-
- version: REPLACEME
1094+
- version: v22.21.0
10951095
pr-url: https://github.com/nodejs/node/pull/59000
10961096
description: No longer need to call `syntheticModule.link()` before
10971097
calling this method.

0 commit comments

Comments
 (0)