Commit Graph

8284 Commits

Author SHA1 Message Date
theweipeng 6cb0690fcc src: detect whether the string is one byte representation or not
References: nodejs#56090
PR-URL: https://github.com/nodejs/node/pull/56147
Fixes: https://github.com/nodejs/node/issues/56090
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2025-02-25 08:01:28 -08:00
Hasegawa-Yukihiro 22ac5976a8 doc: update options to filehandle.appendFile()
PR-URL: https://github.com/nodejs/node/pull/56972
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2025-02-24 20:28:57 +00:00
Michael Dawson 9b6672adcb
doc: add additional caveat for fs.watch
Add clarification based on discussion with security
researcher.

Signed-off-by: Michael Dawson <midawson@redhat.com>
PR-URL: https://github.com/nodejs/node/pull/57150
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2025-02-24 16:55:32 +00:00
Marco Ippolito 56773ba50d src: namespace config file flags
PR-URL: https://github.com/nodejs/node/pull/57170
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
2025-02-24 09:54:56 +00:00
Pietro Marchini 8c2df73db6
test_runner: refactor testPlan counter increse
PR-URL: https://github.com/nodejs/node/pull/56765
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
2025-02-23 20:31:14 +00:00
Livia Medeiros 25dd206c29
fs: remove `fs.F_OK`, `fs.R_OK`, `fs.W_OK`, `fs.X_OK`
PR-URL: https://github.com/nodejs/node/pull/55862
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2025-02-23 10:28:22 +00:00
Pavel Romanov bc8c6f8a5d
doc: remove buffered flag from performance hooks examples
PR-URL: https://github.com/nodejs/node/pull/52607
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2025-02-23 00:14:56 +00:00
Paolo Insogna e027791c6d
process: add threadCpuUsage
PR-URL: https://github.com/nodejs/node/pull/56467
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2025-02-21 14:14:02 +00:00
Marco Ippolito 772c609eb4 src: create THROW_ERR_OPTIONS_BEFORE_BOOTSTRAPPING
PR-URL: https://github.com/nodejs/node/pull/57016
Refs: https://github.com/nodejs/node/issues/53787
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Tierney Cyren <hello@bnb.im>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
2025-02-20 23:07:43 +00:00
Marco Ippolito f0e653d2af src: add config file support
PR-URL: https://github.com/nodejs/node/pull/57016
Refs: https://github.com/nodejs/node/issues/53787
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Tierney Cyren <hello@bnb.im>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
2025-02-20 23:07:42 +00:00
1ilsang 867a754acd doc: fix 'introduced_in' version in typescript module
PR-URL: https://github.com/nodejs/node/pull/57109
Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2025-02-20 12:28:46 +00:00
1ilsang 03fdde505e tools: consolidate 'introduced_in' check for docs
PR-URL: https://github.com/nodejs/node/pull/57109
Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2025-02-20 12:28:45 +00:00
Carlos Espa 15fec136e8
cli: allow --cpu-prof* in NODE_OPTIONS
Fixes: https://github.com/nodejs/node/issues/56944
PR-URL: https://github.com/nodejs/node/pull/57018
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2025-02-20 10:11:01 +00:00
Antoine du Hamel 7a6b12895e
doc: fix link and history of `SourceMap` sections
PR-URL: https://github.com/nodejs/node/pull/57098
Fixes: https://github.com/nodejs/node/issues/57094
Refs: https://github.com/nodejs/node/pull/48461
Refs: https://github.com/nodejs/node/pull/47790
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: James M Snell <jasnell@gmail.com>
2025-02-18 19:26:40 +00:00
Dario Piotrowicz 0192a7d05b doc: add `module namespace object` links
PR-URL: https://github.com/nodejs/node/pull/57093
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2025-02-18 10:51:21 -08:00
Rithvik Vibhu ef91595e2f dns: add TLSA record query and parsing
PR-URL: https://github.com/nodejs/node/pull/52983
Refs: https://github.com/nodejs/node/issues/39569
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev>
2025-02-18 10:37:48 -08:00
Dario Piotrowicz ecf803daca
doc: disambiguate pseudo-code statement
the statement `set Y to be the file system root` can be wrongly
interpreted as the file system root being updated to match Y,
removing the `be` term removes this potential interpretation

PR-URL: https://github.com/nodejs/node/pull/57092
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2025-02-18 13:13:29 +00:00
RafaelGSS 0a4572d6a7 build: add skip_apidoc_files and include QUIC
PR-URL: https://github.com/nodejs/node/pull/56941
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
2025-02-17 19:23:39 -08:00
Dario Piotrowicz 666e773f22
doc: fix wrong articles used to address modules
PR-URL: https://github.com/nodejs/node/pull/57090
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2025-02-17 11:50:49 +00:00
Dario Piotrowicz f1b951fd22
doc: update `module.builtinModules` sentence
updates the sentence saying that `module.builtinModule`
only contains the modules that can be loaded without
`node:` (since v23.5.0 also prefix-only modules are
included in the list)

PR-URL: https://github.com/nodejs/node/pull/57089
Refs: https://github.com/nodejs/node/pull/56185
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jordan Harband <ljharb@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2025-02-16 22:31:15 +00:00
Alexander “weej” Jones b6cd6b7e31
doc: `modules.md`: fix `distance` definition
It's somewhat esoteric at best to define distance in terms of squared
length!

PR-URL: https://github.com/nodejs/node/pull/57046
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2025-02-16 18:26:30 +00:00
Dario Piotrowicz 69fdce2c7f
doc: fix wrong verb form
PR-URL: https://github.com/nodejs/node/pull/57091
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2025-02-16 15:28:33 +00:00
Joyee Cheung e892e79f17
doc: fix transpiler loader hooks documentation
The loader hooks examples have been broken for a while:

1. The nextLoad() hook cannot be used on a .coffee file that ends
   up going to the default load step without an explict format,
   which would cause a ERR_UNKNOWN_FILE_EXTENSION. Mention
   adding a package.json with a type field to work around it
   in the example.
2. Pass the context parameter to the nextLoad() invocation and
   document that context.format is mandatory when module type
   is not explicitly inferrable from the module.
3. Correct the getPackageType() implementation which returns
   false instead of undefined in the absence of an explict format,
   which is not a valid type for format.

PR-URL: https://github.com/nodejs/node/pull/57037
Refs: https://github.com/nodejs/node/issues/57030
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2025-02-16 12:48:56 +00:00
Joyee Cheung 579fc67d49
crypto: support --use-system-ca on non-Windows and non-macOS
On other platforms, load from the OpenSSL default certificate
file and diretory.
This is different from --use-openssl-ca in that it caches
the certificates on first load, instead of always reading
from disk every time a new root store is needed.

When used together with the statically-linked OpenSSL, the
default configuration usually leads to this behavior:

- If SSL_CERT_FILE is used, load from SSL_CERT_FILE. Otherwise
  load from /etc/ssl/cert.pem
- If SSL_CERT_DIR is used, load from all the files under
  SSL_CERT_DIR. Otherwise, load from all the files under
  /etc/ssl/certs

PR-URL: https://github.com/nodejs/node/pull/57009
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2025-02-15 22:54:31 +00:00
tpoisseau e4f2c25527
doc: buffer: fix typo on `Buffer.copyBytesFrom(` `offset` option
PR-URL: https://github.com/nodejs/node/pull/57015
Reviewed-By: Colin Ihrig <cjihrig@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>
2025-02-14 14:54:29 +00:00
Node.js GitHub Bot 69d32d1cfe
2025-02-13, Version 23.8.0 (Current)
Notable changes:

crypto:
  * (SEMVER-MINOR) support --use-system-ca on Windows (Joyee Cheung) https://github.com/nodejs/node/pull/56833
  * (SEMVER-MINOR) added support for reading certificates from macOS system store (Tim Jacomb) https://github.com/nodejs/node/pull/56599
deps:
  * update timezone to 2025a (Node.js GitHub Bot) https://github.com/nodejs/node/pull/56876
sqlite:
  * (SEMVER-MINOR) allow returning `ArrayBufferView`s from user-defined functions (René) https://github.com/nodejs/node/pull/56790
src:
  * set signal inspector io thread name (RafaelGSS) https://github.com/nodejs/node/pull/56416
  * set thread name for main thread and v8 worker (RafaelGSS) https://github.com/nodejs/node/pull/56416
  * set worker thread name using worker.name (RafaelGSS) https://github.com/nodejs/node/pull/56416
  * use a default thread name for inspector (RafaelGSS) https://github.com/nodejs/node/pull/56416
url:
  * (SEMVER-MINOR) add URLPattern implementation (Yagiz Nizipli) https://github.com/nodejs/node/pull/56452
zlib:
  * (SEMVER-MINOR) add zstd support (Jan Krems) https://github.com/nodejs/node/pull/52100

PR-URL: https://github.com/nodejs/node/pull/57005
2025-02-13 18:28:25 +01:00
Antoine du Hamel 25b4a5d2fe
doc: move stability index after history section for consistency
PR-URL: https://github.com/nodejs/node/pull/56997
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
2025-02-12 18:25:09 +00:00
Yukihiro Hasegawa 9ce1fffcdc
doc: add `signal` to `filehandle.writeFile()` options
PR-URL: https://github.com/nodejs/node/pull/56804
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Harshitha K P <harshitha014@gmail.com>
2025-02-12 09:33:06 +01:00
Antoine du Hamel e7626dc70d
2025-02-11, Version 22.14.0 'Jod' (LTS)
Notable changes:

crypto:
  * update root certificates to NSS 3.107 (Node.js GitHub Bot) https://github.com/nodejs/node/pull/56566
fs:
  * (SEMVER-MINOR) allow `exclude` option in globs to accept glob patterns (Daeyeon Jeong) https://github.com/nodejs/node/pull/56489
lib:
  * (SEMVER-MINOR) add typescript support to STDIN eval (Marco Ippolito) https://github.com/nodejs/node/pull/56359
module:
  * (SEMVER-MINOR) add ERR_UNSUPPORTED_TYPESCRIPT_SYNTAX (Marco Ippolito) https://github.com/nodejs/node/pull/56610
  * (SEMVER-MINOR) add `findPackageJSON` util (Jacob Smith) https://github.com/nodejs/node/pull/55412
process:
  * (SEMVER-MINOR) add process.ref() and process.unref() methods (James M Snell) https://github.com/nodejs/node/pull/56400
sqlite:
  * (SEMVER-MINOR) support TypedArray and DataView in `StatementSync` (Alex Yang) https://github.com/nodejs/node/pull/56385
src:
  * (SEMVER-MINOR) add --disable-sigusr1 to prevent signal i/o thread (Rafael Gonzaga) https://github.com/nodejs/node/pull/56441
src,worker:
  * (SEMVER-MINOR) add isInternalWorker (Carlos Espa) https://github.com/nodejs/node/pull/56469
test_runner:
  * (SEMVER-MINOR) add TestContext.prototype.waitFor() (Colin Ihrig) https://github.com/nodejs/node/pull/56595
  * (SEMVER-MINOR) add t.assert.fileSnapshot() (Colin Ihrig) https://github.com/nodejs/node/pull/56459
  * (SEMVER-MINOR) add assert.register() API (Colin Ihrig) https://github.com/nodejs/node/pull/56434
worker:
  * (SEMVER-MINOR) add eval ts input (Marco Ippolito) https://github.com/nodejs/node/pull/56394

PR-URL: https://github.com/nodejs/node/pull/56910
2025-02-11 11:41:44 +01:00
Yagiz Nizipli 5d7091f1bc
timers: set several methods EOL
PR-URL: https://github.com/nodejs/node/pull/56966
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
2025-02-10 21:09:41 +00:00
Yagiz Nizipli 92dae7de04
zlib: make all zstd functions experimental
PR-URL: https://github.com/nodejs/node/pull/56964
Refs: https://github.com/nodejs/node/pull/52100
Reviewed-By: Jan Krems <jan.krems@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
2025-02-10 19:34:05 +00:00
Marco Ippolito 3844e7e0ed
2025-02-10, Version 20.18.3 'Iron' (LTS)
Notable changes:

crypto:
  * update root certificates to NSS 3.104 (Richard Lau) https://github.com/nodejs/node/pull/55681
doc:
  * add LJHarb to collaborators (Jordan Harband) https://github.com/nodejs/node/pull/56132
  * enforce strict policy to semver-major releases (Rafael Gonzaga) https://github.com/nodejs/node/pull/55732
  * add jazelly to collaborators (Jason Zhang) https://github.com/nodejs/node/pull/55531
esm:
  * mark import attributes and JSON module as stable (Nicolò Ribaudo) https://github.com/nodejs/node/pull/55333
tools:
  * fix root certificate updater (Richard Lau) https://github.com/nodejs/node/pull/55681

PR-URL: https://github.com/nodejs/node/pull/56699
2025-02-10 14:45:07 +01:00
Ian Kerins 1781f63633
fs: make `FileHandle.readableWebStream` always create byte streams
The original implementation of the experimental
`FileHandle.readableWebStream` API created non-`type: 'bytes'` streams,
which prevented callers from creating `mode: 'byob'` readers from the
returned stream, which means they could not achieve the associated
"zero-copy" performance characteristics.

Then, #46933 added a parameter allowing callers to pass the `type`
parameter down to the ReadableStream constructor, exposing the same
semantics to callers of `FileHandle.readableWebStream`.

But there is no point to giving callers this choice: FileHandle-derived
streams are by their very nature byte streams. We should not require
callers to explicitly opt in to having byte stream semantics. Moreover,
I do not see a situation in which callers would ever want to have a
non-bytes stream: bytes-streams only do anything differently than normal
ones if `mode: 'byob'` is passed to `getReader`.

So, remove the `options` parameter and always create a ReadableStream
with `type: 'bytes'`.

Fixes #54041.

PR-URL: https://github.com/nodejs/node/pull/55461
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2025-02-10 03:40:31 +00:00
Jonas d1f8ccb10d
url: expose urlpattern as global
PR-URL: https://github.com/nodejs/node/pull/56950
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Matthew Aitken <maitken033380023@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2025-02-09 15:32:59 +00:00
Jan Krems bf12d72faa zlib: add zstd support
Fixes: https://github.com/nodejs/node/issues/48412
PR-URL: https://github.com/nodejs/node/pull/52100
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2025-02-08 12:43:53 +00:00
Jimmy Leung 1b2d2f7e68
doc: update history of stream.Readable.toWeb()
Adds the exact version for when the 2nd `options` argument is available.

Refs: https://github.com/nodejs/node/pull/43515
PR-URL: https://github.com/nodejs/node/pull/56928
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2025-02-07 19:05:04 +00:00
Joyee Cheung c0953d9de7
crypto: support --use-system-ca on Windows
This patch adds support for --use-system-ca on Windows, the
certificates are collected following Chromium's policy,
though the following are left as TODO and out of this patch.

- Support for user-added intermediate certificates
- Support for distrusted certificates

Since those aren't typically supported by other runtimes/tools
either, and what's implemented in this patch is sufficient for
enough use cases already.

PR-URL: https://github.com/nodejs/node/pull/56833
Reviewed-By: James M Snell <jasnell@gmail.com>
2025-02-07 16:32:25 +00:00
Antoine du Hamel 7dbc29ed4b
doc: make MDN links to global classes more consistent
PR-URL: https://github.com/nodejs/node/pull/56924
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
Reviewed-By: Akhil Marsonya <akhil.marsonya27@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2025-02-07 14:33:06 +00:00
Antoine du Hamel e849e74444
doc: make MDN links to global classes more consistent in `assert.md`
PR-URL: https://github.com/nodejs/node/pull/56920
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2025-02-07 15:26:49 +01:00
Antoine du Hamel 5a019daaa6
doc: make MDN links to global classes more consistent
PR-URL: https://github.com/nodejs/node/pull/56923
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
2025-02-07 14:24:02 +00:00
Antoine du Hamel db0fadd092
doc: make MDN links to global classes more consistent in `util.md`
PR-URL: https://github.com/nodejs/node/pull/56922
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2025-02-07 14:23:48 +00:00
Antoine du Hamel ef3031401c
doc: make MDN links to global classes more consistent in `buffer.md`
PR-URL: https://github.com/nodejs/node/pull/56921
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2025-02-07 14:06:29 +00:00
Marco Ippolito 6fd0d0c36d doc: improve type stripping documentation
PR-URL: https://github.com/nodejs/node/pull/56916
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com>
2025-02-07 10:34:18 +00:00
Marco Ippolito db8c687e29 doc: specificy support for erasable ts syntax
PR-URL: https://github.com/nodejs/node/pull/56916
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com>
2025-02-07 10:34:18 +00:00
RafaelGSS d7aacbebd6 src: set signal inspector io thread name
PR-URL: https://github.com/nodejs/node/pull/56416
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
2025-02-06 01:36:28 +00:00
RafaelGSS f32054ffde src: set worker thread name using worker.name
Set the worker thread name using worker.name value
and changing the default to "WorkerThread"

PR-URL: https://github.com/nodejs/node/pull/56416
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
2025-02-06 01:36:27 +00:00
Edy Silva 16dc29d4b6
sqlite, test: expose sqlite online backup api
PR-URL: https://github.com/nodejs/node/pull/56253
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
2025-02-05 22:26:28 +00:00
Chengzhong Wu 316014d172
doc: update websocket link to avoid linking to self
The link `WebSocket` is pointing to the section itself.

PR-URL: https://github.com/nodejs/node/pull/56897
Reviewed-By: Tim Perry <pimterry@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Matthew Aitken <maitken033380023@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
2025-02-05 11:01:18 +00:00
Juan José 24cae2d7b8
doc: mark `--env-file-if-exists` flag as experimental
As `--env-file` is experimental, this must be marked as experimental as
well.

Refs: https://github.com/nodejs/node/issues/56887
Signed-off-by: Juan José Arboleda <soyjuanarbol@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/56893
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
2025-02-05 05:34:10 +00:00
Michael Dawson dd92abc405
deps: update cjs-module-lexer to 2.0.0
Signed-off-by: Michael Dawson <mdawson@devrus.com>
PR-URL: https://github.com/nodejs/node/pull/56855
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
2025-02-04 13:12:33 +00:00
René 2bd5694cd1
sqlite: allow returning `ArrayBufferView`s from user-defined functions
PR-URL: https://github.com/nodejs/node/pull/56790
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2025-02-01 21:19:54 +00:00
Yagiz Nizipli 43c593c428 url: add URLPattern implementation
Co-authored-by: Daniel Lemire <daniel@lemire.me>
PR-URL: https://github.com/nodejs/node/pull/56452
Reviewed-By: Daniel Lemire <daniel@lemire.me>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Jordan Harband <ljharb@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
2025-02-01 02:13:57 +00:00
cjihrig 1a2eb15bc6 test_runner: remove promises returned by t.test()
This commit updates the TestContext.prototype.test() API to no
longer return a Promise.

Fixes: https://github.com/nodejs/node/issues/51292
PR-URL: https://github.com/nodejs/node/pull/56664
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Raz Luvaton <rluvaton@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
2025-01-31 12:56:03 -08:00
cjihrig 96718268fe test_runner: remove promises returned by test()
This commit updates the test() and suite() APIs to no longer
return a Promise.

Fixes: https://github.com/nodejs/node/issues/51292
PR-URL: https://github.com/nodejs/node/pull/56664
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Raz Luvaton <rluvaton@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
2025-01-31 12:56:02 -08:00
Michaël Zasso 44b0e423dc
build: remove support for ppc 32-bit
V8 removed support for it.

Refs: 643753953a
PR-URL: https://github.com/nodejs/node/pull/55014
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2025-01-31 12:47:09 +01:00
Antoine du Hamel c2c7f08f83 2025-01-30, Version 23.7.0 (Current)
Notable changes:

crypto:
  * update root certificates to NSS 3.107 (Node.js GitHub Bot) https://github.com/nodejs/node/pull/56566
fs:
  * (SEMVER-MINOR) allow `exclude` option in globs to accept glob patterns (Daeyeon Jeong) https://github.com/nodejs/node/pull/56489
module:
  * (SEMVER-MINOR) add ERR_UNSUPPORTED_TYPESCRIPT_SYNTAX (Marco Ippolito) https://github.com/nodejs/node/pull/56610
sqlite:
  * (SEMVER-MINOR) support TypedArray and DataView in `StatementSync` (Alex Yang) https://github.com/nodejs/node/pull/56385
src:
  * (SEMVER-MINOR) add --disable-sigusr1 to prevent signal i/o thread (Rafael Gonzaga) https://github.com/nodejs/node/pull/56441
src,worker:
  * (SEMVER-MINOR) add isInternalWorker (Carlos Espa) https://github.com/nodejs/node/pull/56469
test_runner:
  * (SEMVER-MINOR) add TestContext.prototype.waitFor() (Colin Ihrig) https://github.com/nodejs/node/pull/56595
  * (SEMVER-MINOR) add t.assert.fileSnapshot() (Colin Ihrig) https://github.com/nodejs/node/pull/56459
  * (SEMVER-MINOR) add assert.register() API (Colin Ihrig) https://github.com/nodejs/node/pull/56434

PR-URL: https://github.com/nodejs/node/pull/56800
2025-01-30 18:58:16 +01:00
Deokjin Kim 7f18407d0f
doc: fix typo in cjs example of `util.styleText`
`errorMessage` needs to be printed instead of
`successMessage` in console.error(). ESM example is
only fixed in previous PR.

Refs: https://github.com/nodejs/node/pull/56720
PR-URL: https://github.com/nodejs/node/pull/56769
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Jason Zhang <xzha4350@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2025-01-30 02:02:58 +00:00
René 671d058689
doc: clarify sqlite user-defined function behaviour
PR-URL: https://github.com/nodejs/node/pull/56786
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
2025-01-29 14:21:13 +00:00
Tim Jacomb efe698ee93
crypto: added support for reading certificates from macOS system store
PR-URL: https://github.com/nodejs/node/pull/56599
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2025-01-28 15:54:50 +00:00
Robin Mehner da1ca7db75
doc: fix typo in example code for util.styleText
Code shows how to style `errorMessage`, but then
only logs out `successMessage` twice. This might
trip people up when copying the code.

PR-URL: https://github.com/nodejs/node/pull/56720
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
2025-01-25 11:02:31 +00:00
Chengzhong Wu b11ee4cad3
lib: allow skipping source maps in node_modules
Files in `node_modules` are not authored by the user directly and the
original sources are less relevant to the user.

Skipping source maps in `node_modules` improves the general
performance. Add `module.setSourceMapsSupport(enabled, options)` to
skip source maps in `node_modules` if it is needed. This moves
all source maps related API to `node:module` and this a step to
promote the source maps API to stable.

PR-URL: https://github.com/nodejs/node/pull/56639
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2025-01-23 22:44:10 +00:00
Shreyans Pathak 3d861c493b
doc: fix inconsistencies in `WeakSet` and `WeakMap` comparison details
PR-URL: https://github.com/nodejs/node/pull/56683
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
Reviewed-By: Jason Zhang <xzha4350@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2025-01-23 19:24:28 +00:00
Antoine du Hamel a4895e2f8e
doc: add note for features using `InternalWorker` with permission model
PR-URL: https://github.com/nodejs/node/pull/56706
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2025-01-23 08:11:22 +00:00
Antoine du Hamel 309924f65d
doc: add history info for Permission Model
PR-URL: https://github.com/nodejs/node/pull/56707
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
2025-01-22 20:02:09 +00:00
RafaelGSS bf59539b98 src,loader,permission: throw on InternalWorker use
Previously this PR it was expected that InternalWorker
usage doesn't require the --allow-worker when the permission
model is enabled. This, however, exposes a vulnerability
whenever the instance gets accessed by the user. For example
through diagnostics_channel.subscribe('worker_threads')

PR-URL: https://github.com/nodejs-private/node-private/pull/629
Refs: https://hackerone.com/reports/2575105
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
CVE-ID: CVE-2025-23083
2025-01-21 15:53:55 -03:00
Dario Piotrowicz 23c2d33592
doc: clarify cjs/esm diff in `queueMicrotask()` vs `process.nextTick()`
the section comparing `queueMicrotask()` and `process.nextTick()`
doesn't address the different scheduling behavior that the two
functions have in cjs and esm modules, the section's introductory mjs
example also provides an incorrect output, the changes here address
such by explaining the difference between the two module types and
updating the example accordingly

PR-URL: https://github.com/nodejs/node/pull/56659
Fixes: https://github.com/nodejs/node/issues/45048
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2025-01-21 17:16:17 +00:00
Shreyans Pathak 7bc2946293
doc: `WeakSet` and `WeakMap` comparison details
PR-URL: https://github.com/nodejs/node/pull/56648
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2025-01-20 20:18:21 +00:00
Marco Ippolito cee63dcf35
module: add ERR_UNSUPPORTED_TYPESCRIPT_SYNTAX
PR-URL: https://github.com/nodejs/node/pull/56610
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2025-01-17 12:42:50 +00:00
Pietro Marchini 22f1518d2f
test_runner: remove unused errors
PR-URL: https://github.com/nodejs/node/pull/56607
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jacob Smith <jacob@frende.me>
2025-01-17 10:34:55 +00:00
Colin Ihrig 0e7ec5e7a1
test_runner: add TestContext.prototype.waitFor()
This commit adds a waitFor() method to the TestContext class in
the test runner. As the name implies, this method allows tests to
more easily wait for things to happen.

PR-URL: https://github.com/nodejs/node/pull/56595
Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2025-01-16 02:32:37 +00:00
Chengzhong Wu 1238f0afba
util: rename CallSite.column to columnNumber
Align the property names `lineNumber` and `columnNumber`.

PR-URL: https://github.com/nodejs/node/pull/56584
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2025-01-15 13:28:53 +00:00
Carlos Espa 732744cc76
src,worker: add isInternalWorker
PR-URL: https://github.com/nodejs/node/pull/56469
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Bryan English <bryan@bryanenglish.com>
2025-01-14 18:24:30 +00:00
Jacob Smith fc11189cbd
doc: correct customization hook types & clarify descriptions
PR-URL: https://github.com/nodejs/node/pull/56454
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2025-01-14 14:24:41 +00:00
Rafael Gonzaga 496e17e302
src: add --disable-sigusr1 to prevent signal i/o thread
This commit adds a new flag `--disable-sigusr1` to prevent
the SignalIOThread to be up listening the SIGUSR1 events and
then starting the debugging session.

PR-URL: https://github.com/nodejs/node/pull/56441
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2025-01-13 16:51:34 +00:00
Stephen Belanger db7a31e276
diagnostics_channel: capture console messages
PR-URL: https://github.com/nodejs/node/pull/56292
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: Kohei Ueno <kohei.ueno119@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
2025-01-13 12:51:31 +00:00
Chengzhong Wu af89b537ac
util: expose CallSite.scriptId
The `scriptId` is essential to construct chrome devtools protocol
structs like `Network.Initiator`, allowing inspectors to associate
a `CallSite` with a unique script.

PR-URL: https://github.com/nodejs/node/pull/56551
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2025-01-13 12:30:19 +00:00
Rafael Gonzaga b22c3d3455
doc: add section about using npx with permission model
Co-Authored-By: Gar <gar+gh@danger.computer>
Signed-off-by: RafaelGSS <rafael.nunu@hotmail.com>
PR-URL: https://github.com/nodejs/node/pull/56539
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Ruy Adorno <ruy@vlt.sh>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
2025-01-13 09:49:45 +00:00
Tobias Nießen 046be6d28f
doc: fix parentheses in options
PR-URL: https://github.com/nodejs/node/pull/56563
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
2025-01-12 17:58:56 +00:00
Rafael Gonzaga 808e6b36a3
test: clarify fork inherit permission flags
This commit updates the documentation and includes
a test to ensure that permission model flags
will be passed to the child process if `fork`
is called

PR-URL: https://github.com/nodejs/node/pull/56523
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2025-01-11 21:11:16 +00:00
Colin Ihrig ad68d088a3
doc: fix location of NO_COLOR in CLI docs
The 'coverage output' and 'source map cache' sections were
appearing under the NO_COLOR environment variable instead of
the NODE_V8_COVERAGE enviroment variable where they were intended
to be. This commit fixes that issue.

PR-URL: https://github.com/nodejs/node/pull/56525
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2025-01-11 00:03:08 +00:00
Antoine du Hamel 3946f16786
process: fix symbol key and mark experimental new `node:process` methods
PR-URL: https://github.com/nodejs/node/pull/56517
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2025-01-10 14:40:28 +00:00
Carlos Espa 529b56ef9d
fs: deprecate passing invalid types in `fs.existsSync`
PR-URL: https://github.com/nodejs/node/pull/55753
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2025-01-10 13:04:14 +01:00
Alfredo González a627a999f0
doc: add esm examples to node:trace_events
PR-URL: https://github.com/nodejs/node/pull/56514
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2025-01-10 01:33:57 +00:00
Colin Ihrig 19c8cc12ce
test_runner: add t.assert.fileSnapshot()
This commit adds a t.assert.fileSnapshot() API to the test runner.
This is similar to how snapshot tests work in core, as well as
userland options such as toMatchFileSnapshot().

PR-URL: https://github.com/nodejs/node/pull/56459
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
2025-01-09 21:12:17 +00:00
Daeyeon Jeong dc5d0f9bb4
fs: allow `exclude` option in globs to accept glob patterns
Signed-off-by: Daeyeon Jeong <daeyeon.dev@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/56489
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Jason Zhang <xzha4350@gmail.com>
2025-01-08 23:12:27 +00:00
James M Snell ea493c18b2 crypto: make generatePrime/checkPrime interruptible
The `generatePrime` and `checkPrime` functions in the `crypto`
module are only somewhat interruptible. This change makes it
possible to interrupt these more reliably. Note that generating
overly large primes can still take a long time and may not be
interruptible as this mechanism relies on a callback to check
for stopping conditions but OpenSSL may perform a long running
operation without calling the callback right away.

Fixes: https://github.com/nodejs/node/issues/56449
PR-URL: https://github.com/nodejs/node/pull/56460
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2025-01-07 14:38:21 -08:00
Antoine du Hamel 5119049ca6
doc: fix faulty YAML metadata
PR-URL: https://github.com/nodejs/node/pull/56508
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
2025-01-07 22:17:58 +00:00
Ruy Adorno a344300bfa
2025-01-07, Version 22.13.0 'Jod' (LTS)
Notable changes:

assert:
  * (SEMVER-MINOR) add partialDeepStrictEqual (Giovanni Bucci) https://github.com/nodejs/node/pull/54630
cli:
  * (SEMVER-MINOR) implement --trace-env and --trace-env-[js|native]-stack (Joyee Cheung) https://github.com/nodejs/node/pull/55604
crypto:
  * graduate WebCryptoAPI Ed25519 and X25519 algorithms as stable (Filip Skokan) https://github.com/nodejs/node/pull/56142
dgram:
  * (SEMVER-MINOR) support blocklist in udp (theanarkh) https://github.com/nodejs/node/pull/56087
doc:
  * stabilize util.styleText (Rafael Gonzaga) https://github.com/nodejs/node/pull/56265
  * move typescript support to active development (Marco Ippolito) https://github.com/nodejs/node/pull/55536
  * add LJHarb to collaborators (Jordan Harband) https://github.com/nodejs/node/pull/56132
  * (SEMVER-MINOR) add report version and history section (Chengzhong Wu) https://github.com/nodejs/node/pull/56130
  * (SEMVER-MINOR) sort --report-exclude alphabetically (Rafael Gonzaga) https://github.com/nodejs/node/pull/55788
doc,lib,src,test:
  * (SEMVER-MINOR) unflag sqlite module (Colin Ihrig) https://github.com/nodejs/node/pull/55890
module:
  * (SEMVER-MINOR) only emit require(esm) warning under --trace-require-module (Joyee Cheung) https://github.com/nodejs/node/pull/56194
  * (SEMVER-MINOR) add module.stripTypeScriptTypes (Marco Ippolito) https://github.com/nodejs/node/pull/55282
net:
  * (SEMVER-MINOR) support blocklist in net.connect (theanarkh) https://github.com/nodejs/node/pull/56075
  * (SEMVER-MINOR) add SocketAddress.parse (James M Snell) https://github.com/nodejs/node/pull/56076
  * (SEMVER-MINOR) add net.BlockList.isBlockList(value) (James M Snell) https://github.com/nodejs/node/pull/56078
  * (SEMVER-MINOR) support blocklist for net.Server (theanarkh) https://github.com/nodejs/node/pull/56079
process:
  * (SEMVER-MINOR) deprecate `features.{ipv6,uv}` and `features.tls_*` (René) https://github.com/nodejs/node/pull/55545
report:
  * (SEMVER-MINOR) fix typos in report keys and bump the version (Yuan-Ming Hsu) https://github.com/nodejs/node/pull/56068
sqlite:
  * (SEMVER-MINOR) aggregate constants in a single property (Edigleysson Silva (Edy)) https://github.com/nodejs/node/pull/56213
  * (SEMVER-MINOR) add `StatementSync.prototype.iterate` method (tpoisseau) https://github.com/nodejs/node/pull/54213
src:
  * (SEMVER-MINOR) add cli option to preserve env vars on dr (Rafael Gonzaga) https://github.com/nodejs/node/pull/55697
src,lib:
  * (SEMVER-MINOR) stabilize permission model (Rafael Gonzaga) https://github.com/nodejs/node/pull/56201
util:
  * (SEMVER-MINOR) add sourcemap support to getCallSites (Marco Ippolito) https://github.com/nodejs/node/pull/55589

PR-URL: https://github.com/nodejs/node/pull/56329
2025-01-07 14:36:47 -05:00
Node.js GitHub Bot 36c53c69c4
2025-01-07, Version 23.6.0 (Current)
Notable changes:

lib:
  * (SEMVER-MINOR) add typescript support to STDIN eval (Marco Ippolito) https://github.com/nodejs/node/pull/56359
module:
  * (SEMVER-MINOR) unflag --experimental-strip-types (Marco Ippolito) https://github.com/nodejs/node/pull/56350
process:
  * (SEMVER-MINOR) add process.ref() and process.unref() methods (James M Snell) https://github.com/nodejs/node/pull/56400
worker:
  * (SEMVER-MINOR) add eval ts input (Marco Ippolito) https://github.com/nodejs/node/pull/56394

PR-URL: https://github.com/nodejs/node/pull/56450
2025-01-07 18:12:47 +01:00
James M Snell 062ae6f3cb src, quic: refine more of the quic implementation
Signed-off-by: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/56328
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2025-01-06 10:47:36 -08:00
Alex Yang 08b7d38aa4
sqlite: support TypedArray and DataView in `StatementSync`
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/56385
Fixes: https://github.com/nodejs/node/issues/56384
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2025-01-05 11:18:36 +00:00
Eddie Abbondanzio 383e1a281b
test_runner: differentiate test types in enqueue dequeue events
PR-URL: https://github.com/nodejs/node/pull/54049
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
2025-01-05 08:35:35 +00:00
Colin Ihrig 4a7b8157b5
test_runner: add assert.register() API
This commit adds a top level assert.register() API to the test
runner. This function allows users to define their own custom
assertion functions on the TestContext.

Fixes: https://github.com/nodejs/node/issues/52033
PR-URL: https://github.com/nodejs/node/pull/56434
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com>
2025-01-04 18:30:04 +00:00
Colin Ihrig afafee2a30
test_runner: finish marking snapshot testing as stable
Snapshot testing was marked stable in #55897. These were
overlooked at the time.

Refs: https://github.com/nodejs/node/pull/55897
PR-URL: https://github.com/nodejs/node/pull/56425
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
2025-01-03 18:24:51 +00:00
Rafael Gonzaga bf3bc4ec2f
src: drop --experimental-permission in favour of --permission
Refs: https://github.com/nodejs/node/pull/56201
PR-URL: https://github.com/nodejs/node/pull/56240
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2025-01-03 14:07:56 +00:00
Gabriel Schulhof 9731d64f13
doc: add example for piping ReadableStream
When piping a `ReadableStream` created from an `Iterable` into a
`WritableStream`, the sequence of objects in the `Iterable` must
consist of either `Buffer`s, `TypedArray`s, or `DataView`s.

Re: https://github.com/nodejs/node/issues/56297
PR-URL: https://github.com/nodejs/node/pull/56415
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
2025-01-01 19:44:30 +00:00
James M Snell 35742a2d0b process: add process.ref() and process.unref() methods
The `process.ref(...)` and `process.unref(...)` methods are intended
to replace the use of `ref()` and `unref()` methods defined directly
on individual API objects. The existing `ref()` and `unref()` methods
will be marked as legacy and won't be removed but new APIs should use
`process.ref()` and `process.unref()` instead.

Refs: https://github.com/nodejs/node/issues/53266
PR-URL: https://github.com/nodejs/node/pull/56400
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
2024-12-31 10:54:29 -08:00
Gabriel Schulhof c5aa8b8ef1
node-api: define version 10
Notable runtime changes to existing APIs:
- returning `node_api_cannot_run_js` instead of
  `napi_pending_exception`.
- allow creating references to objects, functions, and symbols.

PR-URL: https://github.com/nodejs/node/pull/55676
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2024-12-31 16:29:50 +00:00
Jacob Smith 19d58c5181
module: fix async resolution error within the sync `findPackageJSON`
PR-URL: https://github.com/nodejs/node/pull/56382
Reviewed-By: Jordan Harband <ljharb@gmail.com>
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
2024-12-31 12:07:23 +00:00
Marco Ippolito ecc9fb2f8e
lib: add typescript support to STDIN eval
PR-URL: https://github.com/nodejs/node/pull/56359
Reviewed-By: Jordan Harband <ljharb@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com>
2024-12-29 22:42:51 +00:00
Bart Louwers 0dbbabab95
sqlite: pass conflict type to conflict resolution handler
PR-URL: https://github.com/nodejs/node/pull/56352
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2024-12-29 17:37:54 +00:00
Kevin Gibbons 94191f7b09
doc: expand description of `parseArg`'s `default`
PR-URL: https://github.com/nodejs/node/pull/54431
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Jordan Harband <ljharb@gmail.com>
2024-12-27 19:17:55 +00:00
Marco Ippolito ba5992831b
module: unflag --experimental-strip-types
PR-URL: https://github.com/nodejs/node/pull/56350
Fixes: https://github.com/nodejs/typescript/issues/17
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com>
2024-12-26 18:46:06 +00:00
Kevin Toshihiro Uehara bd0b704d3c
doc: fix the `crc32` documentation
PR-URL: https://github.com/nodejs/node/pull/55898
Fixes: https://github.com/nodejs/node/issues/55800
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2024-12-24 21:53:53 +01:00
Marco Ippolito da3f388c14
module: support eval with ts syntax detection
PR-URL: https://github.com/nodejs/node/pull/56285
Refs: https://github.com/nodejs/typescript/issues/17
Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com>
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
2024-12-24 16:48:02 +00:00
Chengzhong Wu b6df12819d
esm: add experimental support for addon modules
PR-URL: https://github.com/nodejs/node/pull/55844
Fixes: https://github.com/nodejs/node/issues/40541
Fixes: https://github.com/nodejs/node/issues/55821
Reviewed-By: Guy Bedford <guybedford@gmail.com>
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2024-12-20 11:59:08 +00:00
Colin Ihrig 219b900384
test_runner,cli: mark test isolation as stable
This commit stabilizes test isolation configuration in the
test runner.

PR-URL: https://github.com/nodejs/node/pull/56298
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com>
2024-12-20 02:10:26 +00:00
Antoine du Hamel 854d23b0d6
2024-12-19, Version 23.5.0 (Current)
Notable changes:

crypto:
  * graduate WebCryptoAPI Ed25519 and X25519 algorithms as stable (Filip Skokan) https://github.com/nodejs/node/pull/56142
dgram:
  * (SEMVER-MINOR) support blocklist in udp (theanarkh) https://github.com/nodejs/node/pull/56087
doc:
  * stabilize util.styleText (Rafael Gonzaga) https://github.com/nodejs/node/pull/56265
module:
  * (SEMVER-MINOR) add prefix-only modules to `module.builtinModules` (Jordan Harband) https://github.com/nodejs/node/pull/56185
  * (SEMVER-MINOR) only emit require(esm) warning under --trace-require-module (Joyee Cheung) https://github.com/nodejs/node/pull/56194
  * (SEMVER-MINOR) use synchronous hooks for preparsing in import(cjs) (Joyee Cheung) https://github.com/nodejs/node/pull/55698
  * (SEMVER-MINOR) implement module.registerHooks() (Joyee Cheung) https://github.com/nodejs/node/pull/55698
report:
  * (SEMVER-MINOR) fix typos in report keys and bump the version (Yuan-Ming Hsu) https://github.com/nodejs/node/pull/56068
sqlite:
  * (SEMVER-MINOR) aggregate constants in a single property (Edigleysson Silva (Edy)) https://github.com/nodejs/node/pull/56213
src,lib:
  * (SEMVER-MINOR) stabilize permission model (Rafael Gonzaga) https://github.com/nodejs/node/pull/56201

PR-URL: https://github.com/nodejs/node/pull/56310
2024-12-19 19:51:48 +01:00
Antoine du Hamel 0675e05a04
doc: fix links in `module.md`
PR-URL: https://github.com/nodejs/node/pull/56283
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2024-12-19 10:34:42 +00:00
Rafael Gonzaga 7302b6fa3d
doc: stabilize util.styleText
PR-URL: https://github.com/nodejs/node/pull/56265
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Adrian Estrada <edsadr@gmail.com>
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
2024-12-17 20:22:52 +00:00
Edigleysson Silva (Edy) a73c41c51e
sqlite: aggregate constants in a single property
PR-URL: https://github.com/nodejs/node/pull/56213
Fixes: https://github.com/nodejs/node/issues/56193
Refs: https://github.com/nodejs/node/issues/56193
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
2024-12-17 17:36:58 +00:00
Pietro Marchini 5ad2ca920c
test_runner: exclude test files from coverage by default
PR-URL: https://github.com/nodejs/node/pull/56060
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
2024-12-17 11:10:17 +00:00
Kunal Kumar c39875a32d
doc: clarify util.aborted resource usage
PR-URL: https://github.com/nodejs/node/pull/55780
Fixes: https://github.com/nodejs/node/issues/55340
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jason Zhang <xzha4350@gmail.com>
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
2024-12-15 21:56:47 +00:00
Duncan bc64114ebf
buffer: document concat zero-fill
PR-URL: https://github.com/nodejs/node/pull/55562
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jason Zhang <xzha4350@gmail.com>
2024-12-15 21:56:39 +00:00
theanarkh a50f3d5d8a
dgram: support blocklist in udp
PR-URL: https://github.com/nodejs/node/pull/56087
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2024-12-15 14:19:27 +00:00
Alfredo González 2d4e35c74d
doc: add esm examples to node:repl
PR-URL: https://github.com/nodejs/node/pull/55432
Reviewed-By: Tierney Cyren <hello@bnb.im>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2024-12-14 19:50:52 +00:00
Alfredo González a7c9f85f2f
doc: add esm examples to node:readline
PR-URL: https://github.com/nodejs/node/pull/55335
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2024-12-14 19:50:34 +00:00
Jordan Harband 414c5ed4ac
module: add prefix-only modules to `module.builtinModules`
Fixes https://github.com/nodejs/node/issues/42785

PR-URL: https://github.com/nodejs/node/pull/56185
Fixes: https://github.com/nodejs/node/issues/42785
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
2024-12-14 07:35:00 +00:00
Alfredo González b87ecc753b
doc: add esm examples to node:tls
PR-URL: https://github.com/nodejs/node/pull/56229
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2024-12-13 17:09:28 +00:00
Yuan-Ming Hsu 938a581b4d
report: fix typos in report keys and bump the version
Replace "kbytes" with "bytes" in `PrintSystemInformation()` in
`src/node_report.cc`, as RLIMIT_DATA, RLIMIT_RSS, and RLIMIT_AS are
given in bytes.
The report version is bumped from 4 to 5.

Refs: https://www.ibm.com/docs/en/aix/7.3?topic=k-kgetrlimit64-kernel-service
PR-URL: https://github.com/nodejs/node/pull/56068
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2024-12-13 11:28:30 +00:00
Alfredo González 96cd2a6ec3
doc: add esm examples to node:perf_hooks
PR-URL: https://github.com/nodejs/node/pull/55257
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2024-12-12 21:44:05 +00:00
Colin Ihrig e5524eaefa
sqlite: add support for custom functions
This commit adds support to node:sqlite for defining custom
functions that can be invoked from SQL.

Fixes: https://github.com/nodejs/node/issues/54349
PR-URL: https://github.com/nodejs/node/pull/55985
Reviewed-By: Zeyu "Alex" Yang <himself65@outlook.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2024-12-12 16:48:12 +00:00
Tim Perry 7a40aa75a5
http: add setDefaultHeaders option to http.request
This makes it possible to disable the various default headers directly
from the constructor. While this is possible for many use cases by
manually calling removeHeader on the request object instead, when
passing a raw header array to the request constructor the headers are
serialized and prepared to send immediately, and removeHeader cannot
subsequently be used.

With this change, it's now possible to 100% control sent request
headers by passing 'setDefaultHeaders: false' and a raw headers array to
http.request.

PR-URL: https://github.com/nodejs/node/pull/56112
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2024-12-12 16:43:10 +00:00
Rafael Gonzaga be04d06488
src,lib: stabilize permission model
Move permission model from 1.1 (Active Development)
to 2.0 (Stable).

PR-URL: https://github.com/nodejs/node/pull/56201
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
2024-12-12 12:11:58 +00:00
沈鸿飞 33f0f1656b
doc: `sea.getRawAsset(key)` always returns an ArrayBuffer
PR-URL: https://github.com/nodejs/node/pull/56206
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2024-12-12 11:23:13 +00:00
Alex Yang 5c2f599712 sqlite: support `db.loadExtension`
PR-URL: https://github.com/nodejs/node/pull/53900
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2024-12-11 08:50:24 -08:00
Joyee Cheung b6c9dbe7e1 module: only emit require(esm) warning under --trace-require-module
require(esm) is relatively stable now and the experimental warning
has run its course - it's now more troublesome than useful.
This patch changes it to no longer emit a warning unless
`--trace-require-module` is explicitly used. The flag supports
two modes:

- `--trace-require-module=all`: emit warnings for all usages
- `--trace-require-module=no-node-modules`: emit warnings for
  usages that do not come from a `node_modules` folder.

PR-URL: https://github.com/nodejs/node/pull/56194
Fixes: https://github.com/nodejs/node/issues/55417
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
2024-12-11 15:10:33 +00:00
Anton Kastritskii fd9a79df7d
doc: call out import.meta is only supported in ES modules
PR-URL: https://github.com/nodejs/node/pull/56186
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2024-12-11 01:43:13 +00:00
Antoine du Hamel b9329306c6
2024-12-10, Version 23.4.0 (Current)
Notable changes:

assert:
  * (SEMVER-MINOR) add partialDeepStrictEqual (Giovanni Bucci) https://github.com/nodejs/node/pull/54630
cli:
  * (SEMVER-MINOR) implement --trace-env and --trace-env-[js|native]-stack (Joyee Cheung) https://github.com/nodejs/node/pull/55604
doc:
  * add LJHarb to collaborators (Jordan Harband) https://github.com/nodejs/node/pull/56132
doc,lib,src,test:
  * (SEMVER-MINOR) unflag sqlite module (Colin Ihrig) https://github.com/nodejs/node/pull/55890
net:
  * (SEMVER-MINOR) support blocklist in net.connect (theanarkh) https://github.com/nodejs/node/pull/56075
  * (SEMVER-MINOR) add SocketAddress.parse (James M Snell) https://github.com/nodejs/node/pull/56076
  * (SEMVER-MINOR) add net.BlockList.isBlockList(value) (James M Snell) https://github.com/nodejs/node/pull/56078
  * (SEMVER-MINOR) support blocklist for net.Server (theanarkh) https://github.com/nodejs/node/pull/56079
process:
  * (SEMVER-MINOR) deprecate `features.{ipv6,uv}` and `features.tls_*` (René) https://github.com/nodejs/node/pull/55545
sqlite:
  * (SEMVER-MINOR) add `StatementSync.prototype.iterate` method (tpoisseau) https://github.com/nodejs/node/pull/54213

PR-URL: https://github.com/nodejs/node/pull/56119
2024-12-10 16:36:07 +01:00
Joyee Cheung e85964610c module: implement module.registerHooks()
PR-URL: https://github.com/nodejs/node/pull/55698
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Guy Bedford <guybedford@gmail.com>
2024-12-09 23:27:08 +00:00
Edigleysson Silva (Edy) 0a7eeb5068
doc: fix c++ addon hello world sample
PR-URL: https://github.com/nodejs/node/pull/56172
Refs: https://github.com/nodejs/node/issues/56173
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: theanarkh <theratliter@gmail.com>
2024-12-09 17:43:50 +00:00
Filip Skokan ee8810731d crypto: graduate WebCryptoAPI Ed25519 and X25519 algorithms as stable
PR-URL: https://github.com/nodejs/node/pull/56142
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2024-12-07 15:07:53 +01:00
Lenz Weber-Tronic c1ccade02f
lib: disable default memory leak warning for AbortSignal
This change sets the default `kMaxEventTargetListeners` property for
`AbortSignal` instances to 0, disabling the check per default, to
enable users to write isomorphic library code.
If desirable, the max event target listeners check can still be
enabled for individual `AbortSignal` instances by calling
`setMaxListeners` on them.

Refs: https://github.com/nodejs/node/issues/54758
PR-URL: https://github.com/nodejs/node/pull/55816
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2024-12-07 10:41:00 +00:00
Chengzhong Wu 65024ae5a1
doc: fix module.md headings
PR-URL: https://github.com/nodejs/node/pull/56131
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
2024-12-06 14:22:06 +00:00
Chengzhong Wu eb5aa5f0e1
doc: add report version and history section
PR-URL: https://github.com/nodejs/node/pull/56130
Refs: https://github.com/nodejs/node/pull/56068
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
2024-12-06 13:29:54 +00:00
theanarkh f26a1da909
net: support blocklist in net.connect
PR-URL: https://github.com/nodejs/node/pull/56075
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2024-12-06 04:36:24 +00:00
Antoine du Hamel 556f1aece2 test: ensure `cli.md` is in alphabetical order
Co-authored-by: RedYetiDev <redyetidev@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/56025
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2024-12-05 14:47:14 +01:00
James M Snell 3c2da4b849 net: add SocketAddress.parse
Adds a new `net.SocketAddress.parse(...)` API.

```js
const addr = SocketAddress.parse('123.123.123.123:1234');
console.log(addr.address);  // 123.123.123.123
console.log(addr.port); 1234
```

PR-URL: https://github.com/nodejs/node/pull/56076
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2024-12-04 09:29:30 -08:00
James M Snell c7de0ec86c net: add net.BlockList.isBlockList(value)
PR-URL: https://github.com/nodejs/node/pull/56078
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: theanarkh <theratliter@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
2024-12-04 07:48:30 -08:00
Ruy Adorno 7924ea3518
2024-12-03, Version 22.12.0 'Jod' (LTS)
Notable changes:

assert:
  * (SEMVER-MINOR) make assertion_error use Myers diff algorithm (Giovanni Bucci) https://github.com/nodejs/node/pull/54862
buffer:
  * (SEMVER-MINOR) make Buffer work with resizable ArrayBuffer (James M Snell) https://github.com/nodejs/node/pull/55377
crypto:
  * update root certificates to NSS 3.104 (Richard Lau) https://github.com/nodejs/node/pull/55681
doc:
  * enforce strict policy to semver-major releases (Rafael Gonzaga) https://github.com/nodejs/node/pull/55732
  * add jazelly to collaborators (Jason Zhang) https://github.com/nodejs/node/pull/55531
esm:
  * mark import attributes and JSON module as stable (Nicolò Ribaudo) https://github.com/nodejs/node/pull/55333
http:
  * (SEMVER-MINOR) add diagnostic channel `http.client.request.created` (Marco Ippolito) https://github.com/nodejs/node/pull/55586
lib:
  * (SEMVER-MINOR) add UV_UDP_REUSEPORT for udp (theanarkh) https://github.com/nodejs/node/pull/55403
module:
  * (SEMVER-MINOR) unflag --experimental-require-module (Joyee Cheung) https://github.com/nodejs/node/pull/55085
net:
  * (SEMVER-MINOR) add UV_TCP_REUSEPORT for tcp (theanarkh) https://github.com/nodejs/node/pull/55408
sqlite:
  * (SEMVER-MINOR) add support for SQLite Session Extension (Bart Louwers) https://github.com/nodejs/node/pull/54181
tools:
  * fix root certificate updater (Richard Lau) https://github.com/nodejs/node/pull/55681

PR-URL: https://github.com/nodejs/node/pull/56040
2024-12-03 14:44:27 -05:00
Geoffrey Booth 94c327c753
module: remove --experimental-default-type
PR-URL: https://github.com/nodejs/node/pull/56092
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Jacob Smith <jacob@frende.me>
2024-12-02 22:43:55 +00:00
theanarkh d5d1e80763
net: support blocklist for net.Server
PR-URL: https://github.com/nodejs/node/pull/56079
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
2024-12-02 15:21:31 +00:00
Yagiz Nizipli 4ee87b8bc3
zlib: deprecate classes usage without `new`
PR-URL: https://github.com/nodejs/node/pull/55718
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
2024-11-29 20:55:03 +00:00
James M Snell 4cf6fabce2 quic: update more QUIC implementation
Signed-off-by: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/55986
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
2024-11-28 09:53:50 -08:00
Bart Louwers 853b304db8
doc: add added tag and fix typo sqlite.md
PR-URL: https://github.com/nodejs/node/pull/56012
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2024-11-27 20:56:40 +00:00
Blended Bram e64f9496c0
doc: remove unused import from sample code
The `node:path` module is referenced in a code snippet that doesn't
actually use it.

PR-URL: https://github.com/nodejs/node/pull/55570
Reviewed-By: Raz Luvaton <rluvaton@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2024-11-27 21:18:00 +01:00
Luigi Pinca db8ff56629
doc: move history entry to class description
Move the history entry for the `TextDecoder` class into the class
description itself instead of its constructor.

Refs: https://github.com/nodejs/node/issues/55938
PR-URL: https://github.com/nodejs/node/pull/55991
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: LiviaMedeiros <livia@cirno.name>
2024-11-27 14:24:53 +00:00
Luigi Pinca 090aa8bd8e
doc: add history entry for textEncoder.encodeInto()
Fixes: https://github.com/nodejs/node/issues/55938
PR-URL: https://github.com/nodejs/node/pull/55990
Refs: https://github.com/nodejs/node/pull/29524
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: LiviaMedeiros <livia@cirno.name>
2024-11-27 14:11:49 +00:00
Filip Skokan 5bdf1c4ee8
doc: fix deprecation codes
PR-URL: https://github.com/nodejs/node/pull/56018
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2024-11-27 13:16:21 +00:00
Luigi Pinca 17f39bcf3c
doc: remove confusing and outdated sentence
Remove confusing and outdated sentence in `doc/api/stream.md`.

Fixes: https://github.com/nodejs/node/issues/55987
PR-URL: https://github.com/nodejs/node/pull/55988
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Jason Zhang <xzha4350@gmail.com>
Reviewed-By: LiviaMedeiros <livia@cirno.name>
Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com>
2024-11-27 10:26:27 +00:00
Joyee Cheung 9029aec834
cli: implement --trace-env and --trace-env-[js|native]-stack
This implements --trace-env, --trace-env-js-stack and
--trace-env-native-stack CLI options which can be used to find
out what environment variables are accessed and where they are
accessed.

PR-URL: https://github.com/nodejs/node/pull/55604
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2024-11-27 09:44:16 +00:00
René ae8280c95d
process: deprecate `features.{ipv6,uv}` and `features.tls_*`
PR-URL: https://github.com/nodejs/node/pull/55545
Fixes: https://github.com/nodejs/node/issues/55537
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
2024-11-27 04:19:16 +00:00
Carlos Espa a01319a55f
doc: deprecate passing invalid types in `fs.existsSync`
PR-URL: https://github.com/nodejs/node/pull/55892
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Jason Zhang <xzha4350@gmail.com>
2024-11-25 23:48:24 +01:00
skyclouds2001 b17a1fb1ce
doc: add doc for PerformanceObserver.takeRecords()
PR-URL: https://github.com/nodejs/node/pull/55786
Fixes: https://github.com/nodejs/node/issues/55779
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jason Zhang <xzha4350@gmail.com>
2024-11-25 10:02:32 +00:00
Giovanni Bucci d0d52092cf
assert: add partialDeepStrictEqual
Fixes: https://github.com/nodejs/node/issues/50399

Co-Authored-By: Cristian Barlutiu <cristian.barlutiu@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/54630
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Jithil P Ponnan <jithil@outlook.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
2024-11-23 17:45:49 +00:00
Julian Gassner a2a0c22fbf
doc: order `node:crypto` APIs alphabetically
PR-URL: https://github.com/nodejs/node/pull/55831
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2024-11-23 18:10:44 +01:00
Filip Skokan 0116e80827 crypto: allow non-multiple of 8 in SubtleCrypto.deriveBits
PR-URL: https://github.com/nodejs/node/pull/55296
Reviewed-By: James M Snell <jasnell@gmail.com>
2024-11-23 08:22:12 -08:00
Leonardo Peixoto 6190bbc12c
doc: add esm example for zlib
PR-URL: https://github.com/nodejs/node/pull/55946
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2024-11-23 14:04:16 +00:00
tpoisseau bc701e90f3
sqlite: add `StatementSync.prototype.iterate` method
PR-URL: https://github.com/nodejs/node/pull/54213
Reviewed-By: Zeyu "Alex" Yang <himself65@outlook.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2024-11-22 10:21:48 +01:00
Alfredo González d894772157
doc: add esm examples to node:timers
PR-URL: https://github.com/nodejs/node/pull/55857
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Jason Zhang <xzha4350@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2024-11-20 23:26:30 +00:00
RafaelGSS cb7d855f88 2024-11-20, Version 23.3.0 (Current)
Notable changes:

doc:
  * enforce strict policy to semver-major releases (Rafael Gonzaga) https://github.com/nodejs/node/pull/55732
src:
  * (SEMVER-MINOR) add cli option to preserve env vars on dr (Rafael Gonzaga) https://github.com/nodejs/node/pull/55697
util:
  * (SEMVER-MINOR) add sourcemap support to getCallSites (Marco Ippolito) https://github.com/nodejs/node/pull/55589
  * (SEMVER-MINOR) fix util.getCallSites plurality (Chengzhong Wu) https://github.com/nodejs/node/pull/55626

PR-URL: https://github.com/nodejs/node/pull/55921
2024-11-20 19:54:14 -03:00
Hüseyin Açacak eb1cb369fe
src: fix kill signal on Windows
Fixes: https://github.com/nodejs/node/issues/42923
PR-URL: https://github.com/nodejs/node/pull/55514
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Stefan Stojanovic <stefan.stojanovic@janeasystems.com>
2024-11-20 12:14:20 +00:00
Livia Medeiros 2c11d6e61c
tools: lint js in `doc/**/*.md`
PR-URL: https://github.com/nodejs/node/pull/55904
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2024-11-20 10:10:38 +00:00
Rafael Gonzaga f4cd4d9749
doc: fix relative path mention in --allow-fs
PR-URL: https://github.com/nodejs/node/pull/55791
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
2024-11-19 18:31:29 +00:00
Colin Ihrig c921676512
test_runner: mark snapshot testing as stable
This commit marks the test runner's snapshot testing API as
stable.

PR-URL: https://github.com/nodejs/node/pull/55897
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
2024-11-19 17:37:35 +00:00
Colin Ihrig 01b9a54a58
test_runner: mark context.plan() as stable
This function does not require a CLI flag, does not emit a warning,
and is a fairly simple API that is already being used heavily in
the ecosystem. This commit marks context.plan() as stable.

PR-URL: https://github.com/nodejs/node/pull/55895
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
2024-11-19 15:01:30 +00:00
Colin Ihrig 1d01ad6773
doc,lib,src,test: unflag sqlite module
This commit allows the node:sqlite module to be used without
starting Node with a CLI flag. The module is still experimental.

Fixes: https://github.com/nodejs/node/issues/55854
PR-URL: https://github.com/nodejs/node/pull/55890
Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2024-11-19 03:23:18 +00:00
Antoine du Hamel a8daa45070
doc: add history entry for import assertion removal
PR-URL: https://github.com/nodejs/node/pull/55883
Refs: https://github.com/nodejs/node/pull/52104
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
2024-11-18 16:58:59 +00:00
Bart Louwers 746b17e1a5
sqlite: add support for SQLite Session Extension
PR-URL: https://github.com/nodejs/node/pull/54181
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2024-11-18 00:57:04 +00:00
Jordan Harband e577618227 util: inspect: enumerable Symbols no longer have square brackets
Implements https://github.com/orgs/nodejs/discussions/41283#discussioncomment-11188239

PR-URL: https://github.com/nodejs/node/pull/55778
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
2024-11-17 06:57:37 +00:00
Antoine du Hamel 669b6927e4
doc: remove non-working example
PR-URL: https://github.com/nodejs/node/pull/55856
Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Raz Luvaton <rluvaton@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
2024-11-16 16:43:57 +00:00
Antoine du Hamel a6d853c63b
doc: add history entries for JSON modules stabilization
PR-URL: https://github.com/nodejs/node/pull/55855
Refs: https://github.com/nodejs/node/pull/55333
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Jacob Smith <jacob@frende.me>
2024-11-16 16:36:27 +00:00
翠 / green b67986f57a
doc: add `node:sqlite` to mandatory `node:` prefix list
PR-URL: https://github.com/nodejs/node/pull/55846
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2024-11-16 04:05:45 +00:00
Preveen P 0c8ef483ee
doc: clarify UV_THREADPOOL_SIZE env var usage
Setting of UV_THREADPOOL_SIZE from inside process using
process.env.UV_THREADPOOL_SIZE is not guaranteed to work as
the thread pool would have been created as part of the runtime
initialisation much before user code is run.

update doc/api/cli.md

PR-URL: https://github.com/nodejs/node/pull/55832
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2024-11-15 08:37:52 +00:00
Livia Medeiros b02cd411c2
fs: runtime deprecate `fs.F_OK`, `fs.R_OK`, `fs.W_OK`, `fs.X_OK`
PR-URL: https://github.com/nodejs/node/pull/49686
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2024-11-14 23:34:02 +00:00
Antoine du Hamel d9540b51eb
fs: remove `dirent.path`
PR-URL: https://github.com/nodejs/node/pull/55548
Fixes: https://github.com/nodejs/node/issues/55538
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: LiviaMedeiros <livia@cirno.name>
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev>
2024-11-15 00:18:05 +01:00
Antoine du Hamel be5a500ae3
doc: fix history info for `URL.prototype.toJSON`
PR-URL: https://github.com/nodejs/node/pull/55818
Fixes: https://github.com/nodejs/node/issues/55806
Refs: https://github.com/nodejs/node/pull/11236
Refs: https://github.com/nodejs/node/pull/17365
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2024-11-13 16:47:28 +00:00
Joe Bowbeer 598bbf4833
doc: correct max-semi-space-size statement
Signed-off-by: Joe Bowbeer <joe.bowbeer@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/55812
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
2024-11-12 23:55:32 +00:00
Antoine du Hamel f17b9a4c78
2024-11-12, Version 18.20.5 'Hydrogen' (LTS)
Notable changes:

esm:
  * mark import attributes and JSON module as stable (Nicolò Ribaudo) https://github.com/nodejs/node/pull/55333

PR-URL: https://github.com/nodejs/node/pull/55768
2024-11-12 22:35:04 +01:00
skyclouds2001 0d29315972
doc: update unflag info of `import.meta.resolve`
PR-URL: https://github.com/nodejs/node/pull/55810
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2024-11-12 21:01:17 +00:00
Adrien Foulon 2310409a89
report: fix network queries in getReport libuv with exclude-network
PR-URL: https://github.com/nodejs/node/pull/55602
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
2024-11-12 15:57:59 +00:00
Antoine du Hamel c52c670ad4
2024-11-11, Version 23.2.0 (Current)
Notable changes:

crypto:
  * update root certificates to NSS 3.104 (Richard Lau) https://github.com/nodejs/node/pull/55681
doc:
  * move typescript support to active development (Marco Ippolito) https://github.com/nodejs/node/pull/55536
  * add jazelly to collaborators (Jason Zhang) https://github.com/nodejs/node/pull/55531
fs:
  * (SEMVER-MINOR) make `dirent.path` writable (Antoine du Hamel) https://github.com/nodejs/node/pull/55547
http:
  * (SEMVER-MINOR) add diagnostic channel `http.client.request.created` (Marco Ippolito) https://github.com/nodejs/node/pull/55586
module:
  * (SEMVER-MINOR) add `findPackageJSON` util (Jacob Smith) https://github.com/nodejs/node/pull/55412
  * (SEMVER-MINOR) add `module.stripTypeScriptTypes` (Marco Ippolito) https://github.com/nodejs/node/pull/55282

PR-URL: https://github.com/nodejs/node/pull/55741
2024-11-11 21:23:33 +01:00
Rafael Gonzaga 3a0968db43
permission: ignore internalModuleStat on module loading
This improves Permission Model usage when allowing read access to
specifi modules. To achieve that, the permission model check on
internalModuleStat has been removed meaning that on module loading,
uv_fs_stat is performed on files and folders even when the permission
model is enabled. Although a uv_fs_stat is performed, reading/executing
the module will still pass by the permission model check.

Without this PR when an app tries to --allow-fs-read=./a.js
--allow-fs-read=./b.js where `a` attempt to load b, it will fails as
it reads $pwd and no permission has been given to this path.

PR-URL: https://github.com/nodejs/node/pull/55797
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
2024-11-11 17:31:44 +00:00
Rafael Gonzaga 0a00217a5f
doc: sort --report-exclude alphabetically
PR-URL: https://github.com/nodejs/node/pull/55788
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
2024-11-09 12:13:31 +00:00
Edigleysson Silva (Edy) 069ec1b983
doc: consolidate history table of CustomEvent
PR-URL: https://github.com/nodejs/node/pull/55758
Fixes: https://github.com/nodejs/node/issues/55733
Refs: https://github.com/nodejs/node/issues/55733
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
2024-11-09 02:47:32 +00:00
Rafael Gonzaga a243225aa2
src: add cli option to preserve env vars on dr
PR-URL: https://github.com/nodejs/node/pull/55697
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
2024-11-08 17:49:43 +00:00
Antoine du Hamel 94be10ac32
util: do not mark experimental feature as deprecated
PR-URL: https://github.com/nodejs/node/pull/55740
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
2024-11-08 16:16:15 +00:00
Antoine du Hamel 37c941be05
doc: clarify removal of experimental API does not require a deprecation
PR-URL: https://github.com/nodejs/node/pull/55746
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2024-11-08 13:02:49 +00:00
Carlos Espa 765f16c442
doc: add path aliases typescript doc
PR-URL: https://github.com/nodejs/node/pull/55766
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
2024-11-08 10:28:40 +00:00
Aviv Keller daf5346742
doc: add esm example in `path.md`
PR-URL: https://github.com/nodejs/node/pull/55745
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
2024-11-08 11:27:17 +01:00
Aviv Keller 0368f2f662
repl: runtime deprecate instantiating without new
PR-URL: https://github.com/nodejs/node/pull/54869
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: LiviaMedeiros <livia@cirno.name>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Jacob Smith <jacob@frende.me>
2024-11-07 08:03:05 +00:00
Gireesh Punathil 6f12f1e500
doc: consistent use of word child process
reword "child" to "child process" wherever possible.
this helps in maintaining clarity and precision,
consistency while avoiding misinterpretation.

PR-URL: https://github.com/nodejs/node/pull/55654
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2024-11-06 10:28:28 +00:00
Preveen P 98e5693cd4
doc: clarity to available addon options
bullet pointed addon optons; wording clarity; fixes typo

PR-URL: https://github.com/nodejs/node/pull/55715
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2024-11-06 07:55:49 +00:00
Joe Bowbeer 25f8474730
doc: update `--max-semi-space-size` description
PR-URL: https://github.com/nodejs/node/pull/55495
Fixes: https://github.com/nodejs/node/issues/55487
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2024-11-06 00:14:15 +01:00
Marco Ippolito d35cde624f
util: add sourcemap support to getCallSites
PR-URL: https://github.com/nodejs/node/pull/55589
Fixes: https://github.com/nodejs/node/issues/55109
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2024-11-04 16:06:47 +00:00
Dom Harrington e124b0ff7d
doc: broken `PerformanceObserver` code sample
The code sample at the top of the "Performance measurements API"
section of the docs does not run.

The code in question:

```js
const { PerformanceObserver, performance } = require('node:perf_hooks');

const obs = new PerformanceObserver((items) => {
  console.log(items.getEntries()[0].duration);
  performance.clearMarks();
});
obs.observe({ type: 'measure' });
performance.measure('Start to Now');

performance.mark('A');
doSomeLongRunningProcess(() => {
  performance.measure('A to Now', 'A');

  performance.mark('B');
  performance.measure('A to B', 'A', 'B');
});
```

If you replace `doSomeLongRunningProcess` with an IIFE with a sleep()
at the top of it, you get this:

```js
const { PerformanceObserver, performance } = require('node:perf_hooks');

const obs = new PerformanceObserver((items) => {
  console.log(items.getEntries()[0].duration);
  performance.clearMarks();
});
obs.observe({ type: 'measure' });
performance.measure('Start to Now');

performance.mark('A');

(async function doSomeLongRunningProcess() {
  await new Promise(r => setTimeout(r, 5000));
  performance.measure('A to Now', 'A');

  performance.mark('B');
  performance.measure('A to B', 'A', 'B');
})()
```

When you run this, you get the following output:

```sh
$ node performance-test.js
17.873416

node:internal/per_context/domexception:53
    ErrorCaptureStackTrace(this);
    ^
DOMException [SyntaxError]: The "A" performance mark has not been set
    at new DOMException (node:internal/per_context/domexception:53:5)
    at __node_internal_ (node:internal/util:695:10)
    at getMark (node:internal/perf/usertiming:65:11)
    at calculateStartDuration (node:internal/perf/usertiming:202:13)
    at measure (node:internal/perf/usertiming:220:7)
    at Performance.measure (node:internal/perf/performance:135:12)
    at /private/tmp/performance-test.js:14:15

Node.js v20.11.1
```

I believe it's due to the call to `performance.clearMarks();` in the
PerformanceObserver callback. If you remove that, it works as expected:

```js
const { PerformanceObserver, performance } = require('node:perf_hooks');

const obs = new PerformanceObserver((items) => {
  console.log(items.getEntries()[0].duration);
});
obs.observe({ type: 'measure' });
performance.measure('Start to Now');

performance.mark('A');

(async function doSomeLongRunningProcess() {
  await new Promise(r => setTimeout(r, 5000));
  performance.measure('A to Now', 'A');

  performance.mark('B');
  performance.measure('A to B', 'A', 'B');
})()
```

```sh
$ node performance-test.js
17.761083
5002.468417
```

PR-URL: https://github.com/nodejs/node/pull/54227
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2024-11-02 17:05:24 +00:00
robberfree 7f6ea83788
doc: add write flag when open file as the demo code's intention
PR-URL: https://github.com/nodejs/node/pull/54626
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com>
2024-11-02 16:55:53 +00:00
Chengzhong Wu 68dc15e400
util: fix util.getCallSites plurality
`util.getCallSite` returns an array of call site objects. Rename the
function to reflect that it returns a given count of frames captured
as an array of call site object.

Renames the first parameter `frames` to be `frameCount` to indicate
that it specifies the count of returned call sites.

PR-URL: https://github.com/nodejs/node/pull/55626
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
2024-11-02 15:24:56 +00:00
Stephen Belanger 51ae57673d
lib: make ALS default to AsyncContextFrame
PR-URL: https://github.com/nodejs/node/pull/55552
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
2024-11-02 15:14:28 +00:00
Marco Ippolito 560b2a1677
http: add diagnostic channel `http.server.response.created`
PR-URL: https://github.com/nodejs/node/pull/55622
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
2024-11-02 13:46:20 +00:00
Gireesh Punathil 44afd67831
doc: add a note on console stream behavior
Many user reported issues show poor awareness of the
nature of console streams. explicitly document that.

PR-URL: https://github.com/nodejs/node/pull/55616
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2024-11-02 12:37:09 +00:00
Filip Skokan ba8fc73131
doc: remove mention of ECDH-ES in crypto.diffieHellman
PR-URL: https://github.com/nodejs/node/pull/55611
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2024-11-02 12:36:25 +00:00
Gireesh Punathil 824c149e79
doc: improve c++ embedder API doc
normalise the headers, fixup bullet points and
expand `node::IsolateData` scope for clarity.

PR-URL: https://github.com/nodejs/node/pull/55597
Reviewed-By: Akhil Marsonya <akhil.marsonya27@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2024-11-01 03:43:53 +00:00
Marco Ippolito 4379dfb1fd
http: add diagnostic channel `http.client.request.created`
PR-URL: https://github.com/nodejs/node/pull/55586
Fixes: https://github.com/nodejs/node/issues/55352
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com>
Reviewed-By: theanarkh <theratliter@gmail.com>
2024-10-31 13:04:25 +00:00
Tobias Nießen a465b206d7
sqlite: add readOnly option
Allow opening existing SQLite databases with SQLITE_OPEN_READONLY set.

PR-URL: https://github.com/nodejs/node/pull/55567
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
2024-10-31 11:41:14 +00:00
Antoine du Hamel 7270f84596
fs: make `dirent.path` writable
PR-URL: https://github.com/nodejs/node/pull/55547
Refs: https://github.com/nodejs/node/issues/55538
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: LiviaMedeiros <livia@cirno.name>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
2024-10-28 08:33:39 +00:00
Marco Ippolito 2a965493a9
doc: move typescript support to active development
PR-URL: https://github.com/nodejs/node/pull/55536
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
2024-10-27 14:35:11 +00:00
Marco Ippolito bca53e8421
doc: add suggested tsconfig for type stripping
PR-URL: https://github.com/nodejs/node/pull/55534
Reviewed-By: Zeyu "Alex" Yang <himself65@outlook.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
2024-10-27 13:52:50 +00:00
Alfredo González 51eb4c0cda
doc: add esm examples to node:string_decoder
PR-URL: https://github.com/nodejs/node/pull/55507
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
2024-10-26 20:36:25 +00:00
Jacob Smith e312d60e3f
module: add `findPackageJSON` util
PR-URL: https://github.com/nodejs/node/pull/55412
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2024-10-25 20:40:54 +00:00
Antoine du Hamel 7ddd2c2282
2024-10-24, Version 23.1.0 (Current)
Notable changes:

assert:
  * (SEMVER-MINOR) make `assertion_error` use Myers diff algorithm (Giovanni Bucci) https://github.com/nodejs/node/pull/54862
buffer:
  * (SEMVER-MINOR) make `Buffer` work with resizable `ArrayBuffer` (James M Snell) https://github.com/nodejs/node/pull/55377
esm:
  * mark import attributes and JSON module as stable (Nicolò Ribaudo) https://github.com/nodejs/node/pull/55333
lib:
  * (SEMVER-MINOR) add `UV_UDP_REUSEPORT` for udp (theanarkh) https://github.com/nodejs/node/pull/55403
net:
  * (SEMVER-MINOR) add `UV_TCP_REUSEPORT` for tcp (theanarkh) https://github.com/nodejs/node/pull/55408
test_runner:
  * mark `MockTimers` as stable (Erick Wendel) https://github.com/nodejs/node/pull/55398

PR-URL: https://github.com/nodejs/node/pull/55513
2024-10-24 23:26:25 +02:00
Marco Ippolito 53b1050e6f
module: add module.stripTypeScriptTypes
PR-URL: https://github.com/nodejs/node/pull/55282
Fixes: https://github.com/nodejs/node/issues/54300
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
2024-10-24 18:27:58 +00:00
Joyee Cheung f6cfdb918e
doc: move dual package shipping docs to separate repo
Refs: https://github.com/nodejs/admin/issues/917
Refs: https://github.com/nodejs/package-examples/pull/1
Refs: https://github.com/nodejs/node/pull/54648
PR-URL: https://github.com/nodejs/node/pull/55444
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2024-10-22 20:14:50 +00:00
Ederin (Ed) Igharoro 1c2eecd669
doc: add note about stdio streams in child_process
PR-URL: https://github.com/nodejs/node/pull/55322
Fixes: https://github.com/nodejs/node/issues/15714
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2024-10-22 05:05:05 +00:00
leviscar 5983110545
doc: add `isBigIntObject` to documentation
Refs: https://github.com/nodejs/node/pull/19989
Fixes: https://github.com/nodejs/node/issues/55446
PR-URL: https://github.com/nodejs/node/pull/55450
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2024-10-22 07:00:25 +02:00
Ian Kerins 4320e1a7de
doc: remove outdated remarks about `highWaterMark` in fs
`Readable`'s `highWaterMark` has in fact been 64KiB since #52037.

PR-URL: https://github.com/nodejs/node/pull/55462
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2024-10-22 00:17:55 +00:00
theanarkh 7bc3e16da1
net: add UV_TCP_REUSEPORT for tcp
PR-URL: https://github.com/nodejs/node/pull/55408
Refs: https://github.com/libuv/libuv/pull/4407
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2024-10-21 13:10:53 +00:00
theanarkh 6a02c2701e
lib: add UV_UDP_REUSEPORT for udp
PR-URL: https://github.com/nodejs/node/pull/55403
Refs: https://github.com/libuv/libuv/pull/4419
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2024-10-21 10:25:10 +00:00
Yagiz Nizipli 11fbdd8c9d
url: runtime deprecate url.parse
PR-URL: https://github.com/nodejs/node/pull/55017
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2024-10-20 19:01:37 +00:00
Juan José 78b72ca7ba
cli: add `--heap-prof` flag available to `NODE_OPTIONS`
Fixes: https://github.com/nodejs/node/issues/54257
Signed-off-by: Juan José Arboleda <soyjuanarbol@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/54259
Reviewed-By: Zeyu "Alex" Yang <himself65@outlook.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2024-10-20 02:17:22 +00:00
Juan José 61e52c8bd3
src,lib: introduce `util.getSystemErrorMessage(err)`
This patch adds a new utility function which provides human-readable
string description of the given system error code.

Signed-off-by: Juan José Arboleda <soyjuanarbol@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/54075
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2024-10-19 23:15:16 +00:00
Erick Wendel 0c68991474 doc: add changelog for mocktimers
Signed-off-by: Erick Wendel <erick.workspace@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/55398
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
2024-10-17 21:24:41 +00:00
Erick Wendel f772040507 test_runner: mark mockTimers as stable
PR-URL: https://github.com/nodejs/node/pull/55398
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
2024-10-17 21:24:40 +00:00
theanarkh cf7406927f
lib: add flag to drop connection when running in cluster mode
PR-URL: https://github.com/nodejs/node/pull/54927
Refs: https://github.com/nodejs/node/issues/54882
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2024-10-17 15:11:41 +00:00
Antoine du Hamel e2242b4e25
2024-10-16, Version 22.10.0 (Current)
Notable changes:

crypto:
  * (SEMVER-MINOR) add `KeyObject.prototype.toCryptoKey` (Filip Skokan) https://github.com/nodejs/node/pull/55262
  * (SEMVER-MINOR) add Date fields for `validTo` and `validFrom` (Andrew Moon) https://github.com/nodejs/node/pull/54159
doc:
  * add abmusse to collaborators (Abdirahim Musse) https://github.com/nodejs/node/pull/55086
http2:
  * (SEMVER-MINOR) expose `nghttp2_option_set_stream_reset_rate_limit` as an option (Maël Nison) https://github.com/nodejs/node/pull/54875
lib:
  * (SEMVER-MINOR) propagate aborted state to dependent signals before firing events (jazelly) https://github.com/nodejs/node/pull/54826
module:
  * (SEMVER-MINOR) support loading entrypoint as url (RedYetiDev) https://github.com/nodejs/node/pull/54933
  * (SEMVER-MINOR) implement the `"module-sync"` exports condition (Joyee Cheung) https://github.com/nodejs/node/pull/54648
  * (SEMVER-MINOR) implement `flushCompileCache()` (Joyee Cheung) https://github.com/nodejs/node/pull/54971
  * (SEMVER-MINOR) throw when invalid argument is passed to `enableCompileCache()` (Joyee Cheung) https://github.com/nodejs/node/pull/54971
  * (SEMVER-MINOR) write compile cache to temporary file and then rename it (Joyee Cheung) https://github.com/nodejs/node/pull/54971
process:
  * (SEMVER-MINOR) add `process.features.require_module` (Joyee Cheung) https://github.com/nodejs/node/pull/55241
  * (SEMVER-MINOR) add `process.features.typescript` (Aviv Keller) https://github.com/nodejs/node/pull/54295
src:
  * mark `node --run` as stable (Yagiz Nizipli) https://github.com/nodejs/node/pull/53763
test_runner:
  * (SEMVER-MINOR) support custom arguments in `run()` (Aviv Keller) https://github.com/nodejs/node/pull/55126
  * (SEMVER-MINOR) add `'test:summary'` event (Colin Ihrig) https://github.com/nodejs/node/pull/54851
  * (SEMVER-MINOR) add support for coverage via `run()` (Chemi Atlow) https://github.com/nodejs/node/pull/53937
worker:
  * (SEMVER-MINOR) add `markAsUncloneable` api (Jason Zhang) https://github.com/nodejs/node/pull/55234

PR-URL: https://github.com/nodejs/node/pull/55343
2024-10-17 00:34:53 +02:00
Jan Martin 73414f34e8 doc: spell out condition restrictions
PR-URL: https://github.com/nodejs/node/pull/55187
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2024-10-16 08:43:45 -07:00
RafaelGSS fa8f149c0a 2024-10-16, Version 23.0.0 (Current)
Semver-Major Commits:

assert,util:
  * (SEMVER-MAJOR) change WeakMap and WeakSet comparison handling (Cristian Barlutiu) https://github.com/nodejs/node/pull/53495
buffer:
  * (SEMVER-MAJOR) throw when writing beyond buffer" (Robert Nagy) https://github.com/nodejs/node/pull/54588
  * (SEMVER-MAJOR) make File cloneable (Matthew Aitken) https://github.com/nodejs/node/pull/47613
build:
  * (SEMVER-MAJOR) reset embedder string to "-node.0" (Michaël Zasso) https://github.com/nodejs/node/pull/54536
  * (SEMVER-MAJOR) disable ICF for mksnapshot (Leszek Swirski) https://github.com/nodejs/node/pull/54077
  * (SEMVER-MAJOR) include v8-sandbox.h header in distribution (Michaël Zasso) https://github.com/nodejs/node/pull/54077
  * (SEMVER-MAJOR) reset embedder string to "-node.0" (Michaël Zasso) https://github.com/nodejs/node/pull/54077
  * (SEMVER-MAJOR) warn for GCC versions earlier than 12.2 (Michaël Zasso) https://github.com/nodejs/node/pull/54081
  * (SEMVER-MAJOR) drop experimental support for Windows <10 (Michaël Zasso) https://github.com/nodejs/node/pull/54079
  * (SEMVER-MAJOR) remove support for 32-bit Windows (Michaël Zasso) https://github.com/nodejs/node/pull/53184
  * (SEMVER-MAJOR) compile with C++20 support (Michaël Zasso) https://github.com/nodejs/node/pull/45427
child_process:
  * (SEMVER-MAJOR) remove unused internal event (Rich Trott) https://github.com/nodejs/node/pull/53793
cli:
  * (SEMVER-MAJOR) remove deprecated V8 flag (Omer Katz) https://github.com/nodejs/node/pull/54761
  * (SEMVER-MAJOR) move --trace-atomics-wait to eol (Marco Ippolito) https://github.com/nodejs/node/pull/52747
  * (SEMVER-MAJOR) remove --no-experimental-global-customevent flag (Daeyeon Jeong) https://github.com/nodejs/node/pull/52723
  * (SEMVER-MAJOR) remove --no-experimental-fetch flag (Filip Skokan) https://github.com/nodejs/node/pull/52611
  * (SEMVER-MAJOR) remove --no-experimental-global-webcrypto flag (Filip Skokan) https://github.com/nodejs/node/pull/52564
crypto:
  * (SEMVER-MAJOR) runtime deprecate crypto.fips (Yagiz Nizipli) https://github.com/nodejs/node/pull/55019
  * (SEMVER-MAJOR) remove ERR_CRYPTO_SCRYPT_INVALID_PARAMETER (Tobias Nießen) https://github.com/nodejs/node/pull/53305
  * (SEMVER-MAJOR) move DEP0182 to runtime deprecation (Tobias Nießen) https://github.com/nodejs/node/pull/52552
deps:
  * (SEMVER-MAJOR) V8: cherry-pick 97199f686e2f (Michaël Zasso) https://github.com/nodejs/node/pull/54536
  * (SEMVER-MAJOR) V8: cherry-pick 01a47f3ffff2 (Michaël Zasso) https://github.com/nodejs/node/pull/54536
  * (SEMVER-MAJOR) patch V8 to support older Clang versions (Michaël Zasso) https://github.com/nodejs/node/pull/54536
  * (SEMVER-MAJOR) always define V8_NODISCARD as no-op (Michaël Zasso) https://github.com/nodejs/node/pull/54536
  * (SEMVER-MAJOR) fix FP16 bitcasts.h (Stefan Stojanovic) https://github.com/nodejs/node/pull/54536
  * (SEMVER-MAJOR) patch V8 to support compilation with MSVC (StefanStojanovic) https://github.com/nodejs/node/pull/54536
  * (SEMVER-MAJOR) patch V8 to avoid duplicated zlib symbol (Michaël Zasso) https://github.com/nodejs/node/pull/54536
  * (SEMVER-MAJOR) disable V8 concurrent sparkplug compilation (Michaël Zasso) https://github.com/nodejs/node/pull/54536
  * (SEMVER-MAJOR) always define V8_EXPORT_PRIVATE as no-op (Michaël Zasso) https://github.com/nodejs/node/pull/54536
  * (SEMVER-MAJOR) update V8 to 12.9.202.18 (Michaël Zasso) https://github.com/nodejs/node/pull/54536
  * (SEMVER-MAJOR) remove bogus V8 DCHECK (Michaël Zasso) https://github.com/nodejs/node/pull/54077
  * (SEMVER-MAJOR) V8: cherry-pick 00e9eeb3fb2c (Michaël Zasso) https://github.com/nodejs/node/pull/54077
  * (SEMVER-MAJOR) V8: cherry-pick b1397772c70c (Michaël Zasso) https://github.com/nodejs/node/pull/54077
  * (SEMVER-MAJOR) V8: cherry-pick 35888fee7bba (Joyee Cheung) https://github.com/nodejs/node/pull/54077
  * (SEMVER-MAJOR) always define V8_NODISCARD as no-op (Michaël Zasso) https://github.com/nodejs/node/pull/54077
  * (SEMVER-MAJOR) fix FP16 bitcasts.h (Stefan Stojanovic) https://github.com/nodejs/node/pull/54077
  * (SEMVER-MAJOR) V8: revert CL 5331688 (Michaël Zasso) https://github.com/nodejs/node/pull/54077
  * (SEMVER-MAJOR) patch V8 to support compilation with MSVC (StefanStojanovic) https://github.com/nodejs/node/pull/54077
  * (SEMVER-MAJOR) silence internal V8 deprecation warning (Michaël Zasso) https://github.com/nodejs/node/pull/54077
  * (SEMVER-MAJOR) patch V8 to avoid duplicated zlib symbol (Michaël Zasso) https://github.com/nodejs/node/pull/54077
  * (SEMVER-MAJOR) avoid compilation error with ASan (Michaël Zasso) https://github.com/nodejs/node/pull/54077
  * (SEMVER-MAJOR) disable V8 concurrent sparkplug compilation (Michaël Zasso) https://github.com/nodejs/node/pull/54077
  * (SEMVER-MAJOR) always define V8_EXPORT_PRIVATE as no-op (Michaël Zasso) https://github.com/nodejs/node/pull/54077
  * (SEMVER-MAJOR) update V8 to 12.8.374.13 (Michaël Zasso) https://github.com/nodejs/node/pull/54077
doc:
  * (SEMVER-MAJOR) reflect toolchains used for official binaries (Richard Lau) https://github.com/nodejs/node/pull/54967
  * (SEMVER-MAJOR) use gcc 12 on AIX for Node.js >=23 (Richard Lau) https://github.com/nodejs/node/pull/54338
esm:
  * (SEMVER-MAJOR) export 'module.exports' on ESM CJS wrapper (Guy Bedford) https://github.com/nodejs/node/pull/53848
events:
  * (SEMVER-MAJOR) set EventEmitterAsyncResource fields private (Yagiz Nizipli) https://github.com/nodejs/node/pull/54889
fs:
  * (SEMVER-MAJOR) adjust typecheck for `type` in `fs.symlink()` (Livia Medeiros) https://github.com/nodejs/node/pull/49741
  * (SEMVER-MAJOR) runtime deprecate `dirent.path` (Antoine du Hamel) https://github.com/nodejs/node/pull/51050
lib:
  * (SEMVER-MAJOR) validate signals with interface converter (Jason Zhang) https://github.com/nodejs/node/pull/54965
  * (SEMVER-MAJOR) implement interface converter in webidl (Jason Zhang) https://github.com/nodejs/node/pull/54965
  * (SEMVER-MAJOR) expose global CloseEvent (Matthew Aitken) https://github.com/nodejs/node/pull/53355
net:
  * (SEMVER-MAJOR) validate host name for server listen (Jason Zhang) https://github.com/nodejs/node/pull/54470
path:
  * (SEMVER-MAJOR) fix bugs and inconsistencies (Hüseyin Açacak) https://github.com/nodejs/node/pull/54224
process:
  * (SEMVER-MAJOR) remove `process.assert` (Aviv Keller) https://github.com/nodejs/node/pull/55035
src:
  * (SEMVER-MAJOR) update NODE_MODULE_VERSION to 131 (Michaël Zasso) https://github.com/nodejs/node/pull/54536
  * (SEMVER-MAJOR) stop using deprecated fields of `v8::FastApiCallbackOptions` (Andreas Haas) https://github.com/nodejs/node/pull/54077
  * (SEMVER-MAJOR) remove dependency on wrapper-descriptor-based CppHeap (Joyee Cheung) https://github.com/nodejs/node/pull/54077
  * (SEMVER-MAJOR) add source location to v8::TaskRunner (François Doray) https://github.com/nodejs/node/pull/54077
  * (SEMVER-MAJOR) update NODE_MODULE_VERSION to 129 (Michaël Zasso) https://github.com/nodejs/node/pull/54077
  * (SEMVER-MAJOR) do not use soon-to-be-deprecated V8 API (Igor Sheludko) https://github.com/nodejs/node/pull/53174
  * (SEMVER-MAJOR) add UV_PIPE_NO_TRUNCATE for bind in pipe_wrap.cc (theanarkh) https://github.com/nodejs/node/pull/52347
stream:
  * (SEMVER-MAJOR) pipe to a closed or destroyed stream is not allowed in pipeline (jakecastelli) https://github.com/nodejs/node/pull/53241
string_decoder:
  * (SEMVER-MAJOR) refactor encoding validation (Yagiz Nizipli) https://github.com/nodejs/node/pull/54957
test:
  * (SEMVER-MAJOR) update v8-stats test for V8 12.6 (Michaël Zasso) https://github.com/nodejs/node/pull/54077
test_runner:
  * (SEMVER-MAJOR) detect only tests when --test is not used (Colin Ihrig) https://github.com/nodejs/node/pull/54881
  * (SEMVER-MAJOR) always make spec the default reporter (Colin Ihrig) https://github.com/nodejs/node/pull/54548
  * (SEMVER-MAJOR) expose lcov reporter as newable function (Chemi Atlow) https://github.com/nodejs/node/pull/52403
timers:
  * (SEMVER-MAJOR) emit warning if delay is negative or NaN (jakecastelli) https://github.com/nodejs/node/pull/46678
tls:
  * (SEMVER-MAJOR) fix 'ERR_TLS_PSK_SET_IDENTIY_HINT_FAILED' typo (Aviv Keller) https://github.com/nodejs/node/pull/52627
tools:
  * (SEMVER-MAJOR) add additonal include dirs for V8 on AIX (Abdirahim Musse) https://github.com/nodejs/node/pull/54536
  * (SEMVER-MAJOR) update V8 gypfiles for 12.8 (Michaël Zasso) https://github.com/nodejs/node/pull/54077
  * (SEMVER-MAJOR) update V8 gypfiles for 12.7 (Richard Lau) https://github.com/nodejs/node/pull/54077
  * (SEMVER-MAJOR) update V8 gypfiles for 12.6 (Michaël Zasso) https://github.com/nodejs/node/pull/54077
util:
  * (SEMVER-MAJOR) move util.log to eol (marco-ippolito) https://github.com/nodejs/node/pull/52744
  * (SEMVER-MAJOR) move util.isPrimitive to eol (marco-ippolito) https://github.com/nodejs/node/pull/52744
  * (SEMVER-MAJOR) move util.isFunction to eol (marco-ippolito) https://github.com/nodejs/node/pull/52744
  * (SEMVER-MAJOR) move util.isError to eol (marco-ippolito) https://github.com/nodejs/node/pull/52744
  * (SEMVER-MAJOR) move util.isDate to eol (marco-ippolito) https://github.com/nodejs/node/pull/52744
  * (SEMVER-MAJOR) move util.isObject to eol (marco-ippolito) https://github.com/nodejs/node/pull/52744
  * (SEMVER-MAJOR) move util.isRegExp to eol (marco-ippolito) https://github.com/nodejs/node/pull/52744
  * (SEMVER-MAJOR) move util.isUndefined to eol (marco-ippolito) https://github.com/nodejs/node/pull/52744
  * (SEMVER-MAJOR) move util.isSymbol to eol (marco-ippolito) https://github.com/nodejs/node/pull/52744
  * (SEMVER-MAJOR) move util.isString to eol (marco-ippolito) https://github.com/nodejs/node/pull/52744
  * (SEMVER-MAJOR) move util.isNumber to eol (marco-ippolito) https://github.com/nodejs/node/pull/52744
  * (SEMVER-MAJOR) move util.isNullOrUndefined to eol (marco-ippolito) https://github.com/nodejs/node/pull/52744
  * (SEMVER-MAJOR) move util.isNull to eol (marco-ippolito) https://github.com/nodejs/node/pull/52744
  * (SEMVER-MAJOR) move util.isBuffer to eol (marco-ippolito) https://github.com/nodejs/node/pull/52744
  * (SEMVER-MAJOR) move util.isBoolean to eol (marco-ippolito) https://github.com/nodejs/node/pull/52744
  * (SEMVER-MAJOR) move util._extend to eol (marco-ippolito) https://github.com/nodejs/node/pull/52744
zlib:
  * (SEMVER-MAJOR) remove `zlib.bytesRead` (Yagiz Nizipli) https://github.com/nodejs/node/pull/55020

PR-URL: https://github.com/nodejs/node/pull/55338
2024-10-16 11:05:01 -03:00
Rafael Gonzaga 019efe1453
lib: runtime deprecate SlowBuffer
PR-URL: https://github.com/nodejs/node/pull/55175
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2024-10-15 21:24:39 +00:00
Santiago Gimeno d6175b35ad Revert "deps: disable io_uring support in libuv by default"
This reverts commit 42e659cb9d.

PR-URL: https://github.com/nodejs/node/pull/55114
Refs: https://github.com/libuv/libuv/releases/tag/v1.49.0
Refs: https://github.com/libuv/libuv/releases/tag/v1.49.1
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2024-10-14 06:51:19 +00:00
Karl Horky 129ca9e319
doc: add missing return values in buffer docs
PR-URL: https://github.com/nodejs/node/pull/55273
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2024-10-13 19:42:03 +00:00
Nicolò Ribaudo d881fcba86
esm: mark import attributes and JSON module as stable
The two proposals reached stage 4 at the October 2024 meeting.

PR-URL: https://github.com/nodejs/node/pull/55333
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2024-10-12 11:21:09 +00:00
Marco Ippolito 90f56dbad9
module: throw ERR_NO_TYPESCRIPT when compiled without amaro
PR-URL: https://github.com/nodejs/node/pull/55332
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2024-10-11 15:41:38 +00:00
Mert Can Altin fdf838aee6
node-api: add napi_create_buffer_from_arraybuffer method
PR-URL: https://github.com/nodejs/node/pull/54505
Fixes: https://github.com/nodejs/node/issues/54440
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Gabriel Schulhof <gabrielschulhof@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Vladimir Morozov <vmorozov@microsoft.com>
2024-10-11 15:21:57 +00:00
Jimmy Leung acd698a5c8
doc: fix the return type of outgoingMessage.setHeaders()
The actual implementation returns `outgoingMessage` itself, but not
exactly `http.ServerResponse`.

Refs: 20d8b85d34/lib/_http_outgoing.js (L712-L751)
PR-URL: https://github.com/nodejs/node/pull/55290
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Qingyu Deng <i@ayase-lab.com>
2024-10-11 13:03:35 +00:00
Antoine du Hamel 4988bb549e
tools: enforce ordering of error codes in `errors.md`
PR-URL: https://github.com/nodejs/node/pull/55324
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2024-10-10 17:18:20 +00:00
Antoine du Hamel 4a3fffaf58
doc: move `ERR_INVALID_PERFORMANCE_MARK` to legacy errors
PR-URL: https://github.com/nodejs/node/pull/55247
Refs: https://github.com/nodejs/node/pull/14680
Refs: https://github.com/nodejs/node/pull/39297
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2024-10-10 09:52:42 +00:00
Marco Ippolito 31a37e777d
module: wrap swc error in ERR_INVALID_TYPESCRIPT_SYNTAX
PR-URL: https://github.com/nodejs/node/pull/55316
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2024-10-10 09:12:39 +00:00
Ivo Janssen 755b89772d
doc: fix `events.once()` example using `AbortSignal`
PR-URL: https://github.com/nodejs/node/pull/55144
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com>
2024-10-09 07:32:00 +00:00
Tobias Nießen 09d10b50dc
sqlite: disable DQS misfeature by default
Double-quoted string (DQS) literals are not allowed by the SQL standard,
which defines that text enclosed in double quotes is to be interpreted
as an identifier only and never as a string literal. Nevertheless, for
historical reasons, SQLite allows double-quoted string literals in some
cases, which leads to inconsistent behavior and subtle bugs.

This commit changes the behavior of the built-in Node.js API for SQLite
such that the DQS misfeature is disabled by default. This is recommended
by the developers of SQLite. Users can explicitly enable DQS for
compatibility with legacy database schemas if necessary.

PR-URL: https://github.com/nodejs/node/pull/55297
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com>
2024-10-08 21:49:38 +00:00
Aviv Keller 5a3da7b4e4
tools: enforce errors to not be documented in legacy section
PR-URL: https://github.com/nodejs/node/pull/55218
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2024-10-08 16:59:53 +00:00
Joyee Cheung b0f025208f
process: add process.features.require_module
For detecting whether `require(esm)` is supported without triggering
the experimental warning.

PR-URL: https://github.com/nodejs/node/pull/55241
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2024-10-07 15:26:10 +00:00
Aviv Keller 9a9409ff1f
test_runner: throw on invalid source map
PR-URL: https://github.com/nodejs/node/pull/55055
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2024-10-06 20:27:32 +00:00
Filip Skokan 90e3e5e173
crypto: add KeyObject.prototype.toCryptoKey
PR-URL: https://github.com/nodejs/node/pull/55262
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2024-10-06 18:09:02 +00:00
Tobias Nießen 7af434fc19
sqlite: make sourceSQL and expandedSQL string-valued properties
Change sourceSQL and expandedSQL from being methods to being
string-valued properties. These fields

- are conceptually properties (and not actions),
- are derived deterministically from the current state of the object,
- require no parameters, and
- are inexpensive to compute.

Also, following the naming conventions of ECMAScript for new features,
most function names should usually contain a verb, whereas names of
(dynamically computed) properties generally should not, so the current
names also seem more appropriate for properties than for functions.

PR-URL: https://github.com/nodejs/node/pull/54721
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2024-10-06 17:58:22 +00:00
Tobias Nießen a49abec6c3
sqlite: enable foreign key constraints by default
For historical reasons and to maintain compatibibility with legacy
database schemas, SQLite does not enable foreign key constraints by
default. For new applications, however, this behavior is undesirable.
Currently, any application that wishes to use foreign keys must use

    PRAGMA foreign_keys = ON;

to explicitly enable enforcement of such constraints.

This commit changes the behavior of the SQLite API built into Node.js
to enable foreign key constraints by default. This behavior can be
overridden by users to maintain compatibility with legacy database
schemas.

PR-URL: https://github.com/nodejs/node/pull/54777
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2024-10-06 15:57:23 +00:00
Antoine du Hamel a301596c41
doc: move `ERR_NAPI_TSFN_START/STOP_IDLE_LOOP` to legacy errors
PR-URL: https://github.com/nodejs/node/pull/55248
Refs: https://github.com/nodejs/node/pull/17887
Refs: https://github.com/nodejs/node/pull/32997
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com>
2024-10-05 09:59:13 +00:00
Aviv Keller bbdfeebd9e
process: add `process.features.typescript`
PR-URL: https://github.com/nodejs/node/pull/54295
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2024-10-05 07:08:11 +00:00
Ihor Rohovets 32efeea0c0
doc: fix initial default value of autoSelectFamily
Specify the initial default value of `autoSelectFamily`
in description of `net.setDefaultAutoSelectFamily()`
as specified in description of `net.getDefaultAutoSelectFamily()`.

PR-URL: https://github.com/nodejs/node/pull/55245
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com>
2024-10-05 02:06:36 +00:00
Jason Zhang d2ad9b4fb6
worker: add `markAsUncloneable` api
External modules need a way to decorate their objects so that node can
recognize it as a host object for serialization process. Exposing a way
for turning off instead of turning on is much safer.

PR-URL: https://github.com/nodejs/node/pull/55234
Refs: https://github.com/nodejs/node/pull/55178
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
Reviewed-By: Matthew Aitken <maitken033380023@gmail.com>
2024-10-04 07:09:37 +00:00
Michaël Zasso 784eb2c281
2024-10-03, Version 20.18.0 'Iron' (LTS)
Notable changes:

buffer:
  * optimize createFromString (Robert Nagy) https://github.com/nodejs/node/pull/54324
inspector:
  * (SEMVER-MINOR) support `Network.loadingFailed` event (Kohei Ueno) https://github.com/nodejs/node/pull/54246
  * (SEMVER-MINOR) add initial support for network inspection (Kohei Ueno) https://github.com/nodejs/node/pull/53593
lib:
  * (SEMVER-MINOR) add EventSource Client (Aras Abbasi) https://github.com/nodejs/node/pull/51575
repl:
  * doc-deprecate instantiating `node:repl` classes without `new` (Aviv Keller) https://github.com/nodejs/node/pull/54842
src,lib:
  * (SEMVER-MINOR) add performance.uvMetricsInfo (Rafael Gonzaga) https://github.com/nodejs/node/pull/54413
test_runner:
  * (SEMVER-MINOR) support module mocking (Colin Ihrig) https://github.com/nodejs/node/pull/52848
tls:
  * (SEMVER-MINOR) add `allowPartialTrustChain` flag (Anna Henningsen) https://github.com/nodejs/node/pull/54790
url:
  * (SEMVER-MINOR) implement parse method for safer URL parsing (Ali Hassan) https://github.com/nodejs/node/pull/52280
vm:
  * (SEMVER-MINOR) introduce vanilla contexts via vm.constants.DONT_CONTEXTIFY (Joyee Cheung) https://github.com/nodejs/node/pull/54394
zlib:
  * deprecate instantiating classes without new (Yagiz Nizipli) https://github.com/nodejs/node/pull/54708

PR-URL: https://github.com/nodejs/node/pull/55170
2024-10-03 19:54:20 +02:00