Commit Graph

42527 Commits

Author SHA1 Message Date
Yagiz Nizipli
e225f00034
zlib: remove zlib.bytesRead
Use `zlib.bytesWritten` instead.

PR-URL: https://github.com/nodejs/node/pull/55020
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2024-09-28 23:46:21 +00:00
Aviv Keller
f805d0be95
buffer: correctly apply prototype to cloned File / Blob
PR-URL: https://github.com/nodejs/node/pull/55138
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2024-09-28 22:05:58 +00:00
Antoine du Hamel
e7d27320c3
tools: only check teams on the default branch
PR-URL: https://github.com/nodejs/node/pull/55124
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2024-09-28 21:56:26 +00:00
James M Snell
ac53a5b29d
src: move more key handling to ncrypto
PR-URL: https://github.com/nodejs/node/pull/55108
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Matthew Aitken <maitken033380023@gmail.com>
2024-09-28 17:56:05 +00:00
Alfredo González
e6427e1d87
doc: add esm examples to node:net
PR-URL: https://github.com/nodejs/node/pull/55134
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2024-09-28 15:48:33 +00:00
Robert Nagy
3800d60c66 buffer: throw when writing beyond buffer"
This reverts commit dd8eeec3f0.

PR-URL: https://github.com/nodejs/node/pull/54588/
Refs: https://github.com/nodejs/node/pull/54524
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2024-09-28 08:21:43 -07:00
Giovanni
e1d8b4f038 assert: show the diff when deep comparing data with a custom message
Fixes: https://github.com/nodejs/node/issues/48465
PR-URL: https://github.com/nodejs/node/pull/54759
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2024-09-28 08:11:05 -07:00
Edigleysson Silva (Edy)
6d1cd506b5
doc: remove outdated https import reference
PR-URL: https://github.com/nodejs/node/pull/55111
Fixes: https://github.com/nodejs/node/issues/55091
Refs: https://github.com/nodejs/node/pull/53822
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2024-09-28 13:59:31 +00:00
Colin Ihrig
e32521a7b9
test_runner: close and flush destinations on forced exit
This commit updates the test runner to explicitly close and flush
all destination file streams when the --test-force-exit flag is
used.

Fixes: https://github.com/nodejs/node/issues/54327
PR-URL: https://github.com/nodejs/node/pull/55099
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com>
2024-09-28 13:59:06 +00:00
Nathan Baulch
28c7394319
test: fix typos
PR-URL: https://github.com/nodejs/node/pull/55063
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2024-09-28 13:58:55 +00:00
Aviv Keller
bf11e5793b
test_runner: support custom arguments in run()
PR-URL: https://github.com/nodejs/node/pull/55126
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2024-09-28 13:52:04 +00:00
sendoru
5368cdcf8a
doc: move the YAML changes element
moved YAML changes element regarding to `onread` option
from `socket.connect(options[, connectListener])`
to `new net.Socket([options])`

PR-URL: https://github.com/nodejs/node/pull/55112
Refs: https://github.com/nodejs/node/pull/25436
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2024-09-28 13:51:22 +00:00
Jason Zhang
7fe5bcd29e
fs: check subdir correctly in cpSync
PR-URL: https://github.com/nodejs/node/pull/55033
Fixes: https://github.com/nodejs/node/issues/54285
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2024-09-28 13:50:53 +00:00
Aviv Keller
2d77ba5d30
Revert "console: colorize console error and warn"
This reverts commit a833c9e0be.

PR-URL: https://github.com/nodejs/node/pull/54677
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2024-09-28 13:50:39 +00:00
Aviv Keller
e8127db032
tools: make choco install script more readable
PR-URL: https://github.com/nodejs/node/pull/54002
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Stefan Stojanovic <stefan.stojanovic@janeasystems.com>
2024-09-28 15:39:32 +02:00
Antoine du Hamel
23743f63fb
doc: remove random horizontal separators in process.md
PR-URL: https://github.com/nodejs/node/pull/55149
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: LiviaMedeiros <livia@cirno.name>
2024-09-28 10:45:37 +00:00
Carlos Espa
f5d454ac7e
src: add receiver to fast api callback methods
When creating an fast api the callback might use the receiver. In that
case if the internal binding is destructured the method won't have
access to the reciver and it will throw. Passing the receiver as second
argument ensures the receiver is available.

PR-URL: https://github.com/nodejs/node/pull/54408
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
2024-09-28 09:46:03 +00:00
Edigleysson Silva (Edy)
18acff0d01
doc: put --env-file-if-exists=config right under --env-file=config
PR-URL: https://github.com/nodejs/node/pull/55131
Fixes: https://github.com/nodejs/node/issues/55129
Refs: https://github.com/nodejs/node/pull/53060
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2024-09-28 00:01:43 +00:00
Rafael Gonzaga
1398c04c47
build: notify via slack when review-wanted
I have noticed we don't have a usual workflow for
review-wanted PRs. So, in other words the label
is not useful as it should be. This commit notify
via Slack (#node-core) whenever this label is placed
either on an issue or in a PR.

PR-URL: https://github.com/nodejs/node/pull/55102
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
2024-09-27 16:25:52 +00:00
Nathan Baulch
b5fb2ff81e
src: fix typos
PR-URL: https://github.com/nodejs/node/pull/55064
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2024-09-27 15:34:48 +00:00
chirsz
fd787c96e1
doc: fix the require resolve algorithm in modules.md
Before the fix, the pseudocode was describing an infinite loop.

PR-URL: https://github.com/nodejs/node/pull/55117
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
2024-09-27 17:34:38 +02:00
Jason Zhang
87a79cd8a1
stream: treat null asyncIterator as undefined
According to the spec, getIterator should normalize incoming method to
undefined if it is either undefined or null. This PR enforces that spec
compliance with passed WPT.

PR-URL: https://github.com/nodejs/node/pull/55119
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Matthew Aitken <maitken033380023@gmail.com>
Reviewed-By: Mattias Buelens <mattias@buelens.com>
2024-09-27 14:34:11 +00:00
Antoine du Hamel
fb852798dc
esm: do not interpret "main" as a URL
As documented, its value is a path.

PR-URL: https://github.com/nodejs/node/pull/55003
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2024-09-27 10:05:50 +00:00
Christos Koutsiaris
fbc6fcb018
test: remove duplicated test descriptions
PR-URL: https://github.com/nodejs/node/pull/54140
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2024-09-27 10:05:33 +00:00
Sonny
090add7864
fs: refactoring declaratively with Array.fromAsync
Refs: https://github.com/nodejs/node/pull/51912
PR-URL: https://github.com/nodejs/node/pull/54644
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
2024-09-27 11:59:09 +02:00
RedYetiDev
772b35bdc4
module: support loading entrypoint as url
Co-Authored-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/54933
Refs: https://github.com/nodejs/node/pull/49975
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: LiviaMedeiros <livia@cirno.name>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2024-09-27 15:26:48 +08:00
jakecastelli
66a2cb210a
test: deflake test/pummel/test-timers.js
PR-URL: https://github.com/nodejs/node/pull/55098
Fixes: https://github.com/nodejs/node/issues/55092
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2024-09-27 06:16:20 +00:00
Aviv Keller
668e523392
doc: update style guide
PR-URL: https://github.com/nodejs/node/pull/53223
Reviewed-By: James M Snell <jasnell@gmail.com>
2024-09-26 22:56:35 +00:00
James M Snell
812806a757 src: move more stuff over to use Maybe<void>
PR-URL: https://github.com/nodejs/node/pull/54831
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2024-09-26 12:59:23 -07:00
Aviv Keller
ae82b455d1
doc: add missing : to run()'s globPatterns
PR-URL: https://github.com/nodejs/node/pull/55135
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2024-09-26 19:33:31 +00:00
Chengzhong Wu
84966703e0
src: track BaseObjects with an efficient list
PR-URL: https://github.com/nodejs/node/pull/55104
Refs: https://github.com/nodejs/node/pull/54880
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2024-09-26 18:40:33 +01:00
dependabot[bot]
779e6bdd5e
tools: bump Rollup from 4.18.1 to 4.22.4 for lint-md
Bumps [rollup](https://github.com/rollup/rollup) from 4.18.1 to 4.22.4.
- [Release notes](https://github.com/rollup/rollup/releases)
- [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rollup/rollup/compare/v4.18.1...v4.22.4)

---
updated-dependencies:
- dependency-name: rollup
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
PR-URL: https://github.com/nodejs/node/pull/55093
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
2024-09-26 16:27:10 +00:00
Node.js GitHub Bot
5f78e2c880
deps: update timezone to 2024b
PR-URL: https://github.com/nodejs/node/pull/55056
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
2024-09-26 16:26:59 +00:00
Joyee Cheung
06206af181
module: unflag --experimental-require-module
This unflags --experimental-require-module so require(esm) can be
used without the flag. For now, when require() actually encounters
an ESM, it will still emit an experimental warning. To opt out
of the feature, --no-experimental-require-module can be used.

There are some tests specifically testing ERR_REQUIRE_ESM. Some
of them are repurposed to test --no-experimental-require-module.
Some of them are modified to just expect loading require(esm) to
work, when it's appropriate.

PR-URL: https://github.com/nodejs/node/pull/55085
Refs: https://github.com/nodejs/node/issues/52697
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: LiviaMedeiros <livia@cirno.name>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
2024-09-26 14:21:37 +00:00
Khafra
17fd32790a
buffer: make File cloneable
Fixes: https://github.com/nodejs/node/issues/47612
PR-URL: https://github.com/nodejs/node/pull/47613
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2024-09-26 08:24:39 +00:00
Khafra
da5887d8e9
buffer: extract Blob's .arrayBuffer() & webidl changes
- Extracts Blob.prototype.arrayBuffer so it cannot be
  overridden in .text(), etc.
- Make .bytes() enumerable. I guess the WPT runner is
  not running the idlharness tests?
- Make .text() return a Promise, rather than being
  explicitly async. This is a non-documented part of
  the webidl spec. Refs: #49936
- Have .text(), .arrayBuffer(), and .bytes() reject
  for an invalid this instead of throwing. Fix the
  tests regarding this.

PR-URL: https://github.com/nodejs/node/pull/53372
Refs: https://github.com/nodejs/node/pull/49936
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
2024-09-26 05:53:58 +00:00
Luigi Pinca
9bb6a1a790
test: deflake test-http-remove-header-stays-removed
Instead of relying on a timer, verify that `socket.end()` is called when
the `'finish'` event is emitted on the `ServerResponse` object.

PR-URL: https://github.com/nodejs/node/pull/55004
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com>
2024-09-26 02:59:29 +00:00
Yagiz Nizipli
afe56aa58b
crypto: runtime deprecate crypto.fips
PR-URL: https://github.com/nodejs/node/pull/55019
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
2024-09-25 22:31:03 +00:00
Joyee Cheung
02cdf7b809
src: decode native error messages as UTF-8
The native error messages can sometimes contain e.g. path content
that are typically passed in as chars with UTF8-encoded code points.
The native error throwing code previously always decode the chars
as Latin-1, which would be incorrect.

PR-URL: https://github.com/nodejs/node/pull/55024
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2024-09-25 21:56:35 +00:00
Michael Dawson
0f7bdcc17f
test: fix test-tls-junk-closes-server
Refs: https://github.com/nodejs/node/issues/53382

TLS spec seems to indicate there should should be a response
sent when TLS handshake fails. See
https://datatracker.ietf.org/doc/html/rfc8446#page-85

When compiled with OpenSSL32 we see the
the following response '15 03 03 00 02 02 16' which
decodes as a fatal (0x02) TLS error alert number 22 (0x16).
which corresponds to TLS1_AD_RECORD_OVERFLOW which matches
the error we see if NODE_DEBUG is turned on once you get
through the define aliases.

If there is a response from the server the test used to
hang because the end event will not be emitted until after
the response is consumed. This PR fixes the test so
it consumes the response.

Some earlier OpenSSL versions did not seem to send a response but
the error handling seems to have been re-written/improved
in OpenSSL32.

Signed-off-by: Michael Dawson <midawson@redhat.com>
PR-URL: https://github.com/nodejs/node/pull/55089
Refs: https://github.com/nodejs/node/issues/52482
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Jithil P Ponnan <jithil@outlook.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2024-09-25 21:28:05 +00:00
Antoine du Hamel
2118e32d9b
test: fix more tests that fail when path contains a space
PR-URL: https://github.com/nodejs/node/pull/55088
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
2024-09-25 21:27:50 +00:00
Node.js GitHub Bot
5ed3296051
deps: patch V8 to 12.9.202.19
Refs: https://github.com/v8/v8/compare/12.9.202.18...12.9.202.19
PR-URL: https://github.com/nodejs/node/pull/55057
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
2024-09-25 22:42:22 +02:00
Antoine du Hamel
bdddc04dff
test: fix assertSnapshot when path contains a quote
PR-URL: https://github.com/nodejs/node/pull/55087
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
2024-09-25 19:42:12 +00:00
Aviv Keller
18800da280
meta: add more information about nightly releases
PR-URL: https://github.com/nodejs/node/pull/55084
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com>
2024-09-25 17:35:07 +00:00
Antoine du Hamel
aac8ba7bd7
test_runner: fix mocking modules with quote in their URL
PR-URL: https://github.com/nodejs/node/pull/55083
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tierney Cyren <hello@bnb.im>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
2024-09-25 17:34:58 +00:00
Antoine du Hamel
7d0ce254e8
test: fix some tests when path contains %
Tests should pass even if the path where the repo is cloned contains
URL-significant chars.

PR-URL: https://github.com/nodejs/node/pull/55082
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
2024-09-25 17:25:33 +00:00
Marco Ippolito
00d4f8073c
benchmark: create benchmark for typescript
PR-URL: https://github.com/nodejs/node/pull/54904
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2024-09-25 17:25:18 +00:00
Yagiz Nizipli
6fb9f56994
src: update clang-tidy and focus on modernization
PR-URL: https://github.com/nodejs/node/pull/53757
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2024-09-25 14:44:32 +00:00
Nathan Baulch
4c045351c1
lib: fix typos
PR-URL: https://github.com/nodejs/node/pull/55065
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: LiviaMedeiros <livia@cirno.name>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2024-09-25 14:35:18 +00:00
René
7f480818b7
doc: correct cleanup option in stream.(promises.)finished
PR-URL: https://github.com/nodejs/node/pull/55043
Refs: https://github.com/nodejs/node/pull/44862
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2024-09-25 14:35:08 +00:00