Commit Graph

40508 Commits

Author SHA1 Message Date
Jungku Lee
9fe0424baa
trace_events: use private fields instead of symbols for Tracing
PR-URL: https://github.com/nodejs/node/pull/51180
Refs: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes/Private_properties
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io>
2023-12-28 23:20:22 +00:00
vnc5
9db4bf40d4
watch: fix null fileName on windows systems
PR-URL: https://github.com/nodejs/node/pull/49891
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2023-12-28 20:44:44 +00:00
Cheng Zhao
df16c69983
doc: the GN files should use Node's license
PR-URL: https://github.com/nodejs/node/pull/50694
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Tierney Cyren <hello@bnb.im>
2023-12-28 20:27:05 +00:00
翠 / green
4944e971bb
fs: fix fs.promises.realpath for long paths on Windows
Unlike other fs functions that work with paths, realpath isn't
using pathModule.toNamespacedPath prior to calling libuv function. This
is causing issues on windows.

Windows long path test is also improved to cover the mentioned issue.

Fixes: https://github.com/nodejs/node/issues/51031
PR-URL: https://github.com/nodejs/node/pull/51032
Reviewed-By: LiviaMedeiros <livia@cirno.name>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2023-12-28 19:57:51 +00:00
Jia
4560834446 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>
2023-12-28 16:53:38 +01:00
Yagiz Nizipli
ff6365b5ef
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>
2023-12-28 11:12:34 +00:00
Jungku Lee
c14133503a
fs: use private fields instead of symbols for Dir
PR-URL: https://github.com/nodejs/node/pull/51037
Refs: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes/Private_properties
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2023-12-28 06:16:13 +00:00
Node.js GitHub Bot
5e6448310d
deps: update brotli to 1.1.0
PR-URL: https://github.com/nodejs/node/pull/50804
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2023-12-27 06:29:54 +00:00
Michaël Zasso
c21b2bee72
build: fix arm64 cross-compilation
Commit 938212f added -msign-return-address=all to _all_ cflags but that
is wrong when cross-compiling, it should only be added to the target's
cflags.

The flag being deprecated, it is also changed to
`-mbranch-protection=standard`.

Fixes: https://github.com/nodejs/node/issues/42888
Co-Authored-By: Michaël Zasso <targos@protonmail.com>
PR-URL: https://github.com/nodejs/node/pull/51256
Fixes: https://github.com/nodejs/build/issues/3319
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2023-12-27 06:19:24 +00:00
James M Snell
c3664227a8 quic: add quic internalBinding, refine Endpoint, add types
PR-URL: https://github.com/nodejs/node/pull/51112
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2023-12-26 16:27:49 -08:00
Mattias Buelens
20c63134fc
stream: fix code style
PR-URL: https://github.com/nodejs/node/pull/51168
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2023-12-26 13:43:36 +00:00
Node.js GitHub Bot
89ddc98b95
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>
2023-12-26 00:30:05 +00:00
Adam Majer
345f15e493 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>
2023-12-25 14:24:26 -08:00
Ben Noordhuis
aa87b776cd
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>
2023-12-25 12:12:54 +00:00
Michaël Zasso
c64e6035a6
src: do not treat all paths ending with node_modules as such
Fixes: https://github.com/nodejs/node/issues/51245
PR-URL: https://github.com/nodejs/node/pull/51269
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io>
2023-12-25 11:44:26 +00:00
Gaurish Sethia
6a1abd2c03
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>
2023-12-25 04:29:00 +00:00
Jungku Lee
26d39e875f
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>
2023-12-25 03:38:40 +00:00
James M Snell
a3a4eff0be
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>
2023-12-25 02:51:40 +00:00
James M Snell
4d3923aaba
stream: fix cloned webstreams not being unref'd
When cloning a `ReadableStream` and `WritableStream`, both use an
internal `MessageChannel` to communicate with the original stream.
Those, however, previously were not unref'd which would lead to the
process not exiting if the stream was not fully consumed.

Fixes: https://github.com/nodejs/node/issues/44985
PR-URL: https://github.com/nodejs/node/pull/51255
Reviewed-By: Matthew Aitken <maitken033380023@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Debadree Chatterjee <debadree333@gmail.com>
2023-12-24 16:42:10 +00:00
Michaël Zasso
ee61c2c6d3
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: 7fbbf93ea8
Refs: 54067c5fbe/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>
2023-12-24 11:24:11 +00:00
Node.js GitHub Bot
894f1d5ebf
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>
2023-12-24 09:26:33 +00:00
Pulkit Gupta
dad666ad06
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>
2023-12-24 08:23:54 +00:00
Antoine du Hamel
a717fa2111
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>
2023-12-23 20:38:08 +00:00
Davy Landman
f91ccf4c0d 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>
2023-12-23 09:19:34 -08:00
Marco Mac
6b530aee24 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>
2023-12-23 09:18:29 -08:00
uzlopak
c74c514273 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>
2023-12-23 09:04:45 -08:00
theanarkh
e266bb1722
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>
2023-12-23 16:35:27 +00:00
Antoine du Hamel
825163c5ab
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>
2023-12-23 12:38:24 +00:00
Antoine du Hamel
f58a31bece
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>
2023-12-23 12:38:14 +00:00
Marco Ippolito
6329d2cd27
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>
2023-12-23 10:23:43 +00:00
Node.js GitHub Bot
857a34bddb
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>
2023-12-23 09:52:42 +00:00
Sanjaiyan Parthipan
b8fe07df9b
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>
2023-12-23 01:51:47 +01:00
Rafael Gonzaga
04c4c52059
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>
2023-12-22 18:58:53 +00:00
Antoine du Hamel
bc16952cda
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>
2023-12-22 18:34:17 +00:00
marco-ippolito
b9df88a8c2 doc: runtime deprecate flag --trace-atomics-wait
PR-URL: https://github.com/nodejs/node/pull/51179
Refs: https://github.com/nodejs/node/issues/42982
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2023-12-22 07:26:08 -08:00
James M Snell
1523650005 src: use BignumPointer and use BN_clear_free
PR-URL: https://github.com/nodejs/node/pull/50454
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2023-12-22 07:02:09 -08:00
Pulkit Gupta
48cdb880bc
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>
2023-12-22 12:41:22 +00:00
Chengzhong Wu
a81788cb27
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>
2023-12-22 09:34:51 +00:00
Michaël Zasso
9ba5df30b4
doc: bump FreeBSD experimental support to 13.2
Refs: https://www.freebsd.org/security/#sup
Refs: https://github.com/nodejs/build/issues/3593
PR-URL: https://github.com/nodejs/node/pull/51231
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2023-12-22 09:26:09 +00:00
Chiara Ricciardi
ba957a61f8
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>
2023-12-22 06:18:31 +00:00
Luca Del Puppo
c9fe4b67dd
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>
2023-12-22 06:06:01 +00:00
github-actions[bot]
e1ad7fb38d
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>
2023-12-22 04:43:24 +00:00
Michael Dawson
4f3261f101
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>
2023-12-22 04:35:41 +00:00
Ianna83
aa7de747b7 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>
2023-12-21 17:21:35 -08:00
Edoardo Dusi
a03d9bd39d 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>
2023-12-21 17:20:41 -08:00
Joyee Cheung
9c5ef11026 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>
2023-12-21 17:17:31 -08:00
Andrea Pavone
ea41c63670 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>
2023-12-21 17:10:06 -08:00
Yagiz Nizipli
5155238064
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>
2023-12-22 00:09:08 +01:00
Yagiz Nizipli
bfa2eebdb2
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>
2023-12-21 21:23:20 +00:00
Luigi Pinca
30f8ef1a97
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>
2023-12-21 20:09:01 +00:00