Commit Graph
9056 Commits
Author SHA1 Message Date
James M Snell 7b6b21a8aa doc: move histogram.burnRate to correct location in doc
Signed-off-by: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65434
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2026-08-26 02:28:33 +00:00
James M Snell 4d95cec69b perf_hooks: add CBOR export/import for histogram exchange
Provide a binary export/import mechanism for histograms.

Since there is no standard interchange format for histograms,
using CBOR is meant to make the format as platform/runtime
agnostic as possible while producing a compact/efficient
result. No new dependency is introduced, we just encode
the CBOR directly.

Signed-off-by: James M Snell <jasnell@gmail.com>
Assisted-by: Opencode/Opus
PR-URL: https://github.com/nodejs/node/pull/65434
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2026-08-26 02:28:31 +00:00
Filip Skokan e7a69c4992 crypto: discover ciphers from OpenSSL providers
Enumerate usable ciphers and aliases from activated OpenSSL 3 providers
instead of maintaining lists of provider-only algorithms. Skip numeric
OID aliases and filter NULL, TLS composite, multiblock, and
encrypt-then-MAC implementations that the Cipher APIs cannot use.
Preserve the OpenSSL 1.1.1 and BoringSSL paths.

Expose CBC-CTS, SM4-GCM, SM4-CCM, SM4-XTS, and additional AES key wrap
implementations. Add `ctsMode` (CS1/CS2/CS3) and `xtsStandard`
(GB/IEEE) options for selecting provider CTS and SM4-XTS variants.

Keep ordinary cipher construction on the original binding and legacy
lookup paths.

Lazily cache successful provider fetches per Environment for
string initialization and `getCipherInfo()`.
Index entries by case-insensitive query, canonical, and alias names.
Deduplicate owners by provider and canonical identity. Return borrowed
pointers on warm hits.

Use the shared process-wide FIPS-state generation to invalidate
per-Environment cipher caches and refresh `getCiphers()` snapshots in
the main thread and workers. Existing cipher contexts retain their
implementation and can finish across a transition. Release provider
owners before unloading worker addon DSOs.

Enforce one-shot updates for CBC-CTS, AES key wrap, SIV/GCM-SIV, and
CCM decryption. Reject finalization without required input or CCM tags,
and defer authentication failures to `final()`. Document streaming and
XTS data-unit constraints.

Add known-answer vectors, option validation, provider round trips,
cache, worker, snapshot, FIPS transition, and construction benchmark
coverage.

Fixes: https://github.com/nodejs/node/issues/43040
Fixes: https://github.com/nodejs/node/issues/64866
Refs: https://github.com/nodejs/node/issues/62982
Signed-off-by: Filip Skokan <panva.ip@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65484
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2026-08-25 23:11:06 +00:00
Filip Skokan 025e88f981 crypto: discover hashes from OpenSSL providers
Enumerate usable digests and aliases from activated OpenSSL 3 providers
rather than relying only on the legacy digest registry. Normalize
provider aliases, omit numeric OIDs and NULL, and validate them against
the active default property query. Preserve legacy names and the OpenSSL
1.1.1 and BoringSSL paths.

Expose KECCAK-KMAC-128, KECCAK-256, SHA256-192, and other provider
digests. Add `functionName` and `customization` options for cSHAKE
digests in `createHash()` and `crypto.hash()` with OpenSSL 4.0 or later.

Resolve provider-only digest names across hashing, HMAC, KDF, signing,
verification, and RSA digest options. Keep ordinary hash construction
and one-shot hashing on the original binding arities and direct
initialization paths. Use parameterized setup only when cSHAKE options
are supplied.

Lazily cache successful provider fetches per Environment.
Index entries by case-insensitive query, canonical, and alias names.
Deduplicate owners by provider and canonical identity. Return borrowed
pointers on warm hits.

Introduce a process-wide FIPS-state generation that advances only after
successful, state-changing `setFips()` calls. Use it to invalidate
per-Environment digest caches and refresh `getHashes()` snapshots in the
main thread and workers. Keep cache IDs monotonic across invalidation
because JavaScript Realms can retain them. Existing hash contexts can
finish across a transition.

Release provider owners before unloading worker addon DSOs. Document
provider-dependent availability and operation-specific restrictions.
Add known-answer vectors, option validation, provider resolution,
property-query, FIPS transition, worker, snapshot, and cross-API
coverage.

Refs: https://github.com/nodejs/node/issues/62982
Signed-off-by: Filip Skokan <panva.ip@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65484
Fixes: https://github.com/nodejs/node/issues/43040
Fixes: https://github.com/nodejs/node/issues/64866
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2026-08-25 23:11:05 +00:00
Aryn H 056e2ae333 doc: fix default limit of maxHeadersCount
The documented limit of 2000 refers to header pairs (counting both
keys and values), which gives an effective limit of 1000 headers.

This applies to both client and server; they have the same mechanism.

Signed-off-by: Aryn H <arynh@protonmail.com>
PR-URL: https://github.com/nodejs/node/pull/65472
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Tim Perry <pimterry@gmail.com>
Reviewed-By: Deokjin Kim <deokjin81.kim@gmail.com>
2026-08-25 11:59:18 +00:00
Chiang Fong Lee f17088855f doc: fix return types for sync methods
For the sync methods spawnSync(), execSync() and execFileSync(), when
the stdio option is set to anything other than 'pipe', the stdout and
stderr returned from the C++ code will be null, and not a string or
Buffer as currently documented.

PR-URL: https://github.com/nodejs/node/pull/58575
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev>
Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-08-25 11:29:02 +02:00
Taeuk Ha 2eb0b5bf9c doc: update AHAFS reference link
Signed-off-by: Taeuk Ha <tomcat0519@naver.com>
PR-URL: https://github.com/nodejs/node/pull/65481
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Beth Griggs <bethanyngriggs@gmail.com>
2026-08-24 17:30:12 +00:00
James Ross 5e48fb3a1e src: list scripts when --run has no command
Signed-off-by: James Ross <james@jross.me>
PR-URL: https://github.com/nodejs/node/pull/64606
Fixes: https://github.com/nodejs/node/issues/64870
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-08-24 03:14:09 +00:00
Efe Karasakal 75c1f6b772 doc: discourage AbortSignal cleanup for long-lived resources
Signed-off-by: Efe Karasakal <hi@efe.dev>
PR-URL: https://github.com/nodejs/node/pull/64342
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2026-08-23 21:53:47 +00:00
Antoine du Hamel 057e591f7c lib,src: remove --no-experimental-websocket CLI flag
Signed-off-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65284
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Aviv Keller <me@aviv.sh>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
2026-08-23 21:16:19 +00:00
Mert Can Altin 00c80a8572 fs: abort in-flight stat operations
Signed-off-by: Mert Can Altin <mertgold60@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/63143
Refs: https://github.com/nodejs/node/pull/57775
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-08-23 20:29:59 +00:00
James M Snell 524dee4372 perf_hooks: add statistical hypothesis testing to histogram
Welch's t-test, Mann-Whitney U test, Cohen's d, and Cliff's delta,
and and handful of others

These methods enable in-process benchmark comparison and regression
detection without external dependencies.

No new dependencies.

Tests and docs created by the AI agent.

Signed-off-by: James M Snell <jasnell@gmail.com>
Assisted-by: Opencode/Opus
PR-URL: https://github.com/nodejs/node/pull/65416
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2026-08-23 20:29:19 +00:00
Kamat, Trivikram c28857e64c stream: drain pending writes before broadcast end
Keep processing writes that were queued before end(). Signal the
broadcast end only after those writes enter the shared buffer.

Resolve end() after all consumers reach end-of-stream. This prevents
backpressured writes from remaining pending forever.

Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com>
Assisted-by: codex:gpt-5.6-sol
PR-URL: https://github.com/nodejs/node/pull/65334
Fixes: https://github.com/nodejs/node/issues/65333
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-08-23 13:25:30 -07:00
Jihwan fbea5c3633 doc: fix property names in os.networkInterfaces() example
Signed-off-by: hanityx <hanityx@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65469
Refs: https://github.com/nodejs/node/pull/63200
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Deokjin Kim <deokjin81.kim@gmail.com>
2026-08-23 19:11:17 +00:00
Samuel Williams 0b89f8fe47 tty: add raw-vt and io raw modes
Signed-off-by: Samuel Williams <samuel.williams@shopify.com>
PR-URL: https://github.com/nodejs/node/pull/64140
Refs: https://github.com/nodejs/node/issues/63059
Refs: https://github.com/libuv/libuv/issues/32
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2026-08-23 15:52:12 +00:00
Donghoon Kang 6a9e49ed7c doc: fix broken links in cli.md
Fix the link to the Environment variables section
and replace the semi-space link with the relevant V8 documentation.

Signed-off-by: HoonDongKang <d159123@naver.com>
PR-URL: https://github.com/nodejs/node/pull/65412
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2026-08-23 12:58:43 +00:00
Shelley Vohr 65f518c72a module: add a read-only mode to the compile cache
A compile cache generated ahead of time and shipped inside an
application package should only ever be read: the package may be
immutable or covered by an integrity check, and a cache directory that
appears at run time would be a surprise. Add readOnly to
module.enableCompileCache() and NODE_COMPILE_CACHE_READONLY=1: existing
entries are loaded as before, nothing is serialized or persisted,
flushCompileCache() is a no-op, and the cache directory is used as found
rather than created, so enabling against a missing directory fails
instead of making one.

Signed-off-by: Shelley Vohr <shelley.vohr@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65302
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: René <contact.9a5d6388@renegade334.me.uk>
2026-08-23 08:14:37 +00:00
이혜미 f4bcf756f6 doc: remove outdated WASI version fallback
Signed-off-by: hyemimi <hyemi7375@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65303
Refs: https://github.com/nodejs/node/pull/47391
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
2026-08-22 11:59:46 +00:00
Filip Skokan e573bd6b12 crypto: enable SIV and GCM-SIV modes in Cipher/Decipher APIs
Closes #63393

Signed-off-by: Filip Skokan <panva.ip@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/63411
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-08-22 08:24:09 +00:00
Trivikram Kamat bd25af32cc ffi: prefer canonical type names
Document long type names as canonical and use them in examples.
Group alternative spellings separately in the documentation and
internal type maps while retaining support for every existing alias.

Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com>
Assisted-by: codex:gpt-5.6-sol
PR-URL: https://github.com/nodejs/node/pull/65417
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Aviv Keller <me@aviv.sh>
Reviewed-By: René <contact.9a5d6388@renegade334.me.uk>
2026-08-22 07:28:28 +00:00
Donghoon Kang 1db6cda84b doc: fix broken GYP link in n-api.md
Replace the unavailable GYP website with the GYP documentation
preserved in the Chromium source repository.

Signed-off-by: HoonDongKang <d159123@naver.com>
PR-URL: https://github.com/nodejs/node/pull/65413
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Aviv Keller <me@aviv.sh>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2026-08-22 03:49:24 +00:00
Shelley Vohr adad4d650d module: do not split a portable compile cache by uid
A portable compile cache is meant to be reused wherever the same module
layout is found, which includes being generated once (at build time,
say) and shipped read-only with an application for whoever runs it. On
platforms with uids the cache subdirectory is suffixed with the uid of
the user who created it, so such a cache is only ever found by that one
user. Omit the suffix in portable mode: a user who cannot write to the
directory still reads it, and a failed write is only a cache miss.

Signed-off-by: Shelley Vohr <shelley.vohr@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65293
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-08-21 21:53:19 +00:00
Joyee Cheung 15940ef908 build,src: make --use-largepages a no-op
This feature has not been actively used in the wild and has
always only been best-effort on systems that support it. The build
changes it needs breaks WSL1 compatibility and the relocation
mechanism won't work with newer V8 that remaps builtins using
mremap(MREMAP_DONTUNMAP).

This patch effectively removes this feature by turning the flags
into no-ops. A warning will be printed if `--use-largepages=on`
is used.

Signed-off-by: Joyee Cheung <joyeec9h3@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65389
Fixes: https://github.com/nodejs/node/issues/63735
Fixes: https://github.com/nodejs/node/issues/64408
Refs: https://chromium-review.googlesource.com/c/v8/v8/+/7985687
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Richard Lau <richard.lau@ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-08-21 19:29:17 +02:00
Orgad ShanehandClaude Opus 5 a0c366c58c doc: document that an empty OPENSSL_CONF skips config loading
A default OpenSSL configuration file that exists but cannot be read is
fatal at startup: CONF_MFLAGS_IGNORE_MISSING_FILE only covers ENOENT
and ENOTDIR, so a container that mounts /etc/ssl inaccessible to the
user Node.js runs as cannot start at all.

OpenSSL skips config loading entirely when OPENSSL_CONF is set to an
empty value, which gets past this, but that was undocumented. Say so,
including that no configuration is applied, FIPS setup included.

Refs: https://github.com/nodejs/node/issues/62230
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: Orgad Shaneh <orgad.shaneh@audiocodes.com>
PR-URL: https://github.com/nodejs/node/pull/64949
Fixes: https://github.com/nodejs/node/issues/62230
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
2026-08-21 17:05:31 +00:00
soreavis 3618c954ac doc: fix broken TLS security level example
The example under "Setting security levels" does not run. The client
sets `maxVersion: 'TLSv1'` while its `minVersion` stays at the
`tls.DEFAULT_MIN_VERSION` default of `'TLSv1.2'`, so no version overlaps
and the connection fails with ERR_SSL_NO_PROTOCOLS_AVAILABLE. Setting
the client's `minVersion` is not enough on its own: the handshake then
fails with an alert 40, because `createServer` is given no key or
certificate and the server has no shared cipher.

Set `minVersion` on the client, add the key and certificate placeholders
and the openssl recipe that the other sections using them already carry,
pass the server certificate as the client's `ca`, and use port 8000 like
the rest of the file. The section now runs from an empty directory and
prints "Client connected with protocol: TLSv1".

Signed-off-by: Julian Soreavis <julian.soreavis@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65391
Fixes: https://github.com/nodejs/node/issues/60569
Refs: https://github.com/nodejs/node/pull/60571
Reviewed-By: Tim Perry <pimterry@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-08-21 15:01:49 +00:00
Dayun c5d4ae6d36 doc: clarify socket destroyed behavior
Signed-off-by: Dayun <dlekdbs6530@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65395
Fixes: https://github.com/nodejs/node/issues/57367
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
2026-08-21 13:39:55 +00:00
Donghoon Kang 11a9998549 doc: update outdated nodejs.org guide links
Update outdated `nodejs.org/en/docs/guides/...` links
to their current `nodejs.org/learn/...` destinations.

Signed-off-by: HoonDongKang <d159123@naver.com>
PR-URL: https://github.com/nodejs/node/pull/65394
Reviewed-By: Mike McCready <66998419+MikeMcC399@users.noreply.github.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-08-21 05:53:42 +00:00
Trivikram Kamat c2543d9301 sqlite: reject busy statement finalization in authorizer
An iterator can leave a statement active between sqlite3_step() calls.
Finalizing that statement from an authorizer callback can release its
locks and change the outcome of the statement being authorized.

Reject close() and Symbol.dispose when the statement is busy and the
connection is in an authorizer callback. Continue allowing idle
statements to be finalized.

Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com>
Assisted-by: codex:gpt-5.6-sol
PR-URL: https://github.com/nodejs/node/pull/65369
Fixes: https://github.com/nodejs/node/issues/65368
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
2026-08-21 03:30:10 +00:00
Kirill Saied 9677349240 child_process: keep SIGWINCH from killing on Win
Fixes: https://github.com/nodejs/node/issues/64324
Signed-off-by: PickBas <sayed.kirill@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/64510
Reviewed-By: Stefan Stojanovic <stefan.stojanovic@janeasystems.com>
2026-08-21 00:50:15 +00:00
Aviv Keller 0ce7b02d50 doc: remove synopsis
Signed-off-by: avivkeller <me@aviv.sh>
PR-URL: https://github.com/nodejs/node/pull/65246
Reviewed-By: Claudio Wunder <cwunder@gnome.org>
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-08-20 23:55:56 +00:00
Kirill Saied 6d60352305 src: define O_SYNC, O_DSYNC and O_DIRECT on Windows
Signed-off-by: Kirill Saied <sayed.kirill@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/64707
Reviewed-By: Stefan Stojanovic <stefan.stojanovic@janeasystems.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-08-20 11:05:05 +00:00
trivenay fd5b13557f quic: do not destroy incoming streams that have a consumer
An incoming stream was destroyed unless the session had an onstream
callback, even when session-level stream callbacks (onheaders et al)
were registered and the negotiated application (HTTP/3) would drive
the stream through them. Users had to register stub onstream handlers
just to keep their streams alive.

Destroy an incoming stream only when the session has no consumer for
it at all: no onstream callback, and no session-level stream callbacks
runnable on the negotiated application (checked via the existing
headersSupported session state, computed when the application is
selected from ALPN). Sessions with no consumers keep the current
destroy-and-warn behavior so unconsumed streams cannot accumulate and
hold flow control credit.

On HTTP/3 sessions only bidirectional request streams reach this path;
control and QPACK streams are consumed internally by nghttp3 and are
never exposed to JavaScript.

Fixes: https://github.com/nodejs/node/issues/64192

Signed-off-by: Naman Trivedi <trivenay@amazon.com>
PR-URL: https://github.com/nodejs/node/pull/65335
Fixes: https://github.com/nodejs/node/issues/64192
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2026-08-20 07:03:21 +00:00
Vedant Kulkarni 46541f93bf doc: clarify that ipv4 mapped to ipv6 are classified as ipv6
Signed-off-by: Vedant Kulkarni <gamemaker0042@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/62117
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2026-08-19 20:59:57 +00:00
Trivikram Kamat d6bbf5799f sqlite: prevent reentrant session.close()
Reject session.close() while generating a changeset or patchset.
Closing the session at that point frees it while SQLite is still
using it, causing a use-after-free.

Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com>
Assisted-by: codex:gpt-5.6-sol
PR-URL: https://github.com/nodejs/node/pull/65349
Fixes: https://github.com/nodejs/node/issues/65347
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
2026-08-19 06:42:46 +00:00
soreavis 29a083cffb doc: clarify how fs.Dirent file types are determined
The file type of a directory entry returned by fs.readdir() or
fs.opendir() is the type reported by the operating system's directory
listing. Node.js falls back to lstat() only when the reported type is
unknown, and some file systems may report a type that differs from what
lstat() would return. Document this in the fs.Dirent class introduction,
with fs.lstat() as the accurate alternative.

Fixes: https://github.com/nodejs/node/issues/30646
Signed-off-by: Julian Soreavis <julian.soreavis@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/64532
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Jason Zhang <xzha4350@gmail.com>
2026-08-18 15:15:47 +00:00
T 0d84f29fa7 doc: clarify copyFile symlink behavior
Signed-off-by: T <cookesan@users.noreply.github.com>
PR-URL: https://github.com/nodejs/node/pull/62941
Fixes: https://github.com/nodejs/node/issues/61518
Reviewed-By: Aviv Keller <me@aviv.sh>
2026-08-18 07:05:14 +00:00
Erik Demaine 16c06b896c doc: document setRawMode write access on Windows
Fixes: https://github.com/nodejs/node/issues/63852
Signed-off-by: Erik Demaine <edemaine@mit.edu>
PR-URL: https://github.com/nodejs/node/pull/63856
Reviewed-By: Stefan Stojanovic <stefan.stojanovic@janeasystems.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2026-08-18 07:05:05 +00:00
Seongeun Lee 5242e13e19 doc: document per-architecture fast FFI argument limits
The prior text covered only two of the seven supported architectures
and conflated x86-64 SysV with the stricter Win64 emitter.

Signed-off-by: leah-1ee <selee3196@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65207
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
2026-08-18 07:04:55 +00:00
Chaseton Collins 205ef76ba3 doc: add missing return types in fs.md
Three entries in the fs documentation described their return
value only in prose, or not at all, so doc-kit could not parse
a return type and fell back to `void`:

* `filehandle[Symbol.asyncDispose]()` and
  `dir[Symbol.asyncDispose]()` both return a promise, matching
  the existing `Returns: {Promise}` annotations on other async
  dispose methods.
* `new fs.Utf8Stream([options])` is a constructor and returns
  an instance of the class.

Verified at runtime and by rendering the page locally with
doc-kit.

Refs: https://github.com/nodejs/doc-kit/issues/953
Signed-off-by: Chxxeton <43923165+Chxxeton@users.noreply.github.com>
PR-URL: https://github.com/nodejs/node/pull/65307
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Aviv Keller <me@aviv.sh>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
2026-08-18 07:04:46 +00:00
Yuya Inoue ba8cdc2594 doc: add missing return types in buffer.md
Add return types for Blob methods and legacy Base64 helpers so doc-kit
does not render them as `void`.

Refs: nodejs/doc-kit#953
Signed-off-by: inoway46 <inoueyuya416@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65308
Refs: https://github.com/nodejs/doc-kit/issues/953
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2026-08-18 07:04:36 +00:00
Lazizbek Ergashev 46cac5a7c2 doc: add missing added: tags to fs.lchmod
Signed-off-by: Lazizbek Ergashev <lazerg2@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65283
Fixes: https://github.com/nodejs/node/issues/65280
Refs: https://github.com/nodejs/node-v0.x-archive/issues/853
Refs: https://github.com/nodejs/node/commit/3935adced09cd557a836d00558b52d777b9a20a2
Refs: https://github.com/nodejs/node/pull/18297
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-08-16 09:40:37 +00:00
avivkeller 86066045ea cli: add No-Op --experimental-repl-await
Signed-off-by: Aviv Keller <me@aviv.sh>
PR-URL: https://github.com/nodejs/node/pull/64986
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2026-08-15 14:20:31 -07:00
Aviv Keller b9afdd0b87 worker: add support for Web Workers
Signed-off-by: Aviv Keller <me@aviv.sh>
PR-URL: https://github.com/nodejs/node/pull/64894
Fixes: https://github.com/nodejs/node/issues/43583
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matthew Aitken <maitken033380023@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2026-08-15 13:15:47 -07:00
Guilherme Araújo c7b962c222 sqlite: add diagnostic channel
Signed-off-by: Guilherme Araújo <arauujogui@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/62241
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: René <contact.9a5d6388@renegade334.me.uk>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2026-08-15 19:42:37 +00:00
greenhead 91aaf05a25 doc: fix SQLite changeset constant descriptions
Signed-off-by: greenhead <shren0812@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65265
Refs: https://www.sqlite.org/session/c_changeset_abort.html
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-08-15 14:41:37 +00:00
Guilherme Araújo c8996eaec9 sqlite: add stmt persistent flag
Signed-off-by: Guilherme Araújo <arauujogui@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/62757
Reviewed-By: Xuguang Mei <meixuguang@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Edy Silva <edigleyssonsilva@gmail.com>
2026-08-14 21:57:31 +00:00
Trevor Burnham c4b755ee00 sqlite: reject connection access from authorizer callbacks
SQLite requires that an authorizer callback not modify the connection
that invoked it, and counts sqlite3_prepare_v2() and sqlite3_step() as
modifications. node:sqlite let the callback call prepare(), exec(), the
statement execution methods, and other connection-mutating APIs on the
same DatabaseSync. Track authorizer depth on DatabaseSync with an RAII
guard around the callback and throw ERR_INVALID_STATE from the affected
entry points while it is on the stack. Covering every authorizer
invocation, including the re-prepare that SQLite can run during
sqlite3_step(), exposed a second and distinct hazard: reentering a
statement that is currently being stepped is a use-after-free rather
than a contract violation, since finalizing it frees the virtual machine
under sqlite3_step() and re-running it resets that machine
mid-execution. Any callback SQLite invokes during execution can reach
it, so a user-defined function is enough. Track the statements currently
being stepped and reject reentry into only those, which leaves a
user-defined function free to prepare, run, and finalize its own helper
statements.

Signed-off-by: Trevor Burnham <trevorburnham@gmail.com>
Fixes: https://github.com/nodejs/node/issues/63207
Assisted-by: claude:opus-5
PR-URL: https://github.com/nodejs/node/pull/65156
Reviewed-By: Xuguang Mei <meixuguang@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2026-08-14 21:43:35 +00:00
Yagiz Nizipli 967d4af565 zlib: convert classes to modern syntax and eol DEP0184
Convert ZlibBase, Zlib, and the remaining zlib/Brotli stream
constructors to ES6 class syntax. Calling these constructors without
`new` is no longer supported (DEP0184 End-of-Life); use `new` or the
create* factory helpers instead.

This is a semver-major change: code that relied on `zlib.Gzip()`
(without `new`) will now throw TypeError. The createGzip/createDeflate
helpers and all documented `new`-based usage remain unchanged. The
wire behavior and public options are preserved.

Refs: https://github.com/nodejs/node/pull/55718
Refs: https://github.com/nodejs/node/pull/54708
Assisted-by: Grok
Signed-off-by: Yagiz Nizipli <yagiz@nizipli.com>
PR-URL: https://github.com/nodejs/node/pull/64849
Reviewed-By: Aviv Keller <me@aviv.sh>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2026-08-14 14:52:07 +00:00
Harjoth Khara 9e23066b8a doc: document http2 header constants
Signed-off-by: harjoth <harjoth.khara@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/64548
Reviewed-By: Aviv Keller <me@aviv.sh>
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-08-14 03:39:59 +00:00
Adrián Estrada 54bdc2e383 doc: document REPL DEP0185 throws and uncaught-exception behavior
Two doc-only improvements to `doc/api/repl.md`, both filling gaps left
by recent semver-major REPL changes:

1. `repl.REPLServer` is an ES class; calling it without `new` is
   End-of-Life (DEP0185) and throws a native V8 `TypeError`. The
   "Class: REPLServer" section now notes this and links to the DEP0185
   entry in `doc/api/deprecations.md`. No `Stability: 0` banner is
   added because the class itself is not deprecated — only the
   `new`-less invocation is — matching the parallel DEP0184/DEP0195
   "classes without `new`" convention.

2. PR #64034 ("repl: use inspector over vm") removed the old
   "Global uncaught exceptions" subsection because the `domain`-based
   restrictions it documented no longer exist. A new top-level
   `### Error handling` section documents the current model (mirroring
   the `### Error handling` convention in async_hooks/http2/quic),
   anchored to the existing `Uncaught Error: REPL await` example.

Refs: https://github.com/nodejs/node/pull/59495
Refs: https://github.com/nodejs/node/pull/54869
Refs: https://github.com/nodejs/node/pull/54842
Refs: https://github.com/nodejs/node/pull/64034
Signed-off-by: Adrian Estrada <edsadr@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/64993
Reviewed-By: Erick Wendel <erick.workspace@gmail.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
2026-08-13 17:26:22 +00:00