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
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
Rich Trott
73daba8649 doc: remove "note that" from maintaining-the-build-files.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:20 -07:00
Rich Trott
ebf5822f12 doc: remove "note that" from using-symbols.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:18 -07:00
Rich Trott
68cfa56d0c doc: remove "note that" from writing-and-running-benchmarks.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:17 -07:00
Rich Trott
ca276253fb doc: remove "note that" from writing-tests.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:15 -07:00
Rich Trott
73d22d1434 doc: remove "make that" from onboarding.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:14 -07:00
Rich Trott
00907980f0 doc: remove "note that" from releases.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:12 -07:00
Guy Bedford
554ffa3432 bootstrap: --frozen-intrinsics override problem workaround
PR-URL: https://github.com/nodejs/node/pull/28254
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-06-22 23:17:44 +02:00
cjihrig
3fd54510d0
doc: fix typo in process.disconnect() docs
"that" should be "the" in this sentence. This commit also
restructures the sentence to avoid the word "process's"

PR-URL: https://github.com/nodejs/node/pull/28328
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-06-22 13:39:58 -04:00
cjihrig
a03f256409
doc: drop 'Note that' in addons docs
This commit removes the usage of 'Note that' in the addons
documentation. Note that this phrase was not adding anything
meaningful to the docs.

PR-URL: https://github.com/nodejs/node/pull/28327
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2019-06-22 13:36:06 -04:00
cjihrig
c6f959a9d0
doc: remove obsolete external link
The addons documentation links to an external node-qt repo as
a production example. That repo hasn't been updated in over
five years. This commit removes the link.

PR-URL: https://github.com/nodejs/node/pull/28326
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2019-06-22 13:33:09 -04:00
cjihrig
3aeb810ca6
child_process: attach child in promisification
This commit updates the custom exec() and execFile()
promisification to attach the ChildProcess instance to the
returned Promise.

PR-URL: https://github.com/nodejs/node/pull/28325
Fixes: https://github.com/nodejs/node/issues/28244
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Wyatt Preul <wpreul@gmail.com>
2019-06-22 13:18:03 -04:00
cjihrig
05359dd0db
doc: make multipleResolves docs less opinionated
The 'multipleResolves' event does not necessarily indicate an
error. This commit makes the documentation less opinionated, and
includes potential caveats.

PR-URL: https://github.com/nodejs/node/pull/28314
Refs: https://github.com/nodejs/node/issues/24321
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-06-22 12:03:07 -04:00
cjihrig
f00d5bc050
doc: format ECMA-262 with a hyphen
PR-URL: https://github.com/nodejs/node/pull/28309
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2019-06-22 11:59:15 -04:00
Rich Trott
ad2036fc1a doc: revise assert legacy mode text
Revise the text for the `assert` module's legacy mode to make it simpler
and more scannable.

PR-URL: https://github.com/nodejs/node/pull/28315
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2019-06-22 07:05:15 -06:00
legendecas
5705d7bf60 n-api: make func argument of napi_create_threadsafe_function optional
PR-URL: https://github.com/nodejs/node/pull/27791
Refs: https://github.com/nodejs/node/issues/27592
Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com>
2019-06-21 20:23:22 -06:00
Yuriy Vasiyarov
7334aaf2ea doc: document PerformanceNodeTiming.environment field
PR-URL: https://github.com/nodejs/node/pull/28280
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2019-06-21 04:07:54 -06:00
Rich Trott
3af27f86b6 doc: revise strict mode text in assert
Revise the text describing `strict` mode.

PR-URL: https://github.com/nodejs/node/pull/28285
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2019-06-21 03:30:07 -06:00
cjihrig
bfe4c9c2c0
report: add report versioning
This commit adds a version to the diagnostic report feature.

PR-URL: https://github.com/nodejs/node/pull/28121
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
2019-06-20 16:16:11 -04:00
Robert Nagy
1a4f27ae21
doc: clarify when http emits aborted event
PR-URL: https://github.com/nodejs/node/pull/28262
Refs: https://github.com/nodejs/node/issues/28172
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-06-19 15:31:53 -07:00
Rich Trott
17a5eba6c2 doc: tidy AssertionError text
Several minor improvements to text. Remove some repetition.

PR-URL: https://github.com/nodejs/node/pull/28255
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2019-06-18 16:18:25 -07:00
mutao
eaddb22d92
Revert "build: remove mips support"
This reverts commit 9334e45aa0.

PR-URL: https://github.com/nodejs/node/pull/27992
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
2019-06-18 14:28:13 +10:00
Rich Trott
db459e9f72 doc: revise intro sentence for assert
Simplify language, remove redundancy ("tests that can be used to
test") and remove wordy passive voice ("that can be used to" replaced
with "for").

PR-URL: https://github.com/nodejs/node/pull/28226
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-06-17 06:59:17 -07:00
Anna Henningsen
ed24c19002
worker: refactor worker.terminate()
At the collaborator summit in Berlin, the behaviour of
`worker.terminate()` was discussed.

In particular, switching from a callback-based to a Promise-based API
was suggested. While investigating that possibility later, it was
discovered that `.terminate()` was unintentionally synchronous up
until now (including calling its callback synchronously).

Also, the topic of its stability has been brought up. I have performed
two manual reviews of the native codebase for compatibility with
`.terminate()`, and performed some manual fuzz testing with the test
suite. At this point, bugs with `.terminate()` should, in my opinion,
be treated like bugs in other Node.js features.
(It is possible to make Node.js crash with `.terminate()` by messing
with internals and/or built-in prototype objects, but that is already
the case without `.terminate()` as well.)

This commit:

- Makes `.terminate()` an asynchronous operation.
- Makes `.terminate()` return a `Promise`.
- Runtime-deprecates passing a callback.
- Removes a warning about its stability from the documentation.
- Eliminates an unnecessary extra function from the C++ code.

A possible alternative to returning a `Promise` would be to keep the
method synchronous and just drop the callback. Generally, providing
an asynchronous API does provide us with a bit more flexibility.

Refs: https://github.com/nodejs/summit/issues/141

PR-URL: https://github.com/nodejs/node/pull/28021
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-06-17 08:27:17 -04:00
Sam Roberts
574985cec8
https: do not automatically use invalid servername
Stop automatically setting servername in https.request() if the target
host is specified with an IP address. Doing so is invalid, and triggers
a deprecation warning. It is still possible to send an IP address as a
servername if its required, but it needs to be explicity configured, it
won't happen automatically.

PR-URL: https://github.com/nodejs/node/pull/28209
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-06-17 11:58:26 +02:00
Rich Trott
215fd083ea doc: improve assert strict-mode text
Simplify and clarify introductory material on `strict` mode.
Merge two single-sentence paragraphs into a single paragraph.
Replace "`strict mode`" with "`strict` mode".

PR-URL: https://github.com/nodejs/node/pull/28239
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-06-16 21:20:06 -07:00
Joyee Cheung
1432065e9d
lib: correct error.errno to always be numeric
Historically `error.errno` of system errors thrown by Node.js
can sometimes be the same as `err.code`, which are string
representations of the error numbers. This is useless and incorrect,
and results in an information loss for users since then they
will have to resort to something like
`process.binding('uv'[`UV_${errno}`])` to get to the numeric
error codes.

This patch corrects this behavior by always setting `error.errno`
to be negative numbers. For fabricated errors like `ENOTFOUND`,
`error.errno` is now undefined since there is no numeric equivalent
for them anyway. For c-ares errors, `error.errno` is now undefined
because the numeric representations (negated) can be in conflict
with libuv error codes - this is fine since numeric codes was
not available for c-ares errors anyway.

Users can use the public API `util.getSystemErrorName(errno)`
to retrieve string codes for these numbers.

PR-URL: https://github.com/nodejs/node/pull/28140
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2019-06-17 10:18:09 +08:00
rexagod
558f8349c3 doc: clarify commit message format in pull-requests.md
Resolved ambiguous meanings for the term `body of commit message`
in `pull-requests.md` file,

Fixes: https://github.com/nodejs/node/issues/28068
PR-URL: https://github.com/nodejs/node/pull/28125
Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-06-16 16:51:42 -07:00
Christopher Hiller
7561a38ccd report: add cpu info to report output
The report shows CPU consumption %, but without the number of CPU cores,
a consumer cannot tell if the percent (given across all cores) is
actually problematic. E.g., 100% on one CPU is a problem, but 100% on
four CPUs is not necessarily.

This change adds CPU information (similar to `os.cpus()`) to the report
output. Extra info besides the count is also provided as to avoid future
breaking changes in the eventuality that someone needs it; changing the
datatype of `header.cpus` would be breaking.

PR-URL: https://github.com/nodejs/node/pull/28188
Refs: https://github.com/nodejs/diagnostics/issues/307
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-06-15 20:53:07 -07:00
Richard Lau
52255868c5 doc,test: test documentation consistency for NODE_OPTIONS
Add a test that checks that the documented allowed options for the
`NODE_OPTIONS` environment variable are consistent with the actually
allowed options.

PR-URL: https://github.com/nodejs/node/pull/28179
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2019-06-14 20:47:31 -07:00
Richard Lau
7f812c5d8b doc: add missing options allowed in NODE_OPTIONS
Add missing options to the list of allowed options for the
`NODE_OPTIONS` environment variable. Sort the list alphabetically.

PR-URL: https://github.com/nodejs/node/pull/28179
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2019-06-14 20:47:27 -07:00
cjihrig
282e2f669c doc: document behavior of family:0 in dns.lookup()
Fixes: https://github.com/nodejs/node/issues/28159

PR-URL: https://github.com/nodejs/node/pull/28163
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-06-14 22:00:38 +08:00
Daniel Nalborczyk
b5e818197f doc: pass path in URL constructor
PR-URL: https://github.com/nodejs/node/pull/28161
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
2019-06-14 17:19:21 +08:00
Richard Lau
76bf7ee77e doc,n-api: fix typo
PR-URL: https://github.com/nodejs/node/pull/28178
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.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: Ruben Bridgewater <ruben@bridgewater.de>
2019-06-13 16:40:22 -04:00
Joyee Cheung
b245257b70
fs: add *timeNs properties to BigInt Stats objects
- Extend the aliased buffer for stats objects to contain
  the entire time spec (seconds and nanoseconds) for the time
  values instead of calculating the milliseconds in C++ and
  lose precision there.
- Calculate the nanosecond-precision time values in JS and expose
  them in BigInt Stats objects as `*timeNs`. The
  millisecond-precision values are now calculated from the
  nanosecond-precision values.

PR-URL: https://github.com/nodejs/node/pull/21387
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
2019-06-14 03:24:41 +08:00
Anna Henningsen
0640526303 worker: make MessagePort constructor non-callable
Refactor the C++ code for creating `MessagePort`s to skip calling the
constructor and instead directly instantiating the `InstanceTemplate`,
and always throw an error from the `MessagePort` constructor.

This aligns behaviour with the web, and creating single `MessagePort`s
does not make sense anyway.

PR-URL: https://github.com/nodejs/node/pull/28032
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-06-12 20:56:44 -07:00
Ruben Bridgewater
0f900405e5 doc: update assert's validation functions
Using `assert.throws()` or `assert.rejects()` in combination with
validation function can be very powerful. Using them by returning
any value besides `true` makes debugging very difficult though
because there's no context or reason why the error validation failed.
Thus, it is recommended to throw an error in such cases instead of
returning anything besides `true`.

PR-URL: https://github.com/nodejs/node/pull/27781
Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-06-12 20:02:53 -07:00
vmarchaud
f7ffa52312 doc: document trace-events category for dns requests
As implemented in https://github.com/nodejs/node/pull/21840, dns can
emit trace events when the category is enabled. This PR just add
it to the documentation.

PR-URL: https://github.com/nodejs/node/pull/28100
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-06-12 19:42:54 -07:00
FUJI Goro (gfx)
ee167877ad doc: add Buffer#subarray() and add note about Uint8Array#slice()
PR-URL: https://github.com/nodejs/node/pull/28101
Refs: https://github.com/nodejs/node/issues/28087
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-06-12 19:40:37 -07:00
Daniel Bevenius
d9add75cf5 doc: add tls-min/max options to NODE_OPTIONS
This commit add the --tls-min and --tls-max command line options to the
list of allowed options for the NODE_OPTIONS environment variable.

PR-URL: https://github.com/nodejs/node/pull/28146
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2019-06-12 12:24:16 -07:00
Ruben Bridgewater
6a5376bb94
doc: split example into two
This makes sure the "good" and "bad" examples are split into two.
Otherwise it'll result in an parse error.

PR-URL: https://github.com/nodejs/node/pull/27670
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Refael Ackermann (רפאל פלחי) <refack@gmail.com>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
2019-06-11 15:59:16 +02:00
Michael Dawson
fddc2d7a7e doc: clarify N-API version Matrix
I was asked by a community member if they needed to
recompile for v12.x based on the version matrix. Add
additional context to help ensure it is clear that this
is not the case.

PR-URL: https://github.com/nodejs/node/pull/27942
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Christopher Hiller <boneskull@boneskull.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-06-11 09:19:39 -04:00
Geoffrey Booth
62ac84b5f8 doc: add current recommendation for ESM/CommonJS dual packages
PR-URL: https://github.com/nodejs/node/pull/27957
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Jan Krems <jan.krems@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Bradley Farias <bradley.meck@gmail.com>
2019-06-10 22:32:48 -07:00
murgatroid99
155caf72bd
doc: document Http2Stream#id property
PR-URL: https://github.com/nodejs/node/pull/28074
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
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-10 17:02:41 -07:00
Anna Henningsen
7bd2a3fcb4
worker: use DataCloneError for unknown native objects
This aligns the behaviour better with the web.

PR-URL: https://github.com/nodejs/node/pull/28025
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
2019-06-10 15:22:54 +02:00
Anna Henningsen
55de20999b
doc: add note about AsyncResource for Worker pooling
When implementing a pool for Worker threads, the correlation between
posting tasks and getting their results may get lost, depending on
the implementation.

The `AsyncResource` API is the primary way to solve that issue,
so link it from the recommendation in the worker docs.

(This was brought up at the collaborator summit in Berlin.)

PR-URL: https://github.com/nodejs/node/pull/28023
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
2019-06-10 15:20:54 +02:00
rexagod
03d008fe28 doc: fix prohibited-strings warning in pull-requests.md
Correct "Github" to "GitHub" in compliance
to the linting standards.

PR-URL: https://github.com/nodejs/node/pull/28127
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2019-06-09 20:15:25 -07:00
Rich Trott
7105bbc710 doc: improve synopsis.md
Many small improvements to synopsis.md to make it more concise, more
clear, and more correct (punctuation, etc.).

PR-URL: https://github.com/nodejs/node/pull/28115
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2019-06-09 09:20:25 -07:00
Rich Trott
5694171be6 doc: edit reason-for-deprecation text
It's not clear (to me, at least) how describing an API as  "considered
to be unsafe" differs from describing it as simply "unsafe". Use the
shorter, latter wording.

PR-URL: https://github.com/nodejs/node/pull/28098
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
2019-06-08 18:58:23 -07:00
Rich Trott
c046011388 doc: improve DEP0090 text
Edit text for "DEP0090: Invalid GCM authentication tag lengths" for
clarity and branding. Invalid langths are "invalid" rather than
"considered invalid". Refer to "Node.js v11.0.0" rather than "node
v11.0.0".

PR-URL: https://github.com/nodejs/node/pull/28097
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2019-06-08 18:53:37 -07:00
Rich Trott
d71f05c03d doc: clarify special schemes
In url.md, describe "special" protocol schemes as "special" rather than
"considered to be special".

PR-URL: https://github.com/nodejs/node/pull/28091
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
2019-06-08 18:51:41 -07:00
Rich Trott
50a4e00143 doc: clarify weak keys text
Describe small key sizes as "too weak for safe use" rather than
"considered to be too weak for safe use".

PR-URL: https://github.com/nodejs/node/pull/28090
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2019-06-08 18:16:08 -07:00
Rich Trott
cb9232dd84 doc: remove superfluous filenaming convention
It is debatable whether "it is considered good style" in Node.js to use
hypens or underscores to separate words in file names. Node.js has
little to say about that. Remove that material as it is superfluous.

PR-URL: https://github.com/nodejs/node/pull/28089
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
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: Colin Ihrig <cjihrig@gmail.com>
2019-06-08 18:15:05 -07:00
Roman Reiss
6447be6203
doc: adjust TOC margins
PR-URL: https://github.com/nodejs/node/pull/28075
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
2019-06-07 11:22:16 +02:00
Trivikram Kamat
5c61c5d152 doc: order deprecation reasons
PR-URL: https://github.com/nodejs/node/pull/27960
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
2019-06-05 22:49:06 -07:00
Rich Trott
1279e2530b doc: remove "encouraged" as hedging in fs.md
PR-URL: https://github.com/nodejs/node/pull/28027
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-06-05 23:18:27 +08:00
Rich Trott
2a2005c89c doc: remove "strongly recommended" as hedging in fs.md
PR-URL: https://github.com/nodejs/node/pull/28028
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-06-05 23:14:45 +08:00
Rich Trott
8017e7c17f doc: remove "strongly recommended" hedging from tls.md
PR-URL: https://github.com/nodejs/node/pull/28029
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-06-05 23:11:28 +08:00
Rich Trott
703348f2b2 doc: remove "strongly recommended" hedging in deprecations.md
PR-URL: https://github.com/nodejs/node/pull/28031
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2019-06-05 23:06:27 +08:00
Michaël Zasso
cb68c04ce1
2019-06-04, Version 12.4.0 (Current)
Notable changes:

* doc:
  * The JSON variant of the API documentation is no longer experimental
    (Rich Trott) https://github.com/nodejs/node/pull/27842.
* esm:
  * JSON module support is always enabled under
    `--experimental-modules`. The `--experimental-json-modules` flag
    has been removed (Myles Borins)
    https://github.com/nodejs/node/pull/27752.
* http,http2:
  * A new flag has been added for overriding the default HTTP server
    socket timeout (which is two minutes). Pass
    `--http-server-default-timeout=milliseconds`
    or `--http-server-default-timeout=0` to respectively change or
    disable the timeout. Starting with Node.js 13.0.0, the timeout will
    be disabled by default
    (Ali Ijaz Sheikh) https://github.com/nodejs/node/pull/27704.
* inspector:
  * Added an experimental `--heap-prof` flag to start the V8 heap
    profiler on startup and write the heap profile to disk before exit
    (Joyee Cheung) https://github.com/nodejs/node/pull/27596.
* stream:
  * The `readable.unshift()` method now correctly converts strings to
    buffers. Additionally, a new optional argument is accepted to
    specify the string's encoding, such as `'utf8'` or `'ascii'`
    (Marcos Casagrande) https://github.com/nodejs/node/pull/27194.
* v8:
  * The object returned by `v8.getHeapStatistics()` has two new
    properties: `number_of_native_contexts` and
    `number_of_detached_contexts` (Yuriy Vasiyarov)
    https://github.com/nodejs/node/pull/27933.

PR-URL: https://github.com/nodejs/node/pull/28040
2019-06-04 16:01:53 +02:00
Aleksei Koziatinskii
f0018a5152 inspector: added --inspect-publish-uid
This flag specifies how inspector websocket url should be reported.
Tthre options are supported:
- stderr - reports websocket as a message to stderr,
- http - exposes /json/list endpoint that contains inspector websocket
  url,
- binding - require('inspector').url().

Related discussion: https://github.com/nodejs/diagnostics/issues/303

PR-URL: https://github.com/nodejs/node/pull/27741
Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2019-06-03 18:15:04 +03:00
Marcos Casagrande
df339bccf2 stream: convert string to Buffer when calling unshift(<string>)
`readable.unshift` can take a string as an argument, but that
string wasn't being converted to a Buffer, which caused a
<TypeError: Argument must be a buffer> in some cases. Also if a
string was passed, that string was coerced to utf8 encoding.

A second optional argument `encoding` was added to `unshift` to
fix the encoding issue.

Fixes: https://github.com/nodejs/node/issues/27192
PR-URL: https://github.com/nodejs/node/pull/27194
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-06-02 16:56:13 +02:00
Alex Temny
db013e1cd3 doc: clarify wording in modules.md
This is a minor clarification in two places in modules.md.

PR-URL: https://github.com/nodejs/node/pull/27853
Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-06-02 11:57:01 +02:00
Rich Trott
e7ca3987a2 doc: improve explanation for directory with fs.rename()
PR-URL: https://github.com/nodejs/node/pull/27963
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
2019-06-02 11:25:59 +02:00
Kyle Zhang
6b57a51b54 doc: fix the wrong name of AssertionError
err.name of AssertionError should be 'AssertionError'

PR-URL: https://github.com/nodejs/node/pull/27982
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-06-02 10:11:24 +02:00
Rich Trott
187b056408 doc: simplify system call material in doc overview
PR-URL: https://github.com/nodejs/node/pull/27966
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2019-06-02 00:10:01 +02:00
Refael Ackermann
e3cd79ef8e src: update NODE_MODULE_VERSION to 74
Major V8 updates are usually API/ABI incompatible with previous
versions. This commit adapts NODE_MODULE_VERSION for V8 7.5.

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

PR-URL: https://github.com/nodejs/node/pull/27375
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-06-01 09:55:27 -04:00
Benjamin Gruenbaum
4c2345f4f6 doc: warn about relying on fs gc close behavior
Warn about using the bahvior where file handles are closed automatically
when the file is closed.

PR-URL: https://github.com/nodejs/node/pull/27972
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2019-06-01 12:25:04 +02:00
cjihrig
d05668d688
child_process: runtime deprecate _channel
This commit moves DEP0129 to a runtime deprecation.

PR-URL: https://github.com/nodejs/node/pull/27949
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-05-31 11:13:25 -04:00
cjihrig
80d9b1c712
doc: wrap long line
PR-URL: https://github.com/nodejs/node/pull/27951
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-05-31 11:09:54 -04:00
cjihrig
14701e539c
module: runtime deprecate createRequireFromPath()
This commit moves DEP0130 to a runtime deprecation.

PR-URL: https://github.com/nodejs/node/pull/27951
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-05-31 11:09:53 -04:00
cjihrig
3ba6813daf
doc: add information to revoked deprecations
Revoked deprecations are supposed to have some sort of
information explaining why the deprecation was reversed. This
commit adds some information to the two existing revoked
deprecations.

PR-URL: https://github.com/nodejs/node/pull/27952
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-05-31 10:15:55 -04:00
cjihrig
58fb6f5f0d
doc: add missing status to DEP0121
PR-URL: https://github.com/nodejs/node/pull/27950
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
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-05-31 10:03:33 -04:00
cjihrig
d26473b97e
doc: add missing --experimental-wasm-modules docs
PR-URL: https://github.com/nodejs/node/pull/27948
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Guy Bedford <guybedford@gmail.com>
Reviewed-By: Shingo Inoue <leko.noor@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-05-31 09:33:45 -04:00
Yuriy Vasiyarov
a40aae8d1b src: export number_of_native_contexts and number_of_detached_contexts
export number_of_native_contexts and number_of_detached_contexts as
part of v8.getHeapStatistics()

PR-URL: https://github.com/nodejs/node/pull/27933
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-05-30 15:25:55 +02:00
Rich Trott
ff4a71ccc3 doc: revise additional Experimental status text
Clarify and simplify material urging caution with Experimental features.

PR-URL: https://github.com/nodejs/node/pull/27931
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2019-05-30 09:48:20 +02:00
Tariq Ramlall
18be28892f doc: adds link to nightly code coverage report
Adds a link to the nightly test code coverage report page
to the writing-tests.md documentation.

PR-URL: https://github.com/nodejs/node/pull/27922
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2019-05-30 08:37:51 +02:00
Luigi Pinca
eb4c1d5663 doc: fix typo in pipe from async iterator example
PR-URL: https://github.com/nodejs/node/pull/27870
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2019-05-29 08:42:46 +02:00
Beth Griggs
b323658b64
2019-05-28, Version 10.16.0 'Dubnium' (LTS)
Notable changes:

- **deps**:
  - update ICU to 64.2 (Ujjwal Sharma)
    [#27361](https://github.com/nodejs/node/pull/27361)
  - upgrade npm to 6.9.0 (Kat Marchán)
    [#26244](https://github.com/nodejs/node/pull/26244)
  - upgrade openssl sources to 1.1.1b (Sam Roberts)
    [#26327](https://github.com/nodejs/node/pull/26327)
  - upgrade to libuv 1.28.0 (cjihrig)
    [#27241](https://github.com/nodejs/node/pull/27241)
- **events**:
  - add once method to use promises with EventEmitter (Matteo Collina)
   [#26078](https://github.com/nodejs/node/pull/26078)
- **n-api**:
  - mark thread-safe function as stable (Gabriel Schulhof)
    [#25556](https://github.com/nodejs/node/pull/25556)
- **repl**:
  - support top-level for-await-of (Shelley Vohr)
    [#23841](https://github.com/nodejs/node/pull/23841)
- **zlib**:
  - add brotli support (Anna Henningsen)
    [#24938](https://github.com/nodejs/node/pull/24938)

PR-URL: https://github.com/nodejs/node/pull/27514
2019-05-28 23:45:42 +01:00
Alba Mendez
42d80113bb doc,test: clarify that Http2Stream is destroyed after data is read
Correct docs to clarify that behaviour,
and fix a race condition in test-http2-large-write-destroy.js.

Fixes: https://github.com/nodejs/node/issues/27863
PR-URL: https://github.com/nodejs/node/pull/27891
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2019-05-28 10:59:53 -07:00
Rich Trott
fc7c5b9795 doc: reword Experimental stability index
Reword the explanation of the Experimental stability index for brevity
and clarity.

PR-URL: https://github.com/nodejs/node/pull/27879
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2019-05-27 22:40:15 -07:00
Joyee Cheung
4b74dae6b2
inspector: implement --heap-prof
In addition implements --heap-prof-name, --heap-prof-dir and
--heap-prof-interval.
These flags are similar to --cpu-prof flags but they are meant
for the V8 sampling heap profiler instead of the CPU profiler.

PR-URL: https://github.com/nodejs/node/pull/27596
Fixes: https://github.com/nodejs/node/issues/27421
Reviewed-By: Jan Krems <jan.krems@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2019-05-26 22:18:00 +02:00
teams2ua
73c16b11e0
doc: update n-api support matrix
As thread safe functions were back-ported to 8.x and released in 8.16
the documentation should be updated as well.

PR-URL: https://github.com/nodejs/node/pull/27567
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-05-26 17:20:41 +02:00
Daniel Nalborczyk
91ec5bf7ba
doc: fix for OutgoingMessage.prototype._headers/_headerNames
PR-URL: https://github.com/nodejs/node/pull/27574
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-05-26 17:00:43 +02:00
Michael Dawson
dd6481a183 doc: add version info for types
Add version info for types in N-API doc.

PR-URL: https://github.com/nodejs/node/pull/27754
Fixes: https://github.com/nodejs/node/issues/27486
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-05-25 21:42:31 -07:00
Rich Trott
956e08e6f0 doc: remove experimental status for JSON documentation
The JSON documentation is relied up on by some consumers. It has been in
Experimental status for a long time. Promote it to Stable.

Reword the JSON documentation overview for brevity and clarity.

PR-URL: https://github.com/nodejs/node/pull/27842
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2019-05-25 21:09:38 -07:00
Richard Lau
eb32e383d8 doc,n-api: fix typo in N-API introduction
PR-URL: https://github.com/nodejs/node/pull/27833
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-05-25 11:01:17 -07:00
Luigi Pinca
ff8539e9e7 tls: support the hints option
Make `tls.connect()` support the `hints` option for feature parity with
`net.connect()`.

PR-URL: https://github.com/nodejs/node/pull/27816
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-05-25 08:50:02 +02:00
Rich Trott
7d5cf572f3 doc: edit stability index overview
Edit the stability index overview to be more concise. Remove some
awkward and unclear phrasing.

PR-URL: https://github.com/nodejs/node/pull/27831
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2019-05-24 19:28:34 -07:00
Luigi Pinca
165916b1f3 http2: support net.Server options
Make `http2.createServer()` support `net.Server` options.

PR-URL: https://github.com/nodejs/node/pull/27782
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Rich Trott <rtrott@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-05-23 05:35:19 +02:00
Rich Trott
78f2bb1c82 doc: simplify contributing documentation
Remove out-of-place detail about filesystem layout and tools for
generating documentation. Link to the issue tracker and the contribution
guide with clear, concise sentences.

PR-URL: https://github.com/nodejs/node/pull/27785
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2019-05-22 16:21:40 -07:00
Ruben Bridgewater
8a282dc93a
2019-05-22, Version v12.3.1 (Current)
Notable changes

* deps:
  * Fix handling of +0/-0 when constant field tracking is enabled
    (Michaël Zasso) https://github.com/nodejs/node/pull/27792
  * Fix `os.freemem()` and `os.totalmem` correctness (cjihrig)
    https://github.com/nodejs/node/pull/27718
* src:
  * Fix v12.3.0 regression that prevents native addons from compiling
    https://github.com/nodejs/node/pull/27804

PR-URL: https://github.com/nodejs/node/pull/27814
2019-05-22 20:56:15 +02:00
Myles Borins
c3f72510c8
esm: remove experimental status from JSON modules
The HTML spec has officially landed JSON Modules and as such I think
we can move them out of the "experimental" status. They will still
be behind the `--experimental-modules` flag until the entire esm
implementation moves out of experimental.

Refs: https://html.spec.whatwg.org/#creating-a-json-module-script

PR-URL: https://github.com/nodejs/node/pull/27752
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Bradley Farias <bradley.meck@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Guy Bedford <guybedford@gmail.com>
Reviewed-By: Yuta Hiroto <hello@hiroppy.me>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: Jan Krems <jan.krems@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-05-22 04:06:34 -04:00
Ruben Bridgewater
9fec70a703
2019-05-21, Version 12.3.0 (Current)
Notable changes:

* esm:
  * Added the `--experimental-wasm-modules` flag to support
    WebAssembly modules (Myles Borins & Guy Bedford)
    https://github.com/nodejs/node/pull/27659
* process:
  * Log errors using `util.inspect` in case of fatal exceptions
    (Ruben Bridgewater) https://github.com/nodejs/node/pull/27243
* repl:
  * Add `process.on('uncaughtException')` support (Ruben Bridgewater)
    https://github.com/nodejs/node/pull/27151
* stream:
  * Implemented `Readable.from` async iterator utility (Guy Bedford)
    https://github.com/nodejs/node/pull/27660
* tls:
  * Expose built-in root certificates (Ben Noordhuis)
    https://github.com/nodejs/node/pull/26415
  * Support `net.Server` options (Luigi Pinca)
    https://github.com/nodejs/node/pull/27665
  * Expose `keylog` event on TLSSocket (Alba Mendez)
    https://github.com/nodejs/node/pull/27654
* worker:
  * Added the ability to unshift messages from the `MessagePort`
    (Anna Henningsen) https://github.com/nodejs/node/pull/27294

PR-URL: https://github.com/nodejs/node/pull/27799
2019-05-21 21:23:52 +02:00
Dan Beglin
0ca9297c39 doc: corrected tlsSocket.getPeerCertificate response type
Within tls.md, the documentation for the response of
tlsSocket.getPeerCertificate() included subjectaltname
documented as an array of values. However these values are
actually returned as a single string of concatenated values.
The documentation has been updated to reflect this.

PR-URL: https://github.com/nodejs/node/pull/27757
Fixes: https://github.com/nodejs/node/issues/27721
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-05-21 05:28:24 +02:00
himself65
2e5bc8047e doc: correct parameter type on 'subprocess.kill([signal])'
PR-URL: https://github.com/nodejs/node/pull/27760
Reviewed-By: Colin Ihrig <cjihrig@gmail.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>
2019-05-20 23:00:31 +08:00
cjihrig
1b381d630a
doc: replace createRequireFromPath() references
This commit replaces createRequireFromPath() references with
createRequire() references.

PR-URL: https://github.com/nodejs/node/pull/27762
Fixes: https://github.com/nodejs/node/issues/27758
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
2019-05-20 10:22:56 -04:00
cjihrig
58a59a8d6b
doc: improve createRequire() example
Update the example to use import and import.meta.url instead
of require() and require.resolve().

PR-URL: https://github.com/nodejs/node/pull/27762
Fixes: https://github.com/nodejs/node/issues/27758
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
2019-05-20 10:22:44 -04:00
Ruben Bridgewater
9f71dbc334
util: include reference anchor for circular structures
This adds a reference anchor to circular structures when using
`util.inspect`. That way it's possible to identify with what object
the circular reference corresponds too.

PR-URL: https://github.com/nodejs/node/pull/27685
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2019-05-20 14:20:59 +02:00
Ruben Bridgewater
5518664d41
util: if present, fallback to toString using the %s formatter
This makes sure that `util.format` uses `String` to stringify an object
in case the object has an own property named `toString` with type
`function`. That way objects that do not have such function are still
inspected using `util.inspect` and the old behavior is preserved as
well.

PR-URL: https://github.com/nodejs/node/pull/27621
Refs: https://github.com/facebook/jest/issues/8443
Reviewed-By: Roman Reiss <me@silverwind.io>
2019-05-20 14:18:18 +02:00
Ruben Bridgewater
182b48aa77
doc: update util.format formatters documentation
This includes the information that some inputs are handled
differently than others (e.g., `Symbols` are partially represented
as `NaN`).

PR-URL: https://github.com/nodejs/node/pull/27621
Reviewed-By: Roman Reiss <me@silverwind.io>
2019-05-20 14:18:14 +02:00