Commit Graph

10193 Commits

Author SHA1 Message Date
Marco Ippolito
cb20c5b9f4
doc: add documentation for process.features
PR-URL: https://github.com/nodejs/node/pull/54897
Refs: https://github.com/nodejs/node/pull/54295
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2024-09-14 10:09:53 +00:00
Mert Can Altin
75e4d0df8f node-api: add support for UTF-8 and Latin-1 property keys
PR-URL: https://github.com/nodejs/node/pull/52984
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Vladimir Morozov <vmorozov@microsoft.com>
2024-09-13 13:01:52 -07:00
Aviv Keller
99bbf80608
test_runner: report coverage thresholds in test:coverage
PR-URL: https://github.com/nodejs/node/pull/54813
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2024-09-13 13:31:37 +00:00
cjihrig
f5f67ae4a7
test_runner: detect only tests when isolation is off
This commit updates the way the test runner processes 'only'
tests when process-based test isolation is disabled. The
--test-only flag is no longer necessary in this scenario. The
test runner will automatically detect 'only' tests and apply the
appropriate filtering.

PR-URL: https://github.com/nodejs/node/pull/54832
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
2024-09-12 12:41:11 -04:00
Aviv Keller
a202666399
repl: doc-deprecate instantiating node:repl classes without new
PR-URL: https://github.com/nodejs/node/pull/54842
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: LiviaMedeiros <livia@cirno.name>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2024-09-09 22:37:48 +00:00
Anna Henningsen
c3a7b29e56 tls: add allowPartialTrustChain flag
This commit exposes the `X509_V_FLAG_PARTIAL_CHAIN` OpenSSL flag to
users. This is behavior that has been requested repeatedly in the
Github issues, and allows aligning behavior with other TLS libraries
and commonly used applications (e.g. `curl`).

As a drive-by, simplify the `SecureContext` source by deduplicating
call sites at which a new custom certificate store was created for the
`secureContext` in question.

Fixes: https://github.com/nodejs/node/issues/36453
PR-URL: https://github.com/nodejs/node/pull/54790
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2024-09-09 17:24:10 +02:00
Chengzhong Wu
23f8ed0617
doc: experimental flag for global accessible APIs
Explicitly document that adding an API to the global scope requires
`semver-major` label. Waiving the `semver-major` requires a regular
TSC consensus process.

PR-URL: https://github.com/nodejs/node/pull/54330
Refs: https://github.com/nodejs/node/pull/54329
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
2024-09-09 13:57:04 +00:00
Aviv Keller
67357ba8ff
doc: add ERR_INVALID_ADDRESS to errors.md
PR-URL: https://github.com/nodejs/node/pull/54661
Reviewed-By: James M Snell <jasnell@gmail.com>
2024-09-07 23:16:40 +00:00
Guy Bedford
c813de46fc
doc: mark --conditions CLI flag as stable
PR-URL: https://github.com/nodejs/node/pull/54209
Reviewed-By: James M Snell <jasnell@gmail.com>
2024-09-07 01:37:19 +02:00
Tobias Nießen
f061210819
doc: fix typo in recognizing-contributors
PR-URL: https://github.com/nodejs/node/pull/54822
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
2024-09-06 22:31:12 +00:00
Alexandre ABRIOUX
bec80892b3
doc: clarify --max-old-space-size and --max-semi-space-size units
PR-URL: https://github.com/nodejs/node/pull/54477
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
2024-09-06 19:33:03 +02:00
M1CK431
b77476d884
doc: replace --allow-fs-read by --allow-fs-write in related section
PR-URL: https://github.com/nodejs/node/pull/54427
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2024-09-06 08:29:43 +00:00
Tobias Nießen
5fb9083b1a
doc: fix typo in module.md
PR-URL: https://github.com/nodejs/node/pull/54794
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2024-09-05 23:11:54 +00:00
Yagiz Nizipli
26eb062a9b
zlib: deprecate instantiating classes without new
PR-URL: https://github.com/nodejs/node/pull/54708
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: LiviaMedeiros <livia@cirno.name>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2024-09-05 16:25:33 +00:00
Aviv Keller
0debdac9da
doc, child_process: add esm snippets
PR-URL: https://github.com/nodejs/node/pull/53616
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
2024-09-05 08:47:48 +00:00
Aviv Keller
2bd6a57b7b
doc: specify that preloaded modules affect subprocesses
Co-Authored-By: Tim Fish <tim@timfish.uk>
PR-URL: https://github.com/nodejs/node/pull/52939
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2024-09-04 19:55:17 +00:00
Rafael Gonzaga
80a989f931
lib: add util.getCallSite() API
PR-URL: https://github.com/nodejs/node/pull/54380
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Claudio Wunder <cwunder@gnome.org>
Reviewed-By: James M Snell <jasnell@gmail.com>
2024-09-04 19:47:25 +00:00
Tobias Nießen
6c6a9338cb
doc: clarify expandedSQL behavior
I am not sure what exactly the primary use case is for this function
given that the Node.js API is not designed for users to manually bind
parameters of prepared statements, but this at least clarifies what the
function does.

PR-URL: https://github.com/nodejs/node/pull/54685
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2024-09-04 19:30:00 +00:00
Rafael Gonzaga
a63882bece
benchmark,doc: add CPU scaling governor to perf
PR-URL: https://github.com/nodejs/node/pull/54723
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2024-09-04 19:21:18 +00:00
Giovanni Bucci
03fe00e3da
benchmark: adds groups to better separate benchmarks
Fixes: https://github.com/nodejs/node/issues/26425
Co-Authored-By: Yaman Kassir <mestery@protonmail.com>
PR-URL: https://github.com/nodejs/node/pull/54393
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
2024-09-04 03:26:53 +00:00
RafaelGSS
9e5d2b74fb 2024-09-03, Version 22.8.0 (Current)
Notable changes:

net:
  * (SEMVER-MINOR) exclude ipv6 loopback addresses from server.listen (Giovanni Bucci) https://github.com/nodejs/node/pull/54264
src:
  * (SEMVER-MINOR) add JS APIs for compile cache and NODE_DISABLE_COMPILE_CACHE (Joyee Cheung) https://github.com/nodejs/node/pull/54501
src,lib:
  * (SEMVER-MINOR) add performance.uvMetricsInfo (Rafael Gonzaga) https://github.com/nodejs/node/pull/54413
test_runner:
  * (SEMVER-MINOR) add support for coverage thresholds (Aviv Keller) https://github.com/nodejs/node/pull/54429
  * (SEMVER-MINOR) support running tests in process (Colin Ihrig) https://github.com/nodejs/node/pull/53927
  * (SEMVER-MINOR) defer inheriting hooks until run() (Colin Ihrig) https://github.com/nodejs/node/pull/53927
vm:
  * (SEMVER-MINOR) introduce vanilla contexts via vm.constants.DONT_CONTEXTIFY (Joyee Cheung) https://github.com/nodejs/node/pull/54394

PR-URL: https://github.com/nodejs/node/pull/54560
2024-09-03 10:43:27 -03:00
Tobias Nießen
cb747d360e
doc: render type references in SQLite docs
Render JavaScript types as such in the section "Type conversion between
JavaScript and SQLite".

PR-URL: https://github.com/nodejs/node/pull/54684
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2024-09-03 09:46:01 +00:00
Paolo Insogna
294ae14b98
timers: document ref option for scheduler.wait
PR-URL: https://github.com/nodejs/node/pull/54605
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com>
2024-09-02 06:57:02 +00:00
Michael Dawson
a1ffa644e9
doc: fix typo
name used instructions differed that what is in the code

Signed-off-by: Michael Dawson <midawson@redhat.com>
PR-URL: https://github.com/nodejs/node/pull/54640
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2024-08-31 17:33:09 +00:00
Filip Skokan
d49f47ee35
doc: fix webcrypto.md AES-GCM backticks
PR-URL: https://github.com/nodejs/node/pull/54621
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2024-08-30 22:32:03 +00:00
Joyee Cheung
9bdf2ee1d1
doc: add documentation about os.tmpdir() overrides
This documents the TMPDIR, TEMP and TMP overrides on different
platforms and that some operating systems set these by default.

PR-URL: https://github.com/nodejs/node/pull/54613
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2024-08-30 18:44:26 +00:00
Rafael Gonzaga
5a22d8e013
doc: add alert on REPL from TCP socket
PR-URL: https://github.com/nodejs/node/pull/54594
Refs: https://hackerone.com/reports/2684357
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
2024-08-30 14:33:06 +00:00
Rafael Gonzaga
9a275e15c3
src,lib: add performance.uvMetricsInfo
This commit exposes a new API to the perf_hooks.performance
module. This wraps uv_metrics_info into
performance.uvMetricsInfo() function.

PR-URL: https://github.com/nodejs/node/pull/54413
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2024-08-30 14:22:28 +00:00
Michaël Zasso
8966787624
test: run V8 Fast API tests in release mode too
Only keep the call count assertions under `common.isDebug`.

PR-URL: https://github.com/nodejs/node/pull/54570
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2024-08-30 10:25:01 +00:00
Rafael Gonzaga
321a14b36d
doc: fix typo in styleText description
PR-URL: https://github.com/nodejs/node/pull/54616
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2024-08-29 19:42:53 +00:00
Joyee Cheung
d98cfcc581
vm: introduce vanilla contexts via vm.constants.DONT_CONTEXTIFY
This implements a flavor of vm.createContext() and friends
that creates a context without contextifying its global object.
This is suitable when users want to freeze the context (impossible
when the global is contextified i.e. has interceptors installed)
or speed up the global access if they don't need the interceptor
behavior.

```js
const vm = require('node:vm');

const context = vm.createContext(vm.constants.DONT_CONTEXTIFY);

// In contexts with contextified global objects, this is false.
// In vanilla contexts this is true.
console.log(vm.runInContext('globalThis', context) === context);

// In contexts with contextified global objects, this would throw,
// but in vanilla contexts freezing the global object works.
vm.runInContext('Object.freeze(globalThis);', context);

// In contexts with contextified global objects, freezing throws
// and won't be effective. In vanilla contexts, freezing works
// and prevents scripts from accidentally leaking globals.
try {
  vm.runInContext('globalThis.foo = 1; foo;', context);
} catch(e) {
  console.log(e); // Uncaught ReferenceError: foo is not defined
}

console.log(context.Array);  // [Function: Array]
```

PR-URL: https://github.com/nodejs/node/pull/54394
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2024-08-29 09:05:03 +00:00
Benji Marinacci
29cf623567
doc: add getHeapStatistics() property descriptions
PR-URL: https://github.com/nodejs/node/pull/54584
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2024-08-29 05:12:56 +00:00
沈鸿飞
99b491c595
doc: fix module compile cache description
PR-URL: https://github.com/nodejs/node/pull/54625
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2024-08-29 04:36:46 +00:00
Joyee Cheung
ff5ef7083d
src: add JS APIs for compile cache and NODE_DISABLE_COMPILE_CACHE
This patch adds the following API for tools to enable compile
cache dynamically and query its status.

- module.enableCompileCache(cacheDir)
- module.getCompileCacheDir()

In addition this adds a NODE_DISABLE_COMPILE_CACHE environment
variable to disable the code cache enabled by the APIs as
an escape hatch to avoid unexpected/undesired effects of
the compile cache (e.g. less precise test coverage).

When the module.enableCompileCache() method is invoked without
a specified directory, Node.js will use the value of
the NODE_COMPILE_CACHE environment variable if it's set, or
defaults to `path.join(os.tmpdir(), 'node-compile-cache')`
otherwise. Therefore it's recommended for tools to call this
method without specifying the directory to allow overrides.

PR-URL: https://github.com/nodejs/node/pull/54501
Fixes: https://github.com/nodejs/node/issues/53639
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2024-08-28 23:22:57 +00:00
Rafael Gonzaga
4a0ec20a35
lib: respect terminal capabilities on styleText
This PR changes styleText API to respect terminal
capabilities and environment variables such as
NO_COLOR, NODE_DISABLE_COLORS, and FORCE_COLOR.

PR-URL: https://github.com/nodejs/node/pull/54389
Fixes: https://github.com/nodejs/node/issues/54365
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Claudio Wunder <cwunder@gnome.org>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2024-08-28 18:00:11 +00:00
Aviv Keller
342b501cb0
doc: fix information about including coverage files
PR-URL: https://github.com/nodejs/node/pull/54527
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2024-08-27 19:11:04 +00:00
Michael Dawson
d813634424 doc: support collaborators - talk amplification
- document that we support collaborators by amplifying their talks

Signed-off-by: Michael Dawson <midawson@redhat.com>
PR-URL: https://github.com/nodejs/node/pull/54508
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: James M Snell <jasnell@gmail.com>
2024-08-27 14:28:25 -04:00
Marco Ippolito
589a60e3ac
doc: add note about shasum generation failure
PR-URL: https://github.com/nodejs/node/pull/54487
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2024-08-27 15:48:43 +00:00
Colin Ihrig
eb7e18fe94
test_runner: always make spec the default reporter
This is a breaking change. Prior to this commit, the test_runner
defaulted to the spec reporter if using a TTY, and the TAP
reporter otherwise. This commit makes spec the default reporter
unconditionally. TAP output is still available via the
--test-reporter=tap CLI flag.

Fixes: https://github.com/nodejs/node/issues/54540
PR-URL: https://github.com/nodejs/node/pull/54548
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com>
2024-08-27 15:22:16 +00:00
Paolo Insogna
6d654ddd00
timers: fix validation
PR-URL: https://github.com/nodejs/node/pull/54404
Reviewed-By: Claudio Wunder <cwunder@gnome.org>
2024-08-25 07:30:10 +00:00
Yelim Koo
6dce10ff77
doc: update websocket flag description to reflect stable API status
doc: update websocket flag description to reflect stable API status

doc: revert syntax detection description
PR-URL: https://github.com/nodejs/node/pull/54482
Reviewed-By: Matthew Aitken <maitken033380023@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2024-08-24 16:59:25 +00:00
Aviv Keller
9edf4a0856
test_runner: add support for coverage thresholds
Co-Authored-By: Marco Ippolito <marcoippolito54@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/54429
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
2024-08-23 17:02:11 +00:00
shallow-beach
a21af4bfb5
doc: fix capitalization in module.md
PR-URL: https://github.com/nodejs/node/pull/54488
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com>
2024-08-23 00:52:53 +00:00
RafaelGSS
4d5c885f8a 2024-08-22, Version 22.7.0 (Current)
Notable changes:

buffer:
  * use fast API for writing one-byte strings (Robert Nagy) https://github.com/nodejs/node/pull/54311
  * optimize createFromString (Robert Nagy) https://github.com/nodejs/node/pull/54324
  * use native copy impl (Robert Nagy) https://github.com/nodejs/node/pull/54087
inspector:
  * (SEMVER-MINOR) support `Network.loadingFailed` event (Kohei Ueno) https://github.com/nodejs/node/pull/54246
lib:
  * (SEMVER-MINOR) rewrite AsyncLocalStorage without async_hooks (Stephen Belanger) https://github.com/nodejs/node/pull/48528
module:
  * (SEMVER-MINOR) add --experimental-transform-types flag (Marco Ippolito) https://github.com/nodejs/node/pull/54283
  * (SEMVER-MINOR) unflag detect-module (Geoffrey Booth) https://github.com/nodejs/node/pull/53619

PR-URL: https://github.com/nodejs/node/pull/54452
2024-08-22 11:14:41 -03:00
Marco Ippolito
8b0c699f2a
2024-08-21, Version 20.17.0 'Iron' (LTS)
Notable changes:

http:
  * (SEMVER-MINOR) add diagnostics channel `http.client.request.error` (Kohei Ueno) https://github.com/nodejs/node/pull/54054
meta:
  * add jake to collaborators (jakecastelli) https://github.com/nodejs/node/pull/54004
module:
  * (SEMVER-MINOR) support require()ing synchronous ESM graphs (Joyee Cheung) https://github.com/nodejs/node/pull/51977
path:
  * (SEMVER-MINOR) add `matchesGlob` method (Aviv Keller) https://github.com/nodejs/node/pull/52881
stream:
  * (SEMVER-MINOR) expose DuplexPair API (Austin Wright) https://github.com/nodejs/node/pull/34111
  * (SEMVER-MINOR) implement `min` option for `ReadableStreamBYOBReader.read` (Mattias Buelens) https://github.com/nodejs/node/pull/50888

PR-URL: https://github.com/nodejs/node/pull/54447
2024-08-21 18:14:55 +02:00
cjihrig
cc26951180 test_runner: support running tests in process
This commit introduces a new --experimental-test-isolation flag
that, when set to 'none', causes the test runner to execute all
tests in the same process. By default, this is the main test
runner process, but if watch mode is enabled, it spawns a separate
process that runs all of the tests.

The default value of the new flag is 'process', which uses the
existing behavior of running each test file in its own child
process.

It is worth noting that when the isolation mode is 'none', globals
and all other top level logic (such as top level before() and after()
hooks) is shared among all files.

Co-authored-by: Moshe Atlow <moshe@atlow.co.il>
PR-URL: https://github.com/nodejs/node/pull/53927
Fixes: https://github.com/nodejs/node/issues/51548
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2024-08-21 13:39:19 +00:00
Antoine du Hamel
68e94c1e75
test_runner: make mock.module's specifier consistent with import()
The previous implementation was trying to follow both `require` and
`import` conventions. It is not practical to try to follow both,
and aligning with `import()` seems to be what makes the most sense.

PR-URL: https://github.com/nodejs/node/pull/54416
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
2024-08-20 17:39:40 +00:00
Alfredo González
57a4534719
doc: add esm examples to node:https
PR-URL: https://github.com/nodejs/node/pull/54399
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2024-08-19 13:52:40 +00:00
Calvin
80dac9e087
doc: reserve ABI 130 for Electron 33
PR-URL: https://github.com/nodejs/node/pull/54383
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com>
2024-08-19 00:43:30 +00:00
Egawa Ryo
18f455b50f
doc: fix error description of the max header size
PR-URL: https://github.com/nodejs/node/pull/54125
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2024-08-18 13:09:11 +00:00
Rafael Gonzaga
9e83853294
doc: add git node security --cleanup
PR-URL: https://github.com/nodejs/node/pull/54381
Reviewed-By: Ruy Adorno <ruy@vlt.sh>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
2024-08-17 13:50:27 +00:00
Tobias Nießen
97f39eb50a
doc: add note on weakness of permission model
Malicious JavaScript code can bypass the permission model. Hence, it
does not fulfill the requirements of a security mechanism against
malicious code.

PR-URL: https://github.com/nodejs/node/pull/54268
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
2024-08-17 13:03:21 +00:00
Michaël Zasso
e945bd9525
src: update NODE_MODULE_VERSION to 129
Major V8 updates are usually API/ABI incompatible with previous
versions. This commit adapts NODE_MODULE_VERSION for V8 12.8.

Refs: https://github.com/nodejs/CTC/blob/master/meetings/2016-09-28.md
PR-URL: https://github.com/nodejs/node/pull/54077
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
2024-08-16 16:03:08 +02:00
Aviv Keller
59da1df009
cli: allow --test-[name/skip]-pattern in NODE_OPTIONS
PR-URL: https://github.com/nodejs/node/pull/53001
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
2024-08-16 12:58:39 +00:00
Théo LUDWIG
8d37584874
doc: add versions when --watch-preserve-output was added
PR-URL: https://github.com/nodejs/node/pull/54328
Refs: https://github.com/nodejs/node/pull/45717
Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Debadree Chatterjee <debadree333@gmail.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
2024-08-16 00:56:33 +00:00
Jason Zhang
e020dd8610
doc: correct peformance entry types
Fixes: https://github.com/nodejs/node/issues/54212
Fixes: https://github.com/nodejs/node/issues/50290
PR-URL: https://github.com/nodejs/node/pull/54263
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2024-08-15 11:11:08 +00:00
Eliyah Sundström
fd76646e74
doc: fix typo in method name in the sea doc
PR-URL: https://github.com/nodejs/node/pull/54027
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
2024-08-15 11:11:01 +00:00
Michaël Zasso
2573f74b0d
build: always disable strict aliasing
V8 relies on it.

PR-URL: https://github.com/nodejs/node/pull/54339
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2024-08-14 18:33:43 +00:00
Michaël Zasso
1d35a066e7
src,test: ensure that V8 fast APIs are called
Adds a debug-only macro that can be used to track when a V8 fast API is
called. A map of counters is maintained in in thread-local storage and
an internal API can be called to get the total count associated with
a call id.
Specific tests are added and `crypto.timingSafeEqual` as well as
internal documentation are updated to show how to use the macro
and test fast API calls without running long loops.

PR-URL: https://github.com/nodejs/node/pull/54317
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2024-08-13 12:37:02 +00:00
Marco Ippolito
624db50952
doc: mark process.nextTick legacy
PR-URL: https://github.com/nodejs/node/pull/51280
Refs: https://github.com/nodejs/node/issues/51156
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
2024-08-12 16:18:50 +00:00
Marco Ippolito
0301309493
module: add --experimental-transform-types flag
PR-URL: https://github.com/nodejs/node/pull/54283
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Zeyu "Alex" Yang <himself65@outlook.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
2024-08-12 13:07:49 +00:00
Alfredo González
56ff3078cf
doc: add esm examples to node:http2
PR-URL: https://github.com/nodejs/node/pull/54292
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2024-08-11 22:15:08 +00:00
Kohei Ueno
746213ec7a
inspector: support Network.loadingFailed event
PR-URL: https://github.com/nodejs/node/pull/54246
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2024-08-11 11:42:01 +00:00
Rafael Gonzaga
b49019eed6
doc: explicitly mention node:fs module restriction
PR-URL: https://github.com/nodejs/node/pull/54269
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2024-08-10 20:07:06 +00:00
Rafael Gonzaga
d70828149b
doc: remove module-based permission doc
PR-URL: https://github.com/nodejs/node/pull/54266
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2024-08-10 20:06:25 +00:00
Stephen Belanger
7366808b85
lib: improve async_context_frame structure
PR-URL: https://github.com/nodejs/node/pull/54239
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2024-08-09 19:44:42 +00:00
Samuli Asmala
19bf154a13
doc: update buffer.constants.MAX_LENGTH size
Starting from Node v22.0.0 the `buffer.constants.MAX_LENGTH` has been
increased from 4 GiB to 8 PiB due to V8 engine update to 12.4.254.14.

PR-URL: https://github.com/nodejs/node/pull/54207
Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2024-08-09 19:19:24 +00:00
Deokjin Kim
a4f609faf5 doc: make some parameters optional in tracingChannel.traceCallback
Plus, add missing `position` parameter to CJS example.

PR-URL: https://github.com/nodejs/node/pull/54068
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com>
2024-08-07 15:26:20 +09:30
Rafael Gonzaga
7327e44a05
doc: sort versions to fix the linter error
PR-URL: https://github.com/nodejs/node/pull/54229
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
2024-08-06 23:56:00 +02:00
Alfredo González
e2c62203cc
doc: add esm examples to node:dns
PR-URL: https://github.com/nodejs/node/pull/54172
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2024-08-06 18:34:19 +00:00
RafaelGSS
3660ad5c92 2024-08-06, Version 22.6.0 (Current)
Notable changes:

deps:
  * (SEMVER-MINOR) V8: backport 7857eb34db42 (Stephen Belanger) https://github.com/nodejs/node/pull/53997
http:
  * (SEMVER-MINOR) add diagnostics channel `http.client.request.error` (Kohei Ueno) https://github.com/nodejs/node/pull/54054
inspector:
  * (SEMVER-MINOR) add initial support for network inspection (Kohei Ueno) https://github.com/nodejs/node/pull/53593
lib,src:
  * drop --experimental-network-imports (Rafael Gonzaga) https://github.com/nodejs/node/pull/53822
meta:
  * add jake to collaborators (jakecastelli) https://github.com/nodejs/node/pull/54004
module:
  * (SEMVER-MINOR) add --experimental-strip-types (Marco Ippolito) https://github.com/nodejs/node/pull/53725
stream:
  * (SEMVER-MINOR) expose DuplexPair API (Austin Wright) https://github.com/nodejs/node/pull/34111
test_runner:
  * (SEMVER-MINOR) fix support watch with run(), add globPatterns option (Matteo Collina) https://github.com/nodejs/node/pull/53866
  * (SEMVER-MINOR) refactor snapshots to get file from context (Colin Ihrig) https://github.com/nodejs/node/pull/53853
  * (SEMVER-MINOR) add context.filePath (Colin Ihrig) https://github.com/nodejs/node/pull/53853

PR-URL: https://github.com/nodejs/node/pull/54123
2024-08-06 13:58:38 -03:00
Alfredo González
fd49758796
doc: add esm examples to node:console
PR-URL: https://github.com/nodejs/node/pull/54108
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2024-08-06 09:56:59 +00:00
Sadzurami
24ed890663
doc: fix sea assets example
PR-URL: https://github.com/nodejs/node/pull/54192
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2024-08-06 08:24:23 +00:00
sendoru
a5200da1d0
doc: move onread option from socket.connect() to new net.socket()
Fixes: https://github.com/nodejs/node/issues/53792
PR-URL: https://github.com/nodejs/node/pull/54194
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Tim Perry <pimterry@gmail.com>
2024-08-05 23:36:20 +00:00
jaexxin
76d10a10fb doc: add documentation for blob.bytes() method
PR-URL: https://github.com/nodejs/node/pull/54114
Fixes: https://github.com/nodejs/node/issues/54105
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com>
2024-08-05 00:25:32 +09:30
Eddie Abbondanzio
492032f34c
doc: add missing new lines to custom test reporter examples
PR-URL: https://github.com/nodejs/node/pull/54152
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Harshitha K P <harshitha014@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com>
2024-08-03 01:41:55 +00:00
Stephen Belanger
d1229eeca4
lib: rewrite AsyncLocalStorage without async_hooks
PR-URL: https://github.com/nodejs/node/pull/48528
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
2024-08-02 19:44:20 +00:00
Thomas Hunter II
13ca021da3
doc: fix worker threadId/destination typo
PR-URL: https://github.com/nodejs/node/pull/53933
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com>
2024-08-02 10:45:49 +00:00
Yelim Koo
7941b4b333
doc: remove unused imports from worker_threads.md
PR-URL: https://github.com/nodejs/node/pull/54147
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Deokjin Kim <deokjin81.kim@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2024-07-31 17:11:13 +00:00
Yelim Koo
f212674452
doc: clarify useCodeCache setting for cross-platform SEA generation
PR-URL: https://github.com/nodejs/node/pull/53994
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2024-07-31 09:01:38 +00:00
Alfredo González
027710e408
doc: move numCPUs require to top of file in cluster CJS example
PR-URL: https://github.com/nodejs/node/pull/53932
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2024-07-30 06:13:52 +00:00
Rafael Gonzaga
269175b2b4
doc: update security-release process to automated one
PR-URL: https://github.com/nodejs/node/pull/53877
Refs: https://github.com/nodejs/security-wg/issues/860
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2024-07-29 13:34:18 +00:00
YoonSoo_Shin
7480a903f4
doc: fix typo in technical-priorities.md
added a space between the two words.

PR-URL: https://github.com/nodejs/node/pull/54094
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com>
2024-07-29 10:42:33 +00:00
Taejin Kim
6ad25e37b5
doc: fix typo in diagnostic tooling support tiers document
PR-URL: https://github.com/nodejs/node/pull/54058
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2024-07-29 06:36:41 +00:00
Rafael Gonzaga
5ac969fdca
lib,src: drop --experimental-network-imports
PR-URL: https://github.com/nodejs/node/pull/53822
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2024-07-28 16:33:05 +00:00
Kohei Ueno
69a69f6ca3
http: add diagnostics channel http.client.request.error
PR-URL: https://github.com/nodejs/node/pull/54054
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev>
2024-07-28 09:57:38 +00:00
Gabriel Schulhof
2d1b4a8cf7 node-api: rename nogc to basic
Signed-off-by: Gabriel Schulhof <gabrielschulhof@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/53830
Reviewed-By: Vladimir Morozov <vmorozov@microsoft.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
2024-07-26 09:25:02 -07:00
Austin Wright
b32732b1ee
stream: expose DuplexPair API
PR-URL: https://github.com/nodejs/node/pull/34111
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2024-07-26 08:09:23 +00:00
Marco Ippolito
2cd968717d
doc: correct typescript stdin support
PR-URL: https://github.com/nodejs/node/pull/54036
Fixes: https://github.com/nodejs/node/issues/54035
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2024-07-25 12:58:08 +00:00
Thomas Hunter II
36e44f1230
doc, test: tracing channel hasSubscribers getter
follow up work for https://github.com/nodejs/node/pull/51915

PR-URL: https://github.com/nodejs/node/pull/52908
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2024-07-24 16:48:40 +00:00
Marco Ippolito
35f92d953c
module: add --experimental-strip-types
PR-URL: https://github.com/nodejs/node/pull/53725
Refs: https://github.com/nodejs/loaders/issues/217
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruy Adorno <ruy@vlt.sh>
2024-07-24 16:30:06 +00:00
Matteo Collina
2208948e1b
test_runner: fix support watch with run(), add globPatterns option
Signed-off-by: Matteo Collina <hello@matteocollina.com>
PR-URL: https://github.com/nodejs/node/pull/53866
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
2024-07-24 13:11:20 +00:00
Marco Ippolito
7a6185d2fb
2024-07-24, Version 20.16.0 'Iron' (LTS)
Notable changes:

buffer:
  * (SEMVER-MINOR) add .bytes() method to Blob (Matthew Aitken) https://github.com/nodejs/node/pull/53221
doc:
  * doc-only deprecate OpenSSL engine-based APIs (Richard Lau) https://github.com/nodejs/node/pull/53329
  * (SEMVER-MINOR) add context.assert docs (Colin Ihrig) https://github.com/nodejs/node/pull/53169
  * (SEMVER-MINOR) improve explanation about built-in modules (Joyee Cheung) https://github.com/nodejs/node/pull/52762
  * add StefanStojanovic to collaborators (StefanStojanovic) https://github.com/nodejs/node/pull/53118
  * add Marco Ippolito to TSC (Rafael Gonzaga) https://github.com/nodejs/node/pull/53008
inspector:
  * fix disable async hooks on Debugger.setAsyncCallStackDepth (Joyee Cheung) https://github.com/nodejs/node/pull/53473
net:
  * (SEMVER-MINOR) add new net.server.listen tracing channel (Paolo Insogna) https://github.com/nodejs/node/pull/53136
process:
  * (SEMVER-MINOR) add process.getBuiltinModule(id) (Joyee Cheung) https://github.com/nodejs/node/pull/52762
src,permission:
  * (SEMVER-MINOR) --allow-wasi & prevent WASI exec (Rafael Gonzaga) https://github.com/nodejs/node/pull/53124
test_runner:
  * (SEMVER-MINOR) add context.fullName (Colin Ihrig) https://github.com/nodejs/node/pull/53169
util:
  * (SEMVER-MINOR) support `--no-` for argument with boolean type for parseArgs (Zhenwei Jin) https://github.com/nodejs/node/pull/53107

PR-URL: https://github.com/nodejs/node/pull/53945
2024-07-24 14:06:09 +02:00
Marco Ippolito
2db4d94b98
doc: fix typo in recognizing-contributors
PR-URL: https://github.com/nodejs/node/pull/53990
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
2024-07-23 09:54:42 +00:00
Aviv Keller
4b8000c66c
doc: fix documentation for --run
PR-URL: https://github.com/nodejs/node/pull/53976
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2024-07-22 19:13:00 +00:00
Grigory
acd1d22ff8
doc: add info about prefix-only modules to module.builtinModules
PR-URL: https://github.com/nodejs/node/pull/53954
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2024-07-21 17:51:20 +00:00
Antoine du Hamel
bc677d1937
doc,tools: enforce use of node: prefix
PR-URL: https://github.com/nodejs/node/pull/53950
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
2024-07-21 15:44:27 +00:00
Cloyd Lau
befbe69a0d
doc: remove scroll-behavior: smooth;
PR-URL: https://github.com/nodejs/node/pull/53942
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2024-07-21 11:15:28 +00:00
Geoffrey Booth
604ce4cc66
module: unflag detect-module
PR-URL: https://github.com/nodejs/node/pull/53619
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2024-07-20 18:30:46 +00:00
Colin Ihrig
7702aab336
doc: move --test-coverage-{ex,in}clude to proper location
This commit moves the documentation for two CLI flags to the
proper sorted location.

PR-URL: https://github.com/nodejs/node/pull/53926
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
2024-07-20 13:26:09 +00:00
Aviv Keller
6fc0218e3e
doc: add --experimental-sqlite note
PR-URL: https://github.com/nodejs/node/pull/53907
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2024-07-19 19:28:19 +00:00
Richard Lau
45ff44b987
2024-07-19, Version 22.5.1 (Current)
Notable changes:

This release fixes a regression introduced in Node.js 22.5.0. The
problem is known to display the following symptoms:

- Crash with
```
FATAL ERROR: v8::Object::GetCreationContextChecked No creation context available
```

- npm errors with `npm error Exit handler never called!`

- yarn hangs or outputs
```
Usage Error: Couldn't find the node_modules state file - running an install might help (findPackageLocation)
```

PR-URL: https://github.com/nodejs/node/pull/53935
Refs: https://github.com/nodejs/node/issues/53902
Refs: https://github.com/npm/cli/issues/7657
Refs: https://github.com/yarnpkg/berry/issues/6398
2024-07-19 13:41:24 +00:00
jakecastelli
7fe67b7078
doc,tty: add documentation for ReadStream and WriteStream
Co-authored-by: Qingyu Deng <i@ayase-lab.com>
PR-URL: https://github.com/nodejs/node/pull/53567
Fixes: https://github.com/nodejs/node/issues/37780
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Raz Luvaton <rluvaton@gmail.com>
Reviewed-By: Claudio Wunder <cwunder@gnome.org>
2024-07-19 10:53:24 +00:00
Aviv Keller
86f79e6e7c
doc: update api_assets README for new files
PR-URL: https://github.com/nodejs/node/pull/53676
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Claudio Wunder <cwunder@gnome.org>
2024-07-19 10:44:56 +00:00
Kohei Ueno
a523c345b1
inspector: add initial support for network inspection
PR-URL: https://github.com/nodejs/node/pull/53593
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
2024-07-19 05:00:30 +00:00
Aviv Keller
3d019ce6af
cli: document --inspect port 0 behavior
PR-URL: https://github.com/nodejs/node/pull/53782
Reviewed-By: Kohei Ueno <kohei.ueno119@gmail.com>
2024-07-18 14:28:44 +00:00
Antoine du Hamel
fcda2844e6
doc: fix release date for 22.5.0
The release has been postponed and I forgot to update the date in the
`CHANGELOG_V22.md`.

PR-URL: https://github.com/nodejs/node/pull/53889
Refs: https://github.com/nodejs/node/pull/53826
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2024-07-17 17:19:02 +00:00
Rafael Gonzaga
589b67aa17
doc: update release-post nodejs.org script
PR-URL: https://github.com/nodejs/node/pull/53762
Refs: https://github.com/nodejs/nodejs.org/pull/6850
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
2024-07-17 15:29:46 +00:00
Antoine du Hamel
db1c2beae6 2024-07-17, Version 22.5.0 (Current)
Notable changes:

http:
  * (SEMVER-MINOR) expose websockets (Natalia Venditto) https://github.com/nodejs/node/pull/53721
lib:
  * (SEMVER-MINOR) add `node:sqlite` module (Colin Ihrig) https://github.com/nodejs/node/pull/53752
module:
  * add `__esModule` to `require()`'d ESM (Joyee Cheung) https://github.com/nodejs/node/pull/52166
path:
  * (SEMVER-MINOR) add `matchesGlob` method (Aviv Keller) https://github.com/nodejs/node/pull/52881
process:
  * (SEMVER-MINOR) port on-exit-leak-free to core (Vinicius Lourenço) https://github.com/nodejs/node/pull/53239
stream:
  * (SEMVER-MINOR) pipeline wait for close before calling the callback (jakecastelli) https://github.com/nodejs/node/pull/53462
test_runner:
  * support glob matching coverage files (Aviv Keller) https://github.com/nodejs/node/pull/53553
worker:
  * (SEMVER-MINOR) add `postMessageToThread` (Paolo Insogna) https://github.com/nodejs/node/pull/53682

PR-URL: https://github.com/nodejs/node/pull/53826
2024-07-17 12:11:26 -03:00
cjihrig
2ce7c69fce test_runner: add context.filePath
This commit adds a filePath getter to the TestContext and
SuiteContext classes. This allows a context to be mapped back to
the original test file that created it, even if it was imported
from another file. This is useful for mapping features like test
snapshots to the correct test file. This is also prep work for
supporting running test files in the test runner process.

PR-URL: https://github.com/nodejs/node/pull/53853
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2024-07-17 07:01:21 +00:00
mscdex
6ba0af1354
tls: add setKeyCert() to tls.Socket
PR-URL: https://github.com/nodejs/node/pull/53636
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Tim Perry <pimterry@gmail.com>
2024-07-15 15:17:59 +00:00
Aviv Keller
4174b73153
test: support glob matching coverage files
PR-URL: https://github.com/nodejs/node/pull/53553
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2024-07-14 22:37:45 +00:00
Rafael Gonzaga
c126a1f0dc
doc: add Rafael to the last security release
PR-URL: https://github.com/nodejs/node/pull/53769
Refs: https://github.com/nodejs-private/security-release/pull/29
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2024-07-12 12:33:31 +00:00
Joyee Cheung
e77aac2a5f module: add __esModule to require()'d ESM
Tooling in the ecosystem have been using the __esModule property to
recognize transpiled ESM in consuming code. For example, a 'log'
package written in ESM:

export function log(val) { console.log(val); }

Can be transpiled as:

exports.__esModule = true;
exports.default = function log(val) { console.log(val); }

The consuming code may be written like this in ESM:

import log from 'log'

Which gets transpiled to:

const _mod = require('log');
const log = _mod.__esModule ? _mod.default : _mod;

So to allow transpiled consuming code to recognize require()'d real ESM
as ESM and pick up the default exports, we add a __esModule property by
building a source text module facade for any module that has a default
export and add .__esModule = true to the exports. We don't do this to
modules that don't have default exports to avoid the unnecessary
overhead. This maintains the enumerability of the re-exported names
and the live binding of the exports.

The source of the facade is defined as a constant per-isolate property
required_module_facade_source_string, which looks like this

export * from 'original';
export { default } from 'original';
export const __esModule = true;

And the 'original' module request is always resolved by
createRequiredModuleFacade() to wrap which is a ModuleWrap wrapping
over the original module.

PR-URL: https://github.com/nodejs/node/pull/52166
Refs: https://github.com/nodejs/node/issues/52134
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Guy Bedford <guybedford@gmail.com>
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
2024-07-11 18:59:31 +00:00
Vinicius Lourenço
05bb4a716b
process: port on-exit-leak-free to core
PR-URL: https://github.com/nodejs/node/pull/53239
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io>
2024-07-11 17:57:20 +00:00
Sébastien Règne
c590117f1a
doc: use mock.callCount() in examples
PR-URL: https://github.com/nodejs/node/pull/53754
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Raz Luvaton <rluvaton@gmail.com>
2024-07-11 17:11:05 +00:00
Tobias Nießen
3a3dfbde14
doc: clarify authenticity of plaintexts in update
PR-URL: https://github.com/nodejs/node/pull/53784
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
2024-07-11 13:40:39 +00:00
Michael Dawson
23ef285ac4 doc: add option to have support me link
Refs: https://github.com/nodejs/TSC/issues/1552

Signed-off-by: Michael Dawson <midawson@redhat.com>
PR-URL: https://github.com/nodejs/node/pull/53312
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruy Adorno <ruy@vlt.sh>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2024-07-10 16:00:10 -04:00
Tobias Nießen
33a6d1fe3a
crypto: remove ERR_CRYPTO_SCRYPT_INVALID_PARAMETER
It is confusing to have both ERR_CRYPTO_SCRYPT_INVALID_PARAMETER and
ERR_CRYPTO_INVALID_SCRYPT_PARAMS. The former was the original error
code, added in 371103dae8, but parameter
validation gradually changed and now produces
ERR_CRYPTO_INVALID_SCRYPT_PARAMS for all parameter validation errors
coming from OpenSSL, as well as different error codes for validation
errors coming from JavaScript. The only remaining use of
ERR_CRYPTO_SCRYPT_INVALID_PARAMETER is in the validation logic that
ensures that no two synonymous options were passed. We already have an
error code for that particular case, ERR_INCOMPATIBLE_OPTION_PAIR, so
replace these last instances of ERR_CRYPTO_SCRYPT_INVALID_PARAMETER with
that error code and remove ERR_CRYPTO_SCRYPT_INVALID_PARAMETER. If there
ever is need again for such an error code, we can just use
ERR_CRYPTO_INVALID_SCRYPT_PARAMS.

Refs: https://github.com/nodejs/node/pull/35093
Refs: https://github.com/nodejs/node/pull/21525
Refs: https://github.com/nodejs/node/pull/20816
PR-URL: https://github.com/nodejs/node/pull/53305
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2024-07-10 16:38:00 +00:00
Afanasii Kurakin
059f2f43b8
doc: add OpenSSL security level to TLS docs
PR-URL: https://github.com/nodejs/node/pull/53647
Reviewed-By: Tim Perry <pimterry@gmail.com>
2024-07-10 10:41:34 +00:00
Cloyd Lau
661ae62ab8
doc: update scroll-padding-top to 4rem
PR-URL: https://github.com/nodejs/node/pull/53662
Reviewed-By: Claudio Wunder <cwunder@gnome.org>
Reviewed-By: James M Snell <jasnell@gmail.com>
2024-07-10 09:24:43 +00:00
Colin Ihrig
b4e8f1b6bb
lib,src,test,doc: add node:sqlite module
PR-URL: https://github.com/nodejs/node/pull/53752
Fixes: https://github.com/nodejs/node/issues/53264
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
2024-07-09 20:33:38 +00:00
Paolo Insogna
66a635cece
worker: add postMessageToThread
PR-URL: https://github.com/nodejs/node/pull/53682
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
2024-07-09 07:16:04 +00:00
RafaelGSS
4fe0f826a8 2024-07-08, Version 22.4.1 (Current)
This is a security release.

Notable changes:

* CVE-2024-36138 - Bypass incomplete fix of CVE-2024-27980 (High)
* CVE-2024-22020 - Bypass network import restriction via data URL (Medium)
* CVE-2024-22018 - fs.lstat bypasses permission model (Low)
* CVE-2024-36137 - fs.fchown/fchmod bypasses permission model (Low)
* CVE-2024-37372 - Permission model improperly processes UNC paths (Low)

PR-URL: https://github.com/nodejs-private/node-private/pull/617
2024-07-08 14:20:29 -03:00
RafaelGSS
0881c1f01a 2024-07-08, Version 20.15.1 'Iron' (LTS)
This is a security release.

Notable changes:

* CVE-2024-36138 - Bypass incomplete fix of CVE-2024-27980 (High)
* CVE-2024-22020 - Bypass network import restriction via data URL (Medium)
* CVE-2024-22018 - fs.lstat bypasses permission model (Low)
* CVE-2024-36137 - fs.fchown/fchmod bypasses permission model (Low)
* CVE-2024-37372 - Permission model improperly processes UNC paths (Low)

PR-URL: https://github.com/nodejs-private/node-private/pull/608
2024-07-08 14:20:06 -03:00
RafaelGSS
4324e11935 2024-07-08, Version 18.20.4 'Hydrogen' (LTS)
This is a security release.

Notable changes:

* CVE-2024-36138 - Bypass incomplete fix of CVE-2024-27980 (High)
* CVE-2024-22020 - Bypass network import restriction via data URL (Medium)

PR-URL: https://github.com/nodejs-private/node-private/pull/609
2024-07-08 14:19:11 -03:00
Natalia Venditto
a1869fa87e
http: expose websockets
PR-URL: https://github.com/nodejs/node/pull/53721
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: James M Snell <jasnell@gmail.com>
2024-07-08 15:55:43 +00:00
Antoine du Hamel
daea065f24
tls: remove prototype primordials
Co-authored-by: Yagiz Nizipli <yagiz@nizipli.com>
PR-URL: https://github.com/nodejs/node/pull/53699
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: James M Snell <jasnell@gmail.com>
2024-07-07 00:56:04 +00:00
Aviv Keller
c86ecfa94a
cli: update node.1 to reflect Atom's sunset
PR-URL: https://github.com/nodejs/node/pull/53734
Refs: https://github.blog/2022-06-08-sunsetting-atom/
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2024-07-06 21:27:55 +00:00
Rafael Gonzaga
bea91db2c1
doc: mention v8.setFlagsFromString to pm
PR-URL: https://github.com/nodejs/node/pull/53731
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2024-07-06 19:01:35 +00:00
Claudio W
ea711876ca
doc: remove the last <pre> tag
PR-URL: https://github.com/nodejs/node/pull/53741
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
2024-07-06 11:06:46 +00:00
Antoine du Hamel
cbd2c387ce
http: remove prototype primordials
Co-authored-by: Yagiz Nizipli <yagiz@nizipli.com>
PR-URL: https://github.com/nodejs/node/pull/53698
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
2024-07-06 10:33:16 +02:00
Michael Dawson
dca7bc5b10
doc: exclude voting and regular TSC from spotlight
Signed-off-by: Michael Dawson <midawson@redhat.com>
PR-URL: https://github.com/nodejs/node/pull/53694
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Ruy Adorno <ruy@vlt.sh>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
2024-07-05 14:52:17 +00:00
Michaël Zasso
3f86bdd34e
doc: fix releases guide for recent Git versions
PR-URL: https://github.com/nodejs/node/pull/53709
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Beth Griggs <bethanyngriggs@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2024-07-05 11:36:00 +00:00
Antoine du Hamel
88beb76e5c
http2: remove prototype primordials
Co-authored-by: Yagiz Nizipli <yagiz@nizipli.com>
PR-URL: https://github.com/nodejs/node/pull/53696
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
2024-07-05 06:20:12 +00:00
Yagiz Nizipli
5a775b3b9e
url: add missing documentation for URL.parse()
PR-URL: https://github.com/nodejs/node/pull/53733
Reviewed-By: Matthew Aitken <maitken033380023@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2024-07-05 02:51:03 +00:00
Alfredo González
ba3aedc208
doc: require node:process in assert doc examples
PR-URL: https://github.com/nodejs/node/pull/53702
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
2024-07-04 19:49:38 +00:00
jakecastelli
7622dd8c3d
doc: add additional explanation to the wildcard section in permissions
Co-authored-by: Rafael Gonzaga <rafael.nunu@hotmail.com>
PR-URL: https://github.com/nodejs/node/pull/53664
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
2024-07-04 17:30:07 +00:00
Michaël Zasso
66b76e24e2
doc: mark NODE_MODULE_VERSION for Node.js 22.0.0
PR-URL: https://github.com/nodejs/node/pull/53650
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
2024-07-02 09:08:03 +00:00
Michaël Zasso
056f055f38
2024-07-02, Version 22.4.0 (Current)
Notable changes:

deps,lib,src:
  * (SEMVER-MINOR) add experimental web storage (Colin Ihrig) https://github.com/nodejs/node/pull/52435
doc:
  * move `node --run` stability to rc (Yagiz Nizipli) https://github.com/nodejs/node/pull/53433
  * mark WebSocket as stable (Matthew Aitken) https://github.com/nodejs/node/pull/53352
  * mark --heap-prof and related flags stable (Joyee Cheung) https://github.com/nodejs/node/pull/53343
  * mark --cpu-prof and related flags stable (Joyee Cheung) https://github.com/nodejs/node/pull/53343
  * doc-only deprecate OpenSSL engine-based APIs (Richard Lau) https://github.com/nodejs/node/pull/53329
inspector:
  * fix disable async hooks on Debugger.setAsyncCallStackDepth (Joyee Cheung) https://github.com/nodejs/node/pull/53473
lib:
  * (SEMVER-MINOR) add diagnostics_channel events to module loading (RafaelGSS) https://github.com/nodejs/node/pull/44340
util:
  * (SEMVER-MINOR) support `--no-` for argument with boolean type for parseArgs (Zhenwei Jin) https://github.com/nodejs/node/pull/53107

PR-URL: https://github.com/nodejs/node/pull/53583
2024-07-02 10:50:11 +02:00
Vinicius Lourenço
6671f7ef6f
doc: include node.module_timer on available categories
PR-URL: https://github.com/nodejs/node/pull/53638
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2024-07-01 15:18:16 +00:00
Elliot Goodrich
dda30f972a
doc: fix module customization hook examples
When running these examples, `node` fails to return as this
`MessagePort` keeps the event loop active in the main thread unless
it is `unref()`ed.

Fixes: https://github.com/nodejs/node/issues/52846
PR-URL: https://github.com/nodejs/node/pull/53637
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
2024-07-01 13:34:35 +00:00
Emil Tayeb
2e5fc8aa1a
doc: fix doc for correct usage with plan & TestContext
Fixed section in the doc that describes a test that uses the ⁠plan
feature in the test-runner.
However, the test in this example fails.
The fix use  (Textcontext) and reduce the plan number
to 1 since we have 1 assertion.

PR-URL: https://github.com/nodejs/node/pull/53615
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
2024-06-29 19:20:35 +00:00
Michael Dawson
d4a40fd1f7
doc: remove some news issues that are no longer
Signed-off-by: Michael Dawson <midawson@redhat.com>
PR-URL: https://github.com/nodejs/node/pull/53608
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2024-06-29 16:22:17 +00:00
Michael Dawson
4fb9e3621e
doc: add issue for news from ambassadors
Signed-off-by: Michael Dawson <midawson@redhat.com>
PR-URL: https://github.com/nodejs/node/pull/53607
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2024-06-29 16:22:09 +00:00
Leonardo Peixoto
b291605194
doc: add esm example for os
PR-URL: https://github.com/nodejs/node/pull/53604
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io>
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2024-06-29 13:57:49 +00:00
Filip Skokan
d65b17082b
crypto: make deriveBits length parameter optional and nullable
PR-URL: https://github.com/nodejs/node/pull/53601
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2024-06-28 22:21:29 +00:00
jakecastelli
f5ed3386fd
timers: emit warning if delay is negative or NaN
Emit process warning once per process when delay is a negative number or
not a number, this will prevent unexpected behaviour caused by invalid
`delay` also keep the consistency of the behaviour and warning message
for `TIMEOUT_MAX` number As the negative number is invalid delay will be
set to 1.

PR-URL: https://github.com/nodejs/node/pull/46678
Reviewed-By: Debadree Chatterjee <debadree333@gmail.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2024-06-28 11:36:31 +00:00
Cristian Barlutiu
764b13d75c assert,util: change WeakMap and WeakSet comparison handling
PR-URL: https://github.com/nodejs/node/pull/53495
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
2024-06-28 07:28:55 +00:00
René
9cd9aa8dfd
doc, typings: events.once accepts symbol event type
PR-URL: https://github.com/nodejs/node/pull/53542
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2024-06-27 21:56:25 +00:00
Benjamin Gruenbaum
27f1306ee1
meta: warnings bypass deprecation cycle
Allow for emitting new warnings without going through a deprecation
cycle.

Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/53513
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
2024-06-27 10:01:23 +00:00
Eliphaz Bouye
aecc556f69
doc: clarify usage of coverage reporters
PR-URL: https://github.com/nodejs/node/pull/53523
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
2024-06-26 19:10:23 +00:00
Aviv Keller
0e70d0b6ee
doc: document addition testing options
PR-URL: https://github.com/nodejs/node/pull/53569
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
2024-06-26 12:05:14 +00:00
Tobias Nießen
feaa0c7088
doc: clarify that fs.exists() may return false for existing symlink
Given that this API is problematic in any case, we should be precise
about its (perhaps surprising) behavior.

PR-URL: https://github.com/nodejs/node/pull/53566
Reviewed-By: Jithil P Ponnan <jithil@outlook.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
2024-06-26 09:38:30 +00:00
Rob Hogan
d7d9278442
doc: note http.closeAllConnections excludes upgraded sockets
PR-URL: https://github.com/nodejs/node/pull/53560
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
2024-06-25 10:32:47 +00:00
Michael Dawson
eb54c54bf5 doc: recommend not using libuv node-api function
- update documentation recommend not using the
  napi_get_uv_event_loop  function. It should not be
  need for most if not all uses cases now that the
  API is more complete.

Signed-off-by: Michael Dawson <midawson@redhat.com>
PR-URL: https://github.com/nodejs/node/pull/53521
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Gabriel Schulhof <gabrielschulhof@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
2024-06-24 15:29:21 -04:00
Aviv Keller
92a25abca9
path: add matchGlob method
PR-URL: https://github.com/nodejs/node/pull/52881
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2024-06-23 06:08:59 +00:00
Aviv Keller
69abdcd1bd
doc, meta: organize contributing to Node-API guide
PR-URL: https://github.com/nodejs/node/pull/53243
Reviewed-By: Gabriel Schulhof <gabrielschulhof@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2024-06-22 16:55:02 +00:00
RafaelGSS
fbdfe9399c lib: add diagnostics_channel events to module loading
This commit adds a tracing channel for module loading
through `import()` and `require()`.

Co-Authored-By: Stephen Belanger <admin@stephenbelanger.com>
PR-URL: https://github.com/nodejs/node/pull/44340
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
2024-06-20 21:25:04 -03:00
Marco Ippolito
167ef1a621
2024-06-20, Version 20.15.0 'Iron' (LTS)
Notable changes:

doc:
  * add pimterry to collaborators (Tim Perry) https://github.com/nodejs/node/pull/52874
inspector:
  * (SEMVER-MINOR) introduce the `--inspect-wait` flag (Kohei Ueno) https://github.com/nodejs/node/pull/52734
test_runner:
  * (SEMVER-MINOR) support test plans (Colin Ihrig) https://github.com/nodejs/node/pull/52860
tools:
  * (SEMVER-MINOR) fix get_asan_state() in tools/test.py (Joyee Cheung) https://github.com/nodejs/node/pull/52766
  * (SEMVER-MINOR) support max_virtual_memory test configuration (Joyee Cheung) https://github.com/nodejs/node/pull/52766
  * (SEMVER-MINOR) support != in test status files (Joyee Cheung) https://github.com/nodejs/node/pull/52766
zlib:
  * (SEMVER-MINOR) expose zlib.crc32() (Joyee Cheung) https://github.com/nodejs/node/pull/52692

PR-URL: https://github.com/nodejs/node/pull/53486
2024-06-20 17:55:41 +02:00
Michael Dawson
53e9106c4b doc: add additional guidance for PRs to deps
- add additional guidance based in discussion related
  to recent PR to dependency and discussion within the
  security-wg slack channel.

Refs: https://github.com/nodejs/security-wg/issues/1329

Signed-off-by: Michael Dawson <midawson@redhat.com>
PR-URL: https://github.com/nodejs/node/pull/53499
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
2024-06-20 11:50:40 -04:00
Jay Kim
b952ee1e12
stream: update outdated highwatermark doc
PR-URL: https://github.com/nodejs/node/pull/53494
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
2024-06-20 08:59:14 +00:00
Michaël Zasso
2eff28fb7a
tools: move ESLint to tools/eslint
Greatly simplify how ESLint and its plugins are installed.

PR-URL: https://github.com/nodejs/node/pull/53413
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2024-06-19 19:54:08 +00:00
Filip Skokan
67c19c2900
doc: only apply content-visibility on all.html
Refs: #40099
PR-URL: https://github.com/nodejs/node/pull/53510
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Claudio Wunder <cwunder@gnome.org>
2024-06-19 17:14:45 +00:00
Zhenwei Jin
4a72b2f927
util: support --no- for argument with boolean type for parseArgs
PR-URL: https://github.com/nodejs/node/pull/53107
Refs: https://github.com/nodejs/node/issues/53095
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2024-06-19 15:36:18 +00:00
Zhenwei Jin
a072ec382f
doc: update the description of the return type for options.filter
PR-URL: https://github.com/nodejs/node/pull/52742
Refs: https://github.com/nodejs/node/pull/52461
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2024-06-19 08:29:05 +00:00
Michaël Zasso
c93e256ee7
src: use args.This() instead of Holder
The latter is deprecated in V8.

Refs: http://crbug.com/333672197
PR-URL: https://github.com/nodejs/node/pull/53474
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
2024-06-18 16:02:42 +00:00
Aviv Keller
2333573f39
doc: remove first timer badge
PR-URL: https://github.com/nodejs/node/pull/53338
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Qingyu Deng <i@ayase-lab.com>
2024-06-17 09:40:27 +02:00
Benjamin Gruenbaum
75fe4f35d4
stream: support dispose in writable
Add support to Symbol.asyncDispose in writable streams.
Additionally add a test for writable, transform and duplex streams
who inherit from readable/writable to avoid breakage.

Co-authored-by: Robert Nagy <ronagy@icloud.com>
Co-authored-by: atlowChemi <chemi@atlow.co.il>
PR-URL: https://github.com/nodejs/node/pull/48547
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2024-06-15 23:41:59 +00:00
cjihrig
3d09e579d3 deps,lib,src: add experimental web storage
This commit introduces an experimental implementation of the Web
Storage API using SQLite as the backing data store.

PR-URL: https://github.com/nodejs/node/pull/52435
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev>
2024-06-14 18:40:04 +00:00
Yagiz Nizipli
340cb6887d
doc: move node --run stability to rc
PR-URL: https://github.com/nodejs/node/pull/53433
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Xuguang Mei <meixuguang@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
2024-06-14 15:42:12 +00:00
Marco Ippolito
b5aae52c71
Revert "util: move util._extend to eol"
This reverts commit ac97a532f5.

PR-URL: https://github.com/nodejs/node/pull/53429
Refs: https://github.com/tape-testing/tape/issues/607
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: James M Snell <jasnell@gmail.com>
2024-06-14 13:07:58 +00:00
Christian Bates-White
ee8e84144a
doc: add Buffer.from(string) to functions that use buffer pool
Buffer.from(string) is one of the functions that may use the
pre-allocated buffer. It's mentioned in the description of
Buffer.from(array), but not in Buffer.from(string), or in the two other
places where functions that behave this way are listed, so this commit
adds those references.

PR-URL: https://github.com/nodejs/node/pull/52801
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
Reviewed-By: James M Snell <jasnell@gmail.com>
2024-06-14 12:27:01 +00:00
jakecastelli
922feb1ff5
stream: pipe to a closed or destroyed stream is not allowed in pipeline
PR-URL: https://github.com/nodejs/node/pull/53241
Fixes: https://github.com/nodejs/node/issues/52622
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2024-06-14 08:27:56 +00:00
Michael Dawson
756b397771 doc: add initial text for ambassadors program
Signed-off-by: Michael Dawson <midawson@redhat.com>
PR-URL: https://github.com/nodejs/node/pull/52857
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2024-06-13 09:53:08 -04:00
RafaelGSS
d6c77ded0f 2024-06-11, Version 22.3.0 (Current)
Notable changes:

buffer:
  * (SEMVER-MINOR) add .bytes() method to Blob (Matthew Aitken) https://github.com/nodejs/node/pull/53221
cli:
  * (SEMVER-MINOR) add `NODE_RUN_PACKAGE_JSON_PATH` env (Yagiz Nizipli) https://github.com/nodejs/node/pull/53058
  * (SEMVER-MINOR) add `NODE_RUN_SCRIPT_NAME` env to `node --run` (Yagiz Nizipli) https://github.com/nodejs/node/pull/53032
doc:
  * (SEMVER-MINOR) add context.assert docs (Colin Ihrig) https://github.com/nodejs/node/pull/53169
  * (SEMVER-MINOR) improve explanation about built-in modules (Joyee Cheung) https://github.com/nodejs/node/pull/52762
  * add StefanStojanovic to collaborators (StefanStojanovic) https://github.com/nodejs/node/pull/53118
  * add Marco Ippolito to TSC (Rafael Gonzaga) https://github.com/nodejs/node/pull/53008
fs:
  * mark recursive cp methods as stable (Théo LUDWIG) https://github.com/nodejs/node/pull/53127
lib:
  * (SEMVER-MINOR) add EventSource Client (Aras Abbasi) https://github.com/nodejs/node/pull/51575
  * (SEMVER-MINOR) replace MessageEvent with undici's (Matthew Aitken) https://github.com/nodejs/node/pull/52370
module:
  * (SEMVER-MINOR) print amount of load time of a cjs module (Vinicius Lourenço) https://github.com/nodejs/node/pull/52213
net:
  * (SEMVER-MINOR) add new net.server.listen tracing channel (Paolo Insogna) https://github.com/nodejs/node/pull/53136
process:
  * (SEMVER-MINOR) add process.getBuiltinModule(id) (Joyee Cheung) https://github.com/nodejs/node/pull/52762
src:
  * (SEMVER-MINOR) traverse parent folders while running `--run` (Yagiz Nizipli) https://github.com/nodejs/node/pull/53154
src,permission:
  * (SEMVER-MINOR) --allow-wasi & prevent WASI exec (Rafael Gonzaga) https://github.com/nodejs/node/pull/53124
test_runner:
  * (SEMVER-MINOR) add snapshot testing (Colin Ihrig) https://github.com/nodejs/node/pull/53169
  * (SEMVER-MINOR) add context.fullName (Colin Ihrig) https://github.com/nodejs/node/pull/53169
  * (SEMVER-MINOR) support module mocking (Colin Ihrig) https://github.com/nodejs/node/pull/52848

PR-URL: https://github.com/nodejs/node/pull/53379
2024-06-11 15:50:45 -03:00
jakecastelli
521c9c6df7
doc, http: add rejectNonStandardBodyWrites option, clear its behaviour
PR-URL: https://github.com/nodejs/node/pull/53396
Fixes: https://github.com/nodejs/node/issues/53035
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2024-06-11 16:39:17 +00:00
Michaël Zasso
94c8178442
tools: move ESLint tools to tools/eslint
With ESLint flat config, we don't need a hack with `node_modules`
anymore to load ESLint plugins.
This commit moves the node-core plugin out of `tools/node_modules` and
creates a new `tools/eslint` directory to store ESLint tools.

PR-URL: https://github.com/nodejs/node/pull/53393
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
2024-06-11 06:58:51 +00:00
EhsanKhaki
3a7d8c8e9f
doc: fix typo
PR-URL: https://github.com/nodejs/node/pull/53397
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
2024-06-10 22:34:38 +00:00
Aviv Keller
0b020089d9
doc: define more cases for stream event emissions
PR-URL: https://github.com/nodejs/node/pull/53317
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2024-06-08 15:52:46 +00:00
Aviv Keller
d6921500cc
doc: remove mentions of policy model from security info
PR-URL: https://github.com/nodejs/node/pull/53249
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2024-06-08 00:39:52 +00:00
István Donkó
390740460e
doc: fix mistakes in the module load hook api
PR-URL: https://github.com/nodejs/node/pull/53349
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2024-06-07 22:03:07 +00:00
Yagiz Nizipli
5731e2b346
src: traverse parent folders while running --run
PR-URL: https://github.com/nodejs/node/pull/53154
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Daniel Lemire <daniel@lemire.me>
Reviewed-By: James M Snell <jasnell@gmail.com>
2024-06-07 21:20:52 +00:00
Khafra
6ed93b4d69
lib: expose global CloseEvent
This PR adds `CloseEvent` as a global, which can be disabled
via the --no-experimental-websocket flag.

```js
const ws = new WebSocket('...')

ws.addEventListener('close', (event) => {
  assert(event instanceof CloseEvent)
})

```

Fixes: https://github.com/nodejs/node/issues/50275
PR-URL: https://github.com/nodejs/node/pull/53355
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
2024-06-07 17:54:28 +00:00
Khafra
0289e859ef
doc: mark WebSocket as stable
PR-URL: https://github.com/nodejs/node/pull/53352
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2024-06-07 17:24:56 +00:00
Richard Lau
5291b0e1e6
doc: doc-only deprecate OpenSSL engine-based APIs
OpenSSL 3 deprecated support for custom engines with a recommendation
to switch to its new provider model.

PR-URL: https://github.com/nodejs/node/pull/53329
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2024-06-07 16:10:47 +00:00
Joyee Cheung
673511f3bf doc: mark --heap-prof and related flags stable
PR-URL: https://github.com/nodejs/node/pull/53343
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Ruy Adorno <ruy@vlt.sh>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
2024-06-07 13:48:28 +00:00
Joyee Cheung
206027b2de doc: mark --cpu-prof and related flags stable
PR-URL: https://github.com/nodejs/node/pull/53343
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Ruy Adorno <ruy@vlt.sh>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
2024-06-07 13:48:27 +00:00
Tobias Nießen
1945072ab7
doc: remove IRC from man page
PR-URL: https://github.com/nodejs/node/pull/53344
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2024-06-07 13:40:10 +00:00
Richard Lau
747ee0913c
doc: fix broken link in static-analysis.md
Fix broken link in `doc/contributing/static-analysis.md`.
Add a link to the main Node.js Coverity Scan project page.

PR-URL: https://github.com/nodejs/node/pull/53345
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2024-06-07 11:55:16 +00:00
Maarten Zuidhoorn
7f46227bb3
doc: remove cases for keys not containing "*" in PATTERN_KEY_COMPARE
PR-URL: https://github.com/nodejs/node/pull/53215
Fixes: https://github.com/nodejs/node/issues/53206
Refs: https://github.com/nodejs/node/pull/40121
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Guy Bedford <guybedford@gmail.com>
2024-06-05 11:20:26 +00:00
Juan José
b26a260ce5
cli: add --expose-gc flag available to NODE_OPTIONS
This commits allows users to send `--expose-gc` via `NODE_OPTIONS`
environment variable.

Using `node --expose-gc` is possible but via `NODE_OPTIONS` won't
work.

```sh
NODE_OPTIONS='--expose-gc' node
node: --expose-gc is not allowed in NODE_OPTIONS
```

Signed-off-by: Juan José Arboleda <soyjuanarbol@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/53078
Reviewed-By: Tierney Cyren <hello@bnb.im>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2024-06-04 17:07:29 +00:00
Feng Yu
eae75fe635 doc: add err param to fs.cp callback
PR-URL: https://github.com/nodejs/node/pull/53234
Reviewed-By: LiviaMedeiros <livia@cirno.name>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2024-06-03 22:51:17 +00:00
Feng Yu
f3c714b223 doc: add err param to fs.copyFile callback
PR-URL: https://github.com/nodejs/node/pull/53234
Reviewed-By: LiviaMedeiros <livia@cirno.name>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2024-06-03 22:51:16 +00:00
Rafael Gonzaga
3ab0499d43
src,permission: --allow-wasi & prevent WASI exec
PR-URL: https://github.com/nodejs/node/pull/53124
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2024-06-01 13:13:12 +00:00
Keeley Hammond
88d0701e57
doc: reserve 128 for Electron 32
PR-URL: https://github.com/nodejs/node/pull/53203
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
2024-05-31 17:17:07 +00:00
jakecastelli
47c55713ae
doc: add note to ninjia build for macOS using -jn flag
PR-URL: https://github.com/nodejs/node/pull/53187
Fixes: https://github.com/nodejs/node/issues/53176
Refs: https://github.com/nodejs/node/issues/53176
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2024-05-30 16:21:56 +00:00
cjihrig
9f6c12413c
test_runner: add snapshot testing
This commit adds a t.assert.snapshot() method that implements
snapshot testing. Serialization uses JSON.stringify() by default,
but users can configure the serialization to meet their needs.

PR-URL: https://github.com/nodejs/node/pull/53169
Fixes: https://github.com/nodejs/node/issues/48260
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
2024-05-30 09:07:17 -04:00
cjihrig
851dcddb57
doc: add context.assert docs
When context.assert was added, no docs were added. This commit
adds initial documentation for context.assert because the
snapshot() function requires them.

PR-URL: https://github.com/nodejs/node/pull/53169
Refs: https://github.com/nodejs/node/pull/52860
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
2024-05-30 09:07:17 -04:00
cjihrig
90e81aaad7
test_runner: add context.fullName
This commit adds a fullName getter to the TestContext and
SuiteContext classes. This is similar to the existing name getter,
but also includes the name of all ancestor tests/suites.

PR-URL: https://github.com/nodejs/node/pull/53169
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Co-authored-by: Jacob Smith <jacob@frende.me>
2024-05-30 09:07:17 -04:00