40292 Commits

Author SHA1 Message Date
Robert Nagy
dbed0319ac
stream: refactor writable _write
PR-URL: https://github.com/nodejs/node/pull/50198
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2023-10-24 13:45:23 +00:00
Michaël Zasso
7c1b1f41c3
2023-10-24, Version 21.1.0 (Current)
Notable changes:

doc:
  * add H4ad to collaborators (Vinícius Lourenço) https://github.com/nodejs/node/pull/50217
esm:
  * (SEMVER-MINOR) detect ESM syntax in ambiguous JavaScript (Geoffrey Booth) https://github.com/nodejs/node/pull/50096
fs:
  * (SEMVER-MINOR) add flush option to appendFile() functions (Colin Ihrig) https://github.com/nodejs/node/pull/50095
lib:
  * (SEMVER-MINOR) add `navigator.userAgent` (Yagiz Nizipli) https://github.com/nodejs/node/pull/50200
stream:
  * (SEMVER-MINOR) allow pass stream class to `stream.compose` (Alex Yang) https://github.com/nodejs/node/pull/50187
  * call helper function from push and unshift (Raz Luvaton) https://github.com/nodejs/node/pull/50173

PR-URL: https://github.com/nodejs/node/pull/50335
2023-10-24 15:13:00 +02:00
Raz Luvaton
0fb512344f
benchmark: add more cases to Readable.from
PR-URL: https://github.com/nodejs/node/pull/50351
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
2023-10-24 01:36:17 +00:00
Michael Dawson
abd8ff6f78 benchmark: skip test-benchmark-os on IBMi
- IBMi does not have the os.uptime implemented so skip
  otherwise CI tests fail.

Signed-off-by: Michael Dawson <midawson@redhat.com>
PR-URL: https://github.com/nodejs/node/pull/50286
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2023-10-23 21:27:55 -04:00
Node.js GitHub Bot
452de06a0f
tools: update eslint to 8.52.0
PR-URL: https://github.com/nodejs/node/pull/50326
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2023-10-24 00:40:53 +00:00
Node.js GitHub Bot
40773ec08d
deps: update corepack to 0.22.0
PR-URL: https://github.com/nodejs/node/pull/50325
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
2023-10-24 00:40:44 +00:00
Node.js GitHub Bot
3f94ef93a7
deps: update googletest to 116b7e5
PR-URL: https://github.com/nodejs/node/pull/50324
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2023-10-24 00:40:35 +00:00
Chengzhong Wu
52fcf14258 node-api: return napi_exception_pending on proxy handlers
Accessing JS objects can be trapped with proxy handlers. These
handlers can throw when no node-api errors occur. In such cases,
`napi_pending_exception` should be returned.

PR-URL: https://github.com/nodejs/node/pull/48607
Reviewed-By: Gabriel Schulhof <gabrielschulhof@gmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
2023-10-23 18:17:49 -04:00
Aki Hasegawa-Johnson
91a21a2cf6
benchmark: move permission-fs-read to permission-processhas-fs-read
PR-URL: https://github.com/nodejs/node/pull/49770
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
2023-10-23 23:03:03 +02:00
Moshe Atlow
41a3878f3d
test: improve watch mode test
PR-URL: https://github.com/nodejs/node/pull/50319
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2023-10-23 19:03:25 +00:00
Antoine du Hamel
8f742bb13f
test: ensure never settling promises are detected
PR-URL: https://github.com/nodejs/node/pull/50318
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2023-10-23 17:55:50 +00:00
Antoine du Hamel
2da66c1444
vm: use import attributes instead of import assertions
The old import assertions proposal has been
renamed to "import attributes" with the following major changes:

1. The keyword is now `with` instead of `assert`.
2. Unknown assertions cause an error rather than being ignored.

This PR updates the documentation to encourage folks to use the new
syntax, and add aliases to preserve backward compatibility.

PR-URL: https://github.com/nodejs/node/pull/50141
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
2023-10-23 17:30:05 +00:00
Yagiz Nizipli
82cc1d1652
fs: do not throw error on cpSync internals
PR-URL: https://github.com/nodejs/node/pull/50185
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2023-10-23 17:22:28 +00:00
Jithil P Ponnan
9c7af51049
src: add commit hash shorthand in zlib version
src: add commit hash shorthand in zlib version
PR-URL: https://github.com/nodejs/node/pull/50158
Fixes: https://github.com/nodejs/node/issues/50139
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
2023-10-23 17:22:16 +00:00
Node.js GitHub Bot
b00e3b300e
tools: update lint-md-dependencies
- @rollup/plugin-commonjs@25.0.7
- @rollup/plugin-node-resolve@15.2.3
- rollup@4.1.4

PR-URL: https://github.com/nodejs/node/pull/50190
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2023-10-23 17:11:15 +00:00
Tobias Nießen
fa514c936b
doc: fix navigator.hardwareConcurrency example
PR-URL: https://github.com/nodejs/node/pull/50278
Refs: https://github.com/nodejs/node/pull/47769
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: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2023-10-23 18:52:41 +02:00
Node.js GitHub Bot
19216abd64
deps: update ada to 2.7.2
PR-URL: https://github.com/nodejs/node/pull/50338
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
2023-10-23 16:44:37 +00:00
Rafael Gonzaga
1f484969d4
meta: mention other notable changes section
PR-URL: https://github.com/nodejs/node/pull/50309
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Tierney Cyren <hello@bnb.im>
2023-10-23 16:12:49 +00:00
Antoine du Hamel
08ae8401f1
esm: do not give wrong hints when detecting file format
PR-URL: https://github.com/nodejs/node/pull/50314
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
2023-10-23 16:01:59 +00:00
Luke Albao
f6f681b62a
deps: V8: cherry-pick f7d000a7ae7b
Original commit message:

    [logging] Bugfix: LinuxPerfBasicLogger should log JS functions

    This patch fixes a typo that was introduced in commit
    c51041f45400928cd64fbc8f389c0dd0dd15f82f /
    https://chromium-review.googlesource.com/c/v8/v8/+/2336793, which reversed the behavior of the perf_basic_prof_only_functions flag.

    This also refactors the equivalent guard in LinuxPerfJitLogger to use the same inline CodeKind API for identifying JS Functions. This is unrelated to the bug, but it seems a fair rider to add on here.

    Bug: v8:14387
    Change-Id: I25766b0d45f4c65dfec5ae01e094a1ed94111054
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4954225
    Reviewed-by: Camillo Bruni <cbruni@chromium.org>
    Commit-Queue: Camillo Bruni <cbruni@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#90501}

Refs: f7d000a7ae
PR-URL: https://github.com/nodejs/node/pull/50302
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
Reviewed-By: Debadree Chatterjee <debadree333@gmail.com>
2023-10-23 15:27:33 +00:00
Vinícius Lourenço
04f9385311 test: avoid v8 deadcode on performance function
PR-URL: https://github.com/nodejs/node/pull/50074
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
2023-10-23 12:38:55 +00:00
Vinícius Lourenço
adaef03216 perf_hooks: reduce overhead of createHistogram
PR-URL: https://github.com/nodejs/node/pull/50074
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
2023-10-23 12:38:54 +00:00
Robert Nagy
8e814e3b82
stream: avoid getter for defaultEncoding
PR-URL: https://github.com/nodejs/node/pull/50203
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2023-10-23 12:08:26 +00:00
Lucas Santos
45a0b153b3
test_runner: add Date to the supported mock APIs
signed-off-by: Lucas Santos <lhs.santoss@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/48638
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Erick Wendel <erick.workspace@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2023-10-23 11:23:12 +00:00
Geoffrey Booth
25576b5118
doc: explain how to disable navigator
PR-URL: https://github.com/nodejs/node/pull/50310
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Zeyu "Alex" Yang <himself65@outlook.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
2023-10-22 22:24:27 +00:00
Juan José
c206b2a8a4
worker: handle detached MessagePort from a different context
When `worker.moveMessagePortToContext` is used, the async handle
associated with the port, will be triggered more than needed (at least
one more time) and with null data. That can be avoided by simply
checking that the data is present and the port is not detached.

Fixes: https://github.com/nodejs/node/issues/49075
Signed-off-by: Juan José Arboleda <soyjuanarbol@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/49150
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2023-10-22 21:20:52 +00:00
Aras Abbasi
a58ffad656
lib: improve performance of validateStringArray and validateBooleanArray
PR-URL: https://github.com/nodejs/node/pull/49756
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2023-10-22 21:12:38 +00:00
Yagiz Nizipli
d370ed0cd8
test: set test-watch-mode-inspect as flaky
PR-URL: https://github.com/nodejs/node/pull/50259
Refs: https://github.com/nodejs/node/issues/49933
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
2023-10-22 20:10:41 +00:00
Robert Nagy
633642e156
stream: simplify prefinish
PR-URL: https://github.com/nodejs/node/pull/50204
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2023-10-22 16:43:18 +00:00
Node.js GitHub Bot
76f59b4ca0
deps: update undici to 5.26.4
PR-URL: https://github.com/nodejs/node/pull/50274
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2023-10-22 15:20:48 +00:00
Shi Pujin
7dc74a0451
doc: add loong64 info into platform list
PR-URL: https://github.com/nodejs/node/pull/50086
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2023-10-22 10:07:13 +00:00
Richard Lau
0cec82277c
doc: update release process LTS step
A recent refactor of `nodejs-latest-linker` has moved the mapping
between Node.js versions and codenames to a different file.

Refs: https://github.com/nodejs/nodejs-latest-linker/pull/12
PR-URL: https://github.com/nodejs/node/pull/50299
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2023-10-21 17:38:09 +00:00
Antoine du Hamel
745979cf39
Revert "test: set test-esm-loader-resolve-type as flaky"
This reverts commit 2e4bb3c017bac7c0366cf977a92271b0242d4656.

PR-URL: https://github.com/nodejs/node/pull/50315
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
2023-10-21 15:54:28 +00:00
Ulises Gascón
fc423db0aa
tools: drop support for osx notarization with gon
Refs: https://github.com/nodejs/build/issues/3385#issuecomment-1729281269
PR-URL: https://github.com/nodejs/node/pull/50291
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
2023-10-21 15:54:17 +00:00
Niya Shiyas
4f0a7ae09a test: replace forEach with for..of in test-http-perf_hooks.js
PR-URL: https://github.com/nodejs/node/pull/49818
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2023-10-21 16:21:50 +02:00
Niya Shiyas
b084b26c44
test: replace forEach with for..of in test-net-isipv4.js
PR-URL: https://github.com/nodejs/node/pull/49822
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2023-10-21 12:32:43 +00:00
Antoine du Hamel
c38ba67a0d
test: deflake test-esm-loader-resolve-type
PR-URL: https://github.com/nodejs/node/pull/50273
Fixes: https://github.com/nodejs/node/issues/50040
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
2023-10-21 09:25:11 +00:00
Niya Shiyas
63e9d0282d test: replace forEach with for..of in test-http2-server
PR-URL: https://github.com/nodejs/node/pull/49819
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2023-10-21 07:01:01 +02:00
Niya Shiyas
fd562efcfe
test: replace forEach with for..of in test-http2-client-destroy.js
PR-URL: https://github.com/nodejs/node/pull/49820
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2023-10-21 04:59:05 +00:00
Aras Abbasi
2e5ffe9fcf
util: remove internal mime fns from benchmarks
PR-URL: https://github.com/nodejs/node/pull/50201
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
2023-10-21 02:12:44 +00:00
Jungku Lee
506858bf13
fs: improve error performance for readSync
PR-URL: https://github.com/nodejs/node/pull/50033
Refs: https://github.com/nodejs/performance/issues/106
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2023-10-21 02:00:00 +00:00
Node.js GitHub Bot
6ed8269f07 deps: update c-ares to 1.20.1
PR-URL: https://github.com/nodejs/node/pull/50082
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2023-10-20 23:39:26 +00:00
Node.js GitHub Bot
581344f150 deps: update c-ares to 1.20.0
Co-authored-by: Richard Lau <rlau@redhat.com>
PR-URL: https://github.com/nodejs/node/pull/50082
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2023-10-20 23:39:25 +00:00
Jungku Lee
fbd08ec4f3
fs: improve error performance for fsyncSync
PR-URL: https://github.com/nodejs/node/pull/49880
Refs: https://github.com/nodejs/performance/issues/106
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2023-10-20 23:39:14 +00:00
CanadaHonk
c37cf1832c
fs: improve error performance for mkdirSync
PR-URL: https://github.com/nodejs/node/pull/49847
Refs: https://github.com/nodejs/performance/issues/106
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2023-10-20 23:39:03 +00:00
Yagiz Nizipli
6678a09b59
test: update url web platform tests
PR-URL: https://github.com/nodejs/node/pull/50264
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2023-10-20 21:57:33 +00:00
Yagiz Nizipli
05a7810a1d
lib: add navigator.userAgent
PR-URL: https://github.com/nodejs/node/pull/50200
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Matthew Aitken <maitken033380023@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
2023-10-20 20:22:48 +00:00
Filip Skokan
cd6b86bb5a
crypto: ensure valid point on elliptic curve in SubtleCrypto.importKey
PR-URL: https://github.com/nodejs/node/pull/50234
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2023-10-20 16:25:42 +00:00
Geoffrey Booth
02926d3c6a
esm: detect ESM syntax in ambiguous JavaScript
PR-URL: https://github.com/nodejs/node/pull/50096
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Guy Bedford <guybedford@gmail.com>
2023-10-20 15:44:56 +00:00
Yagiz Nizipli
2d24518bfa
test: set test-emit-after-on-destroyed as flaky
Ref: https://github.com/nodejs/node/issues/50245
PR-URL: https://github.com/nodejs/node/pull/50246
Refs: https://github.com/nodejs/node/issues/50245
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
2023-10-20 15:36:06 +00:00