Daeyeon Jeong
29bcd47738
net: fix socket._getpeername
...
Fixes: https://github.com/nodejs/node/issues/43009
If calling `this._handle.getpeername` returns an error at the first
call, its result shouldn't be cached to `this._peername`.
Signed-off-by: Daeyeon Jeong daeyeon.dev@gmail.com
PR-URL: https://github.com/nodejs/node/pull/43010
Reviewed-By: Paolo Insogna <paolo@cowtech.it >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Zeyu "Alex" Yang <himself65@outlook.com >
2022-07-25 21:44:27 -04:00
Feng Yu
f0ed1aed8d
test: remove test-whatwg-events-add-event-listener-options-once.js
...
PR-URL: https://github.com/nodejs/node/pull/43877
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2022-07-25 21:44:26 -04:00
theanarkh
19e8876877
trace_events: trace net connect event
...
PR-URL: https://github.com/nodejs/node/pull/43903
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com >
2022-07-25 21:44:26 -04:00
Andreu Botella
88505556fe
test: work scheduled in process.nextTick can keep the event loop alive
...
PR-URL: https://github.com/nodejs/node/pull/43787
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Ujjwal Sharma <ryzokuken@disroot.org >
2022-07-25 21:44:26 -04:00
Lenvin Gonsalves
cd0d9ddb7c
test_runner: add support for boolean values for concurrency option
...
PR-URL: https://github.com/nodejs/node/pull/43887
Fixes: https://github.com/nodejs/node/issues/43837
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Jacob Smith <jacob@frende.me >
2022-07-25 21:44:25 -04:00
Antoine du Hamel
f98020138a
test_runner: validate timeout option
...
PR-URL: https://github.com/nodejs/node/pull/43843
Reviewed-By: Feng Yu <F3n67u@outlook.com >
2022-07-25 21:44:25 -04:00
Daeyeon Jeong
2266a4b6d6
stream: improve respondWithNewView()
...
This fixes validating an ArrayBufferView given to
ReadableStreamBYOBRequest.respondWithNewView() to improve the web
streams compatibility.
Signed-off-by: Daeyeon Jeong daeyeon.dev@gmail.com
PR-URL: https://github.com/nodejs/node/pull/43866
Reviewed-By: Darshan Sen <raisinten@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2022-07-25 21:44:25 -04:00
Tobias Nießen
81a21946eb
test: simplify test-tls-set-secure-context
...
Instead of recursively scheduling makeRemainingRequests and ignoring its
outcome, safely loop within the async function.
Avoid unncessary async lambda functions passed to assert.rejects.
Use events.once() to simplify control flow in makeRequest, instead of
manually constructing a Promise.
PR-URL: https://github.com/nodejs/node/pull/43878
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2022-07-25 21:44:20 -04:00
cola119
2c47e58ea0
src: fix regression that a source marker is lost
...
PR-URL: https://github.com/nodejs/node/pull/43086
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Ben Coe <bencoe@gmail.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
2022-07-25 21:43:50 -04:00
Moshe Atlow
58d15b3687
test_runner: pass signal on timeout
...
PR-URL: https://github.com/nodejs/node/pull/43911
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2022-07-25 21:43:50 -04:00
theanarkh
25ec71db63
http: fix http server connection list when close
...
PR-URL: https://github.com/nodejs/node/pull/43949
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Paolo Insogna <paolo@cowtech.it >
Reviewed-By: Feng Yu <F3n67u@outlook.com >
2022-07-25 21:43:49 -04:00
Livia Medeiros
61cd11a8a7
test: use common.mustNotMutateObjectDeep() in fs tests
...
PR-URL: https://github.com/nodejs/node/pull/43819
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2022-07-25 21:43:49 -04:00
Robert Nagy
bf3991b406
stream: fix 0 transform hwm backpressure
...
PR-URL: https://github.com/nodejs/node/pull/43685
Refs: https://github.com/nodejs/node/issues/42457
Refs: https://github.com/nodejs/node/pull/43648/files
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2022-07-25 21:43:48 -04:00
theanarkh
7b276b89b9
cluster: send connection to other server when worker drop it
...
PR-URL: https://github.com/nodejs/node/pull/43747
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Paolo Insogna <paolo@cowtech.it >
2022-07-25 21:43:47 -04:00
jiahao.si
67b4edde37
dns: fix getServers return undefined
...
PR-URL: https://github.com/nodejs/node/pull/43922
Reviewed-By: Paolo Insogna <paolo@cowtech.it >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2022-07-25 21:43:47 -04:00
Tobias Nießen
efd5e0e925
test: simplify ReplStream.wait()
...
PR-URL: https://github.com/nodejs/node/pull/43857
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2022-07-25 21:43:47 -04:00
Daeyeon Jeong
dfc4832ef1
events: expose CustomEvent on global with CLI flag
...
Signed-off-by: Daeyeon Jeong daeyeon.dev@gmail.com
PR-URL: https://github.com/nodejs/node/pull/43885
Fixes: https://github.com/nodejs/node/issues/40678
Refs: https://github.com/nodejs/node/pull/43514
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
Reviewed-By: Mestery <mestery@protonmail.com >
2022-07-25 21:43:46 -04:00
theanarkh
ca658c8afe
http: add drop request event for http server
...
PR-URL: https://github.com/nodejs/node/pull/43806
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2022-07-25 21:43:45 -04:00
Antoine du Hamel
8b0248506f
test_runner: do not report an error when tests are passing
...
PR-URL: https://github.com/nodejs/node/pull/43919
Reviewed-By: Mestery <mestery@protonmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2022-07-25 21:43:44 -04:00
Paolo Insogna
9c699bd8a8
http: wait for pending responses in closeIdleConnections
...
PR-URL: https://github.com/nodejs/node/pull/43890
Fixes: https://github.com/nodejs/node/issues/43771
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
2022-07-25 21:43:44 -04:00
KrayzeeKev
c782c3dc69
test: ensure NODE_EXTRA_CA_CERTS not set before tests
...
The 'test-tls-env-extra-ca-file-load.js' test assumes that
NODE_EXTRA_CA_CERTS is not set. If the build environment
happens to have it set, this test will fail. This change
deletes that env var before running the test.
PR-URL: https://github.com/nodejs/node/pull/43858
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2022-07-25 21:43:42 -04:00
John Gee
acfc33ca8c
util: add tokens to parseArgs
...
Offer additional meta-data for building
custom and additional behaviour on
top of parseArgs.
PR-URL: https://github.com/nodejs/node/pull/43459
Reviewed-By: Ben Coe <bencoe@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2022-07-25 21:43:41 -04:00
Livia Medeiros
100f6deb09
fs: use signed types for stat data
...
This allows to support timestamps before 1970-01-01.
On Windows, it's not supported due to Y2038 issue.
PR-URL: https://github.com/nodejs/node/pull/43714
Fixes: https://github.com/nodejs/node/issues/43707
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2022-07-25 21:43:41 -04:00
木杉
c1893b7a7c
child_process: avoid repeated calls to normalizeSpawnArguments
...
PR-URL: https://github.com/nodejs/node/pull/43345
Fixes: https://github.com/nodejs/node/issues/43333
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: LiviaMedeiros <livia@cirno.name >
2022-07-25 21:43:40 -04:00
Daeyeon Jeong
e4473952ae
events: add CustomEvent
...
This implements the Web API `CustomEvent` in `internal/event_target`.
Signed-off-by: Daeyeon Jeong daeyeon.dev@gmail.com
PR-URL: https://github.com/nodejs/node/pull/43514
Refs: https://github.com/nodejs/node/issues/40678
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2022-07-25 21:43:38 -04:00
Tobias Nießen
aba9c8ebea
repl: fix overzealous top-level await
...
Fixes: https://github.com/nodejs/node/issues/43777
PR-URL: https://github.com/nodejs/node/pull/43827
Reviewed-By: Guy Bedford <guybedford@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2022-07-25 21:43:37 -04:00
Ben Noordhuis
d7cfd0c5ba
v8: serialize BigInt64Array and BigUint64Array
...
Teach the serializer about BigInt64Array and BigUint64Array.
I open-coded the type-to-index mapper to stay compatible with the
current wire format without undue code gymnastics.
PR-URL: https://github.com/nodejs/node/pull/43571
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2022-07-25 21:43:35 -04:00
theanarkh
249365524e
src: fix node watchdog race condition
...
PR-URL: https://github.com/nodejs/node/pull/43780
Fixes: https://github.com/nodejs/node/issues/43699
Reviewed-By: Darshan Sen <raisinten@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2022-07-25 21:43:34 -04:00
Stephen Belanger
324473ca32
lib: improved diagnostics_channel subscribe/unsubscribe
...
Adds a new top-level subscribe/unsubscribe which will ref/unref the
channel WeakReference to prevent subscriptions from getting garbage
collected.
PR-URL: https://github.com/nodejs/node/pull/42714
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de >
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
Reviewed-By: Vladimir de Turckheim <vlad2t@hotmail.com >
2022-07-25 21:43:33 -04:00
Stephen Belanger
6bcd40dd85
domain: fix vm promise tracking while keeping isolation
...
PR-URL: https://github.com/nodejs/node/pull/43556
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
2022-07-25 21:43:33 -04:00
legendecas
6f1d2dfb9d
test: add test on worker process.exit in async modules
...
PR-URL: https://github.com/nodejs/node/pull/43751
Refs: https://github.com/v8/v8/commit/22698d267667ad36f8b1d2c1f5ec71f54fcea3eb
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Jiawen Geng <technicalcute@gmail.com >
Reviewed-By: Gus Caplan <me@gus.host >
2022-07-25 21:43:32 -04:00
LiviaMedeiros
776cc3abbd
test: use common.mustNotMutateObjectDeep() in immutability tests
...
PR-URL: https://github.com/nodejs/node/pull/43196
Reviewed-By: Darshan Sen <raisinten@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2022-07-25 21:43:31 -04:00
LiviaMedeiros
42f2deb3a0
test: add common.mustNotMutateObjectDeep()
...
This function returns a Proxy object that throws on attempt to mutate it
Functions and primitives are returned directly
PR-URL: https://github.com/nodejs/node/pull/43196
Reviewed-By: Darshan Sen <raisinten@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2022-07-25 21:43:31 -04:00
txxnano
a057510037
stream: initial approach to include strategy options on Readable.toWeb()
...
PR-URL: https://github.com/nodejs/node/pull/43515
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2022-07-25 21:43:30 -04:00
Tobias Nießen
a9ecba2fa8
test: mark test-http-client-response-timeout flaky
...
Refs: https://github.com/nodejs/node/issues/43680
PR-URL: https://github.com/nodejs/node/pull/43792
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Beth Griggs <bgriggs@redhat.com >
2022-07-25 21:43:29 -04:00
Feng Yu
294f0ef4df
test: mark test-net-connect-reset-until-connected flaky on freebsd
...
PR-URL: https://github.com/nodejs/node/pull/43613
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2022-07-12 07:42:00 +02:00
Ouyang Yadong
ce3a22a9e3
cluster: fix closing dgram sockets in cluster workers throws errors
...
This fixes closing dgram sockets right after binding in cluster
workers will throws `ERR_SOCKET_DGRAM_NOT_RUNNING` errors.
PR-URL: https://github.com/nodejs/node/pull/43709
Fixes: https://github.com/nodejs/node/issues/40671
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2022-07-12 07:41:59 +02:00
Anna Henningsen
f2f7d7b207
test: remove unnecessary .toString() calls in HTTP tests
...
Let’s not have bad examples in our test suite and instead use the
proper way of converting stream data to UTF-8
(i.e. `stream.setEncoding('utf8')`) in all places.
PR-URL: https://github.com/nodejs/node/pull/43731
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2022-07-12 07:41:59 +02:00
Robert Nagy
0f07abc80d
stream: finish pipeline if dst closes before src
...
If the destination stream is closed before the source has completed
the pipeline should finnish with premature close.
Fixes: https://github.com/nodejs/node/issues/43682
PR-URL: https://github.com/nodejs/node/pull/43701
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2022-07-12 07:41:58 +02:00
Antoine du Hamel
c8cbec4cef
lib: make validateObject less affected by prototype tampering
...
PR-URL: https://github.com/nodejs/node/pull/42929
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2022-07-12 07:41:58 +02:00
Daeyeon Jeong
fe1f740f61
src: merge RunInThisContext() with RunInContext()
...
This commit resolves a TODO in `RunInThisContext()` by merging
`RunInThisContext()` with `RunInContext()`.
Signed-off-by: Daeyeon Jeong daeyeon.dev@gmail.com
PR-URL: https://github.com/nodejs/node/pull/43225
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2022-07-12 07:41:58 +02:00
theanarkh
5d8ee519db
cluster: fix fd leak
...
PR-URL: https://github.com/nodejs/node/pull/43650
Reviewed-By: Paolo Insogna <paolo@cowtech.it >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2022-07-12 07:41:57 +02:00
theanarkh
fa5c4643e2
cluster, net: fix listen pipe with readable and writable in cluster
...
PR-URL: https://github.com/nodejs/node/pull/43634
Reviewed-By: Paolo Insogna <paolo@cowtech.it >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2022-07-12 07:41:57 +02:00
Antoine du Hamel
dc484b6f6f
lib: implement safe alternatives to Promise static methods
...
PR-URL: https://github.com/nodejs/node/pull/43728
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
2022-07-12 07:41:57 +02:00
theanarkh
8c97f63401
http: add diagnostics channel for http client
...
PR-URL: https://github.com/nodejs/node/pull/43580
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2022-07-12 07:41:57 +02:00
Ruben Bridgewater
6b16836448
util: mark cwd grey while inspecting errors
...
This changes the util.inspect() output for errors in case stack
traces contain the current working directory in their trace.
If that's the case, the cwd part is marked grey to focus on the
rest of the path.
Signed-off-by: Ruben Bridgewater <ruben@bridgewater.de >
PR-URL: https://github.com/nodejs/node/pull/41082
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2022-07-12 07:41:55 +02:00
Antoine du Hamel
40f51d8e83
test_runner: protect internals against prototype tampering
...
PR-URL: https://github.com/nodejs/node/pull/43578
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2022-07-12 07:41:55 +02:00
theanarkh
a0e7b9983c
net: add drop event for net server
...
PR-URL: https://github.com/nodejs/node/pull/43582
Reviewed-By: Paolo Insogna <paolo@cowtech.it >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com >
2022-07-12 07:41:54 +02:00
Feng Yu
c4d88b3345
test: use Object for tests variable in fs trace test
...
PR-URL: https://github.com/nodejs/node/pull/43585
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: LiviaMedeiros <livia@cirno.name >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com >
2022-07-12 07:41:54 +02:00
Kohei Ueno
baa22a7b7d
util: avoid inline access to Symbol.iterator
...
PR-URL: https://github.com/nodejs/node/pull/43683
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
2022-07-12 07:41:54 +02:00