Jia
42b162b06d
test: replace forEach() with for...of
...
Replace `forEach()` with `for...of` in
`test/parallel/test-assert-typedarray-deepequal.js`.
PR-URL: https://github.com/nodejs/node/pull/50610
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2024-03-25 19:22:38 +00:00
Yagiz Nizipli
4733c8e4df
src: refactor GetCreationContext calls
...
PR-URL: https://github.com/nodejs/node/pull/51287
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
2024-03-25 19:22:37 +00:00
Node.js GitHub Bot
7d60877fa3
deps: update brotli to 1.1.0
...
PR-URL: https://github.com/nodejs/node/pull/50804
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2024-03-25 19:22:32 +00:00
Node.js GitHub Bot
1b99a3f0af
deps: update zlib to 1.3.0.1-motley-40e35a7
...
PR-URL: https://github.com/nodejs/node/pull/51274
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2024-03-25 18:15:20 +00:00
Adam Majer
4be33b5577
benchmark: remove dependency on unshipped tools
...
tools/node_modules is removed from the tarball so it should not be used
as part of unit tests or benchmarks.
Fixes: https://github.com/nodejs/node/issues/51145
Refs: https://github.com/nodejs/node/pull/50684
PR-URL: https://github.com/nodejs/node/pull/51146
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2024-03-25 18:15:18 +00:00
Ben Noordhuis
d76e16bb47
src: enter isolate before destructing IsolateData
...
MVP fix for a worker_threads crash where ~WorkerThreadData() ->
~IsolateData() -> Isolate::DetachCppHeap() kicks off a round of
garbage collection that expects an entered isolate.
No test because the crash is not reliably reproducable but the bug
is pretty clearly described in the linked issue and is obvious once
you see it, IMO.
Fixes: https://github.com/nodejs/node/issues/51129
PR-URL: https://github.com/nodejs/node/pull/51138
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com >
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com >
2024-03-25 18:15:17 +00:00
Gaurish Sethia
f79ac336ad
util: pass invalidSubtypeIndex instead of trimmedSubtype to error
...
PR-URL: https://github.com/nodejs/node/pull/51264
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Deokjin Kim <deokjin81.kim@gmail.com >
2024-03-25 18:15:15 +00:00
Jungku Lee
cab7737f7e
test: fix inconsistency write size in test-fs-readfile-tostring-fail
...
PR-URL: https://github.com/nodejs/node/pull/51141
Refs: https://github.com/nodejs/node/issues/51133
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Deokjin Kim <deokjin81.kim@gmail.com >
2024-03-25 18:15:14 +00:00
James M Snell
4ffdd37d2c
src: eliminate duplicate code in histogram.cc
...
PR-URL: https://github.com/nodejs/node/pull/51263
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
2024-03-25 18:15:12 +00:00
Michaël Zasso
8b97e2e0a7
build: add -flax-vector-conversions to V8 build
...
The flag is on by default in Clang and V8 recently made a change that
makes it necessary with GCC.
Refs: https://github.com/v8/v8/commit/7fbbf93ea879863c1b92ef1a829190b3a31e544c
Refs: https://github.com/llvm/llvm-project/blob/54067c5fbe9fc13ab195cdddb8f17e18d72b5fe4/clang/include/clang/Basic/LangOptions.def#L133-L134
Refs: https://gcc.gnu.org/onlinedocs/gcc/C-Dialect-Options.html#index-flax-vector-conversions
PR-URL: https://github.com/nodejs/node/pull/51257
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
2024-03-25 18:15:10 +00:00
Node.js GitHub Bot
c7aa3976f9
tools: update lint-md-dependencies to rollup@4.9.1
...
PR-URL: https://github.com/nodejs/node/pull/51276
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2024-03-25 18:15:09 +00:00
Pulkit Gupta
34ecd1e36b
test_runner: fixed test object is incorrectly passed to setup()
...
PR-URL: https://github.com/nodejs/node/pull/50982
Reviewed-By: Raz Luvaton <rluvaton@gmail.com >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
2024-03-25 18:15:07 +00:00
Antoine du Hamel
38f4000905
esm: fix hint on invalid module specifier
...
PR-URL: https://github.com/nodejs/node/pull/51223
Fixes: https://github.com/nodejs/node/issues/51216
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2024-03-25 18:15:05 +00:00
Davy Landman
01a41041d6
doc: improve localWindowSize event descriptions
...
The documentation listed the wrong event to subscribe to when calling
`localWindowSize`. Also properly point out the correct event for http2
clients.
Fixes: https://github.com/nodejs/node/issues/51014
Refs: https://github.com/nodejs/node/issues/38426
PR-URL: https://github.com/nodejs/node/pull/51071
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2024-03-25 18:15:04 +00:00
Marco Mac
15731b4b2f
test: replace forEach test-http-server-multiheaders2
...
PR-URL: https://github.com/nodejs/node/pull/50794
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2024-03-25 18:15:02 +00:00
uzlopak
bb7d7f3d1c
errors: fix stacktrace of SystemError
...
PR-URL: https://github.com/nodejs/node/pull/49956
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2024-03-25 18:15:01 +00:00
theanarkh
2ce8b974a0
src: fix unix abstract socket path for trace event
...
PR-URL: https://github.com/nodejs/node/pull/50858
Reviewed-By: James M Snell <jasnell@gmail.com >
2024-03-25 18:14:59 +00:00
Antoine du Hamel
562947e012
lib: fix use of --frozen-intrinsics with --jitless
...
PR-URL: https://github.com/nodejs/node/pull/51248
Fixes: https://github.com/nodejs/node/issues/51232
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2024-03-25 18:14:57 +00:00
Antoine du Hamel
63aa27df10
doc: mark --jitless as experimental
...
It's already documented as such, but it doesn't have the label.
PR-URL: https://github.com/nodejs/node/pull/51247
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de >
Reviewed-By: Akhil Marsonya <akhil.marsonya27@gmail.com >
2024-03-25 18:14:56 +00:00
Marco Ippolito
fe922f05e4
timers: export timers.promises
...
PR-URL: https://github.com/nodejs/node/pull/51246
Fixes: https://github.com/nodejs/node/issues/51237
Reviewed-By: Raz Luvaton <rluvaton@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
2024-03-25 18:14:54 +00:00
Node.js GitHub Bot
2270285839
deps: update simdutf to 4.0.8
...
PR-URL: https://github.com/nodejs/node/pull/51000
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2024-03-25 18:14:52 +00:00
Sanjaiyan Parthipan
7b83ef749e
lib: move function declaration outside of loop
...
PR-URL: https://github.com/nodejs/node/pull/51242
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io >
2024-03-25 18:14:51 +00:00
Rafael Gonzaga
eef64b782e
meta: notify tsc on changes in SECURITY.md
...
PR-URL: https://github.com/nodejs/node/pull/51259
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2024-03-25 18:14:49 +00:00
Antoine du Hamel
0a85b0fd9d
lib: reduce overhead of SafePromiseAllSettledReturnVoid calls
...
It was simply calling `SafePromiseAllSettled`, which itself calls
`arrayToSafePromiseIterable` which wraps all promises into new
`SafePromise` object and wraps it into a `SafeArrayIterator`. Since we
don't care about the return value, we can take some shortcuts.
PR-URL: https://github.com/nodejs/node/pull/51243
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br >
Reviewed-By: James M Snell <jasnell@gmail.com >
2024-03-25 18:14:48 +00:00
James M Snell
9b25268cb8
src: use BignumPointer and use BN_clear_free
...
PR-URL: https://github.com/nodejs/node/pull/50454
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
2024-03-25 18:14:46 +00:00
Pulkit Gupta
a8fd01a5a2
fs: make offset, position & length args in fh.read() optional
...
PR-URL: https://github.com/nodejs/node/pull/51087
Fixes: https://github.com/nodejs/node/issues/47183
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2024-03-25 18:14:44 +00:00
Chengzhong Wu
dc3d70c040
node-api: type tag external values without v8::Private
...
v8::External can not have any properties and private properties. Type
tag v8::External with a wrapper struct without setting a private
property on the v8::External.
PR-URL: https://github.com/nodejs/node/pull/51149
Fixes: https://github.com/nodejs/node-v8/issues/273
Reviewed-By: Vladimir Morozov <vmorozov@microsoft.com >
Reviewed-By: Michael Dawson <midawson@redhat.com >
Reviewed-By: Gabriel Schulhof <gabrielschulhof@gmail.com >
2024-03-25 18:14:43 +00:00
Chiara Ricciardi
9cedaa62fa
test: replace forEach with for-of in test-webcrypto-export-import-ec
...
PR-URL: https://github.com/nodejs/node/pull/51249
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 >
2024-03-25 18:14:41 +00:00
Luca Del Puppo
7f301e04be
test: move to for of loop in test-http-hostname-typechecking.js
...
PR-URL: https://github.com/nodejs/node/pull/50782
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
2024-03-25 18:14:39 +00:00
github-actions[bot]
c8233912e9
doc: run license-builder
...
PR-URL: https://github.com/nodejs/node/pull/51199
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2024-03-25 18:14:38 +00:00
Michael Dawson
6e62e649df
test: skip test-watch-mode-inspect on arm
...
Refs: https://github.com/nodejs/node/issues/49933
- SKIP instead of mark FLAKY as tests seems to fail
builds through left over processe
Signed-off-by: Michael Dawson <midawson@redhat.com >
PR-URL: https://github.com/nodejs/node/pull/51210
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2024-03-25 18:14:36 +00:00
Ianna83
c3c2b2b041
test: replace forEach with for of in file test-trace-events-net.js
...
PR-URL: https://github.com/nodejs/node/pull/50789
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2024-03-25 18:14:35 +00:00
Edoardo Dusi
55c423ba4f
test: replace forEach() with for...of in test/parallel/test-util-log.js
...
PR-URL: https://github.com/nodejs/node/pull/50783
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2024-03-25 18:14:33 +00:00
Joyee Cheung
d8da197f86
module: move the CJS exports cache to internal/modules/cjs/loader
...
This puts it together with the cjsParseCache and reduces the
circular dependency on the singleton loader, which is the
only place where this cache is stored.
Drive-by: remove always-false module status check because there's
no longer a local module variable after
https://github.com/nodejs/node/pull/34605 which is now invalid
leftover code at this point and only doesn't throw because
we happen to have a top-level variable called module.
PR-URL: https://github.com/nodejs/node/pull/51157
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2024-03-25 18:14:31 +00:00
Andrea Pavone
8ac05cf3c4
test: replace forEach with for of in test-trace-events-api.js
...
PR-URL: https://github.com/nodejs/node/pull/50784
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2024-03-25 18:14:30 +00:00
Yagiz Nizipli
721557c6d8
fs: add missing jsdoc parameters to readSync
...
PR-URL: https://github.com/nodejs/node/pull/51225
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
2024-03-25 18:14:28 +00:00
Yagiz Nizipli
3ce9aacfcd
fs: remove internalModuleReadJSON binding
...
PR-URL: https://github.com/nodejs/node/pull/51224
Refs: https://github.com/nodejs/node/commit/45e4f82912
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Matthew Aitken <maitken033380023@gmail.com >
2024-03-25 18:14:26 +00:00
Luigi Pinca
f7b53d05bd
http: remove misleading warning
...
There are cases where the `'clientError'` event can be emitted multiple
times, even if the socket is correctly destroyed.
Fixes: https://github.com/nodejs/node/issues/51073
PR-URL: https://github.com/nodejs/node/pull/51204
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Paolo Insogna <paolo@cowtech.it >
2024-03-25 18:14:25 +00:00
Keyhan Vakil
61d1535d84
deps: V8: cherry-pick de611e69ad51
...
Original commit message:
[maglev] fix non-ptr-compr compilation on old compilers
When pointer compression is disabled, the preprocessor expands some
static asserts to static_assert(false), which doesn't compile on
compilers not implementing the C++ defect report CWG2518, notably clang
before version 17 and gcc before version 13.
Adding in part of the template parameter to the static assert prevents
it from being evaluated immediately which fixes the compilation.
Test: compiled with gcc-11 and clang-14 without pointer compression.
Change-Id: I95ce29bdb1278e6dad9e592d6f9476395f8aeb59
Fixed: v8:14355
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5022760
Reviewed-by: Leszek Swirski <leszeks@chromium.org >
Commit-Queue: Leszek Swirski <leszeks@chromium.org >
Cr-Commit-Position: refs/heads/main@{#91553}
Refs: https://github.com/v8/v8/commit/de611e69ad517c02d16bd1f9fd450b0d20379152
PR-URL: https://github.com/nodejs/node/pull/51200
Refs: https://github.com/nodejs/node/issues/50690
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Richard Lau <rlau@redhat.com >
2024-03-25 18:14:23 +00:00
Rafael Gonzaga
fd5efac176
src,permission: add --allow-addon flag
...
PR-URL: https://github.com/nodejs/node/pull/51183
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
Reviewed-By: Paolo Insogna <paolo@cowtech.it >
2024-03-25 18:14:22 +00:00
Rafael Gonzaga
f4987eb91e
lib,permission: handle buffer on fs.symlink
...
PR-URL: https://github.com/nodejs/node/pull/51212
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com >
Reviewed-By: Paolo Insogna <paolo@cowtech.it >
2024-03-25 18:14:20 +00:00
Rafael Gonzaga
9e360df521
doc: fix limitations and known issues in pm
...
PR-URL: https://github.com/nodejs/node/pull/51184
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io >
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com >
Reviewed-By: Paolo Insogna <paolo@cowtech.it >
2024-03-25 18:14:18 +00:00
Chengzhong Wu
f4d7f0498e
lib: expose default prepareStackTrace
...
Expose the default prepareStackTrace implementation as
`Error.prepareStackTrace` so that userland can chain up formatting of
stack traces with built-in source maps support.
PR-URL: https://github.com/nodejs/node/pull/50827
Fixes: https://github.com/nodejs/node/issues/50733
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com >
2024-03-25 18:14:17 +00:00
legendecas
e08649caa0
repl: fix prepareStackTrace frames array order
...
The second parameter of `Error.prepareStackTrace` is an array of
reversed call site frames.
PR-URL: https://github.com/nodejs/node/pull/50827
Fixes: https://github.com/nodejs/node/issues/50733
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com >
2024-03-25 18:14:15 +00:00
Mattia Iannone
d10d39e8ba
test: replace forEach with for-of in test-v8-serders.js
...
PR-URL: https://github.com/nodejs/node/pull/50791
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
2024-03-25 18:14:13 +00:00
Rafael Gonzaga
576adc5e5b
test: add URL tests to fs-read in pm
...
PR-URL: https://github.com/nodejs/node/pull/51213
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
2024-03-25 18:14:12 +00:00
Rafael Gonzaga
52d8222d32
doc: mention node:wasi in the Threat Model
...
PR-URL: https://github.com/nodejs/node/pull/51211
Reviewed-By: Michael Dawson <midawson@redhat.com >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
2024-03-25 18:14:10 +00:00
Michaël Zasso
95a880f728
meta: update artifact actions to v4
...
Refs: https://github.com/actions/upload-artifact/releases/tag/v4.0.0
Refs: https://github.com/actions/download-artifact/releases/tag/v4.1.0
PR-URL: https://github.com/nodejs/node/pull/51219
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2024-03-25 18:14:09 +00:00
Paolo Insogna
58a636be0e
net: add connection attempt events
...
PR-URL: https://github.com/nodejs/node/pull/51045
Fixes: https://github.com/nodejs/node/issues/48763
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
2024-03-25 18:14:07 +00:00
Rich Trott
cb3270e4c8
doc: remove ambiguous 'considered'
...
PR-URL: https://github.com/nodejs/node/pull/51207
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2024-03-25 18:14:05 +00:00