0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
Commit Graph

30842 Commits

Author SHA1 Message Date
Rich Trott
07b2ada00d doc: fix lexical sorting of bottom-references in dns doc
The links are sorted in lexical order except for the two RFC links which
are reversed. Fix that.

PR-URL: https://github.com/nodejs/node/pull/33987
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2020-06-21 21:29:24 -07:00
Rich Trott
f05c963f33 doc: change "GitHub Repo" to "Code repository"
"GitHub Repo & Issue Tracker" changed to "Code repository and issue
tracker".

PR-URL: https://github.com/nodejs/node/pull/33985
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Matheus Marchini <mat@mmarchini.me>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
2020-06-21 21:27:29 -07:00
Rich Trott
3de78ad69b doc: use Class: consistently
The docs contain 122 uses of `Class:` in headers and one use of `class:`
in headers. This changes that one instance to conform with the other
instances.

PR-URL: https://github.com/nodejs/node/pull/33978
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2020-06-21 18:02:49 -07:00
rickyes
7a5d3a2fc1 http: add maxTotalSockets to agent class
Add maxTotalSockets to determine how many sockets an agent can open.
Unlike maxSockets, The maxTotalSockets does not count by per origin.

PR-URL: https://github.com/nodejs/node/pull/33617
Fixes: https://github.com/nodejs/node/issues/31942
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-06-21 18:20:05 +02:00
Denys Otrishko
64d22c320c timers: fix multipleResolves in promisified timeouts/immediates
After successful timer finish the abort event callback would still
reject (already resolved promise) upon calling abortController.abort().

Signed-off-by: Denys Otrishko <shishugi@gmail.com>

PR-URL: https://github.com/nodejs/node/pull/33949
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2020-06-21 17:26:36 +02:00
Robert Nagy
51a2df4439 fs: document why isPerformingIO is required
PR-URL: https://github.com/nodejs/node/pull/33982
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2020-06-21 17:23:20 +02:00
Robert Nagy
30cc54275d http: don't emit error after close
Refs: https://github.com/nodejs/node/issues/33591

PR-URL: https://github.com/nodejs/node/pull/33654
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2020-06-21 17:21:12 +02:00
James M Snell
fdf10adef8
meta: introduce codeowners again
The [Contributor's Survey
results](https://github.com/nodejs/TSC/pull/882) highlight the fact that
it is often not easy for contributors to know who the right people are
to talk to about a proposed change or who to ask for reviews of a given
subsystem. We briefly toyed around with codeowners before when GitHub
introduced it but just as quickly disabled it because the structure of
our repository made it exceedingly difficult to get right.

Rather than start with a codeowners for the entire project, I propose
that we start with a small experiment focused on specific subsystems.
Specifically, codeowners for modules, streams, net/tls, http/http2, and
quic (once that lands). We can expand out from there as we see how
things go with the minimal starter set. Initially this just enables
codeowners for the `quic` subsystem.

A couple of points:

1. A codeowner should always be a team, never an individual person
2. Each codeowner team should contain at least one TSC member (to
provide coverage for signing off on semver-major changes)
3. PRs touching any code with a codeowner must be signed off by at least
one person on the codeowner team

PR-URL: https://github.com/nodejs/node/pull/33895
Reviewed-By: Matheus Marchini <mat@mmarchini.me>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2020-06-19 17:51:37 -07:00
Pragyan Das
343cf1b3c1 doc: update WASM code sample
- Code sample updated by adding a hello-world (`demo.wat`) code example
- Step for compiling `.wat` to `.wasm` added (with reference to `wabt`
  tools)
- The sample code prints "hello world\n" in the console

This update adds a very minimal change to the existing sample and can be
treated as an extension.

PR-URL: https://github.com/nodejs/node/pull/33626
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2020-06-19 09:57:28 -07:00
Pranshu Srivastava
fdcd4893ff
http2: always call callback on Http2ServerResponse#end
Fixes: https://github.com/nodejs/node/issues/28001

PR-URL: https://github.com/nodejs/node/pull/33911
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2020-06-19 18:22:44 +02:00
Fábio Santos
e199fc5534
module: fix error message about importing names from cjs
When importing specific names from a CJS module, and renaming them using
`as`, the example fix in the error message erroneously contains the
keyword `as` in the destructuring variable declaration.

Example of this issue:

    import { parse as acornParse } from "acorn";
             ^^^^^
    SyntaxError: The requested module 'acorn' is expected to be of type CommonJS, which does not support named exports. CommonJS modules can be imported by importing the default export.
    For example:
    import pkg from 'acorn';
    const { parse as acornParse } = pkg;

PR-URL: https://github.com/nodejs/node/pull/33882
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Guy Bedford <guybedford@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
2020-06-19 18:14:27 +02:00
Gus Caplan
178e52a7ea
lib: remove manual exception handling in queueMicrotask
PR-URL: https://github.com/nodejs/node/pull/33859
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-06-19 18:04:54 +02:00
Gus Caplan
8f000ea09f
deps: V8: cherry-pick 767e65f945e7
Original commit message:

    [API] Fix microtask message reporting

    RunSingleMicrotask calls Runtime::ReportMessage, but the implementation
    of ReportMessage would unconditionally discard these exceptions. This
    CL removes all of the intermediate logic and directly calls
    MessageHandler::ReportMessage, restoring the ability of
    RunSingleMicrotask to report exceptions that occur in microtasks.

    Bug: v8:8326
    Change-Id: I493de74383b2ab191d786611fb9eba9d27e7a243
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2162121
    Commit-Queue: Gus Caplan <me@gus.host>
    Reviewed-by: Jakob Gruber <jgruber@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#67630}

Refs: 767e65f945

PR-URL: https://github.com/nodejs/node/pull/33859
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-06-19 18:04:52 +02:00
Michaël Zasso
a86a295fd7
lib: remove NodeError from the prototype of errors with code
Signed-off-by: Michaël Zasso <targos@protonmail.com>

PR-URL: https://github.com/nodejs/node/pull/33857
Refs: https://github.com/nodejs/node/pull/33770
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Zeyu Yang <himself65@outlook.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2020-06-19 18:03:55 +02:00
Stephen Belanger
646e5a4717
domain: remove native domain code
With the async_hooks callback trampoline, domains no longer need any
native code. With this, domains can exist in pure JavaScript.

PR-URL: https://github.com/nodejs/node/pull/33801
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Vladimir de Turckheim <vlad2t@hotmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Andrey Pechkurov <apechkurov@gmail.com>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
2020-06-19 17:37:26 +02:00
Stephen Belanger
59e6230a30
async_hooks: callback trampoline for MakeCallback
PR-URL: https://github.com/nodejs/node/pull/33801
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Vladimir de Turckheim <vlad2t@hotmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Andrey Pechkurov <apechkurov@gmail.com>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
2020-06-19 17:37:25 +02:00
Ruben Bridgewater
2c4864762d
util: gracefully handle unknown colors
This makes sure colors that are unknown won't cause an error. This
is especially important in case a library wants to use colors
defined by Node.js core, if available and fall back to the default
otherwise.

Signed-off-by: Ruben Bridgewater <ruben@bridgewater.de>

PR-URL: https://github.com/nodejs/node/pull/33797
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2020-06-19 17:36:21 +02:00
Anna Henningsen
52de4cb107
src: minor updates to FastHrtime
- Don’t use 12 as a magic number for the buffer size
- Mark the object as weak (which is conceptually the right thing to do,
  even if there is little practical impact)
- Keep a reference to the `ArrayBuffer` in question for memory tracking

PR-URL: https://github.com/nodejs/node/pull/33851
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-06-19 17:35:36 +02:00
Anna Henningsen
2899588f28
src: simplify alignment-handling code
Use a common function to handle alignment computations in
multiple places.

PR-URL: https://github.com/nodejs/node/pull/33884
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2020-06-19 17:34:20 +02:00
Rich Trott
563062eddf doc: standardize on sentence case for headers
Previously, our documentation headers were a mixture of title case,
sentence case, and things that were neither. For technical
documentation, the _de facto_ standard seems to be sentence case. (See
refs below.) So let's standardize on that. This commit follows a
commit implementing this standard. This commit adds it to the style
guide.

Refs: https://developers.google.com/style/capitalization#capitalization-in-titles-and-headings
Refs: https://docs.microsoft.com/en-us/style-guide/capitalization

PR-URL: https://github.com/nodejs/node/pull/33889
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-06-19 08:09:59 -07:00
Rich Trott
d1d412b413 doc: use sentence-case for headings in docs
PR-URL: https://github.com/nodejs/node/pull/33889
Refs: https://developers.google.com/style/capitalization#capitalization-in-titles-and-headings
Refs: https://docs.microsoft.com/en-us/style-guide/capitalization
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-06-19 08:09:05 -07:00
rickyes
9918bdf5cb
lib: replace charCodeAt with fixed Unicode
PR-URL: https://github.com/nodejs/node/pull/32758
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Zeyu Yang <himself65@outlook.com>
2020-06-19 07:46:37 -07:00
Sarat Addepalli
f0fb511e3b
dgram: allow typed arrays in .send()
PR-URL: https://github.com/nodejs/node/pull/22413
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
2020-06-19 07:40:11 -07:00
Daniel Bevenius
88ef15812c
quic: remove unused string include http3_application
PR-URL: https://github.com/nodejs/node/pull/33926
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-06-19 07:19:07 -07:00
Daniel Bevenius
1bd88a3ac6
quic: fix up node_quic_stream includes
This commit removes the unused <array> and <limits> includes, and adds
<memory> (for std::unique_ptr), and <utility> (for std::move).

PR-URL: https://github.com/nodejs/node/pull/33921
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-06-19 07:14:06 -07:00
Stephen Belanger
56967afdca
deps: V8: cherry-pick eec10a2fd8fa
Original commit message:

    [promisehook] Add before/after hooks to thenable tasks

    This will allow Node.js to properly track async context in thenables.

    Change-Id: If441423789a78307a57ad7e645daabf551cddb57
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2215624
    Reviewed-by: Camillo Bruni <cbruni@chromium.org>
    Reviewed-by: Sathya Gunasekaran  <gsathya@chromium.org>
    Commit-Queue: Gus Caplan <me@gus.host>
    Cr-Commit-Position: refs/heads/master@{#68207}

Refs: eec10a2fd8

PR-URL: https://github.com/nodejs/node/pull/33778
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2020-06-18 20:52:45 -07:00
Pranshu Srivastava
ddfed69168
doc: link readable._read in stream.md
Refs: https://github.com/nodejs/node/issues/33715

PR-URL: https://github.com/nodejs/node/pull/33767
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-06-18 20:47:01 -07:00
Pranshu Srivastava
9dcde529a4
doc: specify default encoding in writable.write
Refs: https://github.com/nodejs/node/issues/33715

PR-URL: https://github.com/nodejs/node/pull/33765
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-06-18 20:43:24 -07:00
Benjamin Gruenbaum
ea866dc81b
events: use property, primordials
PR-URL: https://github.com/nodejs/node/pull/33775
Fixes: https://github.com/nodejs/node/issues/33773
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Zeyu Yang <himself65@outlook.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-06-18 15:12:23 -07:00
James M Snell
d7d79f2163
quic: avoid memory fragmentation issue
Original PR: https://github.com/nodejs/quic/pull/388

Previously, QuicPacket was allocating an std::vector<uint8_t> of
NGTCP2_MAX_PKT_SIZE bytes, then the packet would be serialized into the
buffer, and the std::vector would be resized based on the number of
bytes serialized. I suspect the memory fragmentation that you're seeing
is because of those resize operations not freeing memory in chunks that
are aligned with the allocation. This changes QuicPacket to use a stack
allocation that is always NGTCP2_MAX_PKT_SIZE bytes and the size of the
serialized packet is just recorded without any resizing. When the memory
is freed now, it should be freed in large enough chunks to cover
subsequent allocations.

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

PR-URL: https://github.com/nodejs/node/pull/33912
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
2020-06-18 15:00:13 -07:00
Robert Nagy
16116f5f5f
quic: remove noop code
this.unidirectional depends on #id which is never set
in the constructor, hence this condition will never run
and can be removed.

PR-URL: https://github.com/nodejs/node/pull/33914
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
2020-06-18 14:44:29 -07:00
James M Snell
bfbdc84738
timers: allow promisified timeouts/immediates to be canceled
Using the new experimental AbortController...

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

PR-URL: https://github.com/nodejs/node/pull/33833
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
2020-06-18 11:40:10 -07:00
Rich Trott
0ef6956225 tools: update remark-preset-lint-node@1.15.1 to 1.16.0
This adds linting for code fence language/grammar strings. This is so,
for example, we have only one of ```text and ```txt and not both.

PR-URL: https://github.com/nodejs/node/pull/33852
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
2020-06-18 06:05:38 -07:00
Rich Trott
7407fc2aea doc: update code language flag for internal doc
Use `bash` instead of `shell` for code language flag in
doc/guides/maintaining-ngtcp2-nghttp3.md to conform with our other docs
and upcoming lint requirements.

PR-URL: https://github.com/nodejs/node/pull/33852
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
2020-06-18 06:05:32 -07:00
Brian White
a4f3206b76
events: improve listeners() performance
PR-URL: https://github.com/nodejs/node/pull/33863
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
2020-06-17 12:12:49 -07:00
James M Snell
272b46e04d
quic: skip test-quic-preferred-address-ipv6.js when no ipv6
PR-URL: https://github.com/nodejs/node/pull/33919
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
2020-06-17 11:35:02 -07:00
Daniel Bevenius
4b70f95d64
quic: use Check instead of FromJust in QuicStream
This commit uses Maybe::Check() instead of Maybe::FromJust() as the
return value is not used.

PR-URL: https://github.com/nodejs/node/pull/33909
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-06-17 11:17:48 -07:00
Anna Henningsen
133a97f60d
quic: always copy stateless reset token
Take ownership of the token value, since the memory for it is allocated
anyway and the buffer size is just 16, i.e. copyable very cheaply.

This makes valgrind stop complaining about a use-after-free error
when running `sequential/test-quic-preferred-address-ipv6`.

PR-URL: https://github.com/nodejs/node/pull/33917
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2020-06-17 11:12:28 -07:00
Shelley Vohr
e9145dbaef
2020-06-17, Version 12.18.1 'Erbium' (LTS)
Notable changes:

deps:
  * V8: cherry-pick 548f6c81d424 (Dominykas Blyžė) [#33484](https://github.com/nodejs/node/pull/33484)
  * update to uvwasi 0.0.9 (Colin Ihrig) [#33445](https://github.com/nodejs/node/pull/33445)
  * upgrade to libuv 1.38.0 (Colin Ihrig) [#33446](https://github.com/nodejs/node/pull/33446)
  * upgrade npm to 6.14.5 (Ruy Adorno) [#33239](https://github.com/nodejs/node/pull/33239)

PR-URL: https://github.com/nodejs/node/pull/33811
2020-06-17 09:26:19 -07:00
Mathias Buus
50fb0199cd n-api: document nextTick timing in callbacks
PR-URL: https://github.com/nodejs/node/pull/33804
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2020-06-17 18:24:26 +02:00
Pranshu Srivastava
1e4187fcf4 http2: add invalidheaders test
Refs: https://github.com/nodejs/node/issues/29829

PR-URL: https://github.com/nodejs/node/pull/33161
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
2020-06-17 10:26:03 +02:00
Rich Trott
ee7f0e3f75 doc,stream: split finish and end events into separate entries
The stream doc has the only instance in our docs where two events are
combined into a single entry. Split them into separate adjacent entries.

PR-URL: https://github.com/nodejs/node/pull/33881
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-06-16 21:43:45 -07:00
James M Snell
14d012ef96
quic: fix minor linting issue
PR-URL: https://github.com/nodejs/node/pull/33913
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2020-06-16 13:34:32 -07:00
Dan Fabulich
ff74e35c0b
process: add unhandled-rejection throw and warn-with-error-code
This PR defines two new modes for the --unhandled-rejections flag.

The first mode is called "throw". The "throw" mode first emits
unhandledRejection. If this hook is not set, the "throw" mode will
raise the unhandled rejection as an uncaught exception.

The second mode is called "warn-with-error-code". The
"warn-with-error-code" mode first emits unhandledRejection. If this
hook is not set, the "warn-with-error-code" mode will trigger a
warning and set the process's exit code to 1.

The PR doesn't change the default behavior for unhandled rejections.
That will come in a separate PR.

Refs: https://github.com/nodejs/node/pull/33021

PR-URL: https://github.com/nodejs/node/pull/33475
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2020-06-16 13:03:05 -07:00
James M Snell
bc71278563
events: lazy load perf_hooks for EventTarget
PR-URL: https://github.com/nodejs/node/pull/33717
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Zeyu Yang <himself65@outlook.com>
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2020-06-16 12:27:23 -07:00
James M Snell
55360443ce
quic: initial QUIC implementation
Co-authored-by: Anna Henningsen <anna@addaleax.net>
Co-authored-by: Daniel Bevenius <daniel.bevenius@gmail.com>
Co-authored-by: gengjiawen <technicalcute@gmail.com>
Co-authored-by: James M Snell <jasnell@gmail.com>
Co-authored-by: Lucas Pardue <lucaspardue.24.7@gmail.com>
Co-authored-by: Ouyang Yadong <oyydoibh@gmail.com>
Co-authored-by: Juan Jos<C3><A9> Arboleda <soyjuanarbol@gmail.com>
Co-authored-by: Trivikram Kamat <trivikr.dev@gmail.com>
Co-authored-by: Denys Otrishko <shishugi@gmail.com>

PR-URL: https://github.com/nodejs/node/pull/32379
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2020-06-16 09:23:34 -07:00
James M Snell
bccb514936
deps: maintaining ngtcp2 and nghttp3
Signed-off-by: James M Snell <jasnell@gmail.com>

PR-URL: https://github.com/nodejs/node/pull/32379
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2020-06-16 09:23:24 -07:00
James M Snell
834fa8f23f
deps: add ngtcp2 and nghttp3
Signed-off-by: James M Snell <jasnell@gmail.com>

PR-URL: https://github.com/nodejs/node/pull/32379
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2020-06-16 09:23:16 -07:00
James M Snell
f96b981528
deps: details for updating openssl quic support
Signed-off-by: James M Snell <jasnell@gmail.com>

PR-URL: https://github.com/nodejs/node/pull/32379
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2020-06-16 09:23:06 -07:00
James M Snell
98c8498552
deps: update archs files for OpenSSL-1.1.0
After an OpenSSL source update, all the config files need to be
regenerated and committed by:
  $ make -C deps/openssl/config
  $ git add deps/openssl/config/archs
  $ git add deps/openssl/openssl/include/crypto/bn_conf.h
  $ git add deps/openssl/openssl/include/crypto/dso_conf.h
  $ git add deps/openssl/openssl/include/openssl/opensslconf.h
  $ git commit

PR-URL: https://github.com/nodejs/node/pull/32379
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2020-06-16 09:22:54 -07:00