31275 Commits

Author SHA1 Message Date
Rich Trott
7eb500b538 doc: move digitalinfinity to emeritus
Had an email exchange with Hitesh where he indicated that it was a fine
time to move him to emeritus.

PR-URL: https://github.com/nodejs/node/pull/34191
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Matheus Marchini <mat@mmarchini.me>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2020-07-05 15:04:12 -07:00
Rich Trott
8a57788efe doc: move gibfahn to emeritus
Asked Gibson in email if he should be moved to emeritus and he indicated
it was a good idea.

PR-URL: https://github.com/nodejs/node/pull/34190
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Matheus Marchini <mat@mmarchini.me>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2020-07-05 15:03:33 -07:00
James M Snell
0f97d6066a quic: use TimerWrap for idle and retransmit timers
Signed-off-by: James M Snell <jasnell@gmail.com>

PR-URL: https://github.com/nodejs/node/pull/34186
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2020-07-05 14:57:07 -07:00
James M Snell
e19a251824 src: replace InspectorTimer with TimerWrap utility
Signed-off-by: James M Snell <jasnell@gmail.com>

PR-URL: https://github.com/nodejs/node/pull/34186
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2020-07-05 14:57:03 -07:00
James M Snell
d4f69002b4 src: add TimerWrap utility
Consolidate uv_timer_t boilerplate code into a shared utility.
There are several places throughout the code where we use uv_timer_t
internally (inspector, perf, quic), with some code duplication.
This eliminates the duplicated code, ensures that cleanup occurs
correctly, and simplifies use of the timers.

Signed-off-by: James M Snell <jasnell@gmail.com>

PR-URL: https://github.com/nodejs/node/pull/34186
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2020-07-05 14:56:59 -07:00
James M Snell
e7dadd376e doc: specify how fs.WriteStream/ReadStreams are created
Alternative to https://github.com/nodejs/node/pull/33841

Co-authored-by: zombieleet <zombieleetnca@gmail.com>

PR-URL: https://github.com/nodejs/node/pull/34188
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2020-07-05 14:19:42 -07:00
James M Snell
1b1e985478 quic: add missing memory tracker fields
PR-URL: https://github.com/nodejs/node/pull/34160
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2020-07-05 14:17:42 -07:00
James M Snell
5a87e9b0a5 quic: cleanup timers if they haven't been already
PR-URL: https://github.com/nodejs/node/pull/34160
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2020-07-05 14:17:39 -07:00
James M Snell
3837d9cf1f quic: fixup lint issues
PR-URL: https://github.com/nodejs/node/pull/34160
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2020-07-05 14:17:36 -07:00
James M Snell
7b062ca015 quic: refactor qlog handling
Because of the timing of qlog events emitted by ngtcp2, it
becomes difficult to handle those as events on the QuicSession
object because the final qlog entry is not emitted until the
ngtcp2_conn is freed, which can occur when the object is being
garbage collected (meaning, we a: can't call out to javascript
and b: don't have an object we can use to emit the event).

This refactors it into a QLogStream object that allows the
qlog data to be piped out using a separate Readable stream.

PR-URL: https://github.com/nodejs/node/pull/34160
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2020-07-05 14:17:33 -07:00
James M Snell
e4d369e96e quic: remove onSessionDestroy callback
The QuicSession can be destroyed during garbage collection and
the onSessionDestroy callback was happening in the destructor.

PR-URL: https://github.com/nodejs/node/pull/34160
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2020-07-05 14:17:29 -07:00
James M Snell
3acdd6aac7 quic: refactor QuicSession shared state to use AliasedStruct
PR-URL: https://github.com/nodejs/node/pull/34160
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2020-07-05 14:17:26 -07:00
James M Snell
f9c2245fb5 quic: refactor QuicSession close/destroy flow
PR-URL: https://github.com/nodejs/node/pull/34160
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2020-07-05 14:17:24 -07:00
James M Snell
f7510ca439 quic: additional cleanups on the c++ side
PR-URL: https://github.com/nodejs/node/pull/34160
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2020-07-05 14:17:21 -07:00
James M Snell
b5bf5bb20f quic: refactor native object flags for better readability
Use is_* and set_* pattern for native object flags to improve
readability in the code.

PR-URL: https://github.com/nodejs/node/pull/34160
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2020-07-05 14:17:18 -07:00
James M Snell
b1750a4d53 quic: continued refactoring for quic_stream/quic_session
PR-URL: https://github.com/nodejs/node/pull/34160
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2020-07-05 14:17:15 -07:00
Rich Trott
56dbe466fd doc: remove parenthetical \r\n comment in http and http2 docs
The explanation that the HTTP requests include `\r\n` is true but not
important or relevant in these two specific contexts.

PR-URL: https://github.com/nodejs/node/pull/34178
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2020-07-04 16:46:26 -07:00
Rich Trott
21005c3b44 doc: remove stability from unreleased errors
Remove stability indicators from errors that only existed on the master
branch and are not in the release.

PR-URL: https://github.com/nodejs/node/pull/33764
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2020-07-04 05:51:42 -07:00
Michael Dawson
bff7de3b43 meta: add N-API to codeowners coverage
We have this guidance for contributing to N-API:
https://github.com/nodejs/node/blob/master/doc/guides/adding-new-napi-api.md

It makes sense to have one of the N-API team sign off on commits
that changes N-API

Signed-off-by: Michael Dawson <michael_dawson@ca.ibm.com>

PR-URL: https://github.com/nodejs/node/pull/34039
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2020-07-03 18:14:58 -04:00
Bradley Farias
16f3b6a01b doc: util.debuglog callback
PR-URL: https://github.com/nodejs/node/pull/33856
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-07-03 15:01:10 -07:00
Rich Trott
92f878129f tools: remove lint-js.js
lint-js.js was implemented before ESLint had a caching feature. It is
now only used in CI. Let's remove it on the following grounds:

* It results in occasional (and puzzling) yellow CI runs for
  node-test-linter because the tap file is corrupted somehow.
  Interleaved maybe? I don't know, but a simple solution is removing it
  and running ESLint directly.

* On my local laptop, it reduces the linting from about 75 seconds to
  about 55 seconds. This kind of savings is not worth the added
  complexity and the instability noted above.

PR-URL: https://github.com/nodejs/node/pull/30955
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-07-03 14:56:16 -07:00
Julien Poissonnier
647babc2fd doc: update wording in "Two reading modes"
PR-URL: https://github.com/nodejs/node/pull/34119
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Zeyu Yang <himself65@outlook.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-07-03 14:53:17 -07:00
Luigi Pinca
d2c8b3efc3 doc: clarify that the ctx argument is optional
Clarify that the `ctx` argument of the `SNICallback` callback is
optional.

Fixes: https://github.com/nodejs/node/issues/34085

PR-URL: https://github.com/nodejs/node/pull/34097
Reviewed-By: Ujjwal Sharma <ryzokuken@disroot.org>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-07-03 14:49:30 -07:00
Mateusz Krawczuk
d3d4aceb96 doc: add a reference to the list of OpenSSL flags.
Some of the SSL_OP_* constants are missing description in the
documentation. Instead of rewriting the description from OpenSSL's
wiki, I have decided to put a link to a detailed list in the
'OpenSSL Options' section.

I see no point of doing both - adding a reference to the wiki and
adding constant descriptions - but I might do if presented with
convincing arguments.

This is a follow-up to #33929.

PR-URL: https://github.com/nodejs/node/pull/34050
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-07-03 14:44:21 -07:00
Sam Roberts
3f81f2a421 doc: no longer maintain a CNA structure
Node.js hasn't touched the cve-management repo since the Feb 2019
security release, we've used the HackerOne CVE allocation process.

Maintaining our status as a CNA is not zero cost, there is some routine
adminstration that is requested (see this doc for details).

As we no longer use the CVE management process, I propose removing it.
If this lands, I will go through the interactions with Mitre so that
Node.js is no longer a CNA and cleanup related resources (email aliases,
archive the cve-management repo, whatever else I find).

PR-URL: https://github.com/nodejs/node/pull/33639
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Vladimir de Turckheim <vlad2t@hotmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
2020-07-03 14:38:26 -07:00
Shelley Vohr
37fc587b41
lib: always initialize esm loader callbackMap
PR-URL: https://github.com/nodejs/node/pull/34127
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Gus Caplan <me@gus.host>
2020-07-03 14:31:59 -07:00
Saleem
1a9d6316b8 doc: use consistent naming in stream doc
Consistency of method naming

referred to as readable.push several other times in transform
documentation and also documented under readable, so makes sense
to just stick with readable.push

PR-URL: https://github.com/nodejs/node/pull/30506
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-07-03 14:28:22 -07:00
Anentropic
7c9df66485 doc: clarify how to read process.stdin
document more clearly that stdin will emit multiple readable events

PR-URL: https://github.com/nodejs/node/pull/27350
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-07-03 14:05:47 -07:00
Gabriel Schulhof
cfa3d8fec5 doc: fix entry for napi_create_external_buffer
Remove text regarding copying, because `napi_create_external_buffer`
does not copy.

Fixes: https://github.com/nodejs/node/issues/33471

PR-URL: https://github.com/nodejs/node/pull/34125
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Mathias Buus <mathiasbuus@gmail.com>
Reviewed-By: Zeyu Yang <himself65@outlook.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-07-03 13:57:50 -07:00
Rodion Abdurakhimov
d853145277 doc: fix source link margin to sub-header mark
Prior to this commit, [src] link overlapped sharped (#) sub-header link

PR-URL: https://github.com/nodejs/node/pull/33664
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-07-03 13:35:17 -07:00
Denys Otrishko
b4fe76d656 doc: improve async_hooks asynchronous context example
* use writeFile(1) everywhere to log
* prettify execution id graph
* add clearer explanation for TickObject presence
* add causation graph via triggerAsyncId

PR-URL: https://github.com/nodejs/node/pull/33730
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: Andrey Pechkurov <apechkurov@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Vladimir de Turckheim <vlad2t@hotmail.com>
2020-07-03 13:24:39 -07:00
Anna Henningsen
ee3243fe3f src: remove unused fields from IsolateData
PR-URL: https://github.com/nodejs/node/pull/34139
Reviewed-By: Shelley Vohr <codebytere@gmail.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Zeyu Yang <himself65@outlook.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-07-03 12:21:02 -07:00
Derek Lewis
db3b209e7d doc: clarify esm conditional exports prose
This commit clarifies the behavior of a couple aspects of
conditional exports that may have been difficult to grasp
from the prose alone.

PR-URL: https://github.com/nodejs/node/pull/33886
Reviewed-By: Guy Bedford <guybedford@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-07-03 12:16:23 -07:00
rickyes
a7c6806adc doc: Add maxTotalSockets option to agent constructor
PR-URL: https://github.com/nodejs/node/pull/34013
Refs: https://github.com/nodejs/node/pull/33617
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-07-03 12:14:03 -07:00
rickyes
7f2cf0f8da doc: add streams to the pipeline function signature
PR-URL: https://github.com/nodejs/node/pull/34153
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-07-03 12:11:48 -07:00
Rich Trott
2110fadecd doc: improve triaging text in issues.md
Remove a double negative and many superfluous sentences. The sentiment
in the removed material is good, but we already tell people that
discussion should be focused, helpful, and professional. Having two
extra paragraphs greatly reduces the likelihood that people will read
the material.

PR-URL: https://github.com/nodejs/node/pull/34164
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-07-03 12:08:41 -07:00
Rich Trott
907829b1a4 doc: simply dns.ADDRCONFIG language
PR-URL: https://github.com/nodejs/node/pull/34155
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-07-03 12:03:37 -07:00
Xu Meng
07bbadb2c7 test: skip some IBM i unsupported test cases
Issuing a shutdown() on IBM i PASE with parameter SHUT_WR
also sends a normal close sequence to the partner program.
This leads to timing issues and ECONNRESET failures in some
test cases.
Refs: https://github.com/libuv/libuv/pull/2782

PR-URL: https://github.com/nodejs/node/pull/34118
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-07-03 12:02:24 -07:00
Anna Henningsen
1d7be3253f crypto: move typechecking for timingSafeEqual into C++
This makes the function more robust against V8 inlining.

Fixes: https://github.com/nodejs/node/issues/34073

PR-URL: https://github.com/nodejs/node/pull/34141
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Ujjwal Sharma <ryzokuken@disroot.org>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Zeyu Yang <himself65@outlook.com>
2020-07-03 12:01:03 -07:00
Rich Trott
9b8d317d99 test: fix flaky test-http2-invalidheaderfield
Separate test cases to avoid side effects and race conditions.

Fixes: https://github.com/nodejs/node/issues/34172

PR-URL: https://github.com/nodejs/node/pull/34173
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Andrey Pechkurov <apechkurov@gmail.com>
2020-07-03 08:44:15 -07:00
Richard Lau
d08334a489
test: report actual error code on failure
Add a custom message to parallel/test-dgram-error-message-address so
that the actual error code that doesn't match the allowed errors is
output on assertion failure.

PR-URL: https://github.com/nodejs/node/pull/34134
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Shelley Vohr <codebytere@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
2020-07-03 10:50:49 -04:00
Rich Trott
829f521fda doc: remove "considered" in errors.md
"would be considered a `TypeError`" -> "would be a `TypeError`".

Using "considered" introduces unnecessary ambiguity. Is is not actually
a TypeError but merely "considered" one? Why is that? We don't say.
Simplify to "is a TypeError".

PR-URL: https://github.com/nodejs/node/pull/34152
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Christian Clauss <cclauss@me.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: Andrey Pechkurov <apechkurov@gmail.com>
Reviewed-By: Vladimir de Turckheim <vlad2t@hotmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2020-07-03 07:35:58 -07:00
Rich Trott
dfeeb3c275 doc: simplify and clarify ReferenceError material in errors.md
"should always be considered" -> "indicate"

PR-URL: https://github.com/nodejs/node/pull/34151
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
Reviewed-By: Christian Clauss <cclauss@me.com>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Andrey Pechkurov <apechkurov@gmail.com>
2020-07-03 07:33:29 -07:00
Derek Lewis
1dc837ed9a doc: add http highlight grammar
Prior to this commit, http request message code blocks in Markdown
files were not being highlighted correctly. This has been corrected by
adding the new grammar to the bundle, removing the CRLFs (`\r\n`) from
these code samples, adding a reminder to re-add them, and tuning the
syntax theme to support attribute highlighting.

PR-URL: https://github.com/nodejs/node/pull/33785
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2020-07-02 16:32:42 -07:00
Sam Roberts
1aa847f743 doc: move sam-github to TSC Emeriti
I don't have enough time to remain active in the TSC, so I will step
down.

PR-URL: https://github.com/nodejs/node/pull/34095
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2020-07-02 11:16:32 -07:00
Rich Trott
f06df175b4 doc: change "considered experimental" to "experimental" in n-api.md
This changes "considered" experimental" to "experimental" in the
n-api.md file and introduces some additional brevity.

PR-URL: https://github.com/nodejs/node/pull/34129
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2020-07-02 05:37:25 -07:00
Rich Trott
79eb529c3e doc: changed "considered experimental" to "experimental" in cli.md
Change "no longer considered experimental" to "no longer experimental"
in cli.md.

PR-URL: https://github.com/nodejs/node/pull/34128
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2020-07-02 05:35:57 -07:00
falguniraina
c118304ad0 doc: improve text in issues.md
PR-URL: https://github.com/nodejs/node/pull/33973
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Zeyu Yang <himself65@outlook.com>
2020-07-01 19:54:23 -07:00
Robert Nagy
6213fcee9b stream: save error in state
Useful for future PR's to resolve situations where e.g. finished()
is invoked on an already errored streams.

PR-URL: https://github.com/nodejs/node/pull/34103
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2020-07-01 18:22:56 +02:00
Robert Nagy
60a217b1ea tls: remove unnecessary close listener
Wrapped streams are expected to behave the same as socket with handle.
Remove unnecessary difference in handling.

PR-URL: https://github.com/nodejs/node/pull/34105
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2020-07-01 18:18:59 +02:00