Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2022-05-30src: refactor GetCipherValue and related functionsTobias Nießen
Modernize and simplify GetCipherValue and its call sites. PR-URL: https://github.com/nodejs/node/pull/43171 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
2022-05-30src: make SecureContext fields privateTobias Nießen
These fields should not be public. Only ctx_ is used outside of the class itself, and should be accessed through the ctx() function instead. PR-URL: https://github.com/nodejs/node/pull/43173 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
2022-05-30net: add ability to reset a tcp socketpupilTong
Fixes: https://github.com/nodejs/node/issues/27428 PR-URL: https://github.com/nodejs/node/pull/43112 Reviewed-By: Paolo Insogna <paolo@cowtech.it> Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
2022-05-30src,lib: migrate to console on context's extra bindinglegendecas
Since `globalThis.console` is not an ECMAScript defined builtin, V8's globally installed `console` implementation is been moved to the context's extra binding object. We need to migrate to that one before the globally installed console object is removed in V8. PR-URL: https://github.com/nodejs/node/pull/43142 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
2022-05-30src: reuse GetServerNameTobias Nießen
PR-URL: https://github.com/nodejs/node/pull/43168 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2022-05-30worker: fix heap snapshot crash on exitChengzhong Wu
Worker.parent_port_ can be released before the exit event of Worker. The parent_port_ is not owned by `node::worker::Worker`, thus the reference to it is not always valid, and accessing it at exit crashes the process. As the Worker.parent_port_ is only used in the memory info tracking, it can be safely removed. PR-URL: https://github.com/nodejs/node/pull/43123 Fixes: https://github.com/nodejs/node/issues/43122 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
2022-05-30src: fix static analysis warning and use smart ptrTobias Nießen
Coverity issues a warning about `value_before_reset == ca`, where value_before_reset is a pointer that may not be valid. While comparing the pointer itself should still work, we should really be using smart pointers here so that this particular check can be simplified without running into a memory leak. Refactor SSL_CTX_get_issuer to return a smart pointer and update the call sites accordingly. Note that we might have to change that in the future once we improve error handling throughout crypto/tls. Refs: https://github.com/nodejs/node/pull/37990 PR-URL: https://github.com/nodejs/node/pull/43117 Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
2022-05-30doc: use ASCII apostrophes consistentlyTobias Nießen
PR-URL: https://github.com/nodejs/node/pull/43114 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
2022-05-30src: remove SecureContext::operator*Tobias Nießen
This rather mysterious operator is only used once and can easily be replaced with ssl_ctx(). PR-URL: https://github.com/nodejs/node/pull/43121 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com>
2022-05-30bootstrap: include code cache in the embedded snapshotJoyee Cheung
Since V8 code cache encodes indices to the read-only space it is safer to make sure that the code cache is generated in the same heap used to generate the embdded snapshot. This patch merges the code cache builder into the snapshot builder and makes the code cache part of node::SnapshotData that is deserialized into the native module loader during bootstrap. PR-URL: https://github.com/nodejs/node/pull/43023 Fixes: https://github.com/nodejs/node/issues/31074 Refs: https://github.com/nodejs/node/issues/35711 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2022-05-30src: move context snapshot index to SnapshotDataJoyee Cheung
Also added comments for the members of SnapshotData and renamed blob to v8_snapshot_blob_data for clarity. PR-URL: https://github.com/nodejs/node/pull/43023 Fixes: https://github.com/nodejs/node/issues/31074 Refs: https://github.com/nodejs/node/issues/35711 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2022-05-30src: replace TraceEventScope with sync eventslegendecas
According to the chrome trace event format document, works that are performed on one single thread should be traced with sync duration events. In this way, these events can be grouped under one thread and the trace event viewer can estimate the CPU usage of that thread. PR-URL: https://github.com/nodejs/node/pull/42977 Reviewed-By: Darshan Sen <raisinten@gmail.com>
2022-05-17Working on v18.2.1RafaelGSS
PR-URL: https://github.com/nodejs/node/pull/43036
2022-05-162022-05-17, Version 18.2.0 (Current)v18.2.0RafaelGSS
Notable changes: OpenSSL 3.0.3 This update can be treated as a security release as the issues addressed in OpenSSL 3.0.3 slightly affect Node.js 18. See https://nodejs.org/en/blog/vulnerability/openssl-fixes-in-regular-releases-may2022/ for more information on how the May 2022 OpenSSL releases affect other Node.js release lines. - deps: update archs files for quictls/openssl-3.0.3+quic (RafaelGSS) https://github.com/nodejs/node/pull/43022 - deps: upgrade openssl sources to quictls/openssl-3.0.3 (RafaelGSS) https://github.com/nodejs/node/pull/43022 Other notable changes: - _Revert_ "deps: add template for generated headers" (Daniel Bevenius) https://github.com/nodejs/node/pull/42978 - deps: update undici to 5.2.0 (Node.js GitHub Bot) https://github.com/nodejs/node/pull/43059 - deps: upgrade npm to 8.9.0 (npm team) https://github.com/nodejs/node/pull/42968 - (SEMVER-MINOR) fs: add `read(buffer[, options])` versions (LiviaMedeiros) https://github.com/nodejs/node/pull/42768 - (SEMVER-MINOR) http: added connection closing methods (Shogun) https://github.com/nodejs/node/pull/42812 - doc: add LiviaMedeiros to collaborators (LiviaMedeiros) https://github.com/nodejs/node/pull/43039 - doc: add release key for Juan Arboleda (Juan José) https://github.com/nodejs/node/pull/42961 - (SEMVER-MINOR) fs: add `read(buffer[, options])` versions (LiviaMedeiros) https://github.com/nodejs/node/pull/42768 - (SEMVER-MINOR) http: added connection closing methods (Paolo Insogna) https://github.com/nodejs/node/pull/42812 - (SEMVER-MINOR) perf_hooks: add PerformanceResourceTiming (RafaelGSS) https://github.com/nodejs/node/pull/42725 PR-URL: https://github.com/nodejs/node/pull/43036
2022-05-16node-api: explicitly set __cdecl for API functionsVladimir Morozov
PR-URL: https://github.com/nodejs/node/pull/42780 Reviewed-By: Michael Dawson <midawson@redhat.com>
2022-05-16src: delete AllocatedBufferDarshan Sen
Since all its uses are now gone, it's time to say goodbye to AllocatedBuffer. Refs: https://github.com/nodejs/node/pull/39941 Signed-off-by: Darshan Sen <raisinten@gmail.com> PR-URL: https://github.com/nodejs/node/pull/43008 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Zeyu "Alex" Yang <himself65@outlook.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
2022-05-16node-api: fix napi_get_all_property_namesVladimir Morozov
PR-URL: https://github.com/nodejs/node/pull/42463 Reviewed-By: Michael Dawson <midawson@redhat.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2022-05-16wasm: add missing init reported by coverityMichael Dawson
Signed-off-by: Michael Dawson <mdawson@devrus.com> PR-URL: https://github.com/nodejs/node/pull/42897 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Mestery <mestery@protonmail.com>
2022-05-10src: remove unnecessary commentKohei Ueno
PR-URL: https://github.com/nodejs/node/pull/42952 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2022-05-10src: always signal V8 for intercepted propertiesMichaël Zasso
Closes: https://github.com/nodejs/node/issues/42962 PR-URL: https://github.com/nodejs/node/pull/42963 Fixes: https://github.com/nodejs/node/issues/42962 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2022-05-10worker: fix stream racing with terminateKeyhan Vakil
`OnStreamAfterReqFinished` uses `v8::Object::Has` to check if it needs to call `oncomplete`. `v8::Object::Has` needs to execute Javascript. However when worker threads are involved, `OnStreamAfterReqFinished` may be called after the worker thread termination has begun via `worker.terminate()`. This makes `v8::Object::Has` return `Nothing`, which triggers an assert. This diff fixes the issue by simply defaulting us to `false` in the case where `Nothing` is returned. This is sound because we can't execute `oncomplete` anyway as the isolate is terminating. Fixes: https://github.com/nodejs/node/issues/38418 PR-URL: https://github.com/nodejs/node/pull/42874 Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2022-05-10build: fix various shared library build issuesWilliam Marlow
Node.js unofficially supports a shared library variant where the main node executable is a thin wrapper around node.dll/libnode.so. The key benefit of this is to support embedding Node.js in other applications. Since Node.js 12 there have been a number of issues preventing the shared library build from working correctly, primarily on Windows: * A number of functions used executables such as `mksnapshot` are not exported from `libnode.dll` using a `NODE_EXTERN` attribute * A dependency on the `Winmm` system library is missing * Incorrect defines on executable targets leads to `node.exe` claiming to export a number of functions that are actually in `libnode.dll` * Because `node.exe` attempts to export symbols, `node.lib` gets generated causing native extensions to try to link against `node.exe` not `libnode.dll`. * Similarly, because `node.dll` was renamed to `libnode.dll`, native extensions don't know to look for `libnode.lib` rather than `node.lib`. * On macOS an RPATH is added to find `libnode.dylib` relative to `node` in the same folder. This works fine from the `out/Release` folder but not from an installed prefix, where `node` will be in `bin/` and `libnode.dylib` will be in `lib/`. * Similarly on Linux, no RPATH is added so LD_LIBRARY_PATH needs setting correctly for `bin/node` to find `lib/libnode.so`. For the `libnode.lib` vs `node.lib` issue there are two possible options: 1. Ensure `node.lib` from `node.exe` does not get generated, and instead copy `libnode.lib` to `node.lib`. This means addons compiled when referencing the correct `node.lib` file will correctly depend on `libnode.dll`. The down side is that native addons compiled with stock Node.js will still try to resolve symbols against node.exe rather than libnode.dll. 2. After building `libnode.dll`, dump the exports using `dumpbin`, and process this to generate a `node.def` file to be linked into `node.exe` with the `/DEF:node.def` flag. The export entries in `node.def` will all read ``` my_symbol=libnode.my_symbol ``` so that `node.exe` will redirect all exported symbols back to `libnode.dll`. This has the benefit that addons compiled with stock Node.js will load correctly into `node.exe` from a shared library build, but means that every embedding executable also needs to perform this same trick. I went with the first option as it is the cleaner of the two solutions in my opinion. Projects wishing to generate a shared library variant of Node.js can now, for example, ``` .\vcbuild dll package vs ``` to generate a full node installation including `libnode.dll`, `Release\node.lib`, and all the necessary headers. Native addons can then be built against the shared library build easily by specifying the correct `nodedir` option. For example ``` >npx node-gyp configure --nodedir C:\Users\User\node\Release\node-v18.0.0-win-x64 ... >npx node-gyp build ... >dumpbin /dependents build\Release\binding.node Microsoft (R) COFF/PE Dumper Version 14.29.30136.0 Copyright (C) Microsoft Corporation. All rights reserved. Dump of file build\Release\binding.node File Type: DLL Image has the following dependencies: KERNEL32.dll libnode.dll VCRUNTIME140.dll api-ms-win-crt-string-l1-1-0.dll api-ms-win-crt-stdio-l1-1-0.dll api-ms-win-crt-runtime-l1-1-0.dll ... ``` PR-URL: https://github.com/nodejs/node/pull/41850 Reviewed-By: Michael Dawson <midawson@redhat.com> Reviewed-By: Beth Griggs <bgriggs@redhat.com> Reviewed-By: Richard Lau <rlau@redhat.com>
2022-05-10bootstrap: use a context snapshotted with primordials in workersJoyee Cheung
PR-URL: https://github.com/nodejs/node/pull/42867 Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2022-05-10src,crypto: remove uses of AllocatedBuffer from crypto_rsa.ccDarshan Sen
Refs: https://github.com/nodejs/node/pull/39941 Signed-off-by: Darshan Sen <raisinten@gmail.com> PR-URL: https://github.com/nodejs/node/pull/42852 Reviewed-By: Anna Henningsen <anna@addaleax.net>
2022-05-10http: added connection closing methodsShogun
Fixes: https://github.com/nodejs/node/issues/41578 PR-URL: https://github.com/nodejs/node/pull/42812 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2022-05-10src: fix memory leak for v8.serializeliuxingbaoyu
When Buffer::New passes in existing data, it cannot be garbage collected in js synchronous execution. Fixes: https://github.com/nodejs/node/issues/40828 Refs: https://github.com/nodejs/node/issues/38300 PR-URL: https://github.com/nodejs/node/pull/42695 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
2022-05-10bootstrap: fix wasm_web_api external reference registrationJoyee Cheung
The external references were not actually registered. PR-URL: https://github.com/nodejs/node/pull/42903 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
2022-05-03Working on v18.1.1Michaël Zasso
PR-URL: https://github.com/nodejs/node/pull/42943
2022-05-022022-05-03, Version 18.1.0 (Current)v18.1.0v18.1.0-proposalMichaël Zasso
Notable changes: doc: * add @kuriyosh to collaborators (Yoshiki Kurihara) https://github.com/nodejs/node/pull/42824 lib,src: * (SEMVER-MINOR) implement WebAssembly Web API (Tobias Nießen) https://github.com/nodejs/node/pull/42701 test_runner: * (SEMVER-MINOR) add initial CLI runner (Colin Ihrig) https://github.com/nodejs/node/pull/42658 worker: * (SEMVER-MINOR) add hasRef() to MessagePort (Darshan Sen) https://github.com/nodejs/node/pull/42849 PR-URL: https://github.com/nodejs/node/pull/42943
2022-05-02v8: export cpu_profiler_metadata_size in getHeapCodeStatisticstheanarkh
PR-URL: https://github.com/nodejs/node/pull/42818 Reviewed-By: Darshan Sen <raisinten@gmail.com>
2022-05-02src: turn SSL_CTX_new CHECK/segfault into JS exceptionAnna Henningsen
These operations do not usually fail, but can do so when OpenSSL is not configured properly (I ran into this while dynamically linking against OpenSSL with FIPS). JS exceptions are way more useful than CHECK failures or plain segfaults. PR-URL: https://github.com/nodejs/node/pull/42799 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2022-05-02esm: graduate top-level-await to stableAntoine du Hamel
Removes the experimental label in the docs and makes the `--experimental-top-level-await` flag a no-op. V8 has removed the harmony flag in V8 9.1 and consider the feature stable, there's no reason to keep it experimental in Node.js. PR-URL: https://github.com/nodejs/node/pull/42875 Reviewed-By: Jacob Smith <jacob@frende.me> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com> Reviewed-By: Mestery <mestery@protonmail.com> Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com> Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2022-05-02src: make --no-node-snapshot a per-process optionJoyee Cheung
We enable the shared read-only heap which currently requires that the snapshot used in different isolates in the same process to be the same. Therefore --no-node-snapshot is a per-process option. PR-URL: https://github.com/nodejs/node/pull/42864 Refs: https://github.com/nodejs/node/pull/42809 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2022-04-28fs: fix mkdirSync so ENOSPC is correctly reportedSantiago Gimeno
Fixes: https://github.com/nodejs/node/issues/42808 PR-URL: https://github.com/nodejs/node/pull/42811 Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2022-04-28lib,src: use Response URL as WebAssembly locationTobias Nießen
As per Section 3 of the WebAssembly Web API spec. PR-URL: https://github.com/nodejs/node/pull/42842 Refs: https://github.com/nodejs/node/pull/42701 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2022-04-28wasi: remove unecessary null checkMichael Dawson
As reported by coverity the null check is done after earlier code has already derefenced options.envp. Either we should null check earlier uses or this check is not necessary. Since options.envp is created with new which should throw an exception intead of returning null, it should be safe to assume the null check is not required. Signed-off-by: Michael Dawson <mdawson@devrus.com> PR-URL: https://github.com/nodejs/node/pull/42819 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Darshan Sen <raisinten@gmail.com>
2022-04-28src,crypto: remove uses of AllocatedBuffer from crypto_ec.ccDarshan Sen
Refs: https://github.com/nodejs/node/pull/39941 Signed-off-by: Darshan Sen <raisinten@gmail.com> PR-URL: https://github.com/nodejs/node/pull/42766 Reviewed-By: James M Snell <jasnell@gmail.com>
2022-04-28v8: export more fields in getHeapStatisticstheanarkh
export total_global_handles_size, used_global_handles_size, external_memory in getHeapStatistics PR-URL: https://github.com/nodejs/node/pull/42784 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2022-04-28lib,src: implement WebAssembly Web APITobias Nießen
Refs: https://github.com/nodejs/node/pull/41749 Fixes: https://github.com/nodejs/node/issues/21130 PR-URL: https://github.com/nodejs/node/pull/42701 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2022-04-28src: define fs.constants.S_IWUSR & S_IRUSR for WinLiviu Ionescu
On Windows, most of the POSIX file mode definitions are not available. However, functionally equivalent read/write definitions exists, and chmod() can use them. This patch defines two aliases, so that these definintions are issued in fs.constants. fixes: https://github.com/nodejs/node/issues/41591 PR-URL: https://github.com/nodejs/node/pull/42757 Refs: https://github.com/nodejs/node/issues/41591 Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2022-04-28src: use `node:` prefix in exampleAntoine du Hamel
Refs: https://github.com/nodejs/node/pull/42752 PR-URL: https://github.com/nodejs/node/pull/42794 Reviewed-By: Mestery <mestery@protonmail.com> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com> Reviewed-By: Paolo Insogna <paolo@cowtech.it> Reviewed-By: Rich Trott <rtrott@gmail.com>
2022-04-28doc: add `node:` prefix for all core modulesAntoine du Hamel
Some core modules can be loaded with or without the `node:` prefix. Using the prefix disambiguates which specifiers refer to core modules. This commit updates the docs to use the prefix everywhere a core module is referenced. PR-URL: https://github.com/nodejs/node/pull/42752 Fixes: https://github.com/nodejs/node/issues/38343 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Mestery <mestery@protonmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Akhil Marsonya <akhil.marsonya27@gmail.com> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com> Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com> Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com> Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
2022-04-28worker: add hasRef() to the handle objectDarshan Sen
This should help projects like https://github.com/mafintosh/why-is-node-running and https://github.com/facebook/jest to detect if Worker instances are keeping the event loop active correctly. Fixes: https://github.com/nodejs/node/issues/42091 Refs: https://github.com/mafintosh/why-is-node-running/issues/59 Signed-off-by: Darshan Sen <raisinten@gmail.com> PR-URL: https://github.com/nodejs/node/pull/42756 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2022-04-28doc: consolidate use of multiple-byte unitsAntoine du Hamel
Refs: https://en.wikipedia.org/wiki/Byte#Multiple-byte_units PR-URL: https://github.com/nodejs/node/pull/42587 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Paolo Insogna <paolo@cowtech.it> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Mestery <mestery@protonmail.com>
2022-04-28bootstrap: use the isolate snapshot in workersJoyee Cheung
PR-URL: https://github.com/nodejs/node/pull/42702 Refs: https://github.com/nodejs/node/issues/35711 Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: James M Snell <jasnell@gmail.com>
2022-04-28bootstrap: move embedded snapshot to SnapshotBuilderJoyee Cheung
So that the embedded snapshot can be reused by the worker. PR-URL: https://github.com/nodejs/node/pull/42702 Refs: https://github.com/nodejs/node/issues/35711 Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: James M Snell <jasnell@gmail.com>
2022-04-28async_hooks: avoid decrementing iterator after eraseGabriel Bota
decrementing an iterator returned by `std::vector::erase` may have undefined behaviour and should not be used. Decrementing `end()` on an empty container is undefined and `.erase()` could leave the container empty. Instead, by calling `vec.erase(it--)` we decrement the valid iterator before the erase operation but after being passed to the erase method. In case of `AsyncHooks::RemoveContext` perform the cleanup of empty contexts upfront using `std::remove_if` because the iteration gets interrupted as soon as the context to be removed has been found. PR-URL: https://github.com/nodejs/node/pull/42749 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com>
2022-04-28src: large page attributing an id on LinuxDavid CARLIER
Using the new PR_SET_VMA_ANON_NAME prctl attribute available since the 5.17 release, when rolling out the process address map appears as ` <start>-<end> r-xp 00000000 00:00 0 [anon:nodejs Large Page] ` PR-URL: https://github.com/nodejs/node/pull/42644 Reviewed-By: James M Snell <jasnell@gmail.com>
2022-04-28test_runner: add initial CLI runnerColin Ihrig
This commit introduces an initial version of a CLI-based test runner. PR-URL: https://github.com/nodejs/node/pull/42658 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2022-04-19Working on v18.0.1Beth Griggs
PR-URL: https://github.com/nodejs/node/pull/42262