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
legendecas
61e6d7858a
lib,src: add source map support for global eval
...
Dynamic sources with FunctionConstructor is not supported yet as
V8 prepends lines to the sources which makes the stack line number
incorrect.
PR-URL: https://github.com/nodejs/node/pull/43428
Refs: https://github.com/nodejs/node/issues/43047
Reviewed-By: Ben Coe <bencoe@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
Ouyang Yadong
bf4ac4c55f
net: remove redundant connecting assignment
...
PR-URL: https://github.com/nodejs/node/pull/43710
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Paolo Insogna <paolo@cowtech.it >
2022-07-12 07:41:56 +02:00
Livia Medeiros
5a5c4be5a3
util: add AggregateError.prototype.errors to inspect output
...
PR-URL: https://github.com/nodejs/node/pull/43646
Fixes: https://github.com/nodejs/node/issues/43645
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2022-07-12 07:41:55 +02:00
Ruben Bridgewater
bdca4d3ccf
util: remove unnecessary template string
...
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
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
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
Kid
80ced1ae31
esm: treat 307 and 308 as redirects in HTTPS imports
...
Per RFC 7231 and 7238, HTTP `307` and `308` status code are also for
redirect responses.
Fixes: https://github.com/nodejs/node/issues/43679
Refs: https://datatracker.ietf.org/doc/html/rfc7231#section-6.4.7
Refs: https://datatracker.ietf.org/doc/html/rfc7238
PR-URL: https://github.com/nodejs/node/pull/43689
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com >
Reviewed-By: Zijian Liu <lxxyxzj@gmail.com >
Reviewed-By: LiviaMedeiros <livia@cirno.name >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Jacob Smith <jacob@frende.me >
2022-07-12 07:41:53 +02:00
Moshe Atlow
ddf7518520
test_runner: cancel on termination
...
PR-URL: https://github.com/nodejs/node/pull/43549
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Nitzan Uziely <linkgoron@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2022-07-12 07:41:53 +02:00
Moshe Atlow
ef174eac87
assert: callTracker throw a specific error message when possible
...
PR-URL: https://github.com/nodejs/node/pull/43640
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Nitzan Uziely <linkgoron@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2022-07-12 07:41:53 +02:00
Moshe Atlow
e51d8c6004
test_runner: wait for stderr and stdout to complete
...
PR-URL: https://github.com/nodejs/node/pull/43666
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2022-07-12 07:41:52 +02:00
Basit
1f4f811de5
http2: log debug only when in debug mode
...
PR-URL: https://github.com/nodejs/node/pull/43626
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Ricky Zhou <0x19951125@gmail.com >
2022-07-12 07:41:52 +02:00
Alena Khineika
07836637af
bootstrap: move global initialization to js
...
PR-URL: https://github.com/nodejs/node/pull/43625
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com >
2022-07-12 07:41:52 +02:00
hemanth.hm
9d918d9923
module: add isBuiltIn method
...
PR-URL: https://github.com/nodejs/node/pull/43396
Fixes: https://github.com/nodejs/node/issues/42785
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com >
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com >
2022-07-12 07:41:52 +02:00
Daeyeon Jeong
061ed0e76b
events: improve Event compatibility
...
This fixes `Event` constructor to improve `Event Web API`
compatibility.
The test added was written by referring to
`wpt@dom/events/Event-constructors.any.js`.
Signed-off-by: Daeyeon Jeong daeyeon.dev@gmail.com
PR-URL: https://github.com/nodejs/node/pull/43461
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: LiviaMedeiros <livia@cirno.name >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2022-07-12 07:41:51 +02:00
Guy Bedford
e914185c44
module: cjs-module-lexer WebAssembly fallback
...
PR-URL: https://github.com/nodejs/node/pull/43612
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com >
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Jacob Smith <jacob@frende.me >
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com >
2022-07-12 07:41:47 +02:00
Jacob Smith
953fefe77b
esm: restore next<HookName>'s context as optional arg
...
PR-URL: https://github.com/nodejs/node/pull/43553
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2022-07-12 07:41:46 +02:00
Jacob Smith
79ea19e5e2
errors: extract type detection & use in ERR_INVALID_RETURN_VALUE
...
PR-URL: https://github.com/nodejs/node/pull/43558
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2022-07-12 07:41:45 +02:00
Ray
3ad4d37b3c
module: also enable subpath imports in REPL
...
PR-URL: https://github.com/nodejs/node/pull/43450
Fixes: https://github.com/nodejs/node/issues/43410
Reviewed-By: Guy Bedford <guybedford@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2022-07-12 07:41:44 +02:00
Livia Medeiros
12a591a676
fs: refactor realpath with Map and Set
...
PR-URL: https://github.com/nodejs/node/pull/43569
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2022-07-12 07:41:44 +02:00
Rafael Gonzaga
d834d216f2
perf_hooks: add initiatorType getter
...
PR-URL: https://github.com/nodejs/node/pull/43593
Refs: https://w3c.github.io/resource-timing/#dfn-initiator-type
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com >
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de >
2022-07-12 07:41:43 +02:00
Daeyeon Jeong
66fb059547
events: improve EventListener validation
...
This fixes validating `EventListener` given to `add/removeEventListener`
to improve the Web API compatibility.
According to the WPT test failure with the current validation,
`addEventListener` should not require `handleEvent` to be defined on
an `EventListener`". IIUC, the same can be applied to
`removeEventListener` also.
Signed-off-by: Daeyeon Jeong daeyeon.dev@gmail.com
PR-URL: https://github.com/nodejs/node/pull/43491
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2022-07-12 07:41:43 +02:00
theanarkh
ad1d0541c5
net: fix net keepalive and noDelay
...
1. support setKeepAlive again
2. set keepalive and nodelay to socket which is created by server
PR-URL: https://github.com/nodejs/node/pull/43561
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2022-07-12 07:41:42 +02:00
Moshe Atlow
4bda6e02a3
test_runner: expose describe and it
...
PR-URL: https://github.com/nodejs/node/pull/43420
Refs: https://github.com/nodejs/node/issues/43415
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2022-07-12 07:41:42 +02:00
Kohei Ueno
e9574f3009
readline: fix to not access a property on an undefined value
...
PR-URL: https://github.com/nodejs/node/pull/43543
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2022-07-12 07:41:41 +02:00
Giacomo Gregoletto
1617a4621e
stream: pass error on legacy destroy
...
PR-URL: https://github.com/nodejs/node/pull/43519
Reviewed-By: Robert Nagy <ronagy@icloud.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2022-07-12 07:41:41 +02:00
Antoine du Hamel
2233567331
lib: use null-prototype objects for property descriptors
...
PR-URL: https://github.com/nodejs/node/pull/43473
Reviewed-By: Darshan Sen <raisinten@gmail.com >
2022-07-12 07:41:41 +02:00
Antoine du Hamel
b9198d977f
lib: refactor to avoid unsafe regex primordials
...
PR-URL: https://github.com/nodejs/node/pull/43475
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com >
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com >
2022-07-12 07:41:40 +02:00
Antoine du Hamel
deaf4bb5cd
lib: fix TODO in freeze_intrinsics
...
PR-URL: https://github.com/nodejs/node/pull/43472
Reviewed-By: Guy Bedford <guybedford@gmail.com >
2022-07-12 07:41:40 +02:00
Adam Majer
4df96b501d
crypto: don't disable TLS 1.3 without suites
...
In the manual page, there is a statement that ciphersuites contain
explicit default settings - all TLS 1.3 ciphersuites enabled.
In node, we assume that an empty setting mean no ciphersuites and
we disable TLS 1.3. A correct approach to disabling TLS 1.3 is to
disable TLS 1.3 and by not override the default ciphersuits
with an empty string.
So, only override OpenSSL's TLS 1.3 ciphersuites with an explicit
list of ciphers. If none are acceptable, the correct approach is
to disable TLS 1.3 instead elsewhere.
Fixes: https://github.com/nodejs/node/issues/43419
PR-URL: https://github.com/nodejs/node/pull/43427
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Paolo Insogna <paolo@cowtech.it >
Reviewed-By: James M Snell <jasnell@gmail.com >
2022-07-12 07:41:40 +02:00
snek
ba9b2f021f
wasi: use WasmMemoryObject handle for perf ( #43544 )
...
PR-URL: #43544
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2022-07-12 07:41:39 +02:00
theanarkh
b27856d3d4
http: add perf_hooks detail for http request and client
...
PR-URL: https://github.com/nodejs/node/pull/43361
Reviewed-By: Paolo Insogna <paolo@cowtech.it >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2022-07-12 07:41:38 +02:00
Filip Skokan
bb326f7ece
crypto: handle webcrypto generateKey() usages edge case
...
PR-URL: https://github.com/nodejs/node/pull/43454
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2022-07-12 07:41:38 +02:00
theanarkh
47a252257b
net: fix net.Server keepalive and noDelay
...
PR-URL: https://github.com/nodejs/node/pull/43497
Reviewed-By: Paolo Insogna <paolo@cowtech.it >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2022-07-12 07:41:36 +02:00
Paolo Insogna
491c7619c4
http: defer reentrant execution of Parser::Execute
...
PR-URL: https://github.com/nodejs/node/pull/43369
Fixes: https://github.com/nodejs/node/issues/39671
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2022-07-12 07:41:36 +02:00
Feng Yu
2149acda60
dns: make promise API fully constructed from lib/internal/dns/promises
...
PR-URL: https://github.com/nodejs/node/pull/43227
Refs: https://github.com/nodejs/node/discussions/43198
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com >
2022-07-12 07:41:35 +02:00
Node.js GitHub Bot
59d4da699e
tools: update eslint to 8.18.0
...
PR-URL: https://github.com/nodejs/node/pull/43479
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2022-07-12 07:41:34 +02:00
rubikscraft
3ca9e653a6
child_process: improve ipc write performance
...
PR-URL: https://github.com/nodejs/node/pull/42931
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Zeyu "Alex" Yang <himself65@outlook.com >
2022-07-12 07:41:33 +02:00
rubikscraft
cad6d990ec
child_process: speed up 'advanced' ipc receiving
...
PR-URL: https://github.com/nodejs/node/pull/42931
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Zeyu "Alex" Yang <himself65@outlook.com >
2022-07-12 07:41:33 +02:00
Moshe Atlow
dda64ddfbd
test_runner: add Subtest to tap protocol output
...
PR-URL: https://github.com/nodejs/node/pull/43417
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2022-07-12 07:41:32 +02:00
Feng Yu
0bca7b722e
dns: export error code constants from dns/promises
...
PR-URL: https://github.com/nodejs/node/pull/43176
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2022-07-12 07:41:31 +02:00