0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-29 23:16:30 +01:00
Commit Graph

5988 Commits

Author SHA1 Message Date
Michael Dawson
18405e66d2 doc: mention N-API as recommended approach
We've had a few comments that from the doc it might not
be clear that N-API is the recommended approach for Addons.
As a start, mention N-API early in the non N-API section
as the recommended approach unless lower level access
is required.

PR-URL: https://github.com/nodejs/node/pull/28922
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
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>
2019-08-16 14:47:27 -04:00
Andrew Hughes
791409a9ce
doc: fixup changelog for v10.16.3
Remove (SEMVER-MINOR) label from patch commit. Add link to table.

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

PR-URL: https://github.com/nodejs/node/pull/29159
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2019-08-16 11:08:03 +01:00
Ben Noordhuis
0f8f4cd3d7 doc: fix introduced_in note in querystring.md
The method descriptions mentioned the right version but for some reason
the top-level description did not. Well, now it does.

PR-URL: https://github.com/nodejs/node/pull/29014
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-08-16 10:27:12 +02:00
Beth Griggs
affa23bc88
2019-08-15, Version 8.16.1 'Carbon' (LTS)
This is a security release.

Notable changes:

Node.js, as well as many other implementations of HTTP/2, have been
found vulnerable to Denial of Service attacks.
See https://github.com/Netflix/security-bulletins/blob/master/advisories/third-party/2019-002.md
for more information.

Vulnerabilities fixed:

* CVE-2019-9511 “Data Dribble”: The attacker requests a large amount of
  data from a specified resource over multiple streams. They manipulate
  window size and stream priority to force the server to queue the data
  in 1-byte chunks. Depending on how efficiently this data is queued,
  this can consume excess CPU, memory, or both, potentially leading to a
  denial of service.
* CVE-2019-9512 “Ping Flood”: The attacker sends continual pings to an
  HTTP/2 peer, causing the peer to build an internal queue of responses.
  Depending on how efficiently this data is queued, this can consume
  excess CPU, memory, or both, potentially leading to a denial of
  service.
* CVE-2019-9513 “Resource Loop”: The attacker creates multiple request
  streams and continually shuffles the priority of the streams in a way
  that causes substantial churn to the priority tree. This can consume
  excess CPU, potentially leading to a denial of service.
* CVE-2019-9514 “Reset Flood”: The attacker opens a number of streams
  and sends an invalid request over each stream that should solicit a
  stream of RST_STREAM frames from the peer. Depending on how the peer
  queues the RST_STREAM frames, this can consume excess memory, CPU,or
  both, potentially leading to a denial of service.
* CVE-2019-9515 “Settings Flood”: The attacker sends a stream of
  SETTINGS frames to the peer. Since the RFC requires that the peer
  reply with one acknowledgement per SETTINGS frame, an empty SETTINGS
  frame is almost equivalent in behavior to a ping. Depending on how
  efficiently this data is queued, this can consume excess CPU, memory,
  or both, potentially leading to a denial of service.
* CVE-2019-9516 “0-Length Headers Leak”: The attacker sends a stream of
  headers with a 0-length header name and 0-length header value,
  optionally Huffman encoded into 1-byte or greater headers. Some
  implementations allocate memory for these headers and keep the
  allocation alive until the session dies. This can consume excess
  memory, potentially leading to a denial of service.
* CVE-2019-9517 “Internal Data Buffering”: The attacker opens the HTTP/2
  window so the peer can send without constraint; however, they leave
  the TCP window closed so the peer cannot actually write (many of) the
  bytes on the wire. The attacker then sends a stream of requests for a
  large response object. Depending on how the servers queue the
  responses, this can consume excess memory, CPU, or both, potentially
  leading to a denial of service.
* CVE-2019-9518 “Empty Frames Flood”: The attacker sends a stream of
  frames with an empty payload and without the end-of-stream flag. These
  frames can be DATA, HEADERS, CONTINUATION and/or PUSH_PROMISE. The
  peer spends time processing each frame disproportionate to attack
  bandwidth. This can consume excess CPU, potentially leading to a
  denial of service. (Discovered by Piotr Sikora of Google)

PR-URL: https://github.com/nodejs/node/pull/29152
2019-08-15 23:30:22 +01:00
Beth Griggs
004e2b759f
2019-08-15, Version 10.16.3 'Dubnium' (LTS)
This is a security release.

Notable changes:

Node.js, as well as many other implementations of HTTP/2, have been
found vulnerable to Denial of Service attacks.
See https://github.com/Netflix/security-bulletins/blob/master/advisories/third-party/2019-002.md
for more information.

Vulnerabilities fixed:

* CVE-2019-9511 “Data Dribble”: The attacker requests a large amount of
  data from a specified resource over multiple streams. They manipulate
  window size and stream priority to force the server to queue the data
  in 1-byte chunks. Depending on how efficiently this data is queued,
  this can consume excess CPU, memory, or both, potentially leading to a
  denial of service.
* CVE-2019-9512 “Ping Flood”: The attacker sends continual pings to an
  HTTP/2 peer, causing the peer to build an internal queue of responses.
  Depending on how efficiently this data is queued, this can consume
  excess CPU, memory, or both, potentially leading to a denial of
  service.
* CVE-2019-9513 “Resource Loop”: The attacker creates multiple request
  streams and continually shuffles the priority of the streams in a way
  that causes substantial churn to the priority tree. This can consume
  excess CPU, potentially leading to a denial of service.
* CVE-2019-9514 “Reset Flood”: The attacker opens a number of streams
  and sends an invalid request over each stream that should solicit a
  stream of RST_STREAM frames from the peer. Depending on how the peer
  queues the RST_STREAM frames, this can consume excess memory, CPU,or
  both, potentially leading to a denial of service.
* CVE-2019-9515 “Settings Flood”: The attacker sends a stream of
  SETTINGS frames to the peer. Since the RFC requires that the peer
  reply with one acknowledgement per SETTINGS frame, an empty SETTINGS
  frame is almost equivalent in behavior to a ping. Depending on how
  efficiently this data is queued, this can consume excess CPU, memory,
  or both, potentially leading to a denial of service.
* CVE-2019-9516 “0-Length Headers Leak”: The attacker sends a stream of
  headers with a 0-length header name and 0-length header value,
  optionally Huffman encoded into 1-byte or greater headers. Some
  implementations allocate memory for these headers and keep the
  allocation alive until the session dies. This can consume excess
  memory, potentially leading to a denial of service.
* CVE-2019-9517 “Internal Data Buffering”: The attacker opens the HTTP/2
  window so the peer can send without constraint; however, they leave
  the TCP window closed so the peer cannot actually write (many of) the
  bytes on the wire. The attacker then sends a stream of requests for a
  large response object. Depending on how the servers queue the
  responses, this can consume excess memory, CPU, or both, potentially
  leading to a denial of service.
* CVE-2019-9518 “Empty Frames Flood”: The attacker sends a stream of
  frames with an empty payload and without the end-of-stream flag. These
  frames can be DATA, HEADERS, CONTINUATION and/or PUSH_PROMISE. The
  peer spends time processing each frame disproportionate to attack
  bandwidth. This can consume excess CPU, potentially leading to a
  denial of service. (Discovered by Piotr Sikora of Google)

PR-URL: https://github.com/nodejs/node/pull/29148
2019-08-15 22:50:53 +01:00
Michaël Zasso
edc2e5be34
2019-08-15, Version 12.8.1 (Current)
This is a security release.

Notable changes:

Node.js, as well as many other implementations of HTTP/2, have been
found vulnerable to Denial of Service attacks.
See https://github.com/Netflix/security-bulletins/blob/master/advisories/third-party/2019-002.md
for more information.

Vulnerabilities fixed:

* CVE-2019-9511 “Data Dribble”: The attacker requests a large amount of
  data from a specified resource over multiple streams. They manipulate
  window size and stream priority to force the server to queue the data
  in 1-byte chunks. Depending on how efficiently this data is queued,
  this can consume excess CPU, memory, or both, potentially leading to a
  denial of service.
* CVE-2019-9512 “Ping Flood”: The attacker sends continual pings to an
  HTTP/2 peer, causing the peer to build an internal queue of responses.
  Depending on how efficiently this data is queued, this can consume
  excess CPU, memory, or both, potentially leading to a denial of
  service.
* CVE-2019-9513 “Resource Loop”: The attacker creates multiple request
  streams and continually shuffles the priority of the streams in a way
  that causes substantial churn to the priority tree. This can consume
  excess CPU, potentially leading to a denial of service.
* CVE-2019-9514 “Reset Flood”: The attacker opens a number of streams
  and sends an invalid request over each stream that should solicit a
  stream of RST_STREAM frames from the peer. Depending on how the peer
  queues the RST_STREAM frames, this can consume excess memory, CPU,or
  both, potentially leading to a denial of service.
* CVE-2019-9515 “Settings Flood”: The attacker sends a stream of
  SETTINGS frames to the peer. Since the RFC requires that the peer
  reply with one acknowledgement per SETTINGS frame, an empty SETTINGS
  frame is almost equivalent in behavior to a ping. Depending on how
  efficiently this data is queued, this can consume excess CPU, memory,
  or both, potentially leading to a denial of service.
* CVE-2019-9516 “0-Length Headers Leak”: The attacker sends a stream of
  headers with a 0-length header name and 0-length header value,
  optionally Huffman encoded into 1-byte or greater headers. Some
  implementations allocate memory for these headers and keep the
  allocation alive until the session dies. This can consume excess
  memory, potentially leading to a denial of service.
* CVE-2019-9517 “Internal Data Buffering”: The attacker opens the HTTP/2
  window so the peer can send without constraint; however, they leave
  the TCP window closed so the peer cannot actually write (many of) the
  bytes on the wire. The attacker then sends a stream of requests for a
  large response object. Depending on how the servers queue the
  responses, this can consume excess memory, CPU, or both, potentially
  leading to a denial of service.
* CVE-2019-9518 “Empty Frames Flood”: The attacker sends a stream of
  frames with an empty payload and without the end-of-stream flag. These
  frames can be DATA, HEADERS, CONTINUATION and/or PUSH_PROMISE. The
  peer spends time processing each frame disproportionate to attack
  bandwidth. This can consume excess CPU, potentially leading to a
  denial of service. (Discovered by Piotr Sikora of Google)

PR-URL: https://github.com/nodejs/node/pull/29133
2019-08-15 14:49:36 +02:00
Robert Nagy
e505a741e3 doc: note that stream error can close stream
PR-URL: https://github.com/nodejs/node/pull/29082
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-08-14 15:56:20 -07:00
XhmikosR
f114e5ba33 doc, lib, src, test, tools: fix assorted typos
PR-URL: https://github.com/nodejs/node/pull/29075
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2019-08-12 16:00:22 -07:00
Robert Nagy
d7a4ace34b doc: clarify async iterator leak
Clarifies that creating multiple async iterators from the same stream
can lead to event listener leak.

PR-URL: https://github.com/nodejs/node/pull/28997
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2019-08-12 15:46:22 -07:00
Guy Bedford
2103ae4835 module: pkg exports validations and fallbacks
PR-URL: https://github.com/nodejs/node/pull/28949
Reviewed-By: Bradley Farias <bradley.meck@gmail.com>
Reviewed-By: Jan Krems <jan.krems@gmail.com>
2019-08-12 06:24:28 -04:00
Vse Mozhet Byt
bf692ce1e6 doc: fix nits in child_process.md
* Use `console.error()` for error or stderr output.
* Unify comment style.
* Unify link format.
* Correct link URL.
* Fix some typos.

PR-URL: https://github.com/nodejs/node/pull/29024
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-08-09 11:40:20 -07:00
Tobias Nießen
885c644158
doc: improve UV_THREADPOOL_SIZE description
PR-URL: https://github.com/nodejs/node/pull/29033
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com>
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: Luigi Pinca <luigipinca@gmail.com>
2019-08-09 13:36:56 +02:00
Guy Bedford
0e03c449e3 module: refine package name validation
PR-URL: https://github.com/nodejs/node/pull/28965
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Jan Krems <jan.krems@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-08-07 19:56:11 -07:00
Natalie Fearnley
71c28a4d2b doc: documented default statusCode
PR-URL: https://github.com/nodejs/node/pull/28982
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-08-07 19:48:45 -07:00
EduardoRFS
84a638484e doc: make unshift doc compliant with push doc
readable.unshift() also allows to pass null and end stream

PR-URL: https://github.com/nodejs/node/pull/28953
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2019-08-07 13:14:33 -07:00
Tobias Nießen
0c9ad34427
crypto: extend RSA-OAEP support with oaepHash
This adds an oaepHash option to asymmetric encryption which allows
users to specify a hash function when using OAEP padding. This
feature is required for interoperability with WebCrypto applications.

PR-URL: https://github.com/nodejs/node/pull/28335
Fixes: https://github.com/nodejs/node/issues/25756
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
2019-08-07 13:45:42 +02:00
Beth Griggs
f1478e1789
2019-08-06, Version 10.16.2 'Dubnium' (LTS)
Notable changes:

This release patches a regression in the OpenSSL upgrade to 1.1.1c that
 causes intermittent hangs in machines that have low entropy.

Refs: https://github.com/nodejs/node/issues/28932

PR-URL: https://github.com/nodejs/node/pull/29021
2019-08-06 23:29:55 +01:00
Ruben Bridgewater
a9e7441916
2019-08-06, Version 12.8.0 (Current)
Notable changes:

* assert:
  * Legacy mode deprecation (`DEP0089`) is revoked (Colin Ihrig)
    https://github.com/nodejs/node/pull/28892
* crypto:
  * The `outputLength` option is added to `crypto.createHash`
    (Tobias Nießen) https://github.com/nodejs/node/pull/28805
  * The `maxmem` range is increased from 32 to 53 bits (Tobias Nießen)
    https://github.com/nodejs/node/pull/28799
* n-api:
  * Added APIs for per-instance state management (Gabriel Schulhof)
    https://github.com/nodejs/node/pull/28682
* report:
  * Network interfaces get included in the report (cjihrig)
    https://github.com/nodejs/node/pull/28911
* src:
  * `v8.getHeapCodeStatistics()` is now exported
    (Yuriy Vasiyarov) https://github.com/nodejs/node/pull/27978

PR-URL: https://github.com/nodejs/node/pull/29017
2019-08-07 00:25:59 +02:00
Michael Dawson
e3f4ec94b8 doc: remove use of you
We generally avoid the use of 'you'.

PR-URL: https://github.com/nodejs/node/pull/28919
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-08-03 22:06:13 -07:00
Alex Aubuchon
5eaef7b915 doc: describe NODE_OPTIONS interop w/cmd line opts
Fixes https://github.com/nodejs/node/issues/28910

PR-URL: https://github.com/nodejs/node/pull/28928
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2019-08-03 20:39:43 -07:00
cjihrig
1592d0ab73
report: include network interfaces in report
PR-URL: https://github.com/nodejs/node/pull/28911
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-08-03 07:25:52 -10:00
Vse Mozhet Byt
747ddd5fac doc: fix sorting nit in sections of http.md
PR-URL: https://github.com/nodejs/node/pull/28943
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2019-08-03 08:19:16 -07:00
Rich Trott
36864a60fa doc: remove legacy mode deprecation in assert
The deprecation was revoked in
https://github.com/nodejs/node/pull/28892.

PR-URL: https://github.com/nodejs/node/pull/28909
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-08-02 11:59:58 -07:00
Robert Nagy
08977822ee doc: writableFinished is true before 'finish'
PR-URL: https://github.com/nodejs/node/pull/28811
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2019-08-02 10:14:25 -07:00
Guy Bedford
452b393c1f module: exports error as MODULE_NOT_FOUND
PR-URL: https://github.com/nodejs/node/pull/28905
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jan Krems <jan.krems@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2019-08-01 20:36:27 -07:00
Michaël Zasso
655e0dc01a
src: update NODE_MODULE_VERSION to 77
Major V8 updates are usually API/ABI incompatible with previous
versions. This commit adapts NODE_MODULE_VERSION for V8 7.6.

Refs: https://github.com/nodejs/CTC/blob/master/meetings/2016-09-28.md

PR-URL: https://github.com/nodejs/node/pull/28016
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Refael Ackermann (רפאל פלחי) <refack@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
2019-08-01 12:55:17 +02:00
guybedford
8492acfd57 doc: include "exports" resolver specification
PR-URL: https://github.com/nodejs/node/pull/28899
Reviewed-By: Jan Krems <jan.krems@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-07-31 21:38:00 -07:00
Beth Griggs
9d37013ef0
2019-07-31, Version 10.16.1 'Dubnium' (LTS)
Notable changes:

- **deps**: upgrade openssl sources to 1.1.1c (Sam Roberts) [#28212](https://github.com/nodejs/node/pull/28212)
- **stream**: do not unconditionally call `\_read()` on `resume()` (Anna Henningsen) [#26965](https://github.com/nodejs/node/pull/26965)
- **worker**: fix nullptr deref after MessagePort deser failure (Anna Henningsen) [#25076](https://github.com/nodejs/node/pull/25076)

PR-URL: https://github.com/nodejs/node/pull/28731
2019-07-31 20:04:46 +01:00
cjihrig
2abdfc5d7e
doc: revoke DEP0089
Using the legacy assert module is not discouraged. Revoke
DEP0089 to avoid user confusion.

PR-URL: https://github.com/nodejs/node/pull/28892
Fixes: https://github.com/nodejs/node/issues/28780
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2019-07-31 05:40:33 -10:00
Felipe Duitama
698d479aff doc: add example about emitter.emit in events documentation
PR-URL: https://github.com/nodejs/node/pull/28374
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-07-30 19:46:22 -07:00
Yuriy Vasiyarov
21a7c695f0 src: export v8.GetHeapCodeAndMetadataStatistics()
Export statistic provided by V8 through HeapCodeStatistics class and
and GetHeapCodeAndMetadataStatistics function to v8 Node.js module

PR-URL: https://github.com/nodejs/node/pull/27978
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-07-30 11:36:51 -07:00
Laura Ciro
89344f5bee doc: add example of event close for child_process
PR-URL: https://github.com/nodejs/node/pull/28376
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-07-30 06:19:21 -07:00
Guy Bedford
816db9e192 doc: fixup esm resolver spec formatting
PR-URL: https://github.com/nodejs/node/pull/28885
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2019-07-29 20:25:30 -04:00
himself65
8a10b50b67 doc: correct import statement
JSON file can be imported now

PR-URL: https://github.com/nodejs/node/pull/28876
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-07-29 15:37:53 -07:00
Robert Nagy
70bb570bfb doc: add documentation for stream.destroyed
PR-URL: https://github.com/nodejs/node/pull/28815
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2019-07-26 13:49:48 -07:00
Bradley Farias
7e8ad9bad8 policy: add dependencies map for resources
Adds a "dependencies" field to resources in policy manifest files.
In order to ease development and testing while using manifests,
wildcard values for both "dependencies" and "integrity" have been
added using the boolean value "true" in the policy manifest.

PR-URL: https://github.com/nodejs/node/pull/28767
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Jan Krems <jan.krems@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-07-26 15:13:53 -05:00
Tobias Nießen
31d9b2f14f crypto: add outputLength option to crypto.createHash
This change adds an outputLength option to crypto.createHash which
allows users to produce variable-length hash values using XOF hash
functons.

Fixes: https://github.com/nodejs/node/issues/28757
PR-URL: https://github.com/nodejs/node/pull/28805
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-07-25 23:00:41 -07:00
cjihrig
306d240b01 doc: fix incorrect name in report docs
In diagnostic reports, the CPUs are listed in a "cpus" field.
This commit fixes the docs, which refer to the field as "osCpus"

PR-URL: https://github.com/nodejs/node/pull/28830
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2019-07-25 21:41:34 -07:00
Gabriel Schulhof
5030e81ce3 n-api: add APIs for per-instance state management
Adds `napi_set_instance_data()` and `napi_get_instance_data()`, which
allow native addons to store their data on and retrieve their data from
`napi_env`. `napi_set_instance_data()` accepts a finalizer which is
called when the `node::Environment()` is destroyed.

This entails rendering the `napi_env` local to each add-on.

Fixes: https://github.com/nodejs/abi-stable-node/issues/378
PR-URL: https://github.com/nodejs/node/pull/28682
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2019-07-25 16:53:07 -07:00
Sam Roberts
e9ea8eaf7a doc: describe why new Buffer() is problematic
Existing docs weren't clear on the actual problem. In addition, the text
described 8.0.0 as being a future Node.js release, so adjust language
to reflect that 8.0.0 is in the past (while not losing important
information about what the pre-8.x behaviour was).

PR-URL: https://github.com/nodejs/node/pull/28825
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2019-07-25 12:47:19 -07:00
Samuel Attard
657a78e30a doc: claim NODE_MODULE_VERSION=76 for Electron 8
PR-URL: https://github.com/nodejs/node/pull/28809
Refs: https://github.com/electron/electron/projects/20#card-24099810
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2019-07-24 15:57:49 -07:00
Luigi Pinca
0d32b9de77 doc: add documentation for response.flushHeaders()
PR-URL: https://github.com/nodejs/node/pull/28807
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-07-24 11:46:14 -07:00
Sam Roberts
c5befe3093 doc: fix type in NSS update instructions
The perl script must be fully named, correct so that the command can be
copy-pasted-run from the docs.

PR-URL: https://github.com/nodejs/node/pull/28808
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2019-07-24 10:56:09 -07:00
Tobias Nießen
1dc458cdd0 crypto: increase maxmem range from 32 to 53 bits
Fixes: https://github.com/nodejs/node/issues/28755

PR-URL: https://github.com/nodejs/node/pull/28799
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-07-23 21:17:19 -07:00
Cotton Hou
bd3b85bf89 doc: api/stream.md typo from writeable to writable
PR-URL: https://github.com/nodejs/node/pull/28822
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2019-07-23 17:13:01 -07:00
Jan Krems
dcb6929183 module: implement "exports" proposal for CommonJS
Refs: https://github.com/jkrems/proposal-pkg-exports/issues/36
Refs: https://github.com/nodejs/node/pull/28568

PR-URL: https://github.com/nodejs/node/pull/28759
Reviewed-By: Guy Bedford <guybedford@gmail.com>
Reviewed-By: Bradley Farias <bradley.meck@gmail.com>
2019-07-23 16:11:20 -07:00
Michaël Zasso
52c5287aca
2019-07-23, Version 12.7.0 (Current)
Notable changes:

* deps:
  * Updated nghttp2 to 1.39.1. https://github.com/nodejs/node/pull/28448
  * Updated npm to 6.10.0. https://github.com/nodejs/node/pull/28525
* esm:
  * Implemented experimental "pkg-exports" proposal. A new `"exports"`
    field can be added to a module's `package.json` file to provide
    custom subpath aliasing. See
    https://github.com/jkrems/proposal-pkg-exports/ for more
    information. https://github.com/nodejs/node/pull/28568
* http:
  * Added `response.writableFinished`.
    https://github.com/nodejs/node/pull/28681
  * Exposed `headers`, `rawHeaders` and other fields on an
    `http.ClientRequest` `"information"` event.
    https://github.com/nodejs/node/pull/28459
* inspector:
  * Added `inspector.waitForDebugger()`.
    https://github.com/nodejs/node/pull/28453
* policy:
  * Added `--policy-integrity=sri` CLI option to mitigate policy
    tampering. If a policy integrity is specified and the policy does
    not have that integrity, Node.js will error prior to running any
    code. https://github.com/nodejs/node/pull/28734
* readline,tty:
  * Exposed stream API from various methods which write characters.
    https://github.com/nodejs/node/pull/28674
    https://github.com/nodejs/node/pull/28721
* src:
  * Use cgroups to get memory limits. This improves the way we set
    the memory ceiling for a Node.js process. Previously we would use
    the physical memory size to estimate the necessary V8
    heap sizes. The physical memory size is not necessarily the correct
    limit, e.g. if the process is running inside a docker container or
    is otherwise constrained. This change adds the ability to get a
    memory limit set by linux cgroups, which is used by docker
    containers to set resource constraints.
    https://docs.docker.com/config/containers/resource_constraints/
    https://github.com/nodejs/node/pull/27508

PR-URL: https://github.com/nodejs/node/pull/28817
2019-07-23 22:54:24 +02:00
h3knix
329355986d doc: update env default on child_process functions
PR-URL: https://github.com/nodejs/node/pull/28776
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-07-22 11:17:29 -07:00
Samuel Attard
b686bd79dc doc: claim NODE_MODULE_VERSION=75 for Electron 7
PR-URL: https://github.com/nodejs/node/pull/28774
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
2019-07-21 22:17:10 -07:00
Aleksei Koziatinskii
f02dfdb2b5 inspector: add inspector.waitForDebugger()
This method blocks current node process until a client sends
Runtime.runifWaitingForDebugger.

It can be useful when we need to report inspector.url() before
waiting for connection:
```
inspector.open(0, undefined, false);
fs.writeFileSync(someFileName, inspector.url());
inspector.waitForDebugger();
```

PR-URL: https://github.com/nodejs/node/pull/28453
Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-07-20 22:19:06 -07:00
Bradley Farias
6c288a7044 policy: add policy-integrity to mitigate policy tampering
PR-URL: https://github.com/nodejs/node/pull/28734
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Guy Bedford <guybedford@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-07-20 13:24:58 -07:00
Juan José Arboleda
0df3ea09fa doc: add code example to subprocess.stdout
PR-URL: https://github.com/nodejs/node/pull/28402
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-07-20 12:42:37 -07:00
Tanner Stirrat
4fbefc4283 doc: add information for heap snapshot flag
It's nice to have usage examples, especially since the flag requires the
`SIG` version of the signal name, unlike `kill`.

PR-URL: https://github.com/nodejs/node/pull/28754
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2019-07-20 12:38:18 -07:00
Michael Dawson
6c075238b0 doc: amplify warning for execute callback
Add specific recommendation not to use the
to the napi-env parameter in napi_async_execute_callback

PR-URL: https://github.com/nodejs/node/pull/28738
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-07-20 12:32:06 -07:00
Guy Bedford
6df7b6a4f9 esm: implement "pkg-exports" proposal
Refs: https://github.com/jkrems/proposal-pkg-exports/issues/36

PR-URL: https://github.com/nodejs/node/pull/28568
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2019-07-18 14:54:16 -07:00
cjihrig
d0894773a4
tty: expose stream API from readline methods
This commit exposes the return value and callback of the
underlying readline APIs from the tty module.

PR-URL: https://github.com/nodejs/node/pull/28721
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2019-07-18 17:20:45 -04:00
Vickodev
ed24b8f10a doc: add example for beforeExit event
PR-URL: https://github.com/nodejs/node/pull/28430
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2019-07-17 22:01:22 -07:00
Alex Ramirez
57ed7c33b1 doc: add example for zlib.createGzip()
PR-URL: https://github.com/nodejs/node/pull/28136
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Masashi Hirano <shisama07@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-07-17 22:00:26 -07:00
Juan José Arboleda
d1bb21fc2c doc: improve os.homedir() docs
PR-URL: https://github.com/nodejs/node/pull/28401
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-07-17 21:48:40 -07:00
himself65
3ad87994ec doc: add examples at assert.strictEqual
PR-URL: https://github.com/nodejs/node/pull/28092
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-07-17 21:13:48 -07:00
Robert Nagy
7032e59bb5 http: add response.writableFinished
response.writableFinished is true if all data has been flushed to the
underlying system.

PR-URL: https://github.com/nodejs/node/pull/28681
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-07-16 10:26:08 -07:00
cjihrig
462f43824f
readline: expose stream API in cursorTo()
This commit adds an optional callback to cursorTo(), which is
passed to the stream's write() method. It also exposes the
return value of write().

PR-URL: https://github.com/nodejs/node/pull/28674
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2019-07-16 10:03:19 -04:00
cjihrig
795c7482f2
readline: expose stream API in moveCursor()
This commit adds an optional callback to moveCursor(), which is
passed to the stream's write() method. It also exposes the
return value of write().

PR-URL: https://github.com/nodejs/node/pull/28674
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2019-07-16 10:03:13 -04:00
cjihrig
79cc8bb241
readline: expose stream API in clearLine()
This commit adds an optional callback to clearLine(), which
is passed to the stream's write() method. It also exposes the
return value of write().

PR-URL: https://github.com/nodejs/node/pull/28674
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2019-07-16 10:03:01 -04:00
Austin Wright
d5737a8537 http: expose headers on an http.ClientRequest "information" event
1xx intermediate status responses are allowed to have headers; so
expose the "httpVersion", "httpVersionMajor", "httpVersionMinor",
"headers", "rawHeaders", and "statusMessage" properties on this
event.

PR-URL: https://github.com/nodejs/node/pull/28459
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-07-15 21:22:11 -07:00
Shajan Jacob
87d0d8c7d4 doc: fix minor typo
PR-URL: https://github.com/nodejs/node/pull/28148
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-07-15 19:24:59 -07:00
Gabriel Schulhof
8cb4ba982b doc: update js-native-api example
Update example that shows how to separate N-API code which is not
Node.js-specific from code which defines a Node.js N-API addon. In its
existing state the example uses the pattern

```C
assert(napi_*() == napi_ok);
```

However, this would result in no N-API calls when building with
`-DNDEBUG`.

This change moves away from assert and uses a macro `NAPI_CALL()` which
throws the string corresponding to the non-`napi_ok` status as a JS
exception and short-circuits the binding by returning `NULL`.

PR-URL: https://github.com/nodejs/node/pull/28657
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-07-15 19:15:17 -07:00
Anna Henningsen
ef579110cd
doc: add missing version metadata for Readable.from
Fixes: https://github.com/nodejs/node/issues/28693

PR-URL: https://github.com/nodejs/node/pull/28695
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2019-07-15 22:28:36 +02:00
cjihrig
440a344f68
doc: small grammar correction
This commit improves the grammar of one sentence in the ESM
documentation.

PR-URL: https://github.com/nodejs/node/pull/28669
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-07-15 13:19:46 -04:00
Rich Trott
0796f0e268 Revert "http: fix test where aborted should not be emitted"
This reverts commit 461bf36d70.

PR-URL: https://github.com/nodejs/node/pull/28699
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2019-07-15 08:40:19 -07:00
Ojasvi Monga
11c52d9e9f doc: add documentation for createDiffieHellmanGroup
PR-URL: https://github.com/nodejs/node/pull/28585
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-07-14 23:17:00 -07:00
ZYSzys
6c430b48b9 stream: use readableEncoding public api for child_process
PR-URL: https://github.com/nodejs/node/pull/28548
Refs: https://github.com/nodejs/node/issues/445
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-07-14 22:27:33 -07:00
Robert Nagy
461bf36d70 http: fix test where aborted should not be emitted
PR-URL: https://github.com/nodejs/node/pull/20077
Fixes: https://github.com/nodejs/node/issues/20107
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2019-07-14 21:48:21 -07:00
Gabriel Schulhof
efc39464b0 doc: mark N-API thread-safe function stable
The various TSFN APIs are marked as stable, but the TSFN heading itself
is still marked as experimental.

PR-URL: https://github.com/nodejs/node/pull/28643
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-07-14 11:49:35 -07:00
cjihrig
febdf39fdf
doc: mark process.report as experimental
Everything under process.report is experimental. This commit
adds the missing stability index entries.

PR-URL: https://github.com/nodejs/node/pull/28653
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2019-07-14 10:09:58 -04:00
cjihrig
c31f7e595a
readline: expose stream API in clearScreenDown()
This commit adds an optional callback to clearScreenDown(),
which is passed to the stream's write() method. It also
exposes the return value of write().

PR-URL: https://github.com/nodejs/node/pull/28641
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2019-07-13 16:20:06 -04:00
Rich Trott
a013aa0f5e doc: remove superfluous MDN link in assert.md
PR-URL: https://github.com/nodejs/node/pull/28246
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-07-13 10:06:05 -07:00
cjihrig
ec5518003f
doc: drop 'for more details' in deprecations
The deprecations documentation links to the GitHub issue
tracker in several places. This commit makes the text
around those links consistent.

PR-URL: https://github.com/nodejs/node/pull/28617
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-07-13 10:08:35 -04:00
Walle Cyril
84ad92d2e7 doc: add example on how to create __filename, __dirname for esm
PR-URL: https://github.com/nodejs/node/pull/28282
Fixes: https://github.com/nodejs/node/issues/28114
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Guy Bedford <guybedford@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-07-13 15:46:06 +02:00
Christopher Hiller
bff7a46f31
report: modify getReport() to return an Object
It's likely that anyone using `process.report.getReport()` will be
processing the return value thereafter (e.g., filtering fields or
redacting secrets). This change eliminates boilerplate by calling
`JSON.parse()` on the return value.

Also modified the `validateContent()` and `validate()` test helpers in
`test/common/report.js` to be somewhat more obvious and helpful. Of
note, a report failing validation will now be easier (though still not
_easy_) to read when prepended to the stack trace.

- Refs: https://github.com/nodejs/diagnostics/issues/315

PR-URL: https://github.com/nodejs/node/pull/28630
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-07-12 14:48:09 -07:00
Luigi Pinca
28e18cfff0 doc: add missing types
Document the types returned by the `readable.readableObjectMode`,
`writable.writableLength`, and `writable.writableObjectMode` getters.

PR-URL: https://github.com/nodejs/node/pull/28623
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-07-12 14:35:35 -07:00
Tobias Nießen
9e340357df doc: relax requirements for setAAD in CCM mode
This was fixed in OpenSSL 1.1.1c (openssl/openssl@b48e3be947). The
authentication tag can now be specified after setAAD was called,
matching the behavior of the other supported AEAD modes (GCM, OCB).

Refs: https://github.com/openssl/openssl/pull/7243

PR-URL: https://github.com/nodejs/node/pull/28624
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-07-12 14:34:16 -07:00
Lucas Holmquist
d38b075dd4 doc: add a link to the throw-deprecations flag
Motivation:  On the deprecated api's doc, the --pending-deprecation flag
is a clickable link to the command line docs.

This makes the --throw-deprecation flag, which is described in the next
paragraph also a link to keep things consistent

PR-URL: https://github.com/nodejs/node/pull/28625
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-07-12 14:33:01 -07:00
Vse Mozhet Byt
1cc5c547d5 doc: fix nits in stream.md
* Unify periods and upper case in comments.
* Add missing parentheses for methods.
* Add missing backticks.
* Fix sorting position of `writable.writableFinished` section.
* Replace a one-letter variable with a more readable one.
* `catch(console.log)` -> `catch(console.error)`.
* Document missing `emitClose` option in `new stream.Readable()` section
  mentioned in https://nodejs.org/api/stream.html#stream_event_close_1
  and https://nodejs.org/api/stream.html#stream_readable_destroy_error
  copying from the `new stream.Writable()` section.
  Refs: 36fdf1aa6c/lib/_stream_readable.js (L121)

PR-URL: https://github.com/nodejs/node/pull/28591
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2019-07-11 23:01:08 -07:00
Rich Trott
86f8f4f791 doc: edit stream module introduction
Edit the stream module introduction for concision and simplicity.

PR-URL: https://github.com/nodejs/node/pull/28595
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2019-07-11 22:57:09 -07:00
Rich Trott
f428f47636 doc: change 'unix' to 'Unix' in ninja guide
A recent PR converted all instances of 'unix' and 'UNIX' to 'Unix'
in the API docs. This commit fixes one instance in the guides in
preparation for a relevant lint rule.

PR-URL: https://github.com/nodejs/node/pull/28619
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-07-11 22:42:19 -07:00
vmarchaud
0ebf01dc53
perf_hooks: add HttpRequest statistics monitoring #28445
```js
const { PerformanceObserver, performance } = require('perf_hooks');
const http = require('http');

const obs = new PerformanceObserver((items) => {
  const entry = items.getEntries()[0];
  console.log(entry.name, entry.duration);
});
obs.observe({ entryTypes: ['http'] });

const server = http.Server(function(req, res) {
  server.close();
  res.writeHead(200);
  res.end('hello world\n');
});

server.listen(0, function() {
  const req = http.request({
    port: this.address().port,
    path: '/',
    method: 'POST'
  }).end();
});
```

PR-URL: https://github.com/nodejs/node/pull/28486
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-07-12 00:36:27 +02:00
Jan Krems
ca0884a60b
doc: mention unit for event loop delay measurements
PR-URL: https://github.com/nodejs/node/pull/28629
Reviewed-By: Ben Coe <bencoe@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-07-11 22:08:59 +02:00
Rich Trott
bf46c2cecb doc: update stream.md "Organization of this Document"
Revise the text of "Organization of this Document" in stream.md for
simplicity.

PR-URL: https://github.com/nodejs/node/pull/28601
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-07-11 10:30:01 -07:00
Rich Trott
fe4d53df51 doc: move Usage and Example to same header level
Having Example under Usage in synopsis.md is misleading. That suggests
that the examples will be examples of the CLI usage, but the example
section is mostly about writing a simple web server. Ideally, the Usage
section should be moved to cli.md and the Example section should
constitute a Getting Started or Quick Start page. But for now, make them
equals under a combined header so that the Table of Contents and the
header/layout of the page is not confusing or misleading.

PR-URL: https://github.com/nodejs/node/pull/28570
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2019-07-09 19:45:20 -07:00
cjihrig
4742e4dc3e
doc: remove URLs from zlib docs
This commit removes two URLs from the zlib documentation. One
of the URLs is already linked to in the previous sentence, so
it is removed completely. The other is changed to more human
friendly link text.

PR-URL: https://github.com/nodejs/node/pull/28580
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-07-08 13:42:45 -04:00
cjihrig
29676f4867
doc: make tls links more readable
This commit replaces two long URLs in the TLS documentation
with linked text.

PR-URL: https://github.com/nodejs/node/pull/28580
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-07-08 13:42:23 -04:00
cjihrig
30911157f6
doc: clarify http2 server.close() behavior
This commit is an attempt to clarify the behavior of HTTP2's
server.close() method. Specifically, this makes it more clear
that the server stops allowing new sessions although the
callback may not be invoked for some time due to previously
existing sessions.

PR-URL: https://github.com/nodejs/node/pull/28581
Fixes: https://github.com/nodejs/node/issues/28214
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-07-08 13:38:06 -04:00
cjihrig
e04ee9b37a
doc: format Unix consistently
Update the API docs to always spell as Unix.

PR-URL: https://github.com/nodejs/node/pull/28576
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2019-07-08 13:34:05 -04:00
cjihrig
f67a0a17a0
doc: document family:0 behavior in socket.connect
Now that family:0 is documented in socket.connect(), add an
explanation of what it means since 0 is not an IP family.

PR-URL: https://github.com/nodejs/node/pull/28574
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-07-08 13:31:18 -04:00
Luigi Pinca
8850ef276a doc: add description for the listener argument
Clarify that `listener` is registered as a one-time listener of the
`'connect'` event.

PR-URL: https://github.com/nodejs/node/pull/28500
Fixes: https://github.com/nodejs/node/issues/28217
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
2019-07-06 11:05:13 +02:00
Kirill Fomichev
fd23c12263 doc: fix family default value in socket.connect
PR-URL: https://github.com/nodejs/node/pull/28521
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-07-05 22:29:00 -07:00
Vse Mozhet Byt
344d12c592 doc: simplify process.resourceUsage() section
Merge options list with its description to reduce redundancy
(some possible typos were also fixed and some periods added).

PR-URL: https://github.com/nodejs/node/pull/28499
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-07-04 16:14:27 -07:00
Juan Roa
41fad84035
doc: add example for chmod in fs.md
PR-URL: https://github.com/nodejs/node/pull/28365
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2019-07-03 22:24:49 +02:00
Felipe
c03df4c75d
doc: provide an example to fs.stat()
Provided a small example along its output using fs.stat() to check the
stats on two different paths, one a directory and the other a txt file.

PR-URL: https://github.com/nodejs/node/pull/28381
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-07-03 22:21:10 +02:00
Michaël Zasso
fcf8fe9f1a
2019-07-03, Version 12.6.0 (Current)
Notable changes:

* build:
  * Experimental support for building Node.js on MIPS architecture
    is back. https://github.com/nodejs/node/pull/27992
* child_process:
  * The promisified versions of `child_process.exec` and
    `child_process.execFile` now both return a `Promise` which has the
	child instance attached to their `child` property.
	https://github.com/nodejs/node/pull/28325
* deps:
  * Updated libuv to 1.30.1. https://github.com/nodejs/node/pull/28449,
    https://github.com/nodejs/node/pull/28511
    * Support for the Haiku platform has been added.
    * The maximum `UV_THREADPOOL_SIZE` has been increased from 128 to
	  1024.
    * `uv_fs_copyfile()` now works properly when the source and
	  destination files are the same.
* process:
  * A new method, `process.resourceUsage()` was added. It returns
    resource usage for the current process, such as CPU time.
	https://github.com/nodejs/node/pull/28018
* src:
  * Fixed an issue related to stdio that could lead to a crash of the
    process in some circumstances.
	https://github.com/nodejs/node/pull/28490
* stream:
  * Added a `writableFinished` property to writable streams. It
    indicates that all the data has been flushed to the underlying
	system. https://github.com/nodejs/node/pull/28007
* worker:
  * Fixed an issue that prevented worker threads to listen for data on
    stdin. https://github.com/nodejs/node/pull/28153
* meta:
  * Added Jiawen Geng (https://github.com/gengjiawen) to collaborators.
    https://github.com/nodejs/node/pull/28322

PR-URL: https://github.com/nodejs/node/pull/28508
2019-07-03 15:53:31 +02:00
cjihrig
cce78bbdf5
doc: format try...catch consistently
PR-URL: https://github.com/nodejs/node/pull/28481
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2019-07-02 14:06:01 -04:00
cjihrig
5ab24edb02
doc: remove unnecessary stability specifiers
If a top level module is listed as Stable, there is no need to
call out individual components of that module as Stable. The
extra text is just distracting.

PR-URL: https://github.com/nodejs/node/pull/28485
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2019-07-02 13:13:03 -04:00
cjihrig
e1f27efebf
doc: address missing paren
The closing paren was missing. Move to using commas instead.

PR-URL: https://github.com/nodejs/node/pull/28483
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
2019-07-02 12:17:02 -04:00
NickNaso
9868126546 build: expose napi_build_version variable
Expose `napi_build_version` to allow `node-gyp` to make it
available for building native addons.

Fixes: https://github.com/nodejs/node-gyp/issues/1745
Refs: https://github.com/nodejs/abi-stable-node/issues/371
PR-URL: https://github.com/nodejs/node/pull/27835
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2019-07-01 22:07:42 -07:00
cjihrig
9b77be4814
doc: fix swapedOut typo
This corrects a typo in the process.resourceUsage() docs. The
field is named swappedOut, not swapedOut.

PR-URL: https://github.com/nodejs/node/pull/28497
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2019-07-01 11:21:44 -04:00
vmarchaud
6271ef005e
process: expose uv_rusage on process.resourcesUsage()
As discussed in https://github.com/nodejs/diagnostics/issues/161,
the core should expose important metrics about the runtime, this PR's
goal is to let user get the number of io request made, and lower level
mertrics like the page faults and context switches.

PR-URL: https://github.com/nodejs/node/pull/28018
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2019-07-01 16:02:17 +02:00
cjihrig
6045fbbb5e
doc: reformat for-await-of
Instead of `for`-`await`-`of`, prefer `for await...of`.

PR-URL: https://github.com/nodejs/node/pull/28425
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2019-06-27 13:52:17 -04:00
cjihrig
d22fbbe942
doc: update readline asyncIterator docs
This commit:
- Removes an unnecessary stability index entry. These generally
  are not included for Stable entries.
- Remove mention of experimental status that is not true anymore.
- Remove use of "we"
- Remove use of relative time phrasing.
- Misc cleanup.

PR-URL: https://github.com/nodejs/node/pull/28425
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2019-06-27 13:51:51 -04:00
Gus Caplan
fd3a0d3137
doc: add links to 12.5.0 changelog notable changes
PR-URL: https://github.com/nodejs/node/pull/28450
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-06-27 10:49:49 -05:00
Ruben Bridgewater
af3cc714f9
2019-06-27, Version 12.5.0 (Current)
Notable changes:

* build:
  * The startup time is reduced by enabling V8 snapshots by default
    https://github.com/nodejs/node/pull/28181
* deps:
  * Updated `V8` to 7.5.288.22 https://github.com/nodejs/node/pull/27375
    * The numeric separator (v8.dev/features/numeric-separators) feature is now
      enabled by default
  * Updated `OpenSSL` to 1.1.1c https://github.com/nodejs/node/pull/28211
* inspector:
  * The `--inspect-publish-uid` flag was added to specify ways of the inspector
    web socket url exposure https://github.com/nodejs/node/pull/27741
* n-api:
  * Accessors on napi_define_* are now ECMAScript-compliant
    https://github.com/nodejs/node/pull/27851
* report:
  * The cpu info got added to the report output
    https://github.com/nodejs/node/pull/28188
* src:
  * Restore the original state of the stdio file descriptors on exit to prevent
    leaving stdio in raw or non-blocking mode
    https://github.com/nodejs/node/pull/24260
* tools,gyp:
  * Introduce MSVS 2019 https://github.com/nodejs/node/pull/27375
* util:
  * inspect:
    * Array grouping became more compact and uses more columns than before
      https://github.com/nodejs/node/pull/28059
      https://github.com/nodejs/node/pull/28070
    * Long strings will not be split at 80 characters anymore. Instead they will
      be split on new lines https://github.com/nodejs/node/pull/28055
* worker:
  * `worker.terminate()` now returns a promise and using the callback is
    deprecated https://github.com/nodejs/node/pull/28021

PR-URL: https://github.com/nodejs/node/pull/28268
2019-06-27 15:55:50 +02:00
cjihrig
63a5cd87ea
doc: clean up isDead() example
This commit removes extra whitespace and some awkward text
containing typos from the cluster worker.isDead() code
sample.

PR-URL: https://github.com/nodejs/node/pull/28421
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
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: Luigi Pinca <luigipinca@gmail.com>
2019-06-27 09:47:36 -04:00
Robert Nagy
63a0f4cdd3 doc: clarify response.finished
PR-URL: https://github.com/nodejs/node/pull/28411
Refs: https://github.com/jshttp/on-finished/issues/30
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2019-06-26 21:47:25 -07:00
cjihrig
5b4a0cb149 doc: replace version with REPLACEME
Node 12.4.0 has already been released. Replace the version with
REPLACEME so that the proper version gets inserted at release
time.

PR-URL: https://github.com/nodejs/node/pull/28431
Refs: https://github.com/nodejs/node/pull/28007
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2019-06-26 05:51:14 +02:00
zero1five
33aef82b42 stream: add writableFinished
add a new getter to duplex stream to replace the property `this
.writableState.finished` of the object that inherited duplex.

Refs: https://github.com/nodejs/node/issues/445

PR-URL: https://github.com/nodejs/node/pull/28007
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-06-25 14:46:10 -07:00
Michael Dawson
1b3eac4c7d
doc: remove N-API version for Experimental APIs
Experimental APIs should not have an N-API version
specified. Remove cases were one had been added
incorrectly.

PR-URL: https://github.com/nodejs/node/pull/28330
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.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: Ruben Bridgewater <ruben@bridgewater.de>
2019-06-25 18:17:43 +02:00
Vse Mozhet Byt
daa512b576
doc: fix nits regarding stream utilities
* Unify headings.
* Conform method mentions with the style guide.
* Fix links.

PR-URL: https://github.com/nodejs/node/pull/28385
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-06-25 18:03:36 +02:00
cjihrig
a7e01559af
doc: cleanup pendingSettingsAck docs
This commit rephrases the first sentence of the http2 session
pendingSettingsAck property docs. It also formats SETTINGS
consistently.

PR-URL: https://github.com/nodejs/node/pull/28388
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-06-25 08:27:54 -04:00
Jesse Cogollo
e2d445be8f doc: add example code for worker.isDead() to cluster.md
PR-URL: https://github.com/nodejs/node/pull/28362
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2019-06-24 20:49:18 -07:00
Richard Lau
88db3e431f doc,n-api: fix metadata for napi_create_threadsafe_function
PR-URL: https://github.com/nodejs/node/pull/28410
Refs: https://github.com/nodejs/node/pull/27791
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2019-06-24 18:33:25 -04:00
cjihrig
ad4d626bb9
doc: add missing word in frameError event docs
PR-URL: https://github.com/nodejs/node/pull/28387
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-06-24 18:11:20 -04:00
cjihrig
6f5b5d1c4b
doc: fix sentence about Http2Stream destruction
PR-URL: https://github.com/nodejs/node/pull/28336
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-06-24 13:36:25 -04:00
Angie M. Delgado
c81062a908 doc: add example for Buffer.isEncoding()
PR-URL: https://github.com/nodejs/node/pull/28360
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-06-23 23:00:03 -07:00
nicolasrestrepo
d4549e75d4 doc: add example code for fs.existsSync()
PR-URL: https://github.com/nodejs/node/pull/28354
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-06-23 22:48:24 -07:00
Rich Trott
7696663691 doc: remove "note that" from assert.md
Refs: https://github.com/nodejs/remark-preset-lint-node/pull/16

PR-URL: https://github.com/nodejs/node/pull/28329
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-06-23 07:10:06 -07:00
Rich Trott
fafd98404d doc: remove "note that" from async_hooks.md
PR-URL: https://github.com/nodejs/node/pull/28329
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-06-23 07:10:04 -07:00
Rich Trott
1b2f6d2d02 doc: remove "note that" from buffer.md
Refs: https://github.com/nodejs/remark-preset-lint-node/pull/16

PR-URL: https://github.com/nodejs/node/pull/28329
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-06-23 07:10:03 -07:00
Rich Trott
287ed4c32d doc: remove "note that" from cli.md
Refs: https://github.com/nodejs/remark-preset-lint-node/pull/16

PR-URL: https://github.com/nodejs/node/pull/28329
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-06-23 07:10:01 -07:00
Rich Trott
c9275cdb0b doc: remove "note that" from cluster.md
Refs: https://github.com/nodejs/remark-preset-lint-node/pull/16

PR-URL: https://github.com/nodejs/node/pull/28329
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-06-23 07:09:59 -07:00
Rich Trott
7023cb4e86 doc: remove "note that" from console.md
Refs: https://github.com/nodejs/remark-preset-lint-node/pull/16

PR-URL: https://github.com/nodejs/node/pull/28329
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-06-23 07:09:57 -07:00
Rich Trott
66e5cdefe6 doc: remove "note that" from crypto.md
Refs: https://github.com/nodejs/remark-preset-lint-node/pull/16

PR-URL: https://github.com/nodejs/node/pull/28329
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-06-23 07:09:55 -07:00
Rich Trott
61ea681456 doc: remove "note that" from dgram.md
Refs: https://github.com/nodejs/remark-preset-lint-node/pull/16

PR-URL: https://github.com/nodejs/node/pull/28329
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-06-23 07:09:54 -07:00
Rich Trott
8b574d935c doc: remove "note that" from dns.md
Refs: https://github.com/nodejs/remark-preset-lint-node/pull/16

PR-URL: https://github.com/nodejs/node/pull/28329
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-06-23 07:09:52 -07:00
Rich Trott
ef3d9f11c3 doc: remove "note that" from domain.md
Refs: https://github.com/nodejs/remark-preset-lint-node/pull/16

PR-URL: https://github.com/nodejs/node/pull/28329
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-06-23 07:09:50 -07:00
Rich Trott
2c9883df31 doc: remove "note that" from errors.md
Refs: https://github.com/nodejs/remark-preset-lint-node/pull/16

PR-URL: https://github.com/nodejs/node/pull/28329
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-06-23 07:09:47 -07:00
Rich Trott
5faa53789a doc: remove "note that" from events.md
Refs: https://github.com/nodejs/remark-preset-lint-node/pull/16

PR-URL: https://github.com/nodejs/node/pull/28329
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-06-23 07:09:34 -07:00
Rich Trott
2cd4a6f4b4 doc: remove "note that" from fs.md
Refs: https://github.com/nodejs/remark-preset-lint-node/pull/16

PR-URL: https://github.com/nodejs/node/pull/28329
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-06-23 07:09:24 -07:00
Rich Trott
46b686e329 doc: remove "note that" from http.md
Refs: https://github.com/nodejs/remark-preset-lint-node/pull/16

PR-URL: https://github.com/nodejs/node/pull/28329
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-06-23 07:09:20 -07:00
Rich Trott
9af6d08a04 doc: remove "note that" from http2.md
Refs: https://github.com/nodejs/remark-preset-lint-node/pull/16

PR-URL: https://github.com/nodejs/node/pull/28329
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-06-23 07:09:13 -07:00
Rich Trott
c68513f632 doc: remove "note that" from modules.md
PR-URL: https://github.com/nodejs/node/pull/28329
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-06-23 07:07:39 -07:00
Rich Trott
a3ad22e53f doc: remove "note that" from net.md
Refs: https://github.com/nodejs/remark-preset-lint-node/pull/16

PR-URL: https://github.com/nodejs/node/pull/28329
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-06-23 07:07:38 -07:00
Rich Trott
f647fed18f doc: remove "note that" from process.md
Refs: https://github.com/nodejs/remark-preset-lint-node/pull/16

PR-URL: https://github.com/nodejs/node/pull/28329
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-06-23 07:07:36 -07:00
Rich Trott
2cd5fca399 doc: remove "note that" from stream.md
PR-URL: https://github.com/nodejs/node/pull/28329
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-06-23 07:07:35 -07:00
Rich Trott
ca851a47bf doc: remove "note that" from tls.md
Refs: https://github.com/nodejs/remark-preset-lint-node/pull/16

PR-URL: https://github.com/nodejs/node/pull/28329
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-06-23 07:07:33 -07:00
Rich Trott
5df70e0d67 doc: remove "note that" from tty.md
Refs: https://github.com/nodejs/remark-preset-lint-node/pull/16

PR-URL: https://github.com/nodejs/node/pull/28329
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-06-23 07:07:31 -07:00
Rich Trott
ecead5f61e doc: remove "note that" from url.md
Refs: https://github.com/nodejs/remark-preset-lint-node/pull/16

PR-URL: https://github.com/nodejs/node/pull/28329
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-06-23 07:07:30 -07:00
Rich Trott
e05f7228c8 doc: remove "note that" from util.md
Refs: https://github.com/nodejs/remark-preset-lint-node/pull/16

PR-URL: https://github.com/nodejs/node/pull/28329
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-06-23 07:07:28 -07:00
Rich Trott
ea069e81ae doc: remove "note that" from zlib.md
Refs: https://github.com/nodejs/remark-preset-lint-node/pull/16

PR-URL: https://github.com/nodejs/node/pull/28329
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-06-23 07:07:26 -07:00
Rich Trott
96fd0a0f4d doc: remove "note that" from pull-requests.md
Refs: https://github.com/nodejs/remark-preset-lint-node/pull/16

PR-URL: https://github.com/nodejs/node/pull/28329
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-06-23 07:07:24 -07:00
Rich Trott
c067fdbf44 doc: remove "note that" from maintaining-V8.md
Refs: https://github.com/nodejs/remark-preset-lint-node/pull/16

PR-URL: https://github.com/nodejs/node/pull/28329
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-06-23 07:07:23 -07:00