Commit graph

9061 commits

Author SHA1 Message Date
Node.js GitHub Bot
7c726f742a deps: update icu to 74.1
PR-URL: https://github.com/nodejs/node/pull/50515
Reviewed-By: Steven R Loomis <srl295@gmail.com>
Reviewed-By: LiviaMedeiros <livia@cirno.name>
2023-11-21 16:55:15 -05:00
Ethan Arrowood
a0b66383f1
src: add --disable-warning option
Co-authored-by: Geoffrey Booth <webadmin@geoffreybooth.com>
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/50661
Fixes: https://github.com/nodejs/node/issues/30810
Fixes: https://github.com/nodejs/node/issues/47478
Fixes: https://github.com/nodejs/node/issues/46862
Fixes: https://github.com/nodejs/node/issues/40940
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
2023-11-21 20:30:02 +00:00
vitosorriso
f425710f13
test: replace forEach with for-of in test-url-relative
PR-URL: https://github.com/nodejs/node/pull/50788
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
2023-11-21 12:53:32 +00:00
Steve Goode
f22ba46007
test: replace forEach() with for ... of in test-tls-getprotocol.js
PR-URL: https://github.com/nodejs/node/pull/50600
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
2023-11-21 12:53:22 +00:00
theanarkh
51abedecc5
net: check pipe mode and path
PR-URL: https://github.com/nodejs/node/pull/50770
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
Reviewed-By: James M Snell <jasnell@gmail.com>
2023-11-21 12:21:57 +00:00
Honza Machala
96890f6f33
test: replace forEach in whatwg-encoding-custom-interop
PR-URL: https://github.com/nodejs/node/pull/50607
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2023-11-19 20:29:56 +00:00
Filip Skokan
61b7846431 stream: add Symbol.toStringTag to Compression Streams
PR-URL: https://github.com/nodejs/node/pull/50712
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2023-11-19 07:36:30 +00:00
Jan
59ebf6d397
test: replace forEach() with for-loop
PR-URL: https://github.com/nodejs/node/pull/50596
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2023-11-18 19:09:30 +00:00
Joyee Cheung
0e24f91457
test: improve test-bootstrap-modules.js
Divide builtins into two lists depending on whether
they are loaded before pre-execution or at run time,
and give clearer suggestions about how to deal with them
based on the category they are in.

This helps preventing regressions like the one reported
in https://github.com/nodejs/node/issues/45662.

PR-URL: https://github.com/nodejs/node/pull/50708
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2023-11-17 21:42:21 +00:00
Joyee Cheung
ce4642a5c2
test: skip parallel/test-macos-app-sandbox if disk space < 120MB
It needs to copy the Node.js binary which is currently almost
100MB. To be safe, skip the test when the available disk space
is smaller than 120MB.

PR-URL: https://github.com/nodejs/node/pull/50764
Reviewed-By: Debadree Chatterjee <debadree333@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2023-11-17 20:00:30 +00:00
Joyee Cheung
c5eb2c4190
test: give more time to GC in test-shadow-realm-gc-*
When --node-builtin-modules-path is used, we read and create
new strings for builtins in each realm which increases the memory
usage. As a result GC may not be able to keep up with the
allocation done in the loop in the test.

As a workaround, give GC a bit more time by waiting for a timer
in the loop.

PR-URL: https://github.com/nodejs/node/pull/50735
Refs: https://github.com/nodejs/node/issues/50726
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2023-11-17 16:09:30 +01:00
Yagiz Nizipli
f13dbfd43a src: move package resolver to c++
Co-authored-by: Daniel Lemire <daniel@lemire.me>
PR-URL: https://github.com/nodejs/node/pull/50322
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
2023-11-17 00:16:38 +00:00
Yagiz Nizipli
4ec085b240 deps: add simdjson
PR-URL: https://github.com/nodejs/node/pull/50322
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
2023-11-17 00:16:38 +00:00
Kumar Rishav
1e0b75c3df
tls: fix order of setting cipher before setting cert and key
Set the cipher list and cipher suite before anything else
because @SECLEVEL=<n> changes the security level and
that affects subsequent operations.

Fixes: https://github.com/nodejs/node/issues/36655
Fixes: https://github.com/nodejs/node/issues/49549
Refs: https://github.com/orgs/nodejs/discussions/49634
Refs: https://github.com/orgs/nodejs/discussions/46545
Refs: https://www.openssl.org/docs/man1.1.1/man3/SSL_CTX_set_security_level.html
PR-URL: https://github.com/nodejs/node/pull/50186
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
2023-11-16 14:40:37 +00:00
Markus Muschol
ff879cd493
test: replace foreach with for
PR-URL: https://github.com/nodejs/node/pull/50599
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2023-11-15 11:49:14 +00:00
Jithil P Ponnan
eb46e09570
test: test streambase has already has a consumer
test: test streambase has already has a consumer
PR-URL: https://github.com/nodejs/node/pull/48059
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2023-11-14 21:05:18 +11:00
Ardi Nugraha
996d198101
src: return error --env-file if file is not found
PR-URL: https://github.com/nodejs/node/pull/50588
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2023-11-14 04:05:57 +00:00
Chengzhong Wu
fc2862b7f5
module: bootstrap module loaders in shadow realm
This bootstraps ESM loaders in the ShadowRealm with
`ShadowRealm.prototype.importValue` as its entry point and enables
loading ESM and CJS modules in the ShadowRealm. The module is imported
without a parent URL and resolved with the current process's working
directory.

PR-URL: https://github.com/nodejs/node/pull/48655
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2023-11-13 22:09:47 +08:00
Kyriakos Markakis
ce4a06d5dc
test: change forEach to for...of in path extname
PR-URL: https://github.com/nodejs/node/pull/50667
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2023-11-13 12:45:59 +00:00
Ryan Williams
242cbd7d1a
test: replace forEach with for...of
PR-URL: https://github.com/nodejs/node/pull/50611
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2023-11-12 11:24:52 +00:00
Mika Fischer
314c8f95c5
test_runner: add tests for various mock timer issues
PR-URL: https://github.com/nodejs/node/pull/50384
Fixes: https://github.com/nodejs/node/issues/50365
Fixes: https://github.com/nodejs/node/issues/50381
Fixes: https://github.com/nodejs/node/issues/50382
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: James M Snell <jasnell@gmail.com>
2023-11-12 08:26:28 +00:00
Honza Jedlička
5c500b7f8d
test: use destructuring for accessing setting values
PR-URL: https://github.com/nodejs/node/pull/50609
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2023-11-11 19:24:37 +00:00
Aras Abbasi
83e6350b82
errors: improve hideStackFrames
PR-URL: https://github.com/nodejs/node/pull/49990
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2023-11-11 16:25:08 +00:00
Evgenia Blajer
b8cfb35745
test: replace forEach() with for .. of
PR-URL: https://github.com/nodejs/node/pull/50605
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2023-11-11 15:19:42 +00:00
William Liang
8af570a9b8
test: replace forEach() with for ... of in test-readline-keys.js
PR-URL: https://github.com/nodejs/node/pull/50604
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2023-11-11 15:19:33 +00:00
Jithil P Ponnan
25fdb48876
lib: fix assert shows diff messages in ESM and CJS
This PR addresses an issue which was caused by the design in
the ESM loader.
The ESM loader was modifying the file path and replacing the 'file'
property with the file proto in the stack trace.
This, in turn, led to unhandled exceptions when the assert module
attempted to open the file to display erroneous code.
The changes in this PR resolve this issue by handling the file path
correctly, ensuring that the remaining message formatting code can
execute as expected.

PR-URL: https://github.com/nodejs/node/pull/50634
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2023-11-11 14:24:56 +00:00
spiritualized
2c4bb21b8c
test: replace forEach() with for ... of in test-http2-single-headers.js
PR-URL: https://github.com/nodejs/node/pull/50606
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2023-11-11 13:22:16 +00:00
Moshe Atlow
3cce03a03f
test_runner: pass abortSignal to test files
PR-URL: https://github.com/nodejs/node/pull/50630
Fixes: https://github.com/nodejs/node/issues/50583
Reviewed-By: Debadree Chatterjee <debadree333@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2023-11-10 22:09:15 +00:00
john-mcinall
fd4a305464
test: replace forEach with for of
PR-URL: https://github.com/nodejs/node/pull/50602
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2023-11-10 17:46:55 +00:00
Deokjin Kim
609cd7f5bf
tls: use validateFunction for options.SNICallback
If user uses invalid type for `options.SNICallback` in
TLSSocket(), it's not internal issue of Node.js. So
validateFunction() is more proper than assert().

PR-URL: https://github.com/nodejs/node/pull/50530
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2023-11-10 13:04:07 +00:00
Muthukumar
b4850f2ee4
lib: make event static properties non writable and configurable
The idl definition for Event makes the properties constant
this means that they shouldn't be configurable and writable.
However, they were, and this commit fixes that.

Fixes: https://github.com/nodejs/node/issues/50417
PR-URL: https://github.com/nodejs/node/pull/50425
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
Reviewed-By: Matthew Aitken <maitken033380023@gmail.com>
2023-11-10 12:26:12 +00:00
Kevin Kühnemund
38cd4f7d51
test: replace forEach with for of
PR-URL: https://github.com/nodejs/node/pull/50597
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2023-11-10 11:35:59 +00:00
CorrWu
a5a6fef0db
test: replace forEach with for of
PR-URL: https://github.com/nodejs/node/pull/49785
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2023-11-10 11:35:47 +00:00
Gabriel Bota
f662c9b63f
test: replace forEach with for [...] of
PR-URL: https://github.com/nodejs/node/pull/50615
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Debadree Chatterjee <debadree333@gmail.com>
2023-11-10 09:36:27 +00:00
Damian Krzeminski
3e14cfbbcf
stream: add support for deflate-raw format to webstreams compression
this change makes `deflate-raw` a valid parameter for both
CompressionStream and DecompressionStream constructors

it makes node's implementation consistent with what modern browsers
support and what specification calls for

see: https://wicg.github.io/compression/#compression-stream
PR-URL: https://github.com/nodejs/node/pull/50097
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
2023-11-09 11:18:57 +00:00
Luigi Pinca
3e3467e77a
test: relax version check with shared OpenSSL
Relax the OpenSSL version check when Node.js is built with the
`--shared-openssl` option. Verify only that `process.versions.openssl`
is truthy.

Fixes: https://github.com/nodejs/node/issues/43078
PR-URL: https://github.com/nodejs/node/pull/50505
Reviewed-By: Richard Lau <rlau@redhat.com>
2023-11-08 20:20:43 +00:00
Tom Haddad
8588ee1e4f
test_runner: replace forEach with for of
PR-URL: https://github.com/nodejs/node/pull/50595
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
2023-11-08 14:12:26 +00:00
Shubham Pandey
43dcaa3428
test_runner, cli: add --test-timeout flag
PR-URL: https://github.com/nodejs/node/pull/50443
Fixes: https://github.com/nodejs/node/issues/50431
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Raz Luvaton <rluvaton@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2023-11-08 14:02:12 +00:00
Kajol
5e3217c829
test: replace forEach() with for ... of loop in test-global.js
PR-URL: https://github.com/nodejs/node/pull/49772
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2023-11-07 13:52:09 +00:00
Aras Abbasi
77b0595518
lib: add navigator.language & navigator.languages
PR-URL: https://github.com/nodejs/node/pull/50303
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
2023-11-04 18:07:42 +00:00
Joyee Cheung
94156e35df
test: skip test-diagnostics-channel-memory-leak.js
There is currently no reliable way to detect this leak because:

1. We cannot reliably get a reference to the channel from the
  API to detect finalization without creating another strong reference.
2. This test does gc() and then checks memory usage - however the
  use of gc() disables code aging which can actually lead to increased
  memory usage overall, as it is not intended to be used to lower
  memory usage in the first place.
3. The implementation of diagnostics channels relies on ephemeron gc
  which is inefficient, it's not reliable to use the typical "create
  a lot of objects and see if it crashes" trick to check leaks.

Skip the test for now until we find a way to test it reliably.

To avoid flakiness in the CI, it's better to remove an unreliable
test altogether.

PR-URL: https://github.com/nodejs/node/pull/50327
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
2023-11-03 21:50:03 +00:00
Yagiz Nizipli
4dbb017301
test: improve UV_THREADPOOL_SIZE tests on .env
PR-URL: https://github.com/nodejs/node/pull/49213
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
2023-11-03 17:25:54 +00:00
Aras Abbasi
a450eedffa
lib: add navigator.platform
PR-URL: https://github.com/nodejs/node/pull/50385
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2023-11-02 20:21:21 +00:00
Ram
196224cb29 test: replace forEach() with for...of
Replace `forEach()` with `for...of` in in test-dgram-socket-buffer-size.

PR-URL: https://github.com/nodejs/node/pull/49794
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2023-11-02 19:47:11 +01:00
Chand
791611a997 test: replace forEach() with for...of in test-trace-events-http
PR-URL: https://github.com/nodejs/node/pull/49795
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2023-11-02 19:43:42 +01:00
Dominique Leuenberger
5d01042e34
test: fix testsuite against zlib version 1.3
In the past, zlib versions had major.minor.micro formats, but with 1.3
this has been changed.

Change the test code to accept one, two, or three elements past the
major version.

PR-URL: https://github.com/nodejs/node/pull/50364
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
2023-11-02 10:53:21 +00:00
Niya Shiyas
a1693c669c test: replace forEach with for...of in test-fs-realpath-buffer-encoding
PR-URL: https://github.com/nodejs/node/pull/49804
Reviewed-By: Trivikram Kamat <trivikr.dev@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>
2023-11-02 08:38:35 +01:00
Chengzhong Wu
86afefafda
vm: allow dynamic import with a referrer realm
A referrer can be a Script Record, a Cyclic Module Record, or a Realm
Record as defined in https://tc39.es/ecma262/#sec-HostLoadImportedModule.

Add support for dynamic import calls with a realm as the referrer and
allow specifying an `importModuleDynamically` callback in
`vm.createContext`.

PR-URL: https://github.com/nodejs/node/pull/50360
Refs: https://github.com/nodejs/node/issues/49726
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2023-11-01 06:05:13 +00:00
Robert Nagy
2aaa21f9f6
stream: pre-allocate _events
PR-URL: https://github.com/nodejs/node/pull/50428
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2023-10-29 16:29:59 +00:00
Joshua LeMay
65087c0486
test: migrate message v8 tests from Python to JS
PR-URL: https://github.com/nodejs/node/pull/50421
Fixes: https://github.com/nodejs/node/issues/47707
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
2023-10-29 05:55:01 +00:00