Robert Nagy
e4bf5dc581
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-11 11:25:05 +01:00
Antoine du Hamel
b4a7d9f987
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-11 09:48:41 +01:00
theanarkh
b532dca947
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-11 08:27:34 +01:00
theanarkh
a933a75150
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-10 14:17:32 +01:00
Antoine du Hamel
3fb57843de
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-10 14:17:23 +01:00
Livia Medeiros
653cfff223
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-09 17:01:02 +01:00
Ruben Bridgewater
7cfd5f169c
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-09 15:46:39 +00:00
Ruben Bridgewater
b5cb3410e0
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-09 15:46:38 +00:00
Antoine du Hamel
2fe4e9473f
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-09 14:02:35 +02:00
Kohei Ueno
550e814903
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-09 12:59:50 +01:00
Kid
3d575a4f1b
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-09 01:01:28 +01:00
Moshe Atlow
1523a1817e
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-08 11:17:44 +01:00
Moshe Atlow
458c4fb48b
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-08 11:17:35 +01:00
Moshe Atlow
e1ab9dcd85
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-08 11:17:25 +01:00
Basit
f3a92a0572
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-08 09:34:13 +01:00
Alena Khineika
680dd7c77b
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-08 09:19:24 +01:00
hemanth.hm
6317b8432e
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-08 09:12:32 +01:00
Daeyeon Jeong
3f7f62f6bc
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-08 09:12:13 +01:00
Guy Bedford
10ed3e8dca
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-03 18:33:54 +01:00
Jacob Smith
1f6d005836
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-02 05:44:03 +01:00
Jacob Smith
5a18304cb2
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-01 19:08:08 +01:00
Ray
c15a605d8b
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-06-30 09:31:02 +01:00
Rafael Gonzaga
350a6a8d59
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-06-30 01:24:39 +01:00
Daeyeon Jeong
ed1e9ae402
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-06-29 12:26:18 +01:00
Moshe Atlow
e2225ba8e1
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-06-29 12:31:47 +03:00
Kohei Ueno
593de05c5a
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-06-28 11:10:50 +01:00
Giacomo Gregoletto
51beb26a5f
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-06-28 09:59:24 +01:00
Antoine du Hamel
bb30e2da7a
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-06-27 16:29:10 +01:00
Antoine du Hamel
a055337a02
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-06-27 17:16:06 +02:00
Antoine du Hamel
411fb21723
lib: fix TODO in freeze_intrinsics
...
PR-URL: https://github.com/nodejs/node/pull/43472
Reviewed-By: Guy Bedford <guybedford@gmail.com >
2022-06-27 16:15:16 +01:00
Adam Majer
9cde7a033e
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-06-27 09:47:13 +01:00
theanarkh
d96a2ea615
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-06-25 11:37:20 +01:00
Filip Skokan
84db3e7b06
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-06-25 06:22:35 +01:00
Jacob Smith
3c040348fe
Revert "esm: convert resolve hook to synchronous"
...
This reverts commit 90b634a5a5 .
PR-URL: https://github.com/nodejs/node/pull/43526
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com >
Reviewed-By: Guy Bedford <guybedford@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com >
2022-06-22 08:13:36 +01:00
Feng Yu
3847617f55
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-06-20 19:58:45 +01:00
Node.js GitHub Bot
9c3c66b499
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-06-19 19:39:41 +01:00
rubikscraft
8db79cc31b
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-06-19 16:10:53 +02:00
rubikscraft
f75c02ed74
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-06-19 16:10:48 +02:00
Moshe Atlow
5fadc389b8
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-06-19 08:58:48 +01:00
Jacob Smith
90b634a5a5
esm: convert resolve hook to synchronous
...
PR-URL: https://github.com/nodejs/node/pull/43363
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com >
2022-06-18 18:22:57 +01:00
Feng Yu
dc53c29b97
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-06-18 13:54:31 +01:00
Joyee Cheung
a36a5469c2
v8: add v8.startupSnapshot utils
...
This adds several APIs under the `v8.startupSnapshot` namespace
for specifying hooks into the startup snapshot serialization
and deserialization.
- isBuildingSnapshot()
- addSerializeCallback()
- addDeserializeCallback()
- setDeserializeMainFunction()
PR-URL: https://github.com/nodejs/node/pull/43329
Fixes: https://github.com/nodejs/node/issues/42617
Refs: https://github.com/nodejs/node/issues/35711
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2022-06-17 19:23:56 +08:00
cola119
027c2880a6
util: fix TypeError of symbol in template literals
...
PR-URL: https://github.com/nodejs/node/pull/42790
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2022-06-17 12:33:55 +02:00
木杉
7fd4cf4673
loader: make require.resolve throw for unknown builtin modules
...
Fixes: https://github.com/nodejs/node/issues/43274
PR-URL: https://github.com/nodejs/node/pull/43336
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2022-06-17 10:20:48 +02:00
Filip Skokan
677bd668b7
crypto: fix webcrypto generateKey() with empty usages
...
PR-URL: https://github.com/nodejs/node/pull/43431
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-06-16 22:00:34 +02:00
Filip Skokan
288304c888
crypto: fix webcrypto digest() invalid algorithm
...
PR-URL: https://github.com/nodejs/node/pull/43431
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-06-16 22:00:33 +02:00
Filip Skokan
be03c09ab0
crypto: fix webcrypto RSA generateKey() use of publicExponent
...
PR-URL: https://github.com/nodejs/node/pull/43431
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-06-16 22:00:32 +02:00
Filip Skokan
f3c12bd62f
crypto: fix webcrypto AES-KW keys accepting encrypt/decrypt usages
...
PR-URL: https://github.com/nodejs/node/pull/43431
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-06-16 22:00:31 +02:00
Filip Skokan
f654adf05a
crypto: fix webcrypto deriveBits for non-byte lengths
...
PR-URL: https://github.com/nodejs/node/pull/43431
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-06-16 22:00:29 +02:00
Antoine du Hamel
358008f473
tools,doc: add guards against prototype pollution when creating proxies
...
PR-URL: https://github.com/nodejs/node/pull/43391
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: LiviaMedeiros <livia@cirno.name >
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com >
2022-06-16 00:26:48 +02:00