Anna Henningsen
2e2f4cd095
src: remove unnecessary std::string error messages
...
If we can just use the classic `THROW_...()` methods directly,
without needing to allocate an `std::string` for the message/format
parameter, let's just do so.
PR-URL: https://github.com/nodejs/node/pull/60057
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
2025-09-30 15:39:00 +02:00
Anna Henningsen
0cc1304489
src: remove unnecessary shadowed functions on Utf8Value & BufferValue
...
Both of these are already implemented on the superclass.
PR-URL: https://github.com/nodejs/node/pull/60056
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
2025-09-30 15:38:17 +02:00
Anna Henningsen
77cf2efa57
src: avoid unnecessary string -> char* -> string round trips
...
In these places we can just generate `std::string` directly, so
there's no need to convert to an intermediate C string.
PR-URL: https://github.com/nodejs/node/pull/60055
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
2025-09-30 15:37:42 +02:00
Anna Henningsen
e4e859efc3
src: remove useless dereferencing in THROW_...
...
Our `THROW_...` helpers can handle strings or string views just fine,
all this does is add an extra `strlen()` call that can and should
be avoided.
PR-URL: https://github.com/nodejs/node/pull/60054
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Edy Silva <edigleyssonsilva@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2025-09-30 15:36:58 +02:00
Anna Henningsen
5d1adb8053
src: bring permissions macros in line with general C/C++ standards
...
Specifically, avoid the hazard of unintentionally evaluating
an argument multiple times during macro expansion, and do not
assume the available of particular namespaces in the current scope.
PR-URL: https://github.com/nodejs/node/pull/60053
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
2025-09-30 15:36:12 +02:00
pmarchini
3c36ad0b7c
deps: update amaro to 1.1.4
...
PR-URL: https://github.com/nodejs/node/pull/60044
Fixes: https://github.com/nodejs/node/issues/60007
Fixes: https://github.com/nodejs/node/issues/59737
Reviewed-By: Zeyu "Alex" Yang <himself65@outlook.com >
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com >
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
2025-09-30 15:34:34 +02:00
Ruben Bridgewater
c2536adc28
console,util: improve array inspection performance
...
There is no need to do the own property check, since the descriptor
is needed right afterwards anyway.
PR-URL: https://github.com/nodejs/node/pull/60037
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Jordan Harband <ljharb@gmail.com >
2025-09-30 15:32:40 +02:00
Edy Silva
413693481f
sqlite: replace ToLocalChecked and improve filter error handling
...
PR-URL: https://github.com/nodejs/node/pull/60028
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2025-09-30 15:30:25 +02:00
iknoom
075936b413
src: use std::string_view from node_report
...
PR-URL: https://github.com/nodejs/node/pull/60006
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2025-09-30 15:25:55 +02:00
Diango Gavidia
93ee08cf27
test: expand tls-check-server-identity coverage
...
PR-URL: https://github.com/nodejs/node/pull/60002
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2025-09-30 15:25:08 +02:00
Deokjin Kim
b51fd73e10
test: fix typo of test-benchmark-readline.js
...
"bechmark" -> "benchmark" in test-benchmark-readline.js.
And fix test name in test-benchmark-validators.js.
PR-URL: https://github.com/nodejs/node/pull/59993
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com >
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com >
2025-09-30 15:21:49 +02:00
Dario Piotrowicz
9ac571d0d5
test: add new startNewREPLSever testing utility
...
PR-URL: https://github.com/nodejs/node/pull/59964
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br >
2025-09-30 15:20:02 +02:00
iknoom
c6316f9db9
src: fill options_args, options_env after vectors are finalized
...
PR-URL: https://github.com/nodejs/node/pull/59945
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2025-09-28 10:56:50 +00:00
iknoom
3e1adceca4
src: use RAII for uv_process_options_t
...
PR-URL: https://github.com/nodejs/node/pull/59945
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2025-09-28 10:56:50 +00:00
James M Snell
cff138c6b1
tests: start adding quic test server utilities
...
PR-URL: https://github.com/nodejs/node/pull/59946
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
2025-09-27 12:17:50 -07:00
James M Snell
65a32bac18
deps: add ngtcp2 test binaries
...
The goal here is to add the ngtcp2 client and server
samples so that we can use them in CI to test our QUIC
implementation.
PR-URL: https://github.com/nodejs/node/pull/59946
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
2025-09-27 12:17:49 -07:00
Steven
2e5c8dff9c
doc: mention reverse proxy and include simple example
...
PR-URL: https://github.com/nodejs/node/pull/59736
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2025-09-26 17:58:16 +00:00
Steven
157cfdeeb3
doc: provide alternative to url.parse() using WHATWG URL
...
PR-URL: https://github.com/nodejs/node/pull/59736
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2025-09-26 17:58:15 +00:00
Node.js GitHub Bot
ce72fccc9d
2025-09-25, Version 24.9.0 (Current)
...
Notable changes:
http:
* (SEMVER-MINOR) add shouldUpgradeCallback to let servers control HTTP upgrades (Tim Perry) https://github.com/nodejs/node/pull/59824
sqlite:
* (SEMVER-MINOR) cleanup ERM support and export Session class (James M Snell) https://github.com/nodejs/node/pull/58378
* (SEMVER-MINOR) add tagged template (0hm☘️ ) https://github.com/nodejs/node/pull/58748
worker:
* (SEMVER-MINOR) add heap profile API (theanarkh) https://github.com/nodejs/node/pull/59846
PR-URL: https://github.com/nodejs/node/pull/59997
2025-09-25 21:40:51 +02:00
Deokjin Kim
d3ee5d9b2b
doc: fix typo of built-in module specifier in worker_threads
...
node:: -> node:
PR-URL: https://github.com/nodejs/node/pull/59992
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com >
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com >
2025-09-25 15:31:20 +00:00
Daniel M Brasil
3312e4e946
src: unflag --experimental-webstorage by default
...
PR-URL: https://github.com/nodejs/node/pull/57666
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Edy Silva <edigleyssonsilva@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2025-09-25 11:59:58 +00:00
Node.js GitHub Bot
eb1e671d31
deps: update ada to 3.2.9
...
PR-URL: https://github.com/nodejs/node/pull/59987
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2025-09-25 09:45:38 +00:00
Bruno Rodrigues
0817b40c1b
benchmark: remove unused variable from util/priority-queue
...
PR-URL: https://github.com/nodejs/node/pull/59872
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2025-09-24 20:33:10 +00:00
Bruno Rodrigues
43007e3e42
benchmark: update count to n in permission startup
...
PR-URL: https://github.com/nodejs/node/pull/59872
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2025-09-24 20:33:10 +00:00
Bruno Rodrigues
1e008dab21
benchmark: update num to n in dgram offset-length
...
PR-URL: https://github.com/nodejs/node/pull/59872
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2025-09-24 20:33:09 +00:00
Gerhard Stöbich
4dc19ec9ac
test: verify tracing channel doesn't swallow unhandledRejection
...
Add a test to verify that TracingChannel.tracePromise doesn't swallow
unhandledRejection events in case no then/catch handler is set by user.
PR-URL: https://github.com/nodejs/node/pull/59974
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
2025-09-24 17:22:00 +00:00
Bruno Rodrigues
6ce89d7178
benchmark: adjust dgram offset-length len values
...
PR-URL: https://github.com/nodejs/node/pull/59708
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2025-09-24 14:11:58 +00:00
Bruno Rodrigues
b49089c253
benchmark: update num to n in dgram offset-length
...
PR-URL: https://github.com/nodejs/node/pull/59708
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2025-09-24 14:11:57 +00:00
René
e4e86ea3ef
typings: update 'types' binding
...
- Adds:
- isGeneratorObject
- isProxy
- isSharedArrayBuffer
- isSymbolObject
- Removes:
- isTypedArray
- Fixes:
- isDate
- isNativeError
- isRegExp
- Improves:
- isArgumentsObject
- isExternal
PR-URL: https://github.com/nodejs/node/pull/59692
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
2025-09-24 14:11:47 +00:00
Renegade334
8ca5fec567
timers: fix binding fast call signatures
...
PR-URL: https://github.com/nodejs/node/pull/59600
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2025-09-24 14:11:36 +00:00
Renegade334
4f4d5b348c
wasi: fix WasiFunction fast call signature
...
PR-URL: https://github.com/nodejs/node/pull/59600
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2025-09-24 14:11:36 +00:00
Renegade334
5ac6ee7716
process: fix hrtime fast call signatures
...
PR-URL: https://github.com/nodejs/node/pull/59600
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2025-09-24 14:11:35 +00:00
Renegade334
e9a0912848
perf_hooks: fix histogram fast call signatures
...
PR-URL: https://github.com/nodejs/node/pull/59600
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2025-09-24 14:11:35 +00:00
Node.js GitHub Bot
f5e2ecc41b
2025-09-24, Version 22.20.0 'Jod' (LTS)
...
Notable changes:
crypto:
* update root certificates to NSS 3.114 (Node.js GitHub Bot) https://github.com/nodejs/node/pull/59571
deps:
* fix OpenSSL security level at 1 (Richard Lau) https://github.com/nodejs/node/pull/59859
* upgrade openssl sources to openssl-3.5.2 (Node.js GitHub Bot) https://github.com/nodejs/node/pull/59371
doc:
* stabilize --disable-sigusr1 (Rafael Gonzaga) https://github.com/nodejs/node/pull/59707
* mark `path.matchesGlob` as stable (Aviv Keller) https://github.com/nodejs/node/pull/59572
http:
* (SEMVER-MINOR) add Agent.agentKeepAliveTimeoutBuffer option (Haram Jeong) https://github.com/nodejs/node/pull/59315
http2:
* (SEMVER-MINOR) add support for raw header arrays in h2Stream.respond() (Tim Perry) https://github.com/nodejs/node/pull/59455
inspector:
* add http2 tracking support (Darshan Sen) https://github.com/nodejs/node/pull/59611
sea:
* (SEMVER-MINOR) implement execArgvExtension (Joyee Cheung) https://github.com/nodejs/node/pull/59560
* (SEMVER-MINOR) support execArgv in sea config (Joyee Cheung) https://github.com/nodejs/node/pull/59314
stream:
* (SEMVER-MINOR) add brotli support to CompressionStream and DecompressionStream (Matthew Aitken) https://github.com/nodejs/node/pull/59464
test_runner:
* (SEMVER-MINOR) support object property mocking (Idan Goshen) https://github.com/nodejs/node/pull/58438
worker:
* (SEMVER-MINOR) add cpu profile APIs for worker (theanarkh) https://github.com/nodejs/node/pull/59428
PR-URL: https://github.com/nodejs/node/pull/59973
2025-09-24 13:04:16 +00:00
Tobias Nießen
f46444d8b7
doc: use "WebAssembly" instead of "Web Assembly"
...
PR-URL: https://github.com/nodejs/node/pull/59954
Reviewed-By: Richard Lau <richard.lau@ibm.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2025-09-24 01:05:46 +00:00
Anna Henningsen
9692677afe
src: simplify watchdog instantiations via std::optional
...
It's been a bit of a code smell that we create these objects in
different conditional branches, effectively forcing ourselves to
duplicate logic between those branches.
This code predates `std::optional` being available to us, but
now that it is, it's the idiomatic way to resolve this issue.
(This commit also explicitly deletes move and copy members for
these classes; these had previously been omitted for brevity,
but adding them made me feel more confident that there is no
hidden copy operation added through this change.)
PR-URL: https://github.com/nodejs/node/pull/59960
Reviewed-By: Darshan Sen <raisinten@gmail.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
2025-09-23 23:29:19 +00:00
Bart Louwers
d2ff9daf58
sqlite: fix crash session extension callbacks with workers
...
PR-URL: https://github.com/nodejs/node/pull/59848
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Zeyu "Alex" Yang <himself65@outlook.com >
Reviewed-By: Edy Silva <edigleyssonsilva@gmail.com >
2025-09-23 14:41:39 +00:00
theanarkh
24ded11b66
worker: add heap profile API
...
PR-URL: https://github.com/nodejs/node/pull/59846
Refs: https://github.com/nodejs/node/pull/59428
Reviewed-By: James M Snell <jasnell@gmail.com >
2025-09-23 12:41:47 +00:00
Tobias Nießen
0a72b2cd7b
doc: fix typo in section on microtask order
...
PR-URL: https://github.com/nodejs/node/pull/59932
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
2025-09-23 10:33:13 +00:00
Node.js GitHub Bot
3c0c1609df
deps: update googletest to 50b8600
...
PR-URL: https://github.com/nodejs/node/pull/59955
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
2025-09-23 09:39:18 +00:00
Guy Bedford
4396cf2d45
wasm: enable JSPI
...
PR-URL: https://github.com/nodejs/node/pull/59941
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2025-09-22 18:12:43 -07:00
Joyee Cheung
81af7b93c5
http,https: handle IPv6 with proxies
...
This simplifies the proxy configuration handling code,
adds tests to make sure the proxy support works with IPv6
and throws correct errors for invalid proxy IPs.
Drive-by: remove useless properties from ProxyConfig
PR-URL: https://github.com/nodejs/node/pull/59894
Refs: https://github.com/nodejs/node/issues/57872
Reviewed-By: Aditi Singh <aditisingh1400@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2025-09-22 23:19:26 +00:00
jhofstee
54c456702c
zlib: reduce code duplication
...
The offset in the allocated memory was calculated in alloc and free,
this makes it a single constant so it only needs to be defined once.
PR-URL: https://github.com/nodejs/node/pull/57810
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2025-09-22 20:53:01 +00:00
James M Snell
327e175ba0
src: update crypto objects to use DictionaryTemplate
...
PR-URL: https://github.com/nodejs/node/pull/59942
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2025-09-22 18:26:26 +00:00
hqzing
fe889efc69
build: add the missing macro definitions for OpenHarmony
...
PR-URL: https://github.com/nodejs/node/pull/59804
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com >
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
2025-09-22 17:57:57 +00:00
Anna Henningsen
0ec1d186f4
src: always use strong reference to napi_async_context resource
...
There already is an existing requirement to have matching calls of
`napi_async_init()` and `napi_async_destroy()`, so expecting users
of this API to manually hold onto the resource for the duration of
the `napi_async_context`'s lifetime is unnecessary.
Weak callbacks are generally useful for when a corresponding C++
object should be cleaned up when a JS object is gargbage-collected,
but that is not the case here.
PR-URL: https://github.com/nodejs/node/pull/59828
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
2025-09-22 14:16:10 +00:00
Anna Henningsen
ce748f6cae
src: use Global for storing resource in Node-API callback scope
...
This is a follow-up to 234c26cca3 . The Node-API interface does
not allow us to enforce that values are stored in a specific location,
e.g. on the stack or not; however, V8 requires `Local<>` handles
to be stored on the stack.
To circumvent this restriction, we add the ability to the async handle
stack to store either `Local<>*` pointers or `Global<>*` pointers, with
Node-API making use of the latter.
PR-URL: https://github.com/nodejs/node/pull/59828
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
2025-09-22 14:16:10 +00:00
René
3e79dba4a4
doc: update V8 fast API guidance
...
PR-URL: https://github.com/nodejs/node/pull/58999
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
2025-09-21 23:52:25 +00:00
Yoo
55cd2e589e
dgram: restore buffer optimization in fixBufferList
...
Restore the Buffer.isBuffer() check to avoid unnecessary Buffer.from()
calls when the input is already a Buffer. This improves performance
by 30-50% for buffer-heavy UDP operations.
Includes benchmark test for fixBufferList function to verify the
performance improvements across different data types and chunk sizes.
PR-URL: https://github.com/nodejs/node/pull/59934
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
2025-09-21 17:50:41 +00:00
Eric Rannaud
c81b1dff65
vm: explain how to share promises between contexts w/ afterEvaluate
...
PR-URL: https://github.com/nodejs/node/pull/59801
Fixes: https://github.com/nodejs/node/issues/59541
Refs: https://issues.chromium.org/issues/441679231
Refs: https://groups.google.com/g/v8-dev/c/YIeRg8CUNS8/m/rEQdFuNZAAAJ
Refs: https://tc39.es/ecma262/#sec-newpromiseresolvethenablejob
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2025-09-21 13:04:37 +00:00