atlowChemi
780d030bdf
test_runner: use internal addAbortListener
...
PR-URL: https://github.com/nodejs/node/pull/52081
Refs: https://github.com/nodejs/node/pull/48596
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2024-03-16 09:08:59 +00:00
atlowChemi
a9528e87b9
stream: use internal addAbortListener
...
PR-URL: https://github.com/nodejs/node/pull/52081
Refs: https://github.com/nodejs/node/pull/48596
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2024-03-16 09:08:59 +00:00
atlowChemi
b9d8a14a03
http2: use internal addAbortListener
...
PR-URL: https://github.com/nodejs/node/pull/52081
Refs: https://github.com/nodejs/node/pull/48596
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2024-03-16 09:08:58 +00:00
atlowChemi
ff93f3e1a8
readline: use internal addAbortListener
...
PR-URL: https://github.com/nodejs/node/pull/52081
Refs: https://github.com/nodejs/node/pull/48596
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2024-03-16 09:08:57 +00:00
atlowChemi
d89fc73d45
net: use internal addAbortListener
...
PR-URL: https://github.com/nodejs/node/pull/52081
Refs: https://github.com/nodejs/node/pull/48596
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2024-03-16 09:08:57 +00:00
atlowChemi
8362caa7d8
dgram: use internal addAbortListener
...
PR-URL: https://github.com/nodejs/node/pull/52081
Refs: https://github.com/nodejs/node/pull/48596
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2024-03-16 09:08:56 +00:00
atlowChemi
562369f348
child_process: use internal addAbortListener
...
PR-URL: https://github.com/nodejs/node/pull/52081
Refs: https://github.com/nodejs/node/pull/48596
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2024-03-16 09:08:56 +00:00
atlowChemi
e263946c2e
events: extract addAbortListener for safe internal use
...
Refs: https://github.com/nodejs/node/pull/48596
PR-URL: https://github.com/nodejs/node/pull/52081
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2024-03-16 09:08:55 +00:00
Neal Beeken
40ef2da8d6
events: remove abort listener from signal in on
...
the `abortHandler` function is declared within the scope of
the `events.on` function so cannot be removed by the caller
which can lead to a memory leak
adding the abort listener using the `addAbortListener` helper
returns a disposable that can be used to clean up the listener
when the iterator is exited
Fixes: https://github.com/nodejs/node/issues/51010
PR-URL: https://github.com/nodejs/node/pull/51091
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2024-03-15 15:10:59 +00:00
Moshe Atlow
4f68c7c1c9
watch: mark as stable
...
PR-URL: https://github.com/nodejs/node/pull/52074
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io >
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
Reviewed-By: Michael Dawson <midawson@redhat.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2024-03-15 13:09:48 +00:00
Marco Ippolito
9a1e01c4ce
util: support array of formats in util.styleText
...
PR-URL: https://github.com/nodejs/node/pull/52040
Fixes: https://github.com/nodejs/node/issues/52035
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
Reviewed-By: Paolo Insogna <paolo@cowtech.it >
2024-03-15 10:42:21 +00:00
Moshe Atlow
814fa1ae74
test_runner: use source maps when reporting coverage
...
PR-URL: https://github.com/nodejs/node/pull/52060
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
2024-03-15 06:33:42 +00:00
theanarkh
20525f14b9
lib: fix listen with handle in cluster worker
...
PR-URL: https://github.com/nodejs/node/pull/52056
Reviewed-By: Paolo Insogna <paolo@cowtech.it >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2024-03-14 14:54:31 +00:00
Yagiz Nizipli
639c096004
fs: validate fd from cpp on fchown
...
PR-URL: https://github.com/nodejs/node/pull/52051
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br >
Reviewed-By: Paolo Insogna <paolo@cowtech.it >
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com >
2024-03-14 02:01:26 +00:00
Yagiz Nizipli
9ac1fe05d7
fs: validate fd from cpp on close
...
PR-URL: https://github.com/nodejs/node/pull/52051
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br >
Reviewed-By: Paolo Insogna <paolo@cowtech.it >
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com >
2024-03-14 02:01:25 +00:00
Yagiz Nizipli
3ec20f25df
fs: validate file mode from cpp
...
PR-URL: https://github.com/nodejs/node/pull/52050
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br >
Reviewed-By: Daniel Lemire <daniel@lemire.me >
Reviewed-By: Paolo Insogna <paolo@cowtech.it >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2024-03-14 01:22:55 +00:00
Robert Nagy
1abff07392
stream: bump default highWaterMark
...
This should give a performance boost accross the board.
Given that the old limit is a decod old and memory capacity has
doubled many times since I think it is appropriate to slightly bump
the default limit.
PR-URL: https://github.com/nodejs/node/pull/52037
Refs: https://github.com/nodejs/node/pull/46608
Refs: https://github.com/nodejs/node/pull/50120
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2024-03-13 19:02:14 +00:00
Colin Ihrig
84de97a61e
test_runner: support forced exit
...
This commit updates the test runner to allow a forced exit once
all known tests have finished running.
Fixes: https://github.com/nodejs/node/issues/49925
PR-URL: https://github.com/nodejs/node/pull/52038
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
Reviewed-By: Raz Luvaton <rluvaton@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2024-03-13 10:49:15 +00:00
theanarkh
78be0d0f1c
src: add uv_get_available_memory to report and process
...
PR-URL: https://github.com/nodejs/node/pull/52023
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
2024-03-13 04:06:49 +00:00
Colin Ihrig
3c5764a0e2
test_runner: handle undefined test locations
...
This commit updates the built in reporters to check for the
documented case of a test's location being undefined.
As a drive by fix, the C++ code for computing the test location
now returns undefined if the script location is empty. This lets
tests run inside of eval().
PR-URL: https://github.com/nodejs/node/pull/52036
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
2024-03-12 18:16:28 +00:00
Marco Ippolito
de0602d190
crypto: runtime deprecate Hash constructor
...
PR-URL: https://github.com/nodejs/node/pull/51880
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io >
Reviewed-By: Filip Skokan <panva.ip@gmail.com >
Reviewed-By: Paolo Insogna <paolo@cowtech.it >
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
2024-03-12 07:58:03 +00:00
Joyee Cheung
bec9b5fccc
src: use dedicated routine to compile function for builtin CJS loader
...
So that we can use it to handle code caching in a central place.
Drive-by: use per-isolate persistent strings for the parameters
and mark GetHostDefinedOptions() since it's only used in one
compilation unit
PR-URL: https://github.com/nodejs/node/pull/52016
Refs: https://github.com/nodejs/node/issues/47472
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com >
2024-03-11 19:18:53 +00:00
cjihrig
328642bbb9
test_runner: use paths for test locations
...
This commit transforms test locations to paths when V8 provides
file URLs (which seems to be for ESM files).
Fixes: https://github.com/nodejs/node/issues/51610
PR-URL: https://github.com/nodejs/node/pull/52010
Fixes: https://github.com/nodejs/node/issues/51392
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
2024-03-11 08:56:16 +00:00
cjihrig
6d625fe616
test_runner: support source mapped test locations
...
This commit adds support for source mapping test locations
when the --enable-source-maps flag is present.
Fixes: https://github.com/nodejs/node/issues/51392
PR-URL: https://github.com/nodejs/node/pull/52010
Fixes: https://github.com/nodejs/node/issues/51610
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
2024-03-11 08:56:16 +00:00
Colin Ihrig
592c6907bf
test_runner: avoid overwriting root start time
...
This commit ensures the root test start time is not overwritten
when top level before()/after() hooks are run.
PR-URL: https://github.com/nodejs/node/pull/52020
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
2024-03-11 03:18:07 +00:00
Joyee Cheung
575ced8139
module: print location of unsettled top-level await in entry points
...
When the entry point is a module and the graph it imports still
contains unsettled top-level await when the Node.js instance
finishes the event loop, search from the entry point module
for unsettled top-level await and print their location.
To avoid unnecessary overhead, we register a promise that only
gets settled when the entry point graph evaluation returns
from await, and only search the module graph if it's still
unsettled by the time the instance is exiting.
This patch only handles this for entry point modules. Other kinds of
modules are more complicated so will be left for the future.
Drive-by: update the terminology "unfinished promise" to the
more correct one "unsettled promise" in the codebase.
PR-URL: https://github.com/nodejs/node/pull/51999
Fixes: https://github.com/nodejs/node/issues/42868
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com >
2024-03-10 08:21:22 +08:00
Joyee Cheung
075c95f61f
module: refactor ESM loader initialization and entry point handling
...
Split the `internal/process/esm_loader` file which contains the
singleton cascaded loader:
- The the singleton cascaded loader now directly resides in
`internal/modules/esm/loader`, where the constructor also lives.
This file is the root of most circular dependency of ESM code,
(because components of the loader need the singleton itself),
so this makes the dependency more obvious. Added comments about
loading it lazily to avoid circular dependency.
- The getter to the cascaded loader is also turned into a method
to make the side effect explicit.
- The sequence of `loadESM()` and `handleMainPromise` is now merged
together into `runEntryPointWithESMLoader()` in
`internal/modules/run_main` because this is intended to run entry
points with the ESM loader and not just any module.
- Documents how top-level await is handled.
PR-URL: https://github.com/nodejs/node/pull/51999
Fixes: https://github.com/nodejs/node/issues/42868
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com >
2024-03-10 08:21:18 +08:00
Moshe Atlow and Matthieu
257f32296d
watch: batch file restarts
...
Co-authored-by: Matthieu <matthieusieben@users.noreply.github.com >
PR-URL: https://github.com/nodejs/node/pull/51992
Reviewed-By: Nitzan Uziely <linkgoron@gmail.com >
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2024-03-09 21:55:09 +00:00
Colin Ihrig
29b231763e
test_runner: abort unfinished tests on async error
...
This commit updates the test runner's uncaughtException handler
to abort tests instead of assuming they finished running.
Fixes: https://github.com/nodejs/node/issues/51381
PR-URL: https://github.com/nodejs/node/pull/51996
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2024-03-09 21:30:02 +00:00
Moshe Atlow
5d13419dbd
test_runner: run before hook immediately if test started
...
PR-URL: https://github.com/nodejs/node/pull/52003
Reviewed-By: Raz Luvaton <rluvaton@gmail.com >
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2024-03-09 13:19:08 +00:00
Matteo Collina
cb85073709
stream: do not defer construction by one microtick
...
Fixes: https://github.com/nodejs/node/issues/51993
PR-URL: https://github.com/nodejs/node/pull/52005
Reviewed-By: Robert Nagy <ronagy@icloud.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2024-03-08 14:35:30 +01:00
cjihrig
0e8070d4f2
Revert "test_runner: do not invoke after hook when test is empty"
...
This reverts commit a53fd95d36 .
This caused a regression because the original issue this commit
was attempting to fix is not a bug. The after() hook should
always run.
Fixes: https://github.com/nodejs/node/issues/51997
PR-URL: https://github.com/nodejs/node/pull/51998
Reviewed-By: Matthew Aitken <maitken033380023@gmail.com >
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2024-03-07 09:16:36 +00:00
Stephen Belanger
4f3cf4e89a
diagnostics_channel: early-exit tracing channel trace methods
...
PR-URL: https://github.com/nodejs/node/pull/51915
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io >
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
2024-03-07 03:03:32 +00:00
Cheng Zhao
b34512e38e
src: preload function for Environment
...
This PR adds a |preload| arg to the node::LoadEnvironment to allow
embedders to set a preload function for the environment, which will run
after the environment is loaded and before the main script runs.
This is similiar to the --require CLI option, but runs a C++ function,
and can only be set by embedders.
The preload function can be used by embedders to inject scripts before
running the main script, for example:
1. In Electron it is used to initialize the ASAR virtual filesystem,
inject custom process properties, etc.
2. In VS Code it can be used to reset the module search paths for
extensions.
PR-URL: https://github.com/nodejs/node/pull/51539
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io >
2024-03-04 02:41:18 +00:00
Moshe Atlow
151d365ad1
fs: expose glob and globSync
...
PR-URL: https://github.com/nodejs/node/pull/51912
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
Reviewed-By: Nitzan Uziely <linkgoron@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2024-03-03 23:15:35 +00:00
theanarkh
29ec7e9331
lib: make sure close net server
...
PR-URL: https://github.com/nodejs/node/pull/51929
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io >
Reviewed-By: Paolo Insogna <paolo@cowtech.it >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
2024-03-03 10:29:15 +00:00
Joyee Cheung
7f2d61f82a
v8: implement v8.queryObjects() for memory leak regression testing
...
This is similar to the `queryObjects()` console API provided by the
Chromium DevTools console. It can be used to search for objects that
have the matching constructor on its prototype chain in the entire
heap, which can be useful for memory leak regression tests. To avoid
surprising results, users should avoid using this API on constructors
whose implementation they don't control, or on constructors that can
be invoked by other parties in the application.
To avoid accidental leaks, this API does not return raw references to
the objects found. By default, it returns the count of the objects
found. If `options.format` is `'summary'`, it returns an array
containing brief string representations for each object. The visibility
provided in this API is similar to what the heap snapshot provides,
while users can save the cost of serialization and parsing and directly
filer the target objects during the search.
We have been using this API internally for the test suite, which
has been more stable than any other leak regression testing
strategies in the CI. With a public implementation we can now
use the public API instead.
PR-URL: https://github.com/nodejs/node/pull/51927
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com >
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br >
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de >
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
2024-03-02 22:11:30 +00:00
Malthe Borch
8451990668
test_runner: add support for null and date value output
...
PR-URL: https://github.com/nodejs/node/pull/51920
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2024-03-02 08:48:26 +00:00
Ethan Arrowood and Joyee Cheung
009665fb56
report: add --report-exclude-network option
...
New option `--report-exclude-network`, also available as
`report.excludeNetwork`, enables the user to exclude
networking interfaces in their diagnostic report.
On some systems, this can cause the report to take minutes
to generate so this option can be used to optimize that.
Fixes: https://github.com/nodejs/node/issues/46060
PR-URL: https://github.com/nodejs/node/pull/51645
Co-authored-by: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
2024-03-01 21:50:04 +00:00
theanarkh
d405a606ab
lib: return directly if udp socket close before lookup
...
PR-URL: https://github.com/nodejs/node/pull/51914
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Paolo Insogna <paolo@cowtech.it >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2024-03-01 19:09:07 +00:00
Michał Drobniak
00dc6d9d97
test_runner: improve --test-name-pattern to allow matching single test
...
Try to match a test by name prefixed with all its ancestors
to ensure uniqueness of the name
Fixes: https://github.com/nodejs/node/issues/46728
PR-URL: https://github.com/nodejs/node/pull/51577
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2024-03-01 12:58:11 +00:00
Moshe Atlow
aac5ad901d
test_runner: add test:complete event to reflect execution order
...
PR-URL: https://github.com/nodejs/node/pull/51909
Fixes: https://github.com/nodejs/node/issues/51907
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2024-03-01 10:08:09 +00:00
Anna Henningsen
40565e90b4
lib: account for cwd access from snapshot serialization cb
...
Functions registered with `addSerializeCallback()` can access and call
`process.cwd()`. b7d836e2c7 accounted for the fact that it is
necessary to reset the cwd cache after the snapshot builder script has
run, but did not account for possible accesses from serialization
callbacks. To properly account for these, add a deserialization
callback as well.
As a related drive-by fix, also mention the execution order of
callbacks in the documentation.
Refs: https://github.com/nodejs/node/pull/49684
PR-URL: https://github.com/nodejs/node/pull/51901
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
2024-02-29 20:55:00 +00:00
theanarkh
f63e8b7fa7
lib: fix http client socket path
...
PR-URL: https://github.com/nodejs/node/pull/51900
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Paolo Insogna <paolo@cowtech.it >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2024-02-29 20:22:10 +00:00
Malthe Borch
3ef7117877
test_runner: serialize 'expected' and 'actual' in isolation
...
Previously, a value seen in 'actual' would be serialized as a circular
reference if it had also appeared in 'expected'.
PR-URL: https://github.com/nodejs/node/pull/51851
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
2024-02-29 08:05:59 +00:00
IlyasShabi
f4af4b111c
perf_hooks: performance milestone time origin timestamp improvement
...
PR-URL: https://github.com/nodejs/node/pull/51713
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br >
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
2024-02-28 16:52:30 +00:00
IlyasShabi
a51efa2bcf
stream: fix eventNames() to not return not defined events
...
PR-URL: https://github.com/nodejs/node/pull/51331
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2024-02-27 23:56:43 +00:00
theanarkh
292016c91e
net: fix connect crash when call destroy in lookup handler
...
PR-URL: https://github.com/nodejs/node/pull/51826
Fixes: https://github.com/nodejs/node/issues/50841
Reviewed-By: Paolo Insogna <paolo@cowtech.it >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Jiawen Geng <technicalcute@gmail.com >
2024-02-27 13:46:45 +00:00
Joyee Cheung
4c46439fe9
crypto: implement crypto.hash()
...
This patch introduces a helper crypto.hash() that computes
a digest from the input at one shot. This can be 1.2-1.6x faster
than the object-based createHash() for smaller inputs (<= 5MB)
that are readily available (not streamed) and incur less memory
overhead since no intermediate objects will be created.
PR-URL: https://github.com/nodejs/node/pull/51044
Refs: https://github.com/nodejs/performance/issues/136
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br >
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io >
2024-02-27 13:27:19 +01:00
Joyee Cheung
4cae1b987e
lib: move encodingsMap to internal/util
...
PR-URL: https://github.com/nodejs/node/pull/51044
Refs: https://github.com/nodejs/performance/issues/136
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br >
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io >
2024-02-27 13:27:18 +01:00