Commit Graph

40400 Commits

Author SHA1 Message Date
github-actions[bot]
4e26a59c49
doc: run license-builder
PR-URL: https://github.com/nodejs/node/pull/51111
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2023-12-13 00:25:06 +00:00
Node.js GitHub Bot
1b60054fff
tools: update lint-md-dependencies to rollup@4.7.0
PR-URL: https://github.com/nodejs/node/pull/51106
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
2023-12-12 00:34:55 +00:00
Yagiz Nizipli
3551dc07eb
fs: throw fchownSync error from c++
PR-URL: https://github.com/nodejs/node/pull/51075
Refs: https://github.com/nodejs/performance/issues/106
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2023-12-12 00:34:47 +00:00
Michael Dawson
9e87091311 src: fix double free reported by coverity
Fix double free reported by coverity. ToBufferEndian()
in node_i18n.cc was the only caller of Buffer::New() passing
in a MaybeStackBuffer. Coverity reported a double free
because there were paths in which the src buffer would
be deleted by both the destruction of the MaybeStackBuffer and
by the Buffer which was done even in failure cases for
Buffer::New().

Signed-off-by: Michael Dawson <midawson@redhat.com>
PR-URL: https://github.com/nodejs/node/pull/51046
Reviewed-By: James M Snell <jasnell@gmail.com>
2023-12-11 15:31:51 -05:00
Arsalan Ahmad
6e90fed8c3
http: handle multi-value content-disposition header
Headers in nodejs can be arrays and current workaround for
content-disposition header do not take this into account.
This change fixes that and makes sure array values are handled
properly.

PR-URL: https://github.com/nodejs/node/pull/50977
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2023-12-11 08:41:23 +00:00
James M Snell
fc102f2180 quic: further implementation details
PR-URL: https://github.com/nodejs/node/pull/48244
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
2023-12-10 18:13:22 -08:00
Node.js GitHub Bot
ab93a35a52
tools: update doc to highlight.js@11.9.0 unified@11.0.4
And unist-util-select@5.1.0.

PR-URL: https://github.com/nodejs/node/pull/50459
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2023-12-11 01:41:20 +01:00
Marco Ippolito
ba3f721c76
doc: deprecate hash constructor
PR-URL: https://github.com/nodejs/node/pull/51077
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io>
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
Reviewed-By: James M Snell <jasnell@gmail.com>
2023-12-10 23:09:14 +00:00
Pulkit Gupta
f801b58e77
test_runner: fix infinite loop when files are undefined in test runner
PR-URL: https://github.com/nodejs/node/pull/51047
Fixes: https://github.com/nodejs/node/issues/48823
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: James M Snell <jasnell@gmail.com>
2023-12-10 09:35:22 +00:00
Joyee Cheung
390061ee3b
bootstrap: improve snapshot unsupported builtin warnings
- Only emit warning when the snapshot is built. In general built-ins
  loaded after the snapshot is built should work as usual.
- Clarify what the warning means

PR-URL: https://github.com/nodejs/node/pull/50944
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2023-12-10 08:50:08 +00:00
Jungku Lee
a768d89818
src: remove unused headers in node_file.cc
PR-URL: https://github.com/nodejs/node/pull/50927
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2023-12-10 08:50:00 +00:00
Lei Shi
3b758b3287
benchmark: update iterations in benchmark/perf_hooks
Fixes: https://github.com/nodejs/node/issues/50571
PR-URL: https://github.com/nodejs/node/pull/50869
Refs: https://github.com/nodejs/node/issues/50571
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
Reviewed-By: James M Snell <jasnell@gmail.com>
2023-12-10 08:49:52 +00:00
Liu Jia
1045f287b8
util: improve performance of function areSimilarFloatArrays
Improve performance of areSimilarFloatArrays by using primordial.

Refs: https://github.com/nodejs/node/pull/50621
PR-URL: https://github.com/nodejs/node/pull/51040
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
Reviewed-By: James M Snell <jasnell@gmail.com>
2023-12-10 08:41:25 +00:00
Moshe Atlow
cb08703c80
test: fix test runner colored output test
PR-URL: https://github.com/nodejs/node/pull/51064
Reviewed-By: Raz Luvaton <rluvaton@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: James M Snell <jasnell@gmail.com>
2023-12-10 07:44:43 +00:00
Shubherthi Mitra
37ba7a36e9
doc: add note regarding --experimental-detect-module
PR-URL: https://github.com/nodejs/node/pull/51089
Fixes: https://github.com/nodejs/node/issues/51057
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2023-12-10 00:35:03 +01:00
Lei Shi
29af78e8fb
benchmark: update iterations in benchmark/crypto/aes-gcm-throughput.js
Fixes: https://github.com/nodejs/node/issues/50571
PR-URL: https://github.com/nodejs/node/pull/50929
Refs: https://github.com/nodejs/node/issues/50571
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
Reviewed-By: James M Snell <jasnell@gmail.com>
2023-12-09 18:25:14 +00:00
Lei Shi
e158b11404
benchmark: update iteration and size in benchmark/crypto/randomBytes.js
Fixes: https://github.com/nodejs/node/issues/50571
PR-URL: https://github.com/nodejs/node/pull/50868
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
Reviewed-By: James M Snell <jasnell@gmail.com>
2023-12-09 18:25:04 +00:00
Stefan Stojanovic
1ba508d51b
win,tools: upgrade Windows signing to smctl
As a part of the new signing requrements for Windows change approach to
use the DigiCert cloud HSM service KeyLocker.

PR-URL: https://github.com/nodejs/node/pull/50956
Fixes: https://github.com/nodejs/build/issues/3491
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
2023-12-08 21:58:17 +00:00
Gerhard Stöbich
3f942e2c49
doc: correct tracingChannel.traceCallback()
tracingChannel.traceCallback() requires a callback otherwise it throws
and invalid argument error. As a result arguments are not optional.

Correct the documentation to reflect that arguments are not optional.

Besides that correct description regarding signaling of errors.

Remove an unneeded null check in wrappedCallback() which can't happen
because it's validated that callback is of type function.

PR-URL: https://github.com/nodejs/node/pull/51068
Fixes: https://github.com/nodejs/node/issues/50996
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
2023-12-08 21:01:23 +00:00
Tobias Nießen
8cdb7cae98
doc: use length argument in pbkdf2Key
The optional `length` argument is supposed to determine the
length of the AES-GCM key, so it may be 128, 192, or 256.

PR-URL: https://github.com/nodejs/node/pull/51066
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2023-12-07 23:23:41 +00:00
Jungku Lee
42b238ec9a
fs: update params in jsdoc for createReadStream and createWriteStream
PR-URL: https://github.com/nodejs/node/pull/51063
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Raz Luvaton <rluvaton@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Deokjin Kim <deokjin81.kim@gmail.com>
2023-12-07 19:42:45 +00:00
kylo5aby
639c366883
stream: fix fd is null when calling clearBuffer
PR-URL: https://github.com/nodejs/node/pull/50994
Fixes: https://github.com/nodejs/node/issues/50979
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Raz Luvaton <rluvaton@gmail.com>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
2023-12-07 18:21:19 +00:00
Cheng Zhao
3f4ea7ad7f
build: fix warnings from uv for gn build
PR-URL: https://github.com/nodejs/node/pull/51069
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2023-12-06 20:53:24 +00:00
Chenyu Yang
212a9724d5
benchmark: add undici websocket benchmark
Refs: https://github.com/nodejs/performance/issues/114
PR-URL: https://github.com/nodejs/node/pull/50586
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Matthew Aitken <maitken033380023@gmail.com>
2023-12-06 20:05:38 +00:00
Gabriel Schulhof
727dd28e47 node-api: introduce experimental feature flags
Add a flag for each experimental feature to indicate its presence.
That way, if we compile with `NAPI_EXPERIMENTAL` turned on, we'll be
able to distinguish between what `NAPI_EXPERIMENTAL` used to mean on an
old version of the headers when compiling against such an old version,
and what it means on a new version of Node.js.

PR-URL: https://github.com/nodejs/node/pull/50991
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Vladimir Morozov <vmorozov@microsoft.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2023-12-06 12:08:53 -05:00
Hiroki Osame
342ddb0e3d
module: document parentURL in register options
PR-URL: https://github.com/nodejs/node/pull/51039
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
2023-12-06 08:55:45 +00:00
Yagiz Nizipli
ac9e594e32 deps: update simdjson to v3.6.2
PR-URL: https://github.com/nodejs/node/pull/50986
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
2023-12-06 01:24:00 +00:00
Yagiz Nizipli
28b05cf8c8 tools: fix simdjson updater
PR-URL: https://github.com/nodejs/node/pull/50986
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
2023-12-06 01:23:59 +00:00
Joyee Cheung
c97322adff
benchmark: add create-hash benchmark
PR-URL: https://github.com/nodejs/node/pull/51026
Refs: https://github.com/nodejs/performance/issues/136
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2023-12-05 22:59:31 +00:00
Antoine du Hamel
a49b77b80d
doc: add deprecation notice to dirent.path
Refs: https://github.com/nodejs/node/pull/51020
PR-URL: https://github.com/nodejs/node/pull/51059
Reviewed-By: Debadree Chatterjee <debadree333@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
2023-12-05 21:15:23 +00:00
Bruce MacNaughton
ab857e138f
esm: fix hook name in error message
PR-URL: https://github.com/nodejs/node/pull/50466
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2023-12-05 19:54:01 +01:00
Node.js GitHub Bot
c59fe11038
deps: update zlib to 1.3-22124f5
PR-URL: https://github.com/nodejs/node/pull/50910
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
2023-12-05 19:42:43 +01:00
IlyasShabi
27b2ce5ba6
fs: improve error performance of readvSync
PR-URL: https://github.com/nodejs/node/pull/50100
Refs: https://github.com/nodejs/performance/issues/106
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2023-12-05 18:31:23 +00:00
Cheng Zhao
49579949a9
test: resolve path of embedtest binary correctly
PR-URL: https://github.com/nodejs/node/pull/50276
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-05 19:28:17 +01:00
Joyee Cheung
1e31a01f89
src: implement --trace-promises
This patch implements a debugging flag that dumps the current
stack trace when a promise is created or resolved. To reduce
noise we ignore before and after events (as the execution is
less interesting) and use the per-isolate hook to avoid extra
JS frames. This flag can assist work in reducing unnecessary
promise overhead.

PR-URL: https://github.com/nodejs/node/pull/50899
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io>
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2023-12-05 11:26:44 +00:00
Michaël Zasso
2eb1808a30
2023-12-05, Version 21.4.0 (Current)
Notable changes:

fs:
  * (SEMVER-MINOR) introduce `dirent.parentPath` (Antoine du Hamel) https://github.com/nodejs/node/pull/50976
  * use default w flag for writeFileSync with utf8 encoding (Murilo Kakazu) https://github.com/nodejs/node/pull/50990

PR-URL: https://github.com/nodejs/node/pull/51043
2023-12-05 10:28:50 +01:00
77e3dfca5c
lib: don't parse windows drive letters as schemes
We were incorrectly parsing windows drive letters as schemes. This was
polluting the source map cache with malformed file paths.

Fixes: https://github.com/nodejs/node/issues/50523
PR-URL: https://github.com/nodejs/node/pull/50580
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2023-12-05 09:24:14 +00:00
Node.js GitHub Bot
9def0a9f94
tools: update eslint to 8.55.0
PR-URL: https://github.com/nodejs/node/pull/51025
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2023-12-05 00:37:20 +00:00
Node.js GitHub Bot
5b31aed61b
deps: update undici to 5.28.2
PR-URL: https://github.com/nodejs/node/pull/51024
Reviewed-By: Matthew Aitken <maitken033380023@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2023-12-05 00:37:10 +00:00
Node.js GitHub Bot
646058a257
tools: update lint-md-dependencies to rollup@4.6.1
PR-URL: https://github.com/nodejs/node/pull/51022
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2023-12-05 00:37:00 +00:00
Jérémy Lal
fba2c9332f
test: escape cwd in regexp
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/50980
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2023-12-05 00:17:48 +00:00
Abdirahim Musse
5504cf36ca deps: cherry-pick bfbe4e38d7 from libuv upstream
Original commit message:
  aix: disable ipv6 link local (#4229)

  AIX does not implement ifaddrs and when retrieving the network
  interfaces with uv_interface_addresses there was a test failure in
  tcp_connect6_link_local.

  For now disable ipv6 link local on aix to:

  1) fix broken aix build
  2) stop blocking libuv upgrade in node

  Refs: https://github.com/libuv/libuv/pull/4222#issuecomment-1812962233
  Refs: https://github.com/nodejs/node/pull/50650

Refs: bfbe4e38d7
PR-URL: https://github.com/nodejs/node/pull/50650
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2023-12-04 23:48:17 +00:00
Node.js GitHub Bot
d9f5b4560f deps: update libuv to 1.47.0
deps: update libuv to 1.47.0
PR-URL: https://github.com/nodejs/node/pull/50650
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2023-12-04 23:48:16 +00:00
Antoine du Hamel
5b6aa530d0
doc: deprecate dirent.path
PR-URL: https://github.com/nodejs/node/pull/51020
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io>
Reviewed-By: LiviaMedeiros <livia@cirno.name>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
2023-12-04 23:11:36 +00:00
Richard Lau
7b3eb311a7
src: fix dynamically linked zlib version
Report the version of the dynamically linked zlib if built with
`configure --shared-zlib` instead of the hardcoded version that
corresponds to the bundled version of zlib in `deps`.

PR-URL: https://github.com/nodejs/node/pull/51007
Refs: https://github.com/nodejs/node/pull/50910
Refs: https://github.com/nodejs/node/pull/50158
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
2023-12-04 17:30:58 +00:00
Michael Dawson
d4bcdd89c7 module: fix recently introduced coverity warning
Signed-off-by: Michael Dawson <midawson@redhat.com>
PR-URL: https://github.com/nodejs/node/pull/50843
Reviewed-By: James M Snell <jasnell@gmail.com>
2023-12-04 09:59:08 -05:00
Lei Shi
cd71838675
benchmark: update interations and len in benchmark/util/text-decoder.js
Fixes: https://github.com/nodejs/node/issues/50571
PR-URL: https://github.com/nodejs/node/pull/50938
Refs: https://github.com/nodejs/node/issues/50571
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
2023-12-04 14:38:36 +00:00
Lei Shi
36a75e8b39
benchmark: update iterations of benchmark/util/type-check.js
Fixes: https://github.com/nodejs/node/issues/50571
PR-URL: https://github.com/nodejs/node/pull/50937
Refs: https://github.com/nodejs/node/issues/50571
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
2023-12-04 14:38:26 +00:00
Lei Shi
c510e2677d
benchmark: update iterations in benchmark/util/normalize-encoding.js
Fixes: https://github.com/nodejs/node/issues/50571
PR-URL: https://github.com/nodejs/node/pull/50934
Refs: https://github.com/nodejs/node/issues/50571
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
2023-12-04 14:38:05 +00:00
Lei Shi
964046d3b2
benchmark: update iterations in benchmark/util/inspect-array.js
Fixes: https://github.com/nodejs/node/issues/50571
PR-URL: https://github.com/nodejs/node/pull/50933
Refs: https://github.com/nodejs/node/issues/50571
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
2023-12-04 14:37:54 +00:00