Filip Skokan
0665fa4009
doc: remove last example use of require('crypto').webcrypto
...
PR-URL: https://github.com/nodejs/node/pull/45819
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Akhil Marsonya <akhil.marsonya27@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2022-12-13 19:12:02 +01:00
David Benjamin
8b89d4d421
tls: don't treat fatal TLS alerts as EOF
...
SSL_RECEIVED_SHUTDOWN means not just close_notify or fatal alert. From
what I can tell, this was just a mistake? OnStreamRead's comment
suggests eof_ was intended to be for close_notify.
This fixes a bug in TLSSocket error reporting that seems to have made it
into existing tests. If we receive a fatal alert, EmitRead(UV_EOF)
would, via onConnectEnd in _tls_wrap.js, synthesize an ECONNRESET before
the alert itself is surfaced. As a result, TLS alerts received during
the handshake are misreported by Node.
See the tests that had to be updated as part of this.
PR-URL: https://github.com/nodejs/node/pull/44563
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2022-12-12 19:45:58 +00:00
David Benjamin
7c745142a4
tls: fix re-entrancy issue with TLS close_notify
...
Like errno, OpenSSL's API requires SSL_get_error and error queue be
checked immediately after the failing operation, otherwise the error
queue or SSL object may have changed state and no longer report
information about the operation the caller wanted.
TLSWrap almost heeds this rule, except in TLSWrap::ClearOut. If SSL_read
picks up a closing alert (detected by checking SSL_get_shutdown), Node
calls out to JS with EmitRead(UV_EOF) and only afterwards proceeds to
dispatch on the error. But, by this point, Node has already re-entered
JS, which may change the error.
In particular, I've observed that, on close_notify, JS seems to
sometimes call back into TLSWrap::DoShutdown, calling SSL_shutdown. (I
think this comes from onStreamRead in stream_base_commons.js?)
Instead, SSL_get_error and the error queue should be sampled earlier.
Back in #1661 , Node needed to account for GetSSLError being called after
ssl_ was destroyed. This was the real cause. With this fixed, there's no
need to account for this. (Any case where ssl_ may be destroyed before
SSL_get_error is a case where ssl_ or the error queue could change
state, so it's a bug either way.)
This is the first of two fixes in error-handling here. The
EmitRead(UV_EOF) seems to additionally swallow fatal alerts from the
peer. Some of the ECONNRESET expectations in the tests aren't actually
correct. The next commit will fix this as well.
PR-URL: https://github.com/nodejs/node/pull/44563
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2022-12-12 19:45:57 +00:00
Debadree Chatterjee
79a977ae31
watch: add CLI flag to preserve output
...
Fixes: https://github.com/nodejs/node/issues/45713
PR-URL: https://github.com/nodejs/node/pull/45717
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
2022-12-11 23:23:11 +01:00
Jithil P Ponnan
5108cf2df4
src: add uvwasi version
...
PR-URL: https://github.com/nodejs/node/pull/45639
Refs: https://github.com/nodejs/node/issues/45260
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: theanarkh <theratliter@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2022-12-11 19:24:28 +00:00
Anna Henningsen
d498bd9a8c
src: simplify NodeBIO::GetMethod initialization
...
Make its initialization self-contained to avoid unnecessarily
breaking encapsulation.
PR-URL: https://github.com/nodejs/node/pull/45799
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com >
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2022-12-11 14:45:07 +00:00
Ben Noordhuis
8273320f9f
src: make structuredClone work for process.env
...
Fixes: https://github.com/nodejs/node/issues/45380
PR-URL: https://github.com/nodejs/node/pull/45698
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
2022-12-11 12:54:15 +00:00
Anna Henningsen
94d23f5ec0
src: mark generated snapshot_data as const
...
This renders the mutex protecting it unnecessary, since mutexes
only need to protect concurrent accesses to mutable data.
PR-URL: https://github.com/nodejs/node/pull/45786
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com >
2022-12-10 17:16:24 +00:00
Ben Noordhuis
3ff724dd23
tls: remove trustcor root ca certificates
...
Follow what Ubuntu did and simply remove the CA certificates
altogether.
Fixes: https://github.com/nodejs/node/issues/45762
Refs: https://ubuntu.com/security/notices/USN-5761-2
PR-URL: https://github.com/nodejs/node/pull/45776
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Richard Lau <rlau@redhat.com >
2022-12-10 15:57:01 +00:00
Marco Ippolito
5fe0795041
crypto: fix CipherBase Update int32 overflow
...
PR-URL: https://github.com/nodejs/node/pull/45769
Fixes: https://github.com/nodejs/node/issues/45757
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Filip Skokan <panva.ip@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Paolo Insogna <paolo@cowtech.it >
2022-12-09 11:24:51 +00:00
snek
b3bf07e019
wasi: fast calls
...
PR-URL: https://github.com/nodejs/node/pull/43697
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2022-12-08 04:22:37 +00:00
Michael Dawson
22c645d411
src: cleanup on disambiguating native modules
...
Found while backporting
https://github.com/nodejs/node/pull/45663
Fixup one rename missed
Signed-off-by: Michael Dawson <mdawson@devrus.com >
PR-URL: https://github.com/nodejs/node/pull/45665
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2022-12-02 16:34:09 -05:00
Deokjin Kim
1750a94ec1
src: use enum class instead of enum in node_i18n
...
"enum class" has more advantages than "enum" because
it's strongly typed and scoped.
Refs: https://isocpp.org/wiki/faq/cpp11-language-types#enum-class
PR-URL: https://github.com/nodejs/node/pull/45646
Reviewed-By: Darshan Sen <raisinten@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com >
2022-11-30 01:23:37 +00:00
theanarkh
d579bc16b3
diagnostics_channel: fix diagnostics channel memory leak
...
PR-URL: https://github.com/nodejs/node/pull/45633
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
2022-11-29 10:58:43 +00:00
legendecas
71ff89f929
src: rename internal module declaration as internal bindings
...
This is a continuation of the name reification on the internal bindings.
Renames NODE_MODULE_CONTEXT_AWARE_INTERNAL and
NODE_MODULE_EXTERNAL_REFERENCE to NODE_BINDING_CONTEXT_AWARE_INTERNAL
and NODE_BINDING_EXTERNAL_REFERENCE respectively.
PR-URL: https://github.com/nodejs/node/pull/45551
Refs: https://github.com/nodejs/node/issues/44036
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com >
Reviewed-By: Jacob Smith <jacob@frende.me >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
2022-11-29 00:23:08 +08:00
Michaël Zasso
a6242772ec
src: fix ArrayBuffer::Detach deprecation
...
PR-URL: https://github.com/nodejs/node/pull/45579
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2022-11-27 17:27:21 +00:00
Yagiz Nizipli
dd5c39a808
src: update NODE_MODULE_VERSION to 112
...
Major V8 updates are usually API/ABI incompatible with previous
versions. This commit adapts NODE_MODULE_VERSION for V8 10.9.
Refs: https://github.com/nodejs/CTC/blob/master/meetings/2016-09-28.md
PR-URL: https://github.com/nodejs/node/pull/45579
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2022-11-27 17:27:15 +00:00
Yagiz Nizipli
60810f0da6
buffer: make decodeUTF8 params loose
...
PR-URL: https://github.com/nodejs/node/pull/45610
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
2022-11-27 06:48:51 +00:00
Yagiz Nizipli
9a8d82b99f
src: add internal isArrayBufferDetached
...
PR-URL: https://github.com/nodejs/node/pull/45568
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: LiviaMedeiros <livia@cirno.name >
2022-11-27 03:14:57 +00:00
Michael Dawson
a01dbf179e
src: address coverity warning in node_file.cc
...
Address coverity warning that looks like
it identifies a potential crash due to using
a value after it's been passed into std::move
Signed-off-by: Michael Dawson <mdawson@devrus.com >
PR-URL: https://github.com/nodejs/node/pull/45565
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com >
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com >
2022-11-24 09:22:16 -05:00
Michael Dawson
0bbef56760
node-api: address coverity warning
...
- address coverity unitialized variable warning
Signed-off-by: Michael Dawson <mdawson@devrus.com >
PR-URL: https://github.com/nodejs/node/pull/45563
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2022-11-24 09:21:03 -05:00
Daeyeon Jeong
be9cd3ecb0
src,lib: group properties used as constants from util binding
...
Properties used as constants in `util` internal binding are
scattered. This suggests using an object holding all of them
for better maintenance.
Signed-off-by: Daeyeon Jeong <daeyeon.dev@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/45539
Reviewed-By: Darshan Sen <raisinten@gmail.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
2022-11-24 02:09:29 +00:00
Michaël Zasso
2a7635feb2
src: use qualified std::move call in node_http2
...
Also iwyu in that file.
Closes: https://github.com/nodejs/node/issues/45543
PR-URL: https://github.com/nodejs/node/pull/45555
Fixes: https://github.com/nodejs/node/issues/45543
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de >
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com >
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com >
2022-11-23 08:14:26 +00:00
Michaël Zasso
96026646d7
src: avoid unused variables and functions
...
PR-URL: https://github.com/nodejs/node/pull/45542
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
2022-11-22 12:50:54 +00:00
Michaël Zasso
8577b82354
src: add missing include for std::all_of
...
This fixes compilation of src/inspector_socket.cc with clang-cl.
PR-URL: https://github.com/nodejs/node/pull/45541
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com >
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2022-11-22 12:30:17 +00:00
Shi Lei
d783a1c128
build,deps,src: fix Intel VTune profiling support
...
PR-URL: https://github.com/nodejs/node/pull/45248
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2022-11-22 08:28:19 +00:00
Daeyeon Jeong
be049df055
src,node-api: update napi_is_detached_arraybuffer
...
This gets `napi_is_detached_arraybuffer(..)` to use the new API,
`ArrayBuffer::WasDetached`, that looks more straightforward.
Signed-off-by: Daeyeon Jeong <daeyeon.dev@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/45538
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
Reviewed-By: Michael Dawson <midawson@redhat.com >
2022-11-22 07:14:59 +00:00
Jiawen Geng and joyeecheung
005714eb9a
build: fix env.h for cpp20
...
Co-authored-by: joyeecheung <joyeec9h3@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/45516
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
2022-11-21 09:25:42 +00:00
Daeyeon Jeong
47d3adb825
src: set an appropriate thread pool size if given --v8-pool-size=0
...
It doesn't terminate when any pending V8 tasks exist if no thread
is in the pool.
This allocates one thread at least for V8's background tasks if
`--v8-pool-size=0` is given as a CLI option.
Signed-off-by: Daeyeon Jeong <daeyeon.dev@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/45513
Fixes: https://github.com/nodejs/node/issues/42523
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com >
2022-11-21 02:14:28 +00:00
Joyee Cheung
0220aeb855
src: move FsStatsOffset and kFsStatsBufferLength to node_file.h
...
To avoid bloating env.h, as they are only used in node_file.*
PR-URL: https://github.com/nodejs/node/pull/45498
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2022-11-19 18:22:20 +00:00
Chengzhong Wu
62cde6195f
node-api: declare type napi_cleanup_hook
...
Declare type `napi_cleanup_hook` so that the function signature can be
shared across the codebase.
PR-URL: https://github.com/nodejs/node/pull/45391
Reviewed-By: Michael Dawson <midawson@redhat.com >
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com >
2022-11-19 17:31:36 +00:00
Filip Skokan
b61603f120
crypto: clear OpenSSL error queue after calling X509_check_private_key()
...
Fixes: https://github.com/nodejs/node/issues/45485
PR-URL: https://github.com/nodejs/node/pull/45495
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
2022-11-19 14:55:27 +00:00
theanarkh
bcc704f6e5
trace_events: add new categories
...
PR-URL: https://github.com/nodejs/node/pull/45266
Refs: https://github.com/nodejs/node/pull/45092
Refs: https://github.com/nodejs/node/pull/44458
Reviewed-By: Darshan Sen <raisinten@gmail.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2022-11-19 07:48:18 +00:00
Luigi Pinca
c74dbd2936
crypto: update root certificates
...
Update the list of root certificates in src/node_root_certs.h with
tools/mk-ca-bundle.pl.
Certificates added:
- Autoridad de Certificacion Firmaprofesional CIF A62634068
- Certainly Root E1
- Certainly Root R1
- D-TRUST BR Root CA 1 2020
- D-TRUST EV Root CA 1 2020
- DigiCert TLS ECC P384 Root G5
- DigiCert TLS RSA4096 Root G5
- E-Tugra Global Root CA ECC v3
- E-Tugra Global Root CA RSA v3
- HiPKI Root CA - G1
- ISRG Root X2
- Security Communication ECC RootCA1
- Security Communication RootCA3
- Telia Root CA v2
- vTrus ECC Root CA
- vTrus Root CA
Certificates removed:
- Cybertrust Global Root
- DST Root CA X3
- GlobalSign Root CA - R2
- Hellenic Academic and Research Institutions RootCA 2011
PR-URL: https://github.com/nodejs/node/pull/45490
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
2022-11-18 20:12:34 +00:00
Santiago Gimeno
b18ec0433e
src: don't run tasks on isolate termination
...
Fixes: https://github.com/nodejs/node/issues/45419
PR-URL: https://github.com/nodejs/node/pull/45444
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2022-11-17 20:41:04 +00:00
Joyee Cheung
c5e74bb50f
src: remove the unused PackageConfig class
...
PR-URL: https://github.com/nodejs/node/pull/45478
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com >
Reviewed-By: Akhil Marsonya <akhil.marsonya27@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2022-11-17 18:31:45 +00:00
Joyee Cheung
066e77ae8d
util: use private symbols in JS land directly
...
Instead of calling into C++ to use the private symbols, use an
ObjectTemplate to create an object that holds the symbols and
use them directly from JS land.
PR-URL: https://github.com/nodejs/node/pull/45379
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2022-11-17 18:54:01 +01:00
Takuro Sato
405ea2a10d
crypto: clear OpenSSL error queue after calling X509_verify()
...
Prior to this commit, functions accessing the OpenSSL error queue did
not work properly after x509.verify() returned false.
PR-URL: https://github.com/nodejs/node/pull/45377
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Filip Skokan <panva.ip@gmail.com >
2022-11-17 14:43:03 +00:00
Emanuel Hoogeveen
0d8a782b4d
src: add --max-semi-space-size to the options allowed in NODE_OPTIONS
...
PR-URL: https://github.com/nodejs/node/pull/44436
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Evan Lucas <evanlucas@me.com >
Reviewed-By: Michael Dawson <midawson@redhat.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2022-11-15 13:27:54 +00:00
Moshe Atlow
97355c74e8
test_runner: support watch mode
...
PR-URL: https://github.com/nodejs/node/pull/45214
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2022-11-13 21:40:26 +00:00
Rich Trott
1255db7624
src: condense experimental warning message
...
PR-URL: https://github.com/nodejs/node/pull/45424
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
2022-11-13 04:11:13 +00:00
Yagiz Nizipli and Anna Henningsen
4ac830effd
util: add fast path for utf8 encoding
...
Co-authored-by: Anna Henningsen <anna@addaleax.net >
PR-URL: https://github.com/nodejs/node/pull/45412
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com >
2022-11-12 21:31:44 +00:00
Yagiz Nizipli
ca3ed363ff
util: improve text decoder performance
...
PR-URL: https://github.com/nodejs/node/pull/45388
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2022-11-11 17:48:29 -08:00
Daeyeon Jeong
7b1e153530
src: simplify exit code accesses
...
This simplifies getting the exit code which is set through
`process.exitCode` by removing manually reading the JS property
from the native side.
Signed-off-by: Daeyeon Jeong <daeyeon.dev@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/45125
Reviewed-By: Darshan Sen <raisinten@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
2022-11-10 01:09:18 +00:00
Michael Dawson
09ae62b9a8
node-api: handle no support for external buffers
...
Refs: https://github.com/electron/electron/issues/35801
Refs: https://github.com/nodejs/abi-stable-node/issues/441
Electron recently dropped support for external
buffers. Provide a way for addon authors to:
- hide the methods to create external buffers so they can
avoid using them if they want the broadest compatibility.
- call the methods that create external buffers at runtime
to check if external buffers are supported and either
use them or not based on the return code.
Signed-off-by: Michael Dawson <mdawson@devrus.com >
PR-URL: https://github.com/nodejs/node/pull/45181
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com >
2022-11-09 13:30:43 -05:00
Yagiz Nizipli
aed55df74b
util: improve text-decoder performance
...
PR-URL: https://github.com/nodejs/node/pull/45363
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2022-11-09 14:17:31 +00:00
Ben Noordhuis
9fe6dcf6cc
tls: add "ca" property to certificate object
...
The objects returned by getPeerCertificate() now have an additional "ca"
boolean property that indicates whether the certificate is a Certificate
Authority certificate or not.
Fixes: https://github.com/nodejs/node/issues/44905
PR-URL: https://github.com/nodejs/node/pull/44935
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Michael Dawson <midawson@redhat.com >
2022-11-09 09:29:17 +00:00
Joyee Cheung
b872d30d19
lib: add options to the heap snapshot APIs
...
Support configuration of the HeapSnapshotMode and NumericsMode
fields inf HeapSnapshotOptions in the JS APIs for heap snapshots.
PR-URL: https://github.com/nodejs/node/pull/44989
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
2022-11-08 16:19:54 +01:00
Joyee Cheung
6ef4368db4
src: track contexts in the Environment instead of AsyncHooks
...
This makes it easier to support the vm contexts in the startup
snapshot. We now manage the promise hooks using references to
the contexts from the Environment, and AsyncHooks only hold references
to the hooks.
PR-URL: https://github.com/nodejs/node/pull/45282
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com >
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com >
2022-11-07 21:06:01 +00:00
Filip Skokan
0d7a1390db
crypto: handle unsupported AES ciphers in webcrypto
...
Refs: https://github.com/electron/electron/issues/36256
PR-URL: https://github.com/nodejs/node/pull/45321
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Shelley Vohr <shelley.vohr@gmail.com >
2022-11-07 06:35:25 +00:00