Filip Skokan
47d2d62029
typings: add typing for crypto
...
Signed-off-by: Filip Skokan <panva.ip@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/64122
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
2026-06-27 11:50:27 +02:00
Yagiz Nizipli
daecfc0800
child_process: pass spawn options to the binding positionally
...
ChildProcess.prototype.spawn() handed a single options object to the
ProcessWrap::Spawn() binding, which then read about a dozen properties
back out individually with Object::Get(). Each of those is a property
lookup across the JS/C++ boundary on every spawn.
Pass file, args, cwd, envPairs, stdio, uid and gid as positional
arguments and pack the boolean flags (detached, windowsHide,
windowsVerbatimArguments) into a single integer whose bit values are
exported from the binding as `constants`. The native side then reads
each value directly from the call arguments.
Add internal typings for the process_wrap binding (previously untyped)
describing the new positional spawn() signature and the exported
constants.
There is no observable behavior change. Spawn wall-clock time is
dominated by the operating system process-creation cost and is
unchanged; this reduces the per-spawn work done on the main thread and
clarifies the contract between the JS and C++ layers.
Signed-off-by: Yagiz Nizipli <yagiz@nizipli.com >
PR-URL: https://github.com/nodejs/node/pull/63930
Reviewed-By: Filip Skokan <panva.ip@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Daniel Lemire <daniel@lemire.me >
2026-06-20 15:45:11 +00:00
Yagiz Nizipli
a1074b8460
child_process: serialize advanced IPC messages natively
...
The `advanced` IPC serialization codec was implemented in JavaScript
(ChildProcessSerializer / ChildProcessDeserializer in
lib/internal/child_process/serialization.js). It allocated a wrapper
serializer/deserializer per message and crossed the JS/C++ boundary
several times for every message (writeHeader, writeValue, releaseBuffer,
readHeader, readValue and friends).
Move the codec into a native `ipc_serdes` binding that drives the V8
ValueSerializer/ValueDeserializer with a C++ delegate. The wire format
is preserved byte-for-byte: a big-endian uint32 length prefix followed
by the V8 payload, with ArrayBufferViews tagged as host objects so that
Node Buffers round-trip as Buffers rather than plain Uint8Arrays. The
JSON codec is left unchanged.
A cctest (test/cctest/test_node_ipc_serdes.cc) exercises the binding
directly, covering round-trips of primitives, objects, typed arrays and
Buffers (including the Buffer-vs-Uint8Array distinction) and asserting
the big-endian length-prefix framing.
Round-trip throughput
(benchmark/child_process/child-process-ipc-roundtrip):
payload before after change
64 B ~300k/s ~800k/s +166%
1 KiB ~272k/s ~616k/s +126%
16 KiB ~91k/s ~120k/s +32%
64 KiB ~30k/s ~35k/s +16%
The gain is largest for small messages, where per-message JavaScript
overhead dominated, and tapers for large messages, where the actual
serialization (already native) dominates.
Signed-off-by: Yagiz Nizipli <yagiz@nizipli.com >
PR-URL: https://github.com/nodejs/node/pull/63933
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Filip Skokan <panva.ip@gmail.com >
2026-06-18 18:14:46 +00:00
Renegade334
f2e3c108d8
lib: improve control abstraction coverage in frozen intrinsics
...
Signed-off-by: Renegade334 <contact.9a5d6388@renegade334.me.uk >
PR-URL: https://github.com/nodejs/node/pull/63698
Reviewed-By: Jordan Harband <ljharb@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2026-06-13 17:31:17 +00:00
Renegade334
be93790f23
lib: add Iterator global to primordials
...
Signed-off-by: Renegade334 <contact.9a5d6388@renegade334.me.uk >
PR-URL: https://github.com/nodejs/node/pull/63698
Reviewed-By: Jordan Harband <ljharb@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2026-06-13 17:31:16 +00:00
Robert Nagy
f2fda6013a
buffer: add end parameter
...
To limit how far into the buffer we search without allocating an
unnecessary subarray.
Signed-off-by: Robert Nagy <ronay@icloud.com >
PR-URL: https://github.com/nodejs/node/pull/62390
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2026-04-11 19:24:50 +00:00
René
5e417551e2
typings: rationalise TypedArray types
...
PR-URL: https://github.com/nodejs/node/pull/62174
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Zeyu "Alex" Yang <himself65@outlook.com >
2026-03-12 02:02:47 +00:00
Yagiz Nizipli
37e40040a7
build,deps: replace cjs-module-lexer with merve
...
PR-URL: https://github.com/nodejs/node/pull/61456
Reviewed-By: Guy Bedford <guybedford@gmail.com >
Reviewed-By: Daniel Lemire <daniel@lemire.me >
Reviewed-By: Richard Lau <richard.lau@ibm.com >
2026-01-28 07:29:58 +00:00
Michael Smith
91a99786ae
src: cache missing package.json files in the C++ package config cache
...
PR-URL: https://github.com/nodejs/node/pull/60425
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2026-01-20 13:02:25 +00:00
Taejin Kim
1155adbd23
typings: add typing for string_decoder
...
PR-URL: https://github.com/nodejs/node/pull/61368
Reviewed-By: Aviv Keller <me@aviv.sh >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com >
2026-01-16 01:14:30 +00:00
Nikita Skovoroda
0b02b922a8
lib: implement all 1-byte encodings in js
...
PR-URL: https://github.com/nodejs/node/pull/61093
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: René <contact.9a5d6388@renegade334.me.uk >
2025-12-30 18:56:47 +00:00
Antoine du Hamel
14f02fc2f7
lib,src,test: fix tests without SQLite
...
PR-URL: https://github.com/nodejs/node/pull/60906
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2025-12-11 23:04:24 +01:00
Chengzhong Wu
32ea48d749
lib,src: isInsideNodeModules should test on the first non-internal frame
...
PR-URL: https://github.com/nodejs/node/pull/60991
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
Reviewed-By: Daniel Lemire <daniel@lemire.me >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2025-12-10 13:59:35 +00:00
Mert Can Altin
f65b0bc81a
src: implement Windows-1252 encoding support and update related tests
...
PR-URL: https://github.com/nodejs/node/pull/60893
Fixes: https://github.com/nodejs/node/issues/60888
Fixes: https://github.com/nodejs/node/issues/59515
Fixes: https://github.com/nodejs/node/issues/56542
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
2025-12-04 14:23:01 +00:00
Renegade334
48d0cd7fdc
src: add internal binding for constructing SharedArrayBuffers
...
PR-URL: https://github.com/nodejs/node/pull/60497
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Shelley Vohr <shelley.vohr@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2025-11-03 13:23:20 +00:00
Woohyun Sung
8656088090
typings: add missing properties and method in Worker
...
PR-URL: https://github.com/nodejs/node/pull/60257
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2025-10-18 03:36:53 +00:00
Woohyun Sung
2a18aee4aa
typings: add missing properties in HTTPParser
...
PR-URL: https://github.com/nodejs/node/pull/60257
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2025-10-18 03:36:53 +00:00
Woohyun Sung
355252c749
typings: delete undefined property in ConfigBinding
...
PR-URL: https://github.com/nodejs/node/pull/60257
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2025-10-18 03:36:52 +00:00
Antoine du Hamel
822a8c3244
perf_hooks: fix stack overflow error
...
PR-URL: https://github.com/nodejs/node/pull/60084
Fixes: https://github.com/nodejs/node/issues/54768
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2025-10-13 10:05:45 +02:00
방진혁
bab752d4db
typings: add buffer internalBinding typing
...
PR-URL: https://github.com/nodejs/node/pull/60163
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2025-10-10 22:37:01 +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
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
Michael Smith
e596098e50
src: reduce the nearest parent package JSON cache size
...
PR-URL: https://github.com/nodejs/node/pull/59888
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
Reviewed-By: Edy Silva <edigleyssonsilva@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2025-09-17 10:26:52 +00:00
Nam Yooseong
7c2cb67141
typings: remove unused imports
...
PR-URL: https://github.com/nodejs/node/pull/59880
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2025-09-15 15:54:23 +00:00
방진혁
9d1c9c789b
typings: add typing for 'uv'
...
PR-URL: https://github.com/nodejs/node/pull/59606
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com >
2025-09-08 16:13:05 +00:00
Lee Jiho
e23105794c
typings: add missing properties in ConfigBinding
...
PR-URL: https://github.com/nodejs/node/pull/59585
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com >
2025-09-08 16:12:56 +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
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
성우현 | Woohyun Sung
5abb0666e7
typings: add missing URLBinding methods
...
PR-URL: https://github.com/nodejs/node/pull/59468
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2025-08-21 20:39:21 +00:00
Nam Yooseong
0cb9922d6e
typings: improve internal binding types
...
- Add typing for 'encoding_binding'
PR-URL: https://github.com/nodejs/node/pull/59351
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com >
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com >
2025-08-09 10:15:38 +00:00
Michaël Zasso
af452b8119
typings: improve internal binding types
...
- Add typings for `async_context_frame`, `icu`, and `sea` bindings
- Add a few missing exports on other bindings
- Add a few missing primordials
PR-URL: https://github.com/nodejs/node/pull/59176
Reviewed-By: Zeyu "Alex" Yang <himself65@outlook.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
2025-08-02 05:43:00 +00:00
theanarkh
0ba6e0d7ce
worker: add cpuUsage for worker
...
PR-URL: https://github.com/nodejs/node/pull/59177
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Ilyas Shabi <ilyasshabi94@gmail.com >
2025-07-28 10:42:44 +00:00
ishabi
062e8b5a74
worker: add web locks api
...
PR-URL: https://github.com/nodejs/node/pull/58666
Fixes: https://github.com/nodejs/node/pull/36502
Refs: https://w3c.github.io/web-locks
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev >
Reviewed-By: Filip Skokan <panva.ip@gmail.com >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2025-07-18 07:55:10 -07:00
Shima Ryuhei
b7db89f491
inspector: initial support for Network.loadNetworkResource
...
Fixes: https://github.com/nodejs/node/issues/57873
PR-URL: https://github.com/nodejs/node/pull/58077
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
2025-07-10 12:34:11 +00:00
Dario Piotrowicz
af2ba36816
lib: fix incorrect ArrayBufferPrototypeGetDetached primordial type
...
PR-URL: https://github.com/nodejs/node/pull/58978
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com >
2025-07-09 11:05:39 +00:00
Renegade334
2d3fcf25bf
typings: add Atomics primordials
...
PR-URL: https://github.com/nodejs/node/pull/58577
Reviewed-By: Jordan Harband <ljharb@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Jason Zhang <xzha4350@gmail.com >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
Reviewed-By: Jacob Smith <jacob@frende.me >
2025-06-15 16:31:12 +02:00
Meghan Denny
f48c6f0572
typings: add ZSTD_COMPRESS, ZSTD_DECOMPRESS to internalBinding
...
PR-URL: https://github.com/nodejs/node/pull/58655
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Xuguang Mei <meixuguang@gmail.com >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
2025-06-12 01:47:49 +00:00
Dario Piotrowicz
3c351c272f
fs: improve cpSync no-filter copyDir performance
...
move the logic in `cpSync` that copies a directory from
src to dest from JavaScript to C++ increasing its performance
Note: this improvement is not applied if the filter option is
provided, such optimization will be looked into separately
PR-URL: https://github.com/nodejs/node/pull/58461
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
2025-06-07 14:44:25 +00:00
Shima Ryuhei
0854aa3324
typings: add inspector internalBinding typing
...
PR-URL: https://github.com/nodejs/node/pull/58492
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
2025-05-30 11:11:34 +00:00
Dario Piotrowicz
1a5ab963b8
fs: improve cpSync dest overriding performance
...
move the logic in `cpSync` that overrides existing
dest files from JavaScript to C++ increasing its performance
PR-URL: https://github.com/nodejs/node/pull/58160
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
2025-05-23 12:26:04 +00:00
Dario Piotrowicz
06fb007988
typings: remove no longer valid FixedSizeBlobCopyJob type
...
PR-URL: https://github.com/nodejs/node/pull/58305
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
2025-05-22 09:48:29 +00:00
Dario Piotrowicz
d824a929be
typings: remove no longer valid revokeDataObject type
...
PR-URL: https://github.com/nodejs/node/pull/58305
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
2025-05-22 09:48:29 +00:00
Chengzhong Wu
a436f7b492
fs: unexpose internal constants
...
`EXTENSIONLESS_FORMAT_JAVASCRIPT` and `EXTENSIONLESS_FORMAT_WASM` are
only used internally through binding `getFormatOfExtensionlessFile`.
They should not be exposed publicly.
PR-URL: https://github.com/nodejs/node/pull/58327
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: LiviaMedeiros <livia@cirno.name >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com >
2025-05-16 19:40:17 +00:00
Dario Piotrowicz
6dcd4621bd
src: remove unused checkMessagePort internal binding
...
PR-URL: https://github.com/nodejs/node/pull/58267
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
2025-05-12 21:44:58 +00:00
Jason Zhang
5b134db460
typings: add missing typings for TypedArray
...
PR-URL: https://github.com/nodejs/node/pull/58248
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2025-05-12 05:56:31 +00:00
Matteo Collina
33d8e03d9d
worker: add worker.getHeapStatistics()
...
Adds worker.getHeapStatistics() so that the heap usage of the worker
could be observer from the parent thread.
Signed-off-by: Matteo Collina <hello@matteocollina.com >
PR-URL: https://github.com/nodejs/node/pull/57888
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com >
2025-04-17 10:30:59 +00:00
Dario Piotrowicz
8c254658bb
module: improve getPackageType performance
...
PR-URL: https://github.com/nodejs/node/pull/57599
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com >
2025-04-06 07:47:53 +00:00
Paolo Insogna
e027791c6d
process: add threadCpuUsage
...
PR-URL: https://github.com/nodejs/node/pull/56467
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2025-02-21 14:14:02 +00:00
Yagiz Nizipli and Daniel Lemire
43c593c428
url: add URLPattern implementation
...
Co-authored-by: Daniel Lemire <daniel@lemire.me >
PR-URL: https://github.com/nodejs/node/pull/56452
Reviewed-By: Daniel Lemire <daniel@lemire.me >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Jordan Harband <ljharb@gmail.com >
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com >
2025-02-01 02:13:57 +00:00
Edigleysson Silva (Edy)
a73c41c51e
sqlite: aggregate constants in a single property
...
PR-URL: https://github.com/nodejs/node/pull/56213
Fixes: https://github.com/nodejs/node/issues/56193
Refs: https://github.com/nodejs/node/issues/56193
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com >
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com >
2024-12-17 17:36:58 +00:00