Commit Graph
10087 Commits
Author SHA1 Message Date
Joyee Cheung 916929863d esm: populate separate cache for require(esm) in imported CJS
Otherwise if the ESM happens to be cached separately by the ESM loader
before it gets loaded with `require(esm)` from within an imported
CJS file (which uses a re-invented require() with a couple of quirks,
including a separate cache), it won't be able to load the esm properly
from the cache.

PR-URL: https://github.com/nodejs/node/pull/59679
Refs: https://github.com/nodejs/node/issues/59666
Refs: https://github.com/nodejs/node/issues/52697
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2025-09-08 14:59:31 +00:00
James M Snell b4af647920 quic: reduce boilerplate and other minor cleanups
While I get that macros aren't the most loved thing in
the world, they do help reduce boilerplate, and there's
a lot of boilerplate in the QUIC code. This commit cleans
up some of that boilerplate, particularly around the
use of v8 APIs.

PR-URL: https://github.com/nodejs/node/pull/59342
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev>
2025-09-07 19:29:02 -07:00
James M Snell cd9fd09a27 quic: multiple fixups and updates
Signed-off-by: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/59342
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev>
2025-09-07 19:29:01 -07:00
James M Snell a6c5d27739 quic: update more of the quic to the new compile guard
Signed-off-by: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/59342
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev>
2025-09-07 19:28:59 -07:00
James M Snell ee7b8ab29c quic: few additional small comment edits in cid.h
Signed-off-by: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/59342
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev>
2025-09-07 19:28:57 -07:00
Nicholas Paun f855cda2a2 fs: fix wrong order of file names in cpSync error message
PR-URL: https://github.com/nodejs/node/pull/59775
Reviewed-By: Dario Piotrowicz <dario.piotrowicz@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2025-09-07 18:15:13 +00:00
Filip Skokan a3cd430ef8 crypto: support Ed448 and ML-DSA context parameter in node:crypto
PR-URL: https://github.com/nodejs/node/pull/59570
Reviewed-By: James M Snell <jasnell@gmail.com>
2025-09-07 13:17:42 +00:00
Filip Skokan 0124e0e0d7 crypto: support Ed448 and ML-DSA context parameter in Web Cryptography
PR-URL: https://github.com/nodejs/node/pull/59570
Reviewed-By: James M Snell <jasnell@gmail.com>
2025-09-07 13:17:42 +00:00
Filip Skokan 14c68e3b53 crypto: add KMAC Web Cryptography algorithms
PR-URL: https://github.com/nodejs/node/pull/59647
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2025-09-06 22:43:15 +00:00
Joyee Cheung 6428e2e4ca sea: implement sea.getAssetKeys()
This adds a new API to allow the bundled script in SEA to query
the list of assets.

PR-URL: https://github.com/nodejs/node/pull/59661
Refs: https://github.com/nodejs/single-executable/discussions/112
Reviewed-By: Darshan Sen <raisinten@gmail.com>
2025-09-04 11:58:50 +00:00
Anna Henningsen 3903ee8cf3 src: track async resources via pointers to stack-allocated handles
This addresses an existing `TODO` to remove the need for a separate
`LocalVector`. Since all relevant handles are already present on the
stack, we can track their addresses instead of storing the objects
in a separate container.

PR-URL: https://github.com/nodejs/node/pull/59704
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2025-09-04 09:35:39 +00:00
Thomas Klausner 5600c0eb40 src: fix build on NetBSD
Include missing cmath.h header.

Fixes: https://github.com/nodejs/node/issues/59714
PR-URL: https://github.com/nodejs/node/pull/59718
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
Reviewed-By: Richard Lau <richard.lau@ibm.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2025-09-04 08:00:30 +00:00
Chengzhong Wu 737b42e4ee src: fix race on process exit and off thread CA loading
When calling `process.exit()` or on uncaught exceptions as soon as the
process starts, the process will try to terminate immediately. In this
case, there could be a race condition on the unfinished off-thread
system CA loader which tries to access the OpenSSL API which has been
de-inited on the main thread.

PR-URL: https://github.com/nodejs/node/pull/59632
Refs: https://github.com/nodejs/node/pull/59550
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2025-09-02 10:19:25 +00:00
Edy Silva 961554c89d src,sqlite: refactor value conversion
PR-URL: https://github.com/nodejs/node/pull/59659
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Zeyu "Alex" Yang <himself65@outlook.com>
2025-09-02 02:57:19 +00:00
theanarkh 255dd7b62c worker: optimize cpu profile implement
PR-URL: https://github.com/nodejs/node/pull/59683
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2025-09-01 16:25:48 +00:00
Joyee Cheung fb22c7f414 src: separate module.hasAsyncGraph and module.hasTopLevelAwait
Clarify the names - hasAsyncGraph means either the module or its
dependencies contains top-level await; hasTopLevelAwait means the
module itself contains top-level await. Theoratically the former
can be inferred from iterating over the dependencies but for the
built-in loader it's currently not fully reliable until we eliminate
async linking.

Also remove the hasTopLevelAwait method - we can simply put it
on the module wrap for source text modules right after compilation.

PR-URL: https://github.com/nodejs/node/pull/59675
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2025-09-01 14:59:04 +00:00
Michaël Zasso 45a8b5503e src: use non-deprecated Get/SetPrototype methods
Refs: https://github.com/v8/v8/commit/5e139e98d1e4d8bbcccf7b15cd8e7d08b28e4a81
PR-URL: https://github.com/nodejs/node/pull/59671
Reviewed-By: Edy Silva <edigleyssonsilva@gmail.com>
Reviewed-By: Vladimir Morozov <vmorozov@microsoft.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2025-08-31 20:17:31 +00:00
Nicholas Paun fe1a2e33f5 fs: fix dereference: false on cpSync
PR-URL: https://github.com/nodejs/node/pull/59681
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Dario Piotrowicz <dario.piotrowicz@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2025-08-31 17:30:53 +00:00
Chengzhong Wu 5af035503a src: migrate WriteOneByte to WriteOneByteV2
PR-URL: https://github.com/nodejs/node/pull/59634
Fixes: https://github.com/nodejs/node/issues/59555
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2025-08-29 22:41:00 +00:00
theanarkh cbabdbf3f2 src: remove duplicate code
PR-URL: https://github.com/nodejs/node/pull/59649
Reviewed-By: Edy Silva <edigleyssonsilva@gmail.com>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2025-08-29 17:20:54 +00:00
theanarkh ac92c928ef worker: add cpu profile APIs for worker
PR-URL: https://github.com/nodejs/node/pull/59428
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
2025-08-29 15:42:21 +00:00
Chengzhong Wu 95bef5af88 vm: sync-ify SourceTextModule linkage
Split `module.link(linker)` into two synchronous step
`sourceTextModule.linkRequests()` and
`sourceTextModule.instantiate()`. This allows creating vm modules and
resolving the dependencies in a complete synchronous procedure.

This also makes `syntheticModule.link()` redundant. The link step for a
SyntheticModule is no-op and is already taken care in the constructor
by initializing the binding slots with the given export names.

PR-URL: https://github.com/nodejs/node/pull/59000
Refs: https://github.com/nodejs/node/issues/37648
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2025-08-29 12:17:18 +00:00
Joyee Cheung bcb802cca0 sea: allow using inspector command line flags with SEA
The inspector command line flags should be allowed via NODE_OPTIONS,
though it should not be consumed when passed directly to the SEA.
This patch allows it to consume inspector flags from NODE_OPTIONS
and add tests for different behaviors.

PR-URL: https://github.com/nodejs/node/pull/59568
Fixes: https://github.com/nodejs/node/issues/51688
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
2025-08-27 19:38:55 +00:00
theanarkh 83c955d8c2 src: add name for more threads
PR-URL: https://github.com/nodejs/node/pull/59601
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
2025-08-27 17:20:32 +00:00
Darshan Sen c86c488e18 inspector: add http2 tracking support
This allows tracking HTTP/2 calls through the Network tab of
Chrome DevTools for Node.js.

Signed-off-by: Darshan Sen <raisinten@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/59611
Refs: https://github.com/nodejs/node/issues/53946
Reviewed-By: Ryuhei Shima <shimaryuhei@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Kohei Ueno <kohei.ueno119@gmail.com>
2025-08-27 16:25:13 +00:00
Joyee Cheung 89067de391 src: remove JSONParser
This is now unused after
https://redirect.github.com/nodejs/node/pull/59473 and
and https://redirect.github.com/nodejs/node/pull/59323

PR-URL: https://github.com/nodejs/node/pull/59619
Fixes: https://github.com/nodejs/node/issues/59288
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Shelley Vohr <shelley.vohr@gmail.com>
Reviewed-By: Daniel Lemire <daniel@lemire.me>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
2025-08-27 14:46:43 +00:00
Node.js GitHub Bot 5c9db1046f deps: update amaro to 1.1.2
PR-URL: https://github.com/nodejs/node/pull/59616
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Zeyu "Alex" Yang <himself65@outlook.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
2025-08-27 11:38:48 +00:00
Filip Skokan d00228f5ca crypto: support SLH-DSA KeyObject, sign, and verify
PR-URL: https://github.com/nodejs/node/pull/59537
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2025-08-26 15:41:25 +00:00
Joyee Cheung 6722642e3d sea: implement execArgvExtension
This implements the execArgvExtension configuration field for SEA,
which takes one of three string values to specify whether and how
execution arguments can be extended for the SEA at run time:

* `"none"`: No extension is allowed. Only the arguments specified
  in `execArgv` will be used,
  and the `NODE_OPTIONS` environment variable will be ignored.
* `"env"`: _(Default)_ The `NODE_OPTIONS` environment variable can
  extend the execution arguments.
  This is the default behavior to maintain backward compatibility.
* `"cli"`: The executable can be launched with
  `--node-options="--flag1 --flag2"`, and those flags
  will be parsed as execution arguments for Node.js instead of being
  passed to the user script. This allows using arguments that are
  not supported by the `NODE_OPTIONS` environment variable.

PR-URL: https://github.com/nodejs/node/pull/59560
Fixes: https://github.com/nodejs/node/issues/55573
Fixes: https://github.com/nodejs/single-executable/issues/100
Refs: https://github.com/nodejs/node/issues/51688
Reviewed-By: Xuguang Mei <meixuguang@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
2025-08-25 11:35:56 +00:00
Joyee Cheung 65858596ab crypto: load system CA certificates off thread
When --use-system-ca is enabled, load the system CA certificates
eagerly off the main thread to avoid blocking the main thread
when the first TLS connection is made.

PR-URL: https://github.com/nodejs/node/pull/59550
Refs: https://github.com/nodejs/node/issues/58990
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2025-08-25 11:35:46 +00:00
Tobias Nießen f86b652bc8 src: enforce assumptions in FIXED_ONE_BYTE_STRING
These functions are both meant to be used with a null-terminated and
thus non-empty sequence of `char`s. However, there is nothing stopping
call sites from passing zero-length sequences, which would certainly not
be null-terminated and also would cause an underflow in `N - 1`.
Therefore, this commit

- changes the size `N` of the array from `int` to `std::size_t`,
- ensures that compilation will fail if `N = 0`, and
- adds a runtime assertion that fails if the `N`-th `char` is not `\0`.

Note that the runtime assertion should be eliminated by any optimizing
compiler when given a string literal, which is how these functions are
used for the most part (though not exclusively).

PR-URL: https://github.com/nodejs/node/pull/58155
Reviewed-By: Daniel Lemire <daniel@lemire.me>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
2025-08-24 11:07:37 +00:00
Filip Skokan 8692e601cc crypto: add AES-OCB Web Cryptography algorithm
PR-URL: https://github.com/nodejs/node/pull/59539
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
2025-08-24 09:47:20 +00:00
Node.js GitHub Bot 28e6ba8e4d crypto: update root certificates to NSS 3.114
This is the certdata.txt[0] from NSS 3.114.

This is the version of NSS that shipped in Firefox 142.0 on 2025-08-19.

Certificates added:
- TrustAsia TLS ECC Root CA
- TrustAsia TLS RSA Root CA
- SwissSign RSA TLS Root CA 2022 - 1

Certificates removed:
- GlobalSign Root CA
- Entrust.net Premium 2048 Secure Server CA
- Baltimore CyberTrust Root
- Comodo AAA Services root
- XRamp Global CA Root
- Go Daddy Class 2 CA
- Starfield Class 2 CA

[0] https://raw.githubusercontent.com/nss-dev/nss/refs/tags/NSS_3_114_RTM/lib/ckfw/builtins/certdata.txt

PR-URL: https://github.com/nodejs/node/pull/59571
Reviewed-By: Richard Lau <richard.lau@ibm.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2025-08-23 23:12:43 +00:00
Alex Yang d1eabcb044 sqlite: add sqlite-type symbol for DatabaseSync
PR-URL: https://github.com/nodejs/node/pull/59405
Reviewed-By: Edy Silva <edigleyssonsilva@gmail.com>
2025-08-23 21:45:43 +00:00
Filip Skokan 589ef79bf8 crypto: support ML-KEM in Web Cryptography
PR-URL: https://github.com/nodejs/node/pull/59569
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
2025-08-23 17:01:51 +02:00
Chengzhong Wu 3b4f9b26b1 module: allow overriding linked requests for a ModuleWrap
This allows overriding linked requests for a `ModuleWrap`. The
`statusOverride` in `vm.SourceTextModule` could call `moduleWrap.link`
a second time when `statusOverride` of `linking` is set to undefined.

Overriding of linked requests should be no harm but better to be
avoided. However, this will require a follow-up fix on `statusOverride`
in `vm.SourceTextModule`.

PR-URL: https://github.com/nodejs/node/pull/59527
Fixes: https://github.com/nodejs/node/issues/59480
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
2025-08-22 12:57:07 +00:00
Edy Silva 3c1521cfa0 sqlite: handle ?NNN parameters as positional
PR-URL: https://github.com/nodejs/node/pull/59350
Reviewed-By: Zeyu "Alex" Yang <himself65@outlook.com>
2025-08-22 12:56:58 +00:00
Joyee Cheung b85e77bf27 src: use simdjson to parse --snapshot-config
PR-URL: https://github.com/nodejs/node/pull/59473
Refs: https://github.com/nodejs/node/issues/59288
Reviewed-By: Daniel Lemire <daniel@lemire.me>
2025-08-22 11:07:50 +00:00
Node.js GitHub Bot b6b7f39d3a deps: update undici to 7.14.0
PR-URL: https://github.com/nodejs/node/pull/59507
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Matthew Aitken <maitken033380023@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Richard Lau <richard.lau@ibm.com>
2025-08-21 13:54:51 +00:00
Filip Skokan f8d68d30ae crypto: support ML-KEM, DHKEM, and RSASVE key encapsulation mechanisms
PR-URL: https://github.com/nodejs/node/pull/59491
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
2025-08-20 14:30:58 +00:00
bdcab711b8 crypto: add argon2() and argon2Sync() methods
Co-authored-by: Filip Skokan <panva.ip@gmail.com>
Co-authored-by: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/50353
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2025-08-19 19:30:38 +00:00
Filip Skokan 84aaed7597 crypto: add ChaCha20-Poly1305 Web Cryptography algorithm
PR-URL: https://github.com/nodejs/node/pull/59365
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2025-08-19 15:57:08 +02:00
Shima Ryuhei ee9c8cf0cb inspector: initial support websocket inspection
Refs: https://github.com/nodejs/node/issues/53946
PR-URL: https://github.com/nodejs/node/pull/59404
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2025-08-19 10:09:14 +00:00
Moshe Atlow 64355ae97e test_runner: add option to rerun only failed tests
PR-URL: https://github.com/nodejs/node/pull/59443
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
2025-08-19 07:42:00 +00:00
Tobias Nießen 7c9c981d27 src: fix order of CHECK_NOT_NULL/dereference
`ASYNC_THROW_IF_INSUFFICIENT_PERMISSIONS` may dereference
`req_wrap_async`, so `CHECK_NOT_NULL(req_wrap_async)` should be used
before and not after.

PR-URL: https://github.com/nodejs/node/pull/59487
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Richard Lau <richard.lau@ibm.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
2025-08-18 12:17:47 +00:00
Tobias Nießen d36941d65d sqlite: avoid useless call to FromMaybe()
PR-URL: https://github.com/nodejs/node/pull/59490
Reviewed-By: Zeyu "Alex" Yang <himself65@outlook.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
2025-08-18 10:26:41 +00:00
Asaf Federman f5e6ba3d7c src: assert memory calc for max-old-space-size-percentage
Add validation to ensure that --max-old-space-size-percentage cannot
be used when available memory cannot be calculated, preventing
undefined behavior when memory detection fails.

Also enhance test-process-constrained-memory.js to support testing
in constrained environments where memory calculation may fail.

PR-URL: https://github.com/nodejs/node/pull/59460
Reviewed-By: theanarkh <theratliter@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
2025-08-18 06:51:48 +00:00
0hm☘️ bac083304d src: use simdjson::pad
PR-URL: https://github.com/nodejs/node/pull/59391
Refs: https://github.com/nodejs/node/issues/59389
Reviewed-By: Daniel Lemire <daniel@lemire.me>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2025-08-17 20:24:01 +00:00
Joyee Cheung 3fc70198e0 sea: support execArgv in sea config
The `execArgv` field can be used to specify Node.js-specific
arguments that will be automatically applied when the single
executable application starts. This allows application developers
to configure Node.js runtime options without requiring end users
to be aware of these flags.

PR-URL: https://github.com/nodejs/node/pull/59314
Refs: https://github.com/nodejs/node/issues/51688
Refs: https://github.com/nodejs/node/issues/55573
Refs: https://github.com/nodejs/single-executable/issues/100
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
2025-08-17 08:31:32 +00:00
Tobias Nießen 80fb4fe2a2 src: move shared_ptr objects in KeyObjectData
Since copying `shared_ptr` may involve costly atomic operations,
explicitly move both `shared_ptr` objects that are passed to the
private KeyObjectData constructor.

PR-URL: https://github.com/nodejs/node/pull/59472
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2025-08-16 16:06:22 +00:00