RafaelGSS and Bradley Farias
7cccd5565f
policy: makeRequireFunction on mainModule.require
...
PR-URL: https://github.com/nodejs-private/node-private/pull/358
Backport-PR-URL: https://github.com/nodejs-private/node-private/pull/371
Signed-off-by: RafaelGSS <rafael.nunu@hotmail.com >
Co-authored-by: Bradley Farias <bradley.meck@gmail.com >
Reviewed-by: Bradley Farias <bradley.meck@gmail.com >
Reviewed-by: Michael Dawson <midawson@redhat.com >
2023-02-14 21:40:02 -05:00
RafaelGSS
004e34d046
crypto: clear OpenSSL error on invalid ca cert
...
CVE-ID: CVE-2023-23919
PR-URL: https://github.com/nodejs-private/node-private/pull/370
Refs: https://hackerone.com/bugs?report_id=1808596
Reviewed-By: Michael Dawson <midawson@redhat.com >
Signed-off-by: RafaelGSS <rafael.nunu@hotmail.com >
2023-02-14 21:29:09 -05:00
Debadree Chatterjee
a87963de6b
stream: fix pipeline calling end on destination more than once
...
Fixes: https://github.com/nodejs/node/issues/42866
PR-URL: https://github.com/nodejs/node/pull/46226
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Robert Nagy <ronagy@icloud.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com >
2023-01-31 08:04:21 -05:00
Juan José
1790569518
test: improve test coverage for WHATWG TextDecoder
...
Signed-off-by: Juan José Arboleda <soyjuanarbol@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/45241
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2023-01-31 08:04:21 -05:00
Filip Skokan
52a7887b94
crypto: add CryptoKey Symbol.toStringTag
...
closes #45987
PR-URL: https://github.com/nodejs/node/pull/46042
Fixes: https://github.com/nodejs/node/issues/45987
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com >
2023-01-31 08:04:21 -05:00
Debadree Chatterjee
cde59606cd
stream: implement finished() for ReadableStream and WritableStream
...
Refs: https://github.com/nodejs/node/issues/39316
PR-URL: https://github.com/nodejs/node/pull/46205
Reviewed-By: Robert Nagy <ronagy@icloud.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2023-01-31 08:04:21 -05:00
Suyash Nayan
896027c006
test: add fix so that test exits if port 42 is unprivileged
...
PR-URL: https://github.com/nodejs/node/pull/45904
Fixes: https://github.com/nodejs/node/issues/45838
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2023-01-31 08:04:21 -05:00
vitpavlenko
a558774a40
crypto: add cipher update/final methods encoding validation
...
Refs #45189
PR-URL: https://github.com/nodejs/node/pull/45990
Refs: https://github.com/nodejs/node/issues/45189
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Filip Skokan <panva.ip@gmail.com >
2023-01-31 08:04:20 -05:00
Marco Ippolito
3e70b7d863
http: writeHead if statusmessage is undefined dont override headers
...
PR-URL: https://github.com/nodejs/node/pull/46173
Fixes: https://github.com/nodejs/node/issues/32395
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Paolo Insogna <paolo@cowtech.it >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2023-01-31 08:04:20 -05:00
theanarkh
08a6a61575
src,lib: the handle keeps loop alive in cluster rr mode
...
PR-URL: https://github.com/nodejs/node/pull/46161
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com >
2023-01-31 08:04:20 -05:00
Ben Noordhuis
599d1dc841
crypto: ensure auth tag set for chacha20-poly1305
...
Because OpenSSL v1.x doesn't do that by itself (OpenSSL v3.x does.)
Fixes: https://github.com/nodejs/node/issues/45874
PR-URL: https://github.com/nodejs/node/pull/46185
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Filip Skokan <panva.ip@gmail.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2023-01-31 08:04:19 -05:00
Deokjin Kim
3d1dd96c4f
http: refactor to use min of validateNumber for maxTotalSockets
...
Remove duplicate implementation by using min of validateNumber.
PR-URL: https://github.com/nodejs/node/pull/46115
Reviewed-By: Paolo Insogna <paolo@cowtech.it >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
2023-01-31 08:04:18 -05:00
Deokjin Kim
257224da0e
test: use os.availableParallelism()
...
Refs: https://github.com/nodejs/node/pull/45895
PR-URL: https://github.com/nodejs/node/pull/46003
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
2023-01-31 08:04:18 -05:00
Deokjin Kim
8fac4c5684
perf_hooks: fix checking range of options.figures in createHistogram
...
For `options.figures`, number between 1 and 5 is allowed. So need
to use `validateInteger` to limit max as 5.
Refs: https://github.com/nodejs/node/blob/main/doc/api/perf_hooks.md#perf_hookscreatehistogramoptions
PR-URL: https://github.com/nodejs/node/pull/45999
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2023-01-31 08:04:17 -05:00
Mike Roth
874054f469
deps: add simdutf version to metadata
...
PR-URL: https://github.com/nodejs/node/pull/46145
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
2023-01-31 08:04:16 -05:00
Jonathan Diaz
40d52fbc5f
test: add test to once() in event lib
...
This test verify if eventEmmiter param is right
PR-URL: https://github.com/nodejs/node/pull/46126
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Filip Skokan <panva.ip@gmail.com >
2023-01-31 08:04:16 -05:00
Moshe Atlow
1352f08778
assert: remove assert.snapshot
...
PR-URL: https://github.com/nodejs/node/pull/46112
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2023-01-31 08:04:16 -05:00
Filip Skokan
24a101698c
crypto: return correct bit length in KeyObject's asymmetricKeyDetails
...
PR-URL: https://github.com/nodejs/node/pull/46106
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
2023-01-31 08:04:15 -05:00
cjihrig
86554bf27c
lib: fix incorrect use of console intrinsic
...
The console object was not being frozen because the intrinsic
freezing code was accessing undefined instead of the console
object.
PR-URL: https://github.com/nodejs/node/pull/46044
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Filip Skokan <panva.ip@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2023-01-31 08:04:14 -05:00
Filip Skokan
2de50fef84
crypto: add KeyObject Symbol.toStringTag
...
PR-URL: https://github.com/nodejs/node/pull/46043
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2023-01-31 08:04:14 -05:00
Marco Ippolito
4df1fcc9db
http: join authorization headers
...
PR-URL: https://github.com/nodejs/node/pull/45982
Fixes: https://github.com/nodejs/node/issues/45699
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Paolo Insogna <paolo@cowtech.it >
2023-01-31 08:04:14 -05:00
theanarkh
8de642517e
dgram: sync the old handle state to new handle
...
PR-URL: https://github.com/nodejs/node/pull/46041
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Paolo Insogna <paolo@cowtech.it >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com >
2023-01-31 08:04:14 -05:00
Santiago Gimeno
3ad584c357
net: handle socket.write(cb) edge case
...
Make sure that when calling `write()` on a connecting socket, the
callback is called if the socket is destroyed before the connection is
established.
Fixes: https://github.com/nodejs/node/issues/30841
PR-URL: https://github.com/nodejs/node/pull/45922
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com >
Reviewed-By: Paolo Insogna <paolo@cowtech.it >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2023-01-31 08:04:13 -05:00
Ben Noordhuis
782b6f6f9f
crypto: ensure exported webcrypto EC keys use uncompressed point format
...
The WebCrypto spec apparently mandates that EC keys must be exported in
uncompressed point format. This commit makes it so.
Fixes: https://github.com/nodejs/node/issues/45859
PR-URL: https://github.com/nodejs/node/pull/46021
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Filip Skokan <panva.ip@gmail.com >
2023-01-31 08:04:13 -05:00
Deokjin Kim
f3518f3337
test: use process.hrtime.bigint instead of process.hrtime
...
`process.hrtime` is legacy. So replace `process.hrtime` with
`process.hrtime.bigint` in test.
Refs: https://github.com/nodejs/node/blob/main/doc/api/process.md#processhrtimetime
Signed-off-by: Deokjin Kim <deokjin81.kim@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/45877
Refs: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2023-01-31 08:04:13 -05:00
Deokjin Kim
aec340b312
fs: refactor to use validateInteger
...
PR-URL: https://github.com/nodejs/node/pull/46008
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
2023-01-31 08:04:12 -05:00
Santiago Gimeno
99c033ed98
src: fix crash on OnStreamRead on Windows
...
On Windows it's perfectly possible that the `uv_tcp_t` `read_cb` is
called with an error and a null `uv_buf_t` if it corresponds to a
`UV_HANDLE_ZERO_READ` read. Handle this case without crashing.
Fixes: https://github.com/nodejs/node/issues/40764
PR-URL: https://github.com/nodejs/node/pull/45878
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2023-01-31 08:04:12 -05:00
ywave620
ea73702847
process,worker: ensure code after exit() effectless
...
Cope with the delay(to the next function call) of
v8::Isolate::TerminateExecution()
PR-URL: https://github.com/nodejs/node/pull/45620
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2023-01-31 08:04:11 -05:00
Yagiz Nizipli
16ee02f2eb
buffer: add buffer.isUtf8 for utf8 validation
...
PR-URL: https://github.com/nodejs/node/pull/45947
Reviewed-By: Robert Nagy <ronagy@icloud.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2023-01-31 08:04:11 -05:00
Paolo Insogna and Luigi Pinca
3c0c5e0567
http: improved timeout defaults handling
...
Co-authored-by: Luigi Pinca <luigipinca@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/45778
Fixes: https://github.com/nodejs/node/issues/43355
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2023-01-31 08:04:10 -05:00
Daeyeon Jeong
204757719c
errors: refactor to use a method that formats a list string
...
Signed-off-by: Daeyeon Jeong <daeyeon.dev@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/45793
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2023-01-31 08:04:10 -05:00
cjihrig
b2faceff0a
os: add availableParallelism()
...
This commit exposes uv_available_parallelism() as an alternative
to cpus().length. uv_available_parallelism() is inspired by
Rust's available_parallelism().
PR-URL: https://github.com/nodejs/node/pull/45895
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2023-01-31 08:04:10 -05:00
Geoffrey Booth
7cb6fef6d6
test: fix test broken under --node-builtin-modules-path
...
PR-URL: https://github.com/nodejs/node/pull/45894
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
2023-01-24 16:38:15 -05:00
Debadree Chatterjee
a749ceda2e
src: add undici and acorn to process.versions
...
Fixes: https://github.com/nodejs/node/issues/45260
Refs: https://github.com/nodejs/node/pull/45599
Refs: https://github.com/nodejs/node/issues/45260
PR-URL: https://github.com/nodejs/node/pull/45621
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
2023-01-24 16:38:14 -05:00
Antoine du Hamel
1e32520f72
tools: add ArrayPrototypeConcat to the list of primordials to avoid
...
PR-URL: https://github.com/nodejs/node/pull/44445
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2023-01-24 16:38:14 -05:00
Erick Wendel
55e4140c34
test: fix mock.method to support class instances
...
It fixes a problem when trying to spy a method
from a class instance or static functions
on a class instance
PR-URL: https://github.com/nodejs/node/pull/45608
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2023-01-24 16:38:14 -05:00
Antoine du Hamel
784ed594ea
repl: improve robustness wrt to prototype pollution
...
PR-URL: https://github.com/nodejs/node/pull/45604
Reviewed-By: James M Snell <jasnell@gmail.com >
2023-01-24 16:14:37 -05:00
David Benjamin
757a022443
tls: don't treat fatal TLS alerts as EOF
...
SSL_RECEIVED_SHUTDOWN means not just close_notify or fatal alert. From
what I can tell, this was just a mistake? OnStreamRead's comment
suggests eof_ was intended to be for close_notify.
This fixes a bug in TLSSocket error reporting that seems to have made it
into existing tests. If we receive a fatal alert, EmitRead(UV_EOF)
would, via onConnectEnd in _tls_wrap.js, synthesize an ECONNRESET before
the alert itself is surfaced. As a result, TLS alerts received during
the handshake are misreported by Node.
See the tests that had to be updated as part of this.
PR-URL: https://github.com/nodejs/node/pull/44563
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2023-01-22 16:00:55 -05:00
Joyee Cheung
3f18a833ff
util: use private symbols in JS land directly
...
Instead of calling into C++ to use the private symbols, use an
ObjectTemplate to create an object that holds the symbols and
use them directly from JS land.
PR-URL: https://github.com/nodejs/node/pull/45379
Backport-PR-URL: https://github.com/nodejs/node/pull/45674
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Signed-off-by: Daeyeon Jeong <daeyeon.dev@gmail.com >
2023-01-03 08:39:17 -05:00
Ben Noordhuis
7e386f8cb9
test: remove flaky parallel/test-process-wrap test
...
It's an old test (added when switching from libev to libuv) that tests
implementation details of the internal process_wrap bindings. That kind
of thing doesn't need testing in this day and age, and since the test is
flaky, simply remove it instead of sinking time in fixing it up.
Fixes: https://github.com/nodejs/node/issues/45805
PR-URL: https://github.com/nodejs/node/pull/45806
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2023-01-03 08:39:17 -05:00
Marco Ippolito
108220cb05
doc: buffer.fill empty value
...
PR-URL: https://github.com/nodejs/node/pull/45794
Fixes: https://github.com/nodejs/node/issues/45727
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Paolo Insogna <paolo@cowtech.it >
2023-01-03 08:39:17 -05:00
Jithil P Ponnan
a58bf148b3
src: add uvwasi version
...
PR-URL: https://github.com/nodejs/node/pull/45639
Refs: https://github.com/nodejs/node/issues/45260
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: theanarkh <theratliter@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2023-01-03 08:39:16 -05:00
Ben Noordhuis
b88ee545f2
src: make structuredClone work for process.env
...
Fixes: https://github.com/nodejs/node/issues/45380
PR-URL: https://github.com/nodejs/node/pull/45698
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
2023-01-03 08:39:15 -05:00
Debadree Chatterjee
bbaca8442a
lib: allow Writeable.toWeb() to work on http.Outgoing message
...
Attempted to fix the issue by watering down the condition being
checked in internal/streams/utils isWritableNodeStream utility
Fixes: https://github.com/nodejs/node/issues/44188
PR-URL: https://github.com/nodejs/node/pull/45642
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
2023-01-03 08:39:14 -05:00
Marco Ippolito
2fbf95662c
crypto: fix CipherBase Update int32 overflow
...
PR-URL: https://github.com/nodejs/node/pull/45769
Fixes: https://github.com/nodejs/node/issues/45757
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Filip Skokan <panva.ip@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Paolo Insogna <paolo@cowtech.it >
2023-01-03 08:39:13 -05:00
Deokjin Kim
1284789371
lib: check number of arguments in EventTarget's function
...
For now, addEventListener() only checks number of arguments.
removeEventListener() and dispatchEvent() also need checking
number of arguments.
PR-URL: https://github.com/nodejs/node/pull/45668
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com >
2023-01-03 08:39:13 -05:00
MURAKAMI Masahiko
500024384a
test_runner: add resetCalls to MockFunctionContext
...
This commit allows tests in test runner to reset
the calls of mock function
Refs: https://github.com/nodejs/node/pull/45326#discussion_r1014728750
PR-URL: https://github.com/nodejs/node/pull/45710
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
2023-01-03 08:39:12 -05:00
Deokjin Kim
a1831dacbf
net: check autoSelectFamilyAttemptTimeout is positive
...
In document, `autoSelectFamilyAttemptTimeout` is described as
positive integer because it's time unit. But there is no checking
whether it's positive integer.
PR-URL: https://github.com/nodejs/node/pull/45740
Refs: https://github.com/nodejs/node/blob/main/doc/api/net.md#socketconnectoptions-connectlistener
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Paolo Insogna <paolo@cowtech.it >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2023-01-03 08:39:12 -05:00
Paolo Insogna
048795dab0
net: add autoSelectFamily and autoSelectFamilyAttemptTimeout options
...
PR-URL: https://github.com/nodejs/node/pull/44731
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Robert Nagy <ronagy@icloud.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
2023-01-03 08:39:10 -05:00
Robert Nagy
cbd710bbf4
http: make OutgoingMessage more streamlike
...
Implement missing getters error & closed. Add support for
proper "writable" check through `isWritable` helper.
We cannot fix the `OutgoingMessage.writable` property as that
would break the ecosystem.
PR-URL: https://github.com/nodejs/node/pull/45672
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de >
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2023-01-03 08:39:09 -05:00