Commit Graph

10041 Commits

Author SHA1 Message Date
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