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

2556 Commits

Author SHA1 Message Date
Chris Young
f85d5b21fd doc: fixed formatting issue in cli docs
Removed some bad escape characters

PR-URL: https://github.com/nodejs/node/pull/13808
Fixes: https://github.com/nodejs/node/issues/13805
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
2017-06-28 13:22:07 +02:00
Azard
d71d7a1bc7 doc: fix link in async_hooks.md
PR-URL: https://github.com/nodejs/node/pull/13930
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2017-06-26 22:41:01 +03:00
cjihrig
c02dcc7b59 doc: make socket IPC examples more robust
This commit aims to improve the documentation examples that send
sockets over IPC channels. Specifically, pauseOnConnect is added
to a server that inspects the socket before sending and a
'message' handler adds a check that the socket still exists.

PR-URL: https://github.com/nodejs/node/pull/13196
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
2017-06-22 16:55:41 -04:00
Rob Wu
2a46e57d13 doc: add missing zlib link to stream API docs
This seems to have been removed inadvertently by
330c8d743e in PR 12925.

PR-URL: https://github.com/nodejs/node/pull/13838
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-06-21 20:49:27 -07:00
XadillaX
330349f706 dns: make dns.setServers support customized port
allow `dns.setServers` parameter to contain port

e.g.

```
dns.setServers([ '103.238.225.181:666' ]);
```

And `dns.getServers` will return IP with port if not the default port.

PR-URL: https://github.com/nodejs/node/pull/13723
Refs: https://github.com/nodejs/node/issues/7903
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2017-06-20 18:42:25 -04:00
James M Snell
1fcb76e8f2 cluster: remove deprecated property
PR-URL: https://github.com/nodejs/node/pull/13702
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2017-06-20 11:48:47 -07:00
James M Snell
3fab9f2cd7 doc: EOL deprecated API and update notes
PR-URL: https://github.com/nodejs/node/pull/13702
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2017-06-20 11:48:36 -07:00
James M Snell
22cf25cf2d buffer: support boxed strings and toPrimitive
Add support for `Buffer.from(new String('...'))` and
`Buffer.from({[Symbol.toPrimitive]() { return '...'; }})`

PR-URL: https://github.com/nodejs/node/pull/13725
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-06-19 15:27:01 -07:00
Justin Beckwith
24ecc331e2
doc: document res.connection and res.socket
Adds documentation and samples for the `connection` and
`socket` properties available on the `http.serverResponse`
and `http.clientRequest` objects.

PR-URL: https://github.com/nodejs/node/pull/13617
Fixes: https://github.com/nodejs/node/issues/12617
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com>
2017-06-19 19:40:51 +02:00
Daijiro Wachi
4ca3b9cd6a doc: fix api docs style
doc/api/async_hooks.md
  + L198: Missing code-language flag
  + L239: Missing code-language flag
  + L317: Missing code-language flag
  + L347: Missing code-language flag

doc/api/fs.md
  + L2857: Unused definition

PR-URL: https://github.com/nodejs/node/pull/13700
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@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>
2017-06-19 10:51:37 +02:00
DuanPengfei
6e69421e53 doc: path.relative uses cwd
PR-URL: https://github.com/nodejs/node/pull/13714
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-06-18 22:17:58 -04:00
Roman Reiss
ecf6a46d98
src,lib,test,doc: correct misspellings
PR-URL: https://github.com/nodejs/node/pull/13719
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
2017-06-17 19:17:46 +02:00
Anna Henningsen
1e2905f46a
buffer: add constants object
Add `buffer.constants`, containing length limits for `Buffer` and
`string` instances.

This could be useful for programmers to tell whether a value can
be turned into a string or not.

Ref: https://github.com/nodejs/node/issues/13465
PR-URL: https://github.com/nodejs/node/pull/13467
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2017-06-16 19:48:51 +02:00
Michael Dawson
62e940dfa6 doc: fix a few n-api doc issues
- Add doc for napi_create_string_latin1().
- Fix signatures where c string was specified instead of napi_value.
- Fix return type of napi_callback.
- Update to specify that napi_escape_handle() can only be called once
  for a given scope.

PR-URL: https://github.com/nodejs/node/pull/13650
Fixes: https://github.com/nodejs/node/issues/13555
Fixes: https://github.com/nodejs/node/issues/13556
Fixes: https://github.com/nodejs/node/issues/13562
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jason Ginchereau <jasongin@microsoft.com>
Reviewed-By: Ingvar Stepanyan <me@rreverser.com>
2017-06-16 00:45:36 -04:00
Chris Young
386f53f31d doc: fixes a typo in the async_hooks documentation
> Generally it will correspond the name of the resource's constructor.
should read "Generally, it will correspond to the name..."

PR-URL: https://github.com/nodejs/node/pull/13666
Fixes: https://github.com/nodejs/node/issues/13663
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
2017-06-15 21:31:53 +02:00
Sebastian Van Sande
de4a749788 internal/util: use internal/errors.js
PR-URL: https://github.com/nodejs/node/pull/11301
Refs: https://github.com/nodejs/node/issues/11273
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Franziska Hinkelmann <fhinkel@vt.edu>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2017-06-15 17:07:45 +02:00
Dan Homola
aff8d358fa errors, repl: migrate to use internal/errors.js
* Use existing errors where suitable
* Assign code to a REPL specific error
* Include documentation for the new error code

PR-URL: https://github.com/nodejs/node/pull/11347
Ref: https://github.com/nodejs/node/issues/11273
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2017-06-14 23:05:25 +02:00
Sam Roberts
37fdfce93e net: return this from getConnections()
PR-URL: https://github.com/nodejs/node/pull/13553
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-06-14 13:29:29 -07:00
Sam Roberts
cf24177aba net: return this from destroy()
PR-URL: https://github.com/nodejs/node/pull/13530
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-06-14 13:15:51 -07:00
Sam Roberts
84f3b8f09f doc: document and test that methods return this
Also, add tests to ensure they will always return this, and to confirm
they return this when these doc changes are back-ported to earlier
release lines.

PR-URL: https://github.com/nodejs/node/pull/13531
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-06-14 13:12:21 -07:00
XadillaX
c1c226719f https: make opts optional & immutable when create
`opts` in `createServer` will be immutable that won't change origional
opts value. What's more, it's optional which can make `requestListener`
be the first argument.

PR-URL: https://github.com/nodejs/node/pull/13599
Fixes: https://github.com/nodejs/node/issues/13584
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Yorkie Liu <yorkiefixer@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
2017-06-14 15:14:34 -04:00
jklepatch
2f34bf0f77 doc: removed redundant mentions to error codes
PR-URL: https://github.com/nodejs/node/pull/13627
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-06-14 16:57:16 +02:00
Andreas Madsen
de762b71f2
async_hooks: rename currentId and triggerId
currentId is renamed to executionAsyncId
triggerId is renamed to triggerAsyncId
AsyncResource.triggerId is renamed to AsyncResource.triggerAsyncId
AsyncHooksGetCurrentId is renamed to AsyncHooksGetExecutionAsyncId
AsyncHooksGetTriggerId is renamed to AsyncHooksGetTriggerAsyncId

PR-URL: https://github.com/nodejs/node/pull/13490
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
2017-06-14 12:39:53 +02:00
Tobias Nießen
e318c8a97a doc: fix minor issues reported in #9538
oath.md: make order of properties consistent
tls.md: remove spaces in getPeerCertificate signature
tls.md: add deprecation notice to server.connections
http.md: fix signature of request.end
crypto.md: change crypto parameters to camelCase
vm.md: add missing apostrophe
vm.md: fix signature of vm.runInNewContext
zlib.md: improve description of zlib.createXYZ

PR-URL: https://github.com/nodejs/node/pull/13491
Ref: https://github.com/nodejs/node/issues/9538
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-06-14 00:18:59 +02:00
Anna Henningsen
0ab461440e doc: update async_hooks providers list
PR-URL: https://github.com/nodejs/node/pull/13561
Ref: https://github.com/nodejs/node/pull/13452
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-06-13 12:44:21 -07:00
James M Snell
873e2f270f errors: add missing ERR_ prefix on util.callbackify error
The `FALSY_VALUE_REJECTION` error code added by
https://github.com/nodejs/node/pull/12712 did not have the `ERR_` prefix,
nor was it added to the errors.md documentation. Add the prefix in for
consistency.

PR-URL: https://github.com/nodejs/node/pull/13604
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2017-06-13 12:33:52 -07:00
Scott McKenzie
7f3f72c19b errors, readline: migrate to use internal/errors.js
PR-URL: https://github.com/nodejs/node/pull/11390
Ref: https://github.com/nodejs/node/issues/11273
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2017-06-13 08:44:22 -07:00
XadillaX
ca8a29c360 doc: fix out of date napi_callback doc
The earlier version `napi_callback` returns `void` but now is
`napi_value`. The document of this section hasn't been modified.

PR-URL: https://github.com/nodejs/node/pull/13570
Fixes: https://github.com/nodejs/node/issues/12248
Fixes: https://github.com/nodejs/node/issues/13562
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jason Ginchereau <jasongin@microsoft.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-06-13 07:53:32 -07:00
Vse Mozhet Byt
e2617a0388 doc: fix links and typos in fs.md
PR-URL: https://github.com/nodejs/node/pull/13573
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2017-06-12 12:23:35 +03:00
Justin Beckwith
a2ed3a9c88 doc: fix incorrect fs.utimes() link
PR-URL: https://github.com/nodejs/node/pull/13608
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2017-06-11 14:31:15 -07:00
Anshul Guleria
b6e2cde4b4
doc: fs constants for Node < v6.3.0 in fs.md
Add changelog history in `fs.access` for the changes introduced to
`constants` in the `fs` module prior to Node v6.3.0.

PR-URL: https://github.com/nodejs/node/pull/12690
Fixes: https://github.com/nodejs/node/issues/8044
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
2017-06-11 21:47:38 +01:00
Refael Ackermann
af3aa682ac util: add callbackify
Add `util.callbackify(function)` for creating callback style functions
from functions returning a `Thenable`

PR-URL: https://github.com/nodejs/node/pull/12712
Fixes: https://github.com/nodejs/CTC/issues/109
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Teddy Katz <teddy.katz@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2017-06-10 22:49:28 -04:00
Samuel Reed
ac3477971f
doc: add readline.emitKeypressEvents note
PR-URL: https://github.com/nodejs/node/pull/9447
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
2017-06-10 19:16:57 +02:00
Jamen Marzonie
2529119680 doc: fix napi_create_*_error signatures in n-api
PR-URL: https://github.com/nodejs/node/pull/13544
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna M. Kedzierska <anna.m.kedzierska@gmail.com>
Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
Reviewed-By: Jason Ginchereau <jasongin@microsoft.com>
2017-06-10 17:58:35 +03:00
Gil Tayar
8d7f07f379
child_process: promisify includes stdio in error
This converts the initial implementation of a promised exec that used
the customPromisifyArgs support in util.promisify with a custom
implementation. This is because exec and execFile, when there is an
error, still supply the stdout and stderr of the process, and yet
the promisified version with customPromisifyArgs does
not supply this ability.

I created a custom implementation and attached it to exec and execFile
using the util.promisify.custom key.

Fixes: https://github.com/nodejs/node/issues/13364
PR-URL: https://github.com/nodejs/node/pull/13388
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2017-06-09 21:46:09 +02:00
XadillaX
27de36926b
dns: add resolveAny support
`dns.resolveAny` and `dns.resolve` with `"ANY"` has the similar behavior
like `$ dig <domain> any` and returns an array with several types of
records.

`dns.resolveAny` parses the result packet by several rules in turn.

Supported types:

* A
* AAAA
* CNAME
* MX
* NAPTR
* NS
* PTR
* SOA
* SRV
* TXT

Fixes: https://github.com/nodejs/node/issues/2848
PR-URL: https://github.com/nodejs/node/pull/13137
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
2017-06-09 19:09:28 +02:00
Michael Dawson
c28418a9e5 doc: fix out of date sections in n-api doc
PR-URL: https://github.com/nodejs/node/pull/13508
Fixes: https://github.com/nodejs/node/issues/13469
Fixes: https://github.com/nodejs/node/issues/13458
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jason Ginchereau <jasongin@microsoft.com>
2017-06-09 09:56:50 -04:00
Anna Henningsen
8f39881b74
async_hooks: use resource objects for Promises
Use `PromiseWrap` resource objects whose lifetimes are tied to
the `Promise` instances themselves to track promises, and have
a `.promise` getter that points to the `Promise` and a `.parent`
property that points to the parent Promise’s resource object,
if there is any.

The properties are implemented as getters for internal fields
rather than normal properties in the hope that it helps keep
performance for the common case that async_hooks users will
often not inspect them.

PR-URL: https://github.com/nodejs/node/pull/13452
Reviewed-By: Andreas Madsen <amwebdk@gmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
2017-06-08 23:59:58 +02:00
Tarun
597ba1580a
doc: corrects reference to tlsClientError
After the renaming of `clientError` in TLS to `tlsClientError` in
https://github.com/nodejs/node/commit/1ab6b21360d97719b3101153fb164c0c3eddf08,
the docs inconsistently referred the error as `clientError`, which is now
corrected.

Fixes: https://github.com/nodejs/node/issues/13417
PR-URL: https://github.com/nodejs/node/pull/13533
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
2017-06-08 14:41:37 +02:00
Refael Ackermann
47b9772f52 fs: expose Stats times as Numbers
PR-URL: https://github.com/nodejs/node/pull/13173
Fixes: https://github.com/nodejs/node/issues/8276
Refs: https://github.com/nodejs/node/pull/12607
Refs: https://github.com/nodejs/node/pull/12818
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Brian White <mscdex@mscdex.net>
2017-06-07 16:15:45 -04:00
Sam Roberts
324f1115b3 lib: return this from net.Socket.end()
PR-URL: https://github.com/nodejs/node/pull/13481
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
2017-06-07 12:54:00 -07:00
Fedor Indutny
d6260a8f4b http: overridable keep-alive behavior of Agent
Introduce two overridable `Agent` methods:

* `keepSocketAlive(socket)`
* `reuseSocket(socket, req)`

These methods can be overridden by particular `Agent` class child to
make keep-alive behavior customizable.

Motivation: destroy persisted sockets after some configurable timeout.
It is very non-trivial to do it with available primitives. Such program
will most likely need to poke with undocumented events and methods of
`Agent`. With introduced API such behavior is easy to implement.

PR-URL: https://github.com/nodejs/node/pull/13005
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2017-06-07 14:41:22 -04:00
Vladimir Trifonov
60d14c8702
doc: Add URL argument with http/https request
PR-URL: https://github.com/nodejs/node/pull/13405
Fixes: https://github.com/nodejs/node/issues/13383
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
2017-06-06 22:39:10 -07:00
Sam Roberts
2791b360c1 inspector: allow --inspect=host:port from js
PR-URL: https://github.com/nodejs/node/pull/13228
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-06-06 14:41:17 -07:00
Myles Borins
4c5cbb7c83
2017-06-06, Version 6.11.0 'Boron' (LTS)
This LTS release comes with 126 commits. This includes 40 which
are test related, 32 which are doc related, 12 which are
build / tool related and 4 commits which are updates to
dependencies.

Notable Changes:

* build:
  - support for building mips64el (nanxiongchao)
    https://github.com/nodejs/node/pull/10991
* cluster:
  - disconnect() now returns a reference to the disconnected
    worker. (Sean Villars)
    https://github.com/nodejs/node/pull/10019
* crypto:
  - ability to select cert store at runtime (Adam Majer)
    https://github.com/nodejs/node/pull/8334
  - Use system CAs instead of using bundled ones (Adam Majer)
    https://github.com/nodejs/node/pull/8334
  - The `Decipher` methods `setAuthTag()` and `setAAD` now return
    `this`. (Kirill Fomichev)
    https://github.com/nodejs/node/pull/9398
  - adding support for OPENSSL_CONF again (Sam Roberts)
    https://github.com/nodejs/node/pull/11006
  - make LazyTransform compabile with Streams1 (Matteo Collina)
    https://github.com/nodejs/node/pull/12380
* deps:
  - upgrade libuv to 1.11.0 (cjihrig)
    https://github.com/nodejs/node/pull/11094
  - upgrade libuv to 1.10.2 (cjihrig)
    https://github.com/nodejs/node/pull/10717
  - upgrade libuv to 1.10.1 (cjihrig)
    https://github.com/nodejs/node/pull/9647
  - upgrade libuv to 1.10.0 (cjihrig)
    https://github.com/nodejs/node/pull/9267
* dns:
  - Implemented `{ttl: true}` for `resolve4()` and `resolve6()`
    (Ben Noordhuis)
    https://github.com/nodejs/node/pull/9296
* process:
  - add NODE_NO_WARNINGS environment variable (cjihrig)
    https://github.com/nodejs/node/pull/10842
* readline:
  - add option to stop duplicates in history (Danny Nemer)
    https://github.com/nodejs/node/pull/2982
* src:
  - support "--" after "-e" as end-of-options (John Barboza)
    https://github.com/nodejs/node/pull/10651
* tls:
  - new tls.TLSSocket() supports sec ctx options (Sam Roberts)
    https://github.com/nodejs/node/pull/11005
  - Allow obvious key/passphrase combinations. (Sam Roberts)
    https://github.com/nodejs/node/pull/10294

PR-URL: https://github.com/nodejs/node/pull/13059
2017-06-06 16:30:15 -04:00
Jamen Marz
df46fcb61a doc: fix typo "ndapi" in n-api.md
PR-URL: https://github.com/nodejs/node/pull/13484
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2017-06-06 14:11:09 -04:00
Bartosz Sosnowski
422722ff67 win, doc: document per-drive current working dir
Add note to fs.md and path.md about Windows using per-drive current
working directory.

Fixes: https://github.com/nodejs/node/issues/9378
PR-URL: https://github.com/nodejs/node/pull/13330
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
2017-06-06 11:19:23 +02:00
Michael Dawson
7d9dfdaea3 doc: add ref to option to enable n-api
Since its guarded in by a command line option say
that in the docs and provide the option that needs
to be used to enable it.

PR-URL: https://github.com/nodejs/node/pull/13406
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießn <tniessen@tnie.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jason Ginchereau <jasongin@microsoft.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
2017-06-05 19:51:38 -04:00
Vse Mozhet Byt
5d9dc94509 doc: fix nits in code examples of async_hooks.md
* Make `require()` consistent.
* Add missing argument.
* Add missing `\n` in outputs.
* Reduce string concatenations.
* Update outputs.
* Reword and fix a typo.

PR-URL: https://github.com/nodejs/node/pull/13400
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Andreas Madsen <amwebdk@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
2017-06-05 16:43:34 +03:00
Vse Mozhet Byt
ce8bce497c doc: use prefer-rest-params eslint rule in docs
Do not promote using of `arguments`.

One fragment is left as is because of history nature:
it uses a real deprecated code from libs.

Refs: http://eslint.org/docs/rules/prefer-rest-params
Refs: 99da8e8e02/lib/util.js (L1002-L1006)

PR-URL: https://github.com/nodejs/node/pull/13389
Reviewed-By: Daijiro Wachi <daijiro.wachi@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: Refael Ackermann <refack@gmail.com>
2017-06-05 14:27:57 +03:00