Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
23468fd
http2: fix allowHttp1+Upgrade, broken by shouldUpgradeCallback
pimterry Sep 20, 2025
fe492c7
process: fix hrtime fast call signatures
Renegade334 Jul 13, 2025
81548ab
wasi: fix WasiFunction fast call signature
Renegade334 Jul 13, 2025
cee3622
timers: fix binding fast call signatures
Renegade334 Jul 13, 2025
78efd1b
benchmark: update num to n in dgram offset-length
brunocroh Sep 1, 2025
af0a8ba
benchmark: adjust dgram offset-length len values
brunocroh Sep 1, 2025
af3a59d
test: verify tracing channel doesn't swallow unhandledRejection
Flarna Sep 24, 2025
4e8d99f
benchmark: update num to n in dgram offset-length
brunocroh Sep 12, 2025
6764ce8
benchmark: update count to n in permission startup
brunocroh Sep 12, 2025
af33e8e
benchmark: remove unused variable from util/priority-queue
brunocroh Sep 12, 2025
c7c597e
src: use RAII for uv_process_options_t
iknoom Sep 20, 2025
54b439f
src: fill `options_args`, `options_env` after vectors are finalized
iknoom Sep 22, 2025
b58df47
test: fix typo of test-benchmark-readline.js
deokjinkim Sep 23, 2025
26394cd
test: expand tls-check-server-identity coverage
diangogav Sep 24, 2025
df72dc9
console,util: improve array inspection performance
BridgeAR Sep 27, 2025
d1fb8a5
src: avoid unnecessary string -> `char*` -> string round trips
addaleax Sep 28, 2025
1289ef8
src: remove unnecessary shadowed functions on Utf8Value & BufferValue
addaleax Sep 28, 2025
764d356
src: remove unnecessary `std::string` error messages
addaleax Sep 28, 2025
c3be122
src: allow `std::string_view` arguments to `SPrintF()` and friends
addaleax Sep 28, 2025
9fae03c
tools: use dependabot cooldown and move tools/doc
RafaelGSS Sep 30, 2025
6e386c0
src: make ToLower/ToUpper input args more flexible
addaleax Sep 28, 2025
987841a
src: avoid unnecessary string allocations in SPrintF impl
addaleax Sep 28, 2025
4206406
test: mark test-web-locks skip on IBM i
sravani1510 Oct 1, 2025
81a3055
process: fix default `env` for `process.execve`
richardlau Oct 1, 2025
609c063
src: remove unused variables from report
iknoom Oct 2, 2025
e4b95a5
test: replace diagnostics_channel stackframe in output snapshots
legendecas Oct 3, 2025
c2dd6ee
process: fix wrong asyncContext under unhandled-rejections=strict
islandryu Oct 4, 2025
ea5cfd9
lib: implement passive listener behavior per spec
Amemome Oct 4, 2025
56abc4a
lib: optimize priority queue
gurgunday Oct 4, 2025
aac90d3
tools: verify signatures when updating nghttp*
aduh95 Oct 5, 2025
b928ea9
test: ensure that the message event is fired
lpinca Oct 5, 2025
40fea57
tools: add message on auto-fixing js lint issues in gh workflow
dario-piotrowicz Oct 5, 2025
ef67d09
http: improve writeEarlyHints by avoiding for-of loop
haramj Oct 6, 2025
2197097
src: remove `AnalyzeTemporaryDtors` option from .clang-tidy
iknoom Sep 25, 2025
76b4cab
src: bring permissions macros in line with general C/C++ standards
addaleax Sep 28, 2025
6ac4ab1
2025-10-28, Version 22.21.1 'Jod' (LTS)
nodejs-github-bot Oct 23, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ updates:
directory: /
schedule:
interval: monthly
cooldown:
- semver-major-days: 5
- semver-minor-days: 5
- semver-patch-days: 5

commit-message:
prefix: meta
open-pull-requests-limit: ${{secrets.OPEN_PR_LIMIT}}
Expand All @@ -14,6 +19,10 @@ updates:
directory: /tools/eslint
schedule:
interval: monthly
cooldown:
- semver-major-days: 5
- semver-minor-days: 5
- semver-patch-days: 5
commit-message:
prefix: tools
open-pull-requests-limit: ${{secrets.OPEN_PR_LIMIT}}
Expand All @@ -27,6 +36,10 @@ updates:
directory: /tools/lint-md
schedule:
interval: monthly
cooldown:
- semver-major-days: 5
- semver-minor-days: 5
- semver-patch-days: 5
commit-message:
prefix: tools
open-pull-requests-limit: ${{secrets.OPEN_PR_LIMIT}}
Expand All @@ -35,3 +48,20 @@ updates:
applies-to: version-updates
patterns:
- '*'

- package-ecosystem: npm
directory: /tools/doc
schedule:
interval: weekly
cooldown:
- semver-major-days: 5
- semver-minor-days: 5
- semver-patch-days: 5
commit-message:
prefix: tools
open-pull-requests-limit: ${{secrets.OPEN_PR_LIMIT}}
groups:
doc:
applies-to: version-updates
patterns:
- '*'
26 changes: 25 additions & 1 deletion .github/workflows/linters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,31 @@ jobs:
- name: Environment Information
run: npx envinfo
- name: Lint JavaScript files
run: NODE=$(command -v node) make lint-js
run: |
set +e
NODE=$(command -v node) make lint-js
EXIT_CODE="$?"
if [ "$EXIT_CODE" != "0" ]; then
echo
echo 'ERROR: The JavaScript lint validation failed (the errors are logged above).'
echo ' Please fix the lint errors.'
if NODE=$(command -v node) make lint-js-fix > /dev/null 2>&1; then
echo ' Run:'
echo ' make lint-js-fix'
echo ' to fix the lint issues.'
git --no-pager diff
elif git diff --quiet --exit-code; then
echo ' None of the issue is auto-fixable, so manual fixes for'
echo ' all of the issues are required.'
else
echo ' Run:'
echo ' make lint-js-fix'
echo ' to fix the auto-fixable lint issues.'
echo ' Note that some manual fixes are also required.'
fi
echo
exit "$EXIT_CODE"
fi
- name: Get release version numbers
if: ${{ github.event.pull_request && github.event.pull_request.base.ref == github.event.pull_request.base.repo.default_branch }}
id: get-released-versions
Expand Down
17 changes: 0 additions & 17 deletions .github/workflows/tools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ on:
- c-ares
- cjs-module-lexer
- corepack
- doc
- googletest
- gyp-next
- histogram
Expand Down Expand Up @@ -119,22 +118,6 @@ jobs:
run: |
make corepack-update
echo "NEW_VERSION=$(node deps/corepack/dist/corepack.js --version)" >> $GITHUB_ENV
- id: doc
subsystem: tools
label: tools
run: |
cd tools/doc
npm ci
NEW_VERSION=$(npm outdated --parseable | cut -d: -f4 | xargs)
if [ "$NEW_VERSION" != "" ]; then
echo "NEW_VERSION=new version" >> $GITHUB_ENV
rm -rf package-lock.json node_modules
# Include $NEW_VERSION to explicitly update the package.json
# entry for the dependency and also so that semver-major updates
# are not skipped.
npm install --ignore-scripts $NEW_VERSION
npm install --ignore-scripts
fi
- id: googletest
subsystem: deps
label: dependencies, test
Expand Down
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ release.
</tr>
<tr>
<td valign="top">
<b><a href="doc/changelogs/CHANGELOG_V22.md#22.21.0">22.21.0</a></b><br/>
<b><a href="doc/changelogs/CHANGELOG_V22.md#22.21.1">22.21.1</a></b><br/>
<a href="doc/changelogs/CHANGELOG_V22.md#22.21.0">22.21.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V22.md#22.20.0">22.20.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V22.md#22.19.0">22.19.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V22.md#22.18.0">22.18.0</a><br/>
Expand Down
12 changes: 6 additions & 6 deletions benchmark/dgram/offset-length.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,28 @@ const common = require('../common.js');
const dgram = require('dgram');
const PORT = common.PORT;

// `num` is the number of send requests to queue up each time.
// `n` is the number of send requests to queue up each time.
// Keep it reasonably high (>10) otherwise you're benchmarking the speed of
// event loop cycles more than anything else.
const bench = common.createBenchmark(main, {
len: [1, 64, 256, 1024],
num: [100],
len: [1, 512, 1024],
n: [100],
type: ['send', 'recv'],
dur: [5],
});

function main({ dur, len, num, type }) {
function main({ dur, len, n, type }) {
const chunk = Buffer.allocUnsafe(len);
let sent = 0;
let received = 0;
const socket = dgram.createSocket('udp4');

function onsend() {
if (sent++ % num === 0) {
if (sent++ % n === 0) {
// The setImmediate() is necessary to have event loop progress on OSes
// that only perform synchronous I/O on nonblocking UDP sockets.
setImmediate(() => {
for (let i = 0; i < num; i++) {
for (let i = 0; i < n; i++) {
socket.send(chunk, 0, chunk.length, PORT, '127.0.0.1', onsend);
}
});
Expand Down
8 changes: 4 additions & 4 deletions benchmark/dgram/single-buffer.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,23 @@ const PORT = common.PORT;
// event loop cycles more than anything else.
const bench = common.createBenchmark(main, {
len: [1, 64, 256, 1024],
num: [100],
n: [100],
type: ['send', 'recv'],
dur: [5],
});

function main({ dur, len, num, type }) {
function main({ dur, len, num: n, type }) {
const chunk = Buffer.allocUnsafe(len);
let sent = 0;
let received = 0;
const socket = dgram.createSocket('udp4');

function onsend() {
if (sent++ % num === 0) {
if (sent++ % n === 0) {
// The setImmediate() is necessary to have event loop progress on OSes
// that only perform synchronous I/O on nonblocking UDP sockets.
setImmediate(() => {
for (let i = 0; i < num; i++) {
for (let i = 0; i < n; i++) {
socket.send(chunk, PORT, '127.0.0.1', onsend);
}
});
Expand Down
12 changes: 6 additions & 6 deletions benchmark/permission/permission-startup.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ const bench = common.createBenchmark(main, {
],
prefixPath: ['/tmp'],
nFiles: [10, 100, 1000],
count: [30],
n: [30],
});

function spawnProcess(script, bench, state) {
const cmd = process.execPath || process.argv[0];
while (state.finished < state.count) {
while (state.finished < state.n) {
const child = spawnSync(cmd, script);
if (child.status !== 0) {
console.log('---- STDOUT ----');
Expand All @@ -39,13 +39,13 @@ function spawnProcess(script, bench, state) {
bench.start();
}

if (state.finished === state.count) {
bench.end(state.count);
if (state.finished === state.n) {
bench.end(state.n);
}
}
}

function main({ count, script, nFiles, prefixPath }) {
function main({ n, script, nFiles, prefixPath }) {
script = path.resolve(__dirname, '../../', `${script}.js`);
const optionsWithScript = [
'--permission',
Expand All @@ -54,6 +54,6 @@ function main({ count, script, nFiles, prefixPath }) {
script,
];
const warmup = 3;
const state = { count, finished: -warmup };
const state = { n, finished: -warmup };
spawnProcess(optionsWithScript, bench, state);
}
2 changes: 1 addition & 1 deletion benchmark/util/priority-queue.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const bench = common.createBenchmark(main, {
n: [1e5],
}, { flags: ['--expose-internals'] });

function main({ n, type }) {
function main({ n }) {
const PriorityQueue = require('internal/priority_queue');
const queue = new PriorityQueue();
bench.start();
Expand Down
43 changes: 43 additions & 0 deletions doc/changelogs/CHANGELOG_V22.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
</tr>
<tr>
<td>
<a href="#22.21.1">22.21.1</a><br/>
<a href="#22.21.0">22.21.0</a><br/>
<a href="#22.20.0">22.20.0</a><br/>
<a href="#22.19.0">22.19.0</a><br/>
Expand Down Expand Up @@ -66,6 +67,48 @@
* [io.js](CHANGELOG_IOJS.md)
* [Archive](CHANGELOG_ARCHIVE.md)

<a id="22.21.1"></a>

## 2025-10-28, Version 22.21.1 'Jod' (LTS), @aduh95

### Commits

* \[[`af33e8e668`](https://github.com/nodejs/node/commit/af33e8e668)] - **benchmark**: remove unused variable from util/priority-queue (Bruno Rodrigues) [#59872](https://github.com/nodejs/node/pull/59872)
* \[[`6764ce8756`](https://github.com/nodejs/node/commit/6764ce8756)] - **benchmark**: update count to n in permission startup (Bruno Rodrigues) [#59872](https://github.com/nodejs/node/pull/59872)
* \[[`4e8d99f0dc`](https://github.com/nodejs/node/commit/4e8d99f0dc)] - **benchmark**: update num to n in dgram offset-length (Bruno Rodrigues) [#59872](https://github.com/nodejs/node/pull/59872)
* \[[`af0a8ba7f8`](https://github.com/nodejs/node/commit/af0a8ba7f8)] - **benchmark**: adjust dgram offset-length len values (Bruno Rodrigues) [#59708](https://github.com/nodejs/node/pull/59708)
* \[[`78efd1be4a`](https://github.com/nodejs/node/commit/78efd1be4a)] - **benchmark**: update num to n in dgram offset-length (Bruno Rodrigues) [#59708](https://github.com/nodejs/node/pull/59708)
* \[[`df72dc96e9`](https://github.com/nodejs/node/commit/df72dc96e9)] - **console,util**: improve array inspection performance (Ruben Bridgewater) [#60037](https://github.com/nodejs/node/pull/60037)
* \[[`ef67d09f50`](https://github.com/nodejs/node/commit/ef67d09f50)] - **http**: improve writeEarlyHints by avoiding for-of loop (Haram Jeong) [#59958](https://github.com/nodejs/node/pull/59958)
* \[[`23468fd76b`](https://github.com/nodejs/node/commit/23468fd76b)] - **http2**: fix allowHttp1+Upgrade, broken by shouldUpgradeCallback (Tim Perry) [#59924](https://github.com/nodejs/node/pull/59924)
* \[[`56abc4ac76`](https://github.com/nodejs/node/commit/56abc4ac76)] - **lib**: optimize priority queue (Gürgün Dayıoğlu) [#60039](https://github.com/nodejs/node/pull/60039)
* \[[`ea5cfd98c5`](https://github.com/nodejs/node/commit/ea5cfd98c5)] - **lib**: implement passive listener behavior per spec (BCD1me) [#59995](https://github.com/nodejs/node/pull/59995)
* \[[`c2dd6eed2f`](https://github.com/nodejs/node/commit/c2dd6eed2f)] - **process**: fix wrong asyncContext under unhandled-rejections=strict (Shima Ryuhei) [#60103](https://github.com/nodejs/node/pull/60103)
* \[[`81a3055710`](https://github.com/nodejs/node/commit/81a3055710)] - **process**: fix default `env` for `process.execve` (Richard Lau) [#60029](https://github.com/nodejs/node/pull/60029)
* \[[`fe492c7ace`](https://github.com/nodejs/node/commit/fe492c7ace)] - **process**: fix hrtime fast call signatures (Renegade334) [#59600](https://github.com/nodejs/node/pull/59600)
* \[[`76b4cab8fc`](https://github.com/nodejs/node/commit/76b4cab8fc)] - **src**: bring permissions macros in line with general C/C++ standards (Anna Henningsen) [#60053](https://github.com/nodejs/node/pull/60053)
* \[[`21970970c7`](https://github.com/nodejs/node/commit/21970970c7)] - **src**: remove `AnalyzeTemporaryDtors` option from .clang-tidy (iknoom) [#60008](https://github.com/nodejs/node/pull/60008)
* \[[`609c063e81`](https://github.com/nodejs/node/commit/609c063e81)] - **src**: remove unused variables from report (Moonki Choi) [#60047](https://github.com/nodejs/node/pull/60047)
* \[[`987841a773`](https://github.com/nodejs/node/commit/987841a773)] - **src**: avoid unnecessary string allocations in SPrintF impl (Anna Henningsen) [#60052](https://github.com/nodejs/node/pull/60052)
* \[[`6e386c0632`](https://github.com/nodejs/node/commit/6e386c0632)] - **src**: make ToLower/ToUpper input args more flexible (Anna Henningsen) [#60052](https://github.com/nodejs/node/pull/60052)
* \[[`c3be1226c7`](https://github.com/nodejs/node/commit/c3be1226c7)] - **src**: allow `std::string_view` arguments to `SPrintF()` and friends (Anna Henningsen) [#60058](https://github.com/nodejs/node/pull/60058)
* \[[`764d35647d`](https://github.com/nodejs/node/commit/764d35647d)] - **src**: remove unnecessary `std::string` error messages (Anna Henningsen) [#60057](https://github.com/nodejs/node/pull/60057)
* \[[`1289ef89ec`](https://github.com/nodejs/node/commit/1289ef89ec)] - **src**: remove unnecessary shadowed functions on Utf8Value & BufferValue (Anna Henningsen) [#60056](https://github.com/nodejs/node/pull/60056)
* \[[`d1fb8a538d`](https://github.com/nodejs/node/commit/d1fb8a538d)] - **src**: avoid unnecessary string -> `char*` -> string round trips (Anna Henningsen) [#60055](https://github.com/nodejs/node/pull/60055)
* \[[`54b439fb5a`](https://github.com/nodejs/node/commit/54b439fb5a)] - **src**: fill `options_args`, `options_env` after vectors are finalized (iknoom) [#59945](https://github.com/nodejs/node/pull/59945)
* \[[`c7c597e2ca`](https://github.com/nodejs/node/commit/c7c597e2ca)] - **src**: use RAII for uv\_process\_options\_t (iknoom) [#59945](https://github.com/nodejs/node/pull/59945)
* \[[`b928ea9716`](https://github.com/nodejs/node/commit/b928ea9716)] - **test**: ensure that the message event is fired (Luigi Pinca) [#59952](https://github.com/nodejs/node/pull/59952)
* \[[`e4b95a5158`](https://github.com/nodejs/node/commit/e4b95a5158)] - **test**: replace diagnostics\_channel stackframe in output snapshots (Chengzhong Wu) [#60024](https://github.com/nodejs/node/pull/60024)
* \[[`4206406694`](https://github.com/nodejs/node/commit/4206406694)] - **test**: mark test-web-locks skip on IBM i (SRAVANI GUNDEPALLI) [#59996](https://github.com/nodejs/node/pull/59996)
* \[[`26394cd5bf`](https://github.com/nodejs/node/commit/26394cd5bf)] - **test**: expand tls-check-server-identity coverage (Diango Gavidia) [#60002](https://github.com/nodejs/node/pull/60002)
* \[[`b58df47995`](https://github.com/nodejs/node/commit/b58df47995)] - **test**: fix typo of test-benchmark-readline.js (Deokjin Kim) [#59993](https://github.com/nodejs/node/pull/59993)
* \[[`af3a59dba8`](https://github.com/nodejs/node/commit/af3a59dba8)] - **test**: verify tracing channel doesn't swallow unhandledRejection (Gerhard Stöbich) [#59974](https://github.com/nodejs/node/pull/59974)
* \[[`cee362242b`](https://github.com/nodejs/node/commit/cee362242b)] - **timers**: fix binding fast call signatures (Renegade334) [#59600](https://github.com/nodejs/node/pull/59600)
* \[[`40fea57fdd`](https://github.com/nodejs/node/commit/40fea57fdd)] - **tools**: add message on auto-fixing js lint issues in gh workflow (Dario Piotrowicz) [#59128](https://github.com/nodejs/node/pull/59128)
* \[[`aac90d351b`](https://github.com/nodejs/node/commit/aac90d351b)] - **tools**: verify signatures when updating nghttp\* (Antoine du Hamel) [#60113](https://github.com/nodejs/node/pull/60113)
* \[[`9fae03c7d9`](https://github.com/nodejs/node/commit/9fae03c7d9)] - **tools**: use dependabot cooldown and move tools/doc (Rafael Gonzaga) [#59978](https://github.com/nodejs/node/pull/59978)
* \[[`81548abdf6`](https://github.com/nodejs/node/commit/81548abdf6)] - **wasi**: fix WasiFunction fast call signature (Renegade334) [#59600](https://github.com/nodejs/node/pull/59600)

<a id="22.21.0"></a>

## 2025-10-20, Version 22.21.0 'Jod' (LTS), @aduh95
Expand Down
4 changes: 3 additions & 1 deletion lib/_http_server.js
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,9 @@ ServerResponse.prototype.writeEarlyHints = function writeEarlyHints(hints, cb) {

head += 'Link: ' + link + '\r\n';

for (const key of ObjectKeys(hints)) {
const keys = ObjectKeys(hints);
for (let i = 0; i < keys.length; i++) {
const key = keys[i];
if (key !== 'link') {
head += key + ': ' + hints[key] + '\r\n';
}
Expand Down
25 changes: 23 additions & 2 deletions lib/internal/event_target.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ const { now } = require('internal/perf/utils');

const kType = Symbol('type');
const kDetail = Symbol('detail');
const kInPassiveListener = Symbol('kInPassiveListener');

const isTrustedSet = new SafeWeakSet();
const isTrusted = ObjectGetOwnPropertyDescriptor({
Expand Down Expand Up @@ -127,6 +128,7 @@ class Event {

this[kTarget] = null;
this[kIsBeingDispatched] = false;
this[kInPassiveListener] = false;
}

/**
Expand Down Expand Up @@ -178,6 +180,7 @@ class Event {
preventDefault() {
if (!isEvent(this))
throw new ERR_INVALID_THIS('Event');
if (!this.#cancelable || this[kInPassiveListener]) return;
this.#defaultPrevented = true;
}

Expand Down Expand Up @@ -266,6 +269,19 @@ class Event {
return !this.#cancelable || !this.#defaultPrevented;
}

/**
* @type {boolean}
*/
set returnValue(value) {
if (!isEvent(this))
throw new ERR_INVALID_THIS('Event');

if (!value) {
if (!this.#cancelable || this[kInPassiveListener]) return;
this.#defaultPrevented = true;
}
}

/**
* @type {boolean}
*/
Expand Down Expand Up @@ -760,7 +776,6 @@ class EventTarget {
throw new ERR_EVENT_RECURSION(event.type);

this[kHybridDispatch](event, event.type, event);

return event.defaultPrevented !== true;
}

Expand Down Expand Up @@ -813,8 +828,8 @@ class EventTarget {
this[kRemoveListener](root.size, type, listener, capture);
}

let arg;
try {
let arg;
if (handler.isNodeStyleListener) {
arg = nodeValue;
} else {
Expand All @@ -824,6 +839,9 @@ class EventTarget {
handler.callback.deref() : handler.callback;
let result;
if (callback) {
if (handler.passive && !handler.isNodeStyleListener) {
arg[kInPassiveListener] = true;
}
result = FunctionPrototypeCall(callback, this, arg);
if (!handler.isNodeStyleListener) {
arg[kIsBeingDispatched] = false;
Expand All @@ -833,6 +851,9 @@ class EventTarget {
addCatch(result);
} catch (err) {
emitUncaughtException(err);
} finally {
if (arg?.[kInPassiveListener])
arg[kInPassiveListener] = false;
}

handler = next;
Expand Down
Loading
Loading