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

1838 Commits

Author SHA1 Message Date
Jackson Tian
c6ae7d00c6 doc: improve httpVersionMajor / httpVersionMajor
The description of httpVersionMajor & httpVersionMinor should
have same context like httpVersion.

PR-URL: https://github.com/nodejs/node/pull/5296
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
2016-02-27 14:18:00 +01:00
Evan Lucas
1c30d606b1 doc: fix relative links in net docs
They were not being processed as relative links.

PR-URL: https://github.com/nodejs/node/pull/5358
Reviewed-By: Roman Reiss <me@silverwind.io>
2016-02-27 14:13:39 +01:00
Brian White
a67d5c1034 doc: fix crypto function indentation level
PR-URL: https://github.com/nodejs/node/pull/5460
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
2016-02-27 14:09:31 +01:00
dcposch@dcpos.ch
4e77a7ce29 doc: link to man pages
This changes the doc generator to automatically link references such as
`open(2)` to a man page on man7.org or freebsd.org

PR-URL: https://github.com/nodejs/node/pull/5073
Reviewed-By: Ben Noorhduis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
2016-02-27 14:06:47 +01:00
Rafael Cepeda
9894c026f5 doc: add missing property in cluster example
`Cluster.setupMaster(options)` Options object was missing an `args`
property on the example.

PR-URL: https://github.com/nodejs/node/pull/5305
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
2016-02-27 14:04:51 +01:00
Chris Dew
1913909fce doc: corrected name of argument in socket.send
Corrected name of "msg" argument from "buf" to "msg".

PR-URL: https://github.com/nodejs/node/pull/5449
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
2016-02-27 14:02:19 +01:00
Alexander Makarenko
acee594b6e doc: fix links in tls, cluster docs
Fix missing links described in #5322.

PR-URL: https://github.com/nodejs/node/pull/5364
Reviewed-By: Roman Reiss <me@silverwind.io>
2016-02-27 14:00:53 +01:00
Sam Roberts
513133c936 doc: correct name of engine methods
ENGINE_METHOD_PKEY_METH and ENGINE_METHOD_PKEY_ASN1_METH are misspelled
in the documentation, both should be ..._METHS.

PR-URL: https://github.com/nodejs/node/pull/5463
Reviewed-By: Fedor Indutny <fedor@indutny.com>
2016-02-26 19:44:33 -08:00
Rich Trott
3e3d941495 doc,tools,test: lint doc-based addon tests
PR-URL: https://github.com/nodejs/node/pull/5427
Fixes: https://github.com/nodejs/node/issues/5424
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
2016-02-26 11:56:43 -08:00
Rich Trott
6e6ce09861 doc: copyedit util doc
Add verbs to make sentence fragments less fragmentary.

PR-URL: https://github.com/nodejs/node/pull/5399
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
2016-02-25 13:27:47 -08:00
Stefan Budeanu
7c48cb5601 crypto: Improve control of FIPS mode
Default to FIPS off even in FIPS builds.
Add JS API to check and control FIPS mode.
Add command line arguments to force FIPS on/off.
Respect OPENSSL_CONF variable and read the config.
Add testing for new features.

Fixes: https://github.com/nodejs/node/issues/3819
PR-URL: https://github.com/nodejs/node/pull/5181
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-by: Michael Dawson <michael_dawson@ca.ibm.com>
2016-02-25 15:06:41 -05:00
Marc Cuva
7e51966b32 doc: fix typo in pbkdf2Sync code sample
Function name in code sample had the wrong capitalization.

PR-URL: https://github.com/nodejs/node/pull/5306
Reviewed-By: Roman Reiss <me@silverwind.io>
2016-02-25 19:51:02 +01:00
Chinedu Francis Nwafili
8b1af2f8d4 doc: fix buf.readInt16LE output
Previous example didn't account for the 1 byte offset

PR-URL: https://github.com/nodejs/node/pull/5282
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
2016-02-25 19:28:53 +01:00
cjihrig
ee7754be47 repl: accept no arguments to start()
Currently, there is a check to ensure that the user either
provides an object or a string to repl.start(). The string case
is used to set a REPL prompt. However, a default of '> ' already
exists, so forcing the user to specify a prompt is a bit
redundant. This commit removes this restriction.

Fixes: https://github.com/nodejs/node/issues/5385
PR-URL: https://github.com/nodejs/node/pull/5388
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Julian Duque <julianduquej@gmail.com>
2016-02-25 08:48:43 -05:00
cjihrig
54cbf2826b doc: note util.isError() @@toStringTag limitations
util.isError() is the only remaining util.is*() method that
depends on Object.prototype.toString() behavior. This commit
notes the limitations of isError() related to @@toStringTag.

Refs: https://github.com/nodejs/node/pull/2201
PR-URL: https://github.com/nodejs/node/pull/5414
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2016-02-25 08:37:37 -05:00
Dirceu Pereira Tiegs
581606a5fd doc: clarify error handling in net.createServer
Remove indications that an error argument is sent to the `listen()` callback.

Fixes: https://github.com/nodejs/node/issues/5345
PR-URL: https://github.com/nodejs/node/pull/5353
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
2016-02-25 05:57:14 -06:00
Ron Korving
45789027ac doc: document fs.datasync(Sync)
The APIs are implemented but currently not documented.

PR-URL: https://github.com/nodejs/node/pull/5402
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Rod Vagg <rod@vagg.org>
2016-02-25 12:50:59 +01:00
Ben Noordhuis
66f4586dd0 cluster: emit worker as first 'message' event arg
It's documented as such but didn't actually behave that way.

Bug introduced in commit 66fc8ca ("cluster: emit 'message' event on
cluster master"), which is the commit that introduced the event.

Fixes: https://github.com/nodejs/node/issues/5126
PR-URL: https://github.com/nodejs/node/pull/5361
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2016-02-25 12:46:37 +01:00
cjihrig
10f55b0aae doc: mention prototype check in deepStrictEqual()
The docs for assert.deepStrictEqual() do not currently mention
that prototypes are compared for objects. This commit adds that
information to the documentation.

Fixes: https://github.com/nodejs/node/issues/5365
PR-URL: https://github.com/nodejs/node/pull/5367
Reviewed-By: Robert Lindstädt <robert.lindstaedt@gmail.com>
Reviewed-By: Benjamin Gruenbaum <inglor@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2016-02-23 09:17:11 -05:00
cjihrig
e854f60585 child_process: add keepOpen option to send()
This option allows an instance of net.Socket to be kept open in
the sending process.

Fixes: https://github.com/nodejs/node/issues/4271
PR-URL: https://github.com/nodejs/node/pull/5283
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2016-02-22 11:55:30 -05:00
cjihrig
1952844f45 child_process: support options in send()
This commit adds an options object to process.send(). The same
object is propagated to process._send(), the _handleQueue, and the
send() and postSend() functions of the handle converter.

Fixes: https://github.com/nodejs/node/issues/4271
PR-URL: https://github.com/nodejs/node/pull/5283
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2016-02-22 11:53:38 -05:00
Jiho Choi
d5c04c34f1 vm: fix produceCachedData
Fix segmentation faults when compiling the same code with
`produceCachedData` option. V8 ignores the option when the code is in
its compilation cache and does not return cached data. Added
`cachedDataProduced` property to `v8.Script` to denote whether the
cached data is produced successfully.

PR-URL: https://github.com/nodejs/node/pull/5343
Reviewed-By: Fedor Indutny <fedor@indutny.com>
2016-02-21 14:59:35 -05:00
Kevin Locke
91f6bc0bd6 doc: clarify child_process.execFile{,Sync} file arg
The changes to the file argument of execFile in #4504 make it appear
that execFile requires an absolute or relative path to the executable
file, when it also supports a filename which will be resolved using
$PATH.  Although the example makes this clear, assuming there isn't a
node binary in $CWD, it's easy to overlook.  This commit clarifies that
point.

It also updates the argument description for execFileSync to match,
since it was overlooked in #4504 and behaves identically.

PR-URL: https://github.com/nodejs/node/pull/5310
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-02-19 16:16:52 -08:00
Chinedu Francis Nwafili
0cb0287f8a doc: fix buf.length slice example
Previously tried to reassign a const.

PR-URL: https://github.com/nodejs/node/pull/5259
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
2016-02-18 03:17:44 +01:00
Chinedu Francis Nwafili
069072c4bf doc: fix buffer[index] example
PR-URL: https://github.com/nodejs/node/pull/5253
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
2016-02-18 03:06:18 +01:00
Rafael Cepeda
51bd77022b doc: fix template string
Template string was syntactically incorrect. Copied Documentation code
would throw an error.

PR-URL: https://github.com/nodejs/node/pull/5240
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
2016-02-18 03:01:47 +01:00
Noah Rose
c605c5d587 doc: clarify exceptions during uncaughtException
PR-URL: https://github.com/nodejs/node/pull/5180
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Benjamin Gruenbaum <inglor@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
2016-02-17 23:56:02 +01:00
Alexander Makarenko
fb502ef081 doc: improvements to console.markdown copy
Fix missing links. Fix styling of printf() - once #5073 lands,
link to man page will be auto-generated. Fix several typos.

PR-URL: https://github.com/nodejs/node/pull/5225
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-02-17 23:51:30 +01:00
cjihrig
7550160e2b doc: update process.send() signature
This commit brings the process.send() signature into sync with
the child_process.send() documentation. Specifically, this commit
adds the callback argument and return type to the docs.

PR-URL: https://github.com/nodejs/node/pull/5284
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-02-17 12:18:24 -05:00
James M Snell
9b6440a86c doc: add simple http clientError example
The clientError event allows proper http 4xx responses to
be returned when a parse error occurs, but the documentation
did not demonstrate how to use it.

PR-URL: https://github.com/nodejs/node/pull/5248
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
2016-02-17 08:31:19 -08:00
Brian White
a1dace166a doc: fix net.createConnection() example
PR-URL: https://github.com/nodejs/node/pull/5219
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-02-15 07:40:27 -08:00
Brian White
9bee03aaf2 http: allow async createConnection()
This commit adds support for async createConnection()
implementations and is still backwards compatible with
synchronous createConnection() implementations.

This commit also makes the http client more friendly with
generic stream objects produced by createConnection() by
checking stream.writable instead of stream.destroyed as the
latter is currently a net.Socket-ism and not set by the core
stream implementations.

PR-URL: https://github.com/nodejs/node/pull/4638
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-02-11 12:52:46 -05:00
Rich Trott
49fa0abf9b doc: fix minor inconsistencies in repl doc
PR-URL: https://github.com/nodejs/node/pull/5193
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-02-11 07:16:28 -08:00
Trevor Norris
b55e58042c buffer: add encoding parameter to fill()
Can now call fill() using following parameters if value is a String:

    fill(string[, start[, end]][, encoding])

And with the following if value is a Buffer:

    fill(buffer[, start[, end]])

The encoding is ignored if value is not a String. All other non-Buffer
values are coerced to a uint32.

A multibyte strings will simply be copied into the Buffer until the
number of bytes run out. Meaning partial strings can be left behind:

    Buffer(3).fill('\u0222');
    // returns: <Buffer c8 a2 c8>

In some encoding cases, such as 'hex', fill() will throw if the input
string is not valid.

PR-URL: https://github.com/nodejs/node/pull/4935
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-02-10 12:06:20 -07:00
James M Snell
7bef1b7907 http: strictly forbid invalid characters from headers
PR-URL: https://github.com/nodejs/node-private/pull/26
Reviewed-By: Rod Vagg <r@va.gg>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2016-02-09 09:22:09 -08:00
Alejandro Oviedo
3da7d13e59 doc: merging behavior of writeHead vs setHeader
PR-URL: https://github.com/nodejs/node/pull/5081
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
2016-02-09 13:17:38 +01:00
Claudio Rodriguez
47e926a8d6 doc: fix type references for link gen, link css
Fixes several type references in the docs so that the
doc html gen tool that parses them can put the correct
links in.

Changes css styling for the generated type links.

PR-URL: https://github.com/nodejs/node/pull/4741
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Chris Dickinson <chris@neversaw.us>
Reviewed-By: Roman Reiss <me@silverwind.io>
2016-02-09 13:12:21 +01:00
Rich Trott
394556e9f5 doc: fix dgram doc indentation
PR-URL: https://github.com/nodejs/node/pull/5118
Reviewed-By: Roman Reiss <me@silverwind.io>
2016-02-08 13:25:23 -08:00
Daniel Turing
dbdbdd4998 dns: add resolvePtr to query plain DNS PTR records
Resolving plain PTR records is used beyond reverse DNS, most
prominently with DNS-SD (RFC6763). This adds dns.resolvePtr(),
and uses it (instead of dns.reverse()) in dns.resolve().

PR-URL: https://github.com/nodejs/node/pull/4921
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Brian White <mscdex@mscdex.net>
2016-02-08 17:30:38 +01:00
Matteo Collina
76bc4c75bf doc: clarify dgram socket.send() multi-buffer support
Fixes: #5124
See: https://github.com/nodejs/node/pull/4374
PR-URL: https://github.com/nodejs/node/pull/5130
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-02-08 16:15:34 +00:00
Ben Noordhuis
eaa9e0e776 doc: console is asynchronous unless it's a file
Mea culpa, looks like I forgot to update console.markdown in commit
dac1d38 ("doc: stdout/stderr can block when directed to file").
This commit rectifies that.

Refs: https://github.com/nodejs/node/issues/5131
PR-URL: https://github.com/nodejs/node/pull/5133
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Evan Lucas <evanlucas@me.com>
2016-02-07 23:28:21 +01:00
Rich Trott
07424705a6 doc: fix typo in dgram doc
Remove stray square brackets from dgram documentation.

PR-URL: https://github.com/nodejs/node/pull/5114
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2016-02-07 08:16:59 -08:00
Alexander Makarenko
c714b2e21c doc: fix links order in Buffer doc
Sort links in lexical order

PR-URL: https://github.com/nodejs/node/pull/5076
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Roman Klauke <romaaan.git@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-02-04 10:53:24 -08:00
Alexander Makarenko
39d0797449 doc: minor improvement in OS docs
Add links to `process.arch` and `process.platform`.

PR-URL: https://github.com/nodejs/node/pull/5006
Reviewed-By: Roman Klauke <romaaan.git@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
2016-02-04 19:25:07 +01:00
Alexander Makarenko
13a3685e43 doc: fix links in Addons docs
Put links in a lexical order. Add missing links. Remove duplicates.

PR-URL: https://github.com/nodejs/node/pull/5072
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-02-04 10:14:46 -08:00
Brian White
01dd8ed113 doc: fix inconsistent styling
PR-URL: https://github.com/nodejs/node/pull/4996
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-02-04 10:11:07 -08:00
Timothy Gu
ac0d92e4d1 doc: fix link in cluster documentation
PR-URL: https://github.com/nodejs/node/pull/5068
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-02-04 10:00:10 -08:00
Minwoo Jung
34a5019b6b doc: fix reference to API hash.final
fix a reference to a non-existent API, `hash.final()`.
It should be `hash.digest()`.

PR-URL: https://github.com/nodejs/node/pull/5050
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
2016-02-04 22:15:30 +09:00
Brian White
c41c09375b doc: correct tlsSocket.getCipher() description
getCipher() actually includes the protocol version that the cipher was
first supported and *not* the negotiated protocol of the current
connection.

PR-URL: https://github.com/nodejs/node/pull/4995
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-02-03 21:36:40 -05:00
Brian White
2c357a7e3b tls: add getProtocol() to TLS sockets
This commit adds a new method for TLS sockets that returns the
negotiated protocol version.

PR-URL: https://github.com/nodejs/node/pull/4995
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-02-03 21:34:06 -05:00
Michaël Zasso
4501a28ad9 doc: clarify optional arguments of Buffer methods
PR-URL: https://github.com/nodejs/node/pull/5008
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
2016-02-03 19:54:50 +01:00
Rainer Oviir
977159f149 doc: uppercase 'RSA-SHA256' in crypto.markdown
Fixes: https://github.com/nodejs/node/issues/5031
PR-URL: https://github.com/nodejs/node/pull/5044
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-02-03 01:10:58 +01:00
Rich Trott
3874f32277 doc: apply consistent styling for functions
Always refer to (for example) `assert.deepEqual()` as
`assert.deepEqual()` and never as `assert.deepEqual`.

PR-URL: https://github.com/nodejs/node/pull/4974
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
2016-02-02 14:28:49 -08:00
Alexander Makarenko
b0b4aeb640 doc: multiple improvements in Stream docs
Add missing links, remove duplicate ones, fix constants and functions styling.
Minor lexical corrections.

PR-URL: https://github.com/nodejs/node/pull/5009
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-02-02 09:53:37 -08:00
Alexander Makarenko
0c924ea39f doc: improve styling consistency in VM docs
Improve functions styling. Connect sections with links.

PR-URL: https://github.com/nodejs/node/pull/5005
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-02-02 09:03:10 -08:00
piepmatz
d74eb5fe01 doc: fix anchor links from stream to http and events
PR-URL: https://github.com/nodejs/node/pull/5007
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-02-02 09:01:23 -08:00
Evan Lucas
f3be421c1c dns: coerce port to number in lookupService
Previously, port could be any number in dns.lookupService. This change
throws a TypeError if port is outside the range of 0-65535. It also
coerces the port to a number.

PR-URL: https://github.com/nodejs/node/pull/4883
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Minwoo Jung <jmwsoft@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-02-01 09:36:57 -08:00
Alexander Makarenko
4736eeca53 doc: minor improvement to HTTPS doc
Add link to Buffer page.

PR-URL: https://github.com/nodejs/node/pull/5002
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Chris Dickinson <chris@neversaw.us>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-02-01 09:14:42 -08:00
Alexander Makarenko
7aff1d95b7 doc: improve styling consistency in Buffer docs
Add links style consistency.

PR-URL: https://github.com/nodejs/node/pull/5001
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Roman Klauke <romaaan.git@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-02-01 09:11:26 -08:00
Alexander Makarenko
267bb391ec doc: consistent styling for functions in TLS docs
Provide links for functions where needed and fix function links style.

PR-URL: https://github.com/nodejs/node/pull/5000
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Roman Klauke <romaaan.git@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-02-01 09:09:52 -08:00
Prayag Verma
4644673f2d doc: fix minor typo in process doc
Remove extra `be`

PR-URL: https://github.com/nodejs/node/pull/5018
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
2016-02-01 08:48:02 +01:00
Minwoo Jung
de3e94b0ef doc: fix notDeepEqual API
API calls in `assert` are `deepEqual()`, not `notDeepEqual()`.
use `notDeepEqual` to make it clear.

PR-URL: https://github.com/nodejs/node/pull/4971
Reviewed-By: Rich Trott <rtrott@gmail.com>
2016-01-31 16:49:52 +09:00
Timothy Gu
6ad1f7b51c doc: make buffer methods styles consistent
- Maintain alphabetical order
- Add documentation for `offset` and `value` where absent
- Add return value documentation where absent
- Remove redundant "Optional"
- Move defaults to parameter enumerations

PR-URL: https://github.com/nodejs/node/pull/4873
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-01-30 11:22:11 -08:00
Timothy Gu
27c8b73fa6 doc: fix JSON generation for aliased methods
Currently assert/assert.ok currently has the following signature:

    "signatures": [
      {
        "params": [
          {
            "name": "value"
          },
          {
            "name": "message])"
          },
          {
            "name": "assert.ok(value"
          },
          {
            "name": "message",
            "optional": true
          }
        ]
      }
    ]

The heading reads

    assert(value[, message]), assert.ok(value[, message])

Split them into two sections to make it working.

PR-URL: https://github.com/nodejs/node/pull/4871
Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
2016-01-30 11:06:25 -08:00
Evan Lucas
8ff9b56c92 doc: add more details to process.env
process.env has a few quirks that deserve documenting.

The commit documents:

- How assigning to process.env will implicitly call `toString()`
- How to remove an environment variable from process.env

PR-URL: https://github.com/nodejs/node/pull/4924
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
2016-01-29 22:09:08 -06:00
ChALkeR
6894c62df5 doc: don't use "interface" as a variable name
In readline.markdown, don't use strict mode reserved keyword "interface"
as a variable name.

This commit changes the name of one `readline.Interface` instance from
"interface" to "rl", as it is named in other places of the doc.

PR-URL: https://github.com/nodejs/node/pull/4900
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Minwoo Jung <jmwsoft@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
2016-01-30 00:33:14 +01:00
Peter Lyons
b004bbd9bd doc: spell writable consistently
Docs have 108 instances of "writable" and only 1 "writeable" so
fix this one.

PR-URL: https://github.com/nodejs/node/pull/4954
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
2016-01-30 00:22:42 +01:00
Matteo Collina
137f53c7b7 dgram: support dgram.send with multiple buffers
Added ability to dgram.send to send multiple buffers, _writev style.
The offset and length parameters in dgram.send are now optional.
Refactored the dgram benchmarks, and seperated them from net.
Added docs for the new signature.

Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
Fixes: https://github.com/nodejs/node/issues/4302
PR-URL: https://github.com/nodejs/node/pull/4374
2016-01-29 19:26:44 +01:00
Kári Tristan Helgason
3218dfbe60 doc: update eol handling in readline
This commit explicitly calls out the end of line sequences
used to generate line events in the readline module.

Fixes: https://github.com/nodejs/node/issues/4916
PR-URL: https://github.com/nodejs/node/pull/4927
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2016-01-28 10:08:33 -05:00
Benjamin Gruenbaum
334a7e3614 doc: replace function expressions with arrows
This commit replaces multiple usages of `function(){}` with ES2015
arrow functions in places it was forgotten earlier. The goal is to
make the docs more consistent since other functions were already
replaced with ES2015 arrows.

In addition, it fixes invalid syntax in modules.markdown to valid
syntax as well as remove `var self = this` pattern usages in the code
where they are now possible to avoid through arrow functions.

PR-URL: https://github.com/nodejs/node/pull/4832
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-01-27 23:00:20 +01:00
Sakthipriyan Vairamani
4714abb482 doc: show links consistently in deprecations
PR-URL: https://github.com/nodejs/node/pull/4907
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-01-27 13:42:45 -08:00
cjihrig
c3bb4b1aa5 child_process: add shell option to spawn()
This commit adds a shell option, to spawn() and spawnSync(). This
option allows child processes to be spawned with or without a
shell. The option also allows a custom shell to be defined, for
compatibility with exec()'s shell option.

Fixes: https://github.com/nodejs/node/issues/1009
PR-URL: https://github.com/nodejs/node/pull/4598
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-01-26 19:40:43 -05:00
Dmitriy Lazarev
2c426355df doc: remove unnecessary bind(this)
PR-URL: https://github.com/nodejs/node/pull/4797
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Chris Dickinson <chris@neversaw.us>
Reviewed-By: Roman Reiss <me@silverwind.io>
2016-01-26 20:49:13 +01:00
Jimb Esser
58086423f9 doc: fix nonsensical grammar in Buffer::write
PR-URL: https://github.com/nodejs/node/pull/4863
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
2016-01-26 20:05:17 +01:00
cjihrig
57003520f8 src: attach error to stack on displayErrors
The vm module's displayErrors option attaches error arrow
messages as a hidden property. Later, core JavaScript code
can optionally decorate the error stack with the arrow message.
However, when user code catches an error, it has no way to
access the arrow message. This commit changes the behavior of
displayErrors to mean "decorate the error stack if an error
occurs."

Fixes: https://github.com/nodejs/node/issues/4835
PR-URL: https://github.com/nodejs/node/pull/4874
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2016-01-26 11:03:13 -05:00
Alexander Makarenko
8ba5631625 doc: add servername parameter docs
Add `servername` parameter docs for `https.request()` method.

Follows #4389

PR-URL: https://github.com/nodejs/node/pull/4729
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
2016-01-25 19:12:36 +01:00
Jackson Tian
accd69ef63 doc: fix code type of markdowns
1. correct code type in addons.markdown
2. add missed code type in crypto.markdown

PR-URL: https://github.com/nodejs/node/pull/4858
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Roman Klauke <romaaan.git@gmail.com>
2016-01-25 16:08:46 +01:00
Fedor Indutny
96934cbb30 vm: introduce cachedData/produceCachedData
Introduce `cachedData`/`produceCachedData` options for `v8.Script`.
Could be used to consume/produce V8's code cache for speeding up
compilation of known code.

PR-URL: https://github.com/nodejs/node/pull/4777
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2016-01-24 16:34:55 -05:00
Benjamin Gruenbaum
83e43fbb04 doc: check for errors in 'listen' event
In the docs we typically check for errors and surface them. This
is IMO a good idea and good practice. This PR adds a check for
errors in three places in the `net` docs where it was missing.

PR-URL: https://github.com/nodejs/node/pull/4834
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Roman Klauke <romaaan.git@gmail.com>>
2016-01-24 19:50:43 +01:00
Jeff Harris
f19b9d6b8c doc: undo move http.IncomingMessage.statusMessage
The description for `statusMessage` was accidentally moved under the
heading for `http.IncomingMessage.socket`.  This commit puts it back
in the correct place.

PR-URL: https://github.com/nodejs/node/pull/4822
Fixes: https://github.com/nodejs/node/issues/4558
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Roman Klauke <romaaan.git@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
2016-01-24 14:50:30 +01:00
Robert Jefe Lindstaedt
17d5a3ab99 doc: proper markdown escaping -> \_\_, \*, \_
PR-URL: https://github.com/nodejs/node/pull/4805
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2016-01-22 21:32:50 -08:00
Glen Arrowsmith
26073dd1c1 doc: Examples work when data exceeds buffer size
PR-URL: https://github.com/nodejs/node/pull/4811
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Shigeki Ohtsu <ohtsu@iij.ad.jp>
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-01-22 20:34:38 -08:00
Robert Jefe Lindstaedt
4e1023d6b4 doc: harmonize $ node command line notation
PR-URL: https://github.com/nodejs/node/pull/4806
Reviewed-By: Stephan Belanger <admin@stephenbelanger.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
2016-01-22 19:57:19 +01:00
Karl Skomski
2bcea02e24 doc: add buf.indexOf encoding param with example
PR-URL: https://github.com/nodejs/node/pull/3373
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
2016-01-22 11:50:54 -07:00
Tom Gallacher
a1163582c5 crypto: pbkdf2 deprecate digest overload.
As per #3292, this PR introduces a deprecation notice about removing
the 'default digest' overload which currently defaults to the soon
to be defunct SHA1 digest.

Instead it should be left up to the documentation and implementor to
suggest a suitable digest function.

Ref: https://github.com/nodejs/node/pull/3292
PR-URL: https://github.com/nodejs/node/pull/4047
Reviewed-By: bnoordhuis - Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: Shigeki Ohtsu <ohtsu@iij.ad.jp>
2016-01-23 02:26:28 +09:00
José Moreira
5ef9989bd6 net: add net.listening boolean property over a getter
Added a listening property into net.Server.prototype indicating
if the server is listening or not for connections.

Other Server constructors that rely on net.Server should also
gain access to this property.

Also included tests for net and http subsystems.

PR-URL: https://github.com/nodejs/node/pull/4743
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2016-01-21 16:34:35 -06:00
Robert Jefe Lindstaedt
e436272897 doc: fenced all code blocks, typo fixes
This changes the code blocks from 4-space indentation to ``` fences for
better syntax highlighting and future linting support. Minor On-the-fly
changes for typos and highlight breaking markdown have been made.

JSON-Style objects have been changed so their closing bracket is
on the same line as the opening one.

Known issues:
* Not every JSON / object notation has been improved. Should
  make another run for this.
* Some example functions break hightlighting due to various
  combinations of brackets. However changing them means leaving
  the code style.

Fixes: https://github.com/nodejs/node/issues/4726
PR-URL: https://github.com/nodejs/node/pull/4733
Reviewed-By: Roman Reiss <me@silverwind.io>
2016-01-21 20:55:09 +01:00
cjihrig
eee9dc7e9d Revert "stream: add bytesRead property for readable"
This reverts commit bfb2cd0bfd.

The bytesRead property, as implemented, tracks characters
instead of bytes when using an identity encoding.

Refs: https://github.com/nodejs/node/pull/4372
PR-URL: https://github.com/nodejs/node/pull/4746
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-01-18 13:13:04 -05:00
Ben Ripkens
5f57005ec9 v8,src: expose statistics about heap spaces
Provide means to inspect information about the separate heap spaces
via a callable API. This is helpful to analyze memory issues.

Fixes: https://github.com/nodejs/node/issues/2079
PR-URL: https://github.com/nodejs/node/pull/4463
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-01-18 11:44:00 -05:00
Evan Lucas
da550aa063 repl: make sure historyPath is trimmed
If one were to set NODE_REPL_HISTORY to a string that contains only a
space (" "), then the history file would be created with that name
which can cause problems are certain systems.

PR-URL: https://github.com/nodejs/node/pull/4539
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2016-01-16 13:21:53 -06:00
cjihrig
212a44df03 doc: clarify protocol default in http.request()
The previously listed default of 'http' is incorrect, and
causes an error to be thrown. This commit changes it to the
correct value of 'http:'

Fixes: https://github.com/nodejs/node/issues/4712
PR-URL: https://github.com/nodejs/node/pull/4714
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-01-15 12:08:49 -05:00
Michael Theriot
666c089e68 doc: fix named anchors in addons.markdown and http.markdown
PR-URL: https://github.com/nodejs/node/pull/4708
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-01-14 22:09:59 -08:00
Jackson Tian
bfb2cd0bfd stream: add bytesRead property for readable
Add a bytesRead property for readable is
useful in some use cases.

When user want know how many bytes read of
readable, need to caculate it in userland.
If encoding is specificed, get the value is
very slowly.

PR-URL: https://github.com/nodejs/node/pull/4372
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-01-14 17:34:29 -08:00
Claudio Rodriguez
310530b7ec doc: add path property to Write/ReadStream in fs.markdown
Documents the "path" property on fs.WriteStream
and fs.ReadStream. See #4327

PR-URL: https://github.com/nodejs/node/pull/4368
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-01-14 17:27:37 -08:00
Vitor Cortez
3470574cb6 doc: clarify explanation of first stream section
The last sentence of the explanation for the first stream section
seemed a bit confusing. I tried to change the sentence to clarify it.

Additionally, the sections were turned into a numbered list to be more
clear about which section is being described, and improve readability.

PR-URL: https://github.com/nodejs/node/pull/4234
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-01-14 17:03:19 -08:00
Roman Klauke
4c132fe61e doc: make references clickable
The child_process docs contained some links, but some links were
somehow "broken". `make doc` couldn't translate them and left `[]`
in the compiled HTML.

PR-URL: https://github.com/nodejs/node/pull/4654
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-01-13 09:08:39 -08:00
Ryan Sobol
d139704ff7 doc: improve child_process.execFile() code example
PR-URL: https://github.com/nodejs/node/pull/4504
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
2016-01-13 11:24:33 -05:00
Daniel Sellers
d755432fa9 http: improves expect header handling
Now returns a 417 error status or allows for an event listener on
the `checkExpectation` event. Before we were ignoring requests that
had misspelled `100-continue` values for expect headers.

This is a quick port of the work done here:
https://github.com/nodejs/node-v0.x-archive/pull/7132 by alFReD-NSH
with surrounding discussion here:
https://github.com/nodejs/node-v0.x-archive/issues/4651

Also updates all the instances of the deprecated
EventEmitter.listenerCount to the current self.listenerCount. Most
of these were in the new code ported over but there was another
legacy instance.

Refs: #2403
PR-URL: https://github.com/nodejs/node/pull/4501
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-01-13 08:05:12 -08:00
zoubin
eeb6fdcd0f doc: add docs for more stream options
PR-URL: https://github.com/nodejs/node/pull/4639
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Chris Dickinson <chris@neversaw.us>
2016-01-12 12:49:42 -08:00
Saquib
6039a7c1b5 fs: add autoClose option to fs.createWriteStream
Add support to fs.createWriteStream and fs.createWriteStream for an autoClose
option that behaves similarly to the autoClose option supported by
fs.createReadStream and fs.ReadStream.

When an instance of fs.createWriteStream created with autoClose === false finishes,
it is not destroyed. Its underlying fd is not closed and it is the
responsibility of the user to close it.

PR-URL: https://github.com/nodejs/node/pull/3679
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2016-01-11 11:03:52 -08:00
Robert Jefe Lindstaedt
5a53cba784 doc: adds usage of readline line-by-line parsing
In order to make developers aware of node-core built-in
functionality, which might replace module APIs, we should
add an example of readline`s interface usage.
SEO will eventually aid this goal, since it is well searched
on Q&A sites.

PR-URL: https://github.com/nodejs/node/pull/4609
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: James M Snell <jasnell@gmail.com>>
2016-01-11 19:53:05 +01:00
Richard Sun
a2e77cedef doc: remove "above" and "below" references
The docs were recently refactored, and some "above" and "below"
references were no longer accurate. This commit removes many
such references, and replaces others with links.

PR-URL: https://github.com/nodejs/node/pull/4499
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-01-11 13:06:00 -05:00
Wyatt Preul
d7c5110a79 doc: stronger suggestion for userland assert
Fixes: https://github.com/nodejs/node/issues/4532
PR-URL: https://github.com/nodejs/node/pull/4535
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
2016-01-11 10:17:31 -05:00
Sequoia McDowell
b40aca1cd5 doc: label http.IncomingMessage as a Class
`Server`, `ServerResponse` etc. were marked as classes, this one class
was overlooked.

PR-URL: https://github.com/nodejs/node/pull/4589
Fixes: https://github.com/nodejs/node/issues/4576
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
2016-01-11 07:17:18 +01:00
Sequoia McDowell
9456f5012d doc: document http's server.listen return value
The server method returns `self` in order to allow chaining.

PR-URL: https://github.com/nodejs/node/pull/4590
Fixes: https://github.com/nodejs/node/issues/4571
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
2016-01-11 07:10:01 +01:00
Fedor Indutny
5f76b24e5e http: overridable clientError
Make default `clientError` behavior (close socket immediately)
overridable. With this APIs it is possible to write a custom error
handler, and to send, for example, a 400 HTTP response.

    http.createServer(...).on('clientError', function(err, socket) {
      socket.end('HTTP/1.1 400 Bad Request\r\n\r\n');
      socket.destroy();
    });

Fix: #4543
PR-URL: https://github.com/nodejs/node/pull/4557
Reviewed-By: Brian White <mscdex@mscdex.net>
2016-01-07 03:39:15 -05:00
Fedor Indutny
1ab6b21360 tls: rename clientError to tlsClientError
`clientError` will have `http.Server`-specific behavior, and we don't
want to shadow it in `tls.Server`.

PR-URL: https://github.com/nodejs/node/pull/4557
Reviewed-By: Brian White <mscdex@mscdex.net>
2016-01-07 03:38:56 -05:00
Brian White
e51bbfd487 doc: add missing backtick for readline
PR-URL: https://github.com/nodejs/node/pull/4549
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2016-01-06 00:04:37 -05:00
James M Snell
cc82e5e3d9 doc: improvements to crypto.markdown copy
General improvements to crypto.markdown including new and
revised examples.

PR-URL: https://github.com/nodejs/node/pull/4435
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: Shigeki Ohtsu <ohtsu@iij.ad.jp>
2016-01-06 09:51:56 +09:00
Shigeki Ohtsu
64e294adb2 doc: fix heading level error in Buffer doc
tools/doc/html.js in make doc throws an error in checking a heading
level in the markdown file.

PR-URL: https://github.com/nodejs/node/pull/4537
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-01-05 10:13:21 -08:00
Dave
a497bb5d09 doc: close backtick in process.title description
PR-URL: https://github.com/nodejs/node/pull/4534
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
2016-01-05 10:27:17 -05:00
Richard Sun
5194a1e3ce doc: fix numbering in stream.markdown
PR-URL: https://github.com/nodejs/node/pull/4538
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2016-01-05 10:24:15 -05:00
James M Snell
7e985d81cc doc: improvements to dgram.markdown copy
General improvements to dgram.markdown copy

PR-URL: https://github.com/nodejs/node/pull/4437
Reviewed-By: Minwoo Jung <jmwsoft@gmail.com>
Reviewed-By: Stephan Belanger <admin@stephenbelanger.com>
2016-01-04 08:42:06 -08:00
James M Snell
bbb4a2a517 doc: improvements to errors.markdown copy
General improvements to errors.markdown including
improved/revised examples

PR-URL: https://github.com/nodejs/node/pull/4454
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Minwoo Jung <jmwsoft@gmail.com>
2016-01-04 08:40:09 -08:00
Anna Henningsen
ac153bd2a6 timers: fail early when callback is not a function
`setTimeout()`, `setInterval()` and `setIntermediate` currently
throw errors when receiving non-function objects as their first
argument, but only do so when trying to execute the callback,
i.e. after the waited time has passed. This may complicate
debugging when a lot of calls to `setTimeout()`/etc. are involved,
so failing as early as possible seems like a good idea.

`setTimeout()` historically ignored an falsy first
argument, while the other functions do not and throw instead.
This patch changes this behaviour to make all three match and
adds remarks in the corresponding documentation.

PR-URL: https://github.com/nodejs/node/pull/4362
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
2016-01-04 14:56:19 +11:00
Ryan Sobol
4e8a005662 doc: mention that http.Server inherits from net.Server
PR-URL: https://github.com/nodejs/node/pull/4455
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2015-12-30 12:06:25 -08:00
Ben Ripkens
c280596944 doc: explain ClientRequest#setTimeout time unit
State a time unit for the timeout parameter in ClientRequest#setTimeout

PR-URL: https://github.com/nodejs/node/pull/4458
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2015-12-30 12:04:03 -08:00
iamchenxin
1de6e4f9ab doc: add anchors for _transform _flush _writev in stream.markdown
PR-URL: https://github.com/nodejs/node/pull/4448
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2015-12-30 11:49:47 -08:00
James M Snell
1a004f1187 doc: improvements to debugger.markdown copy
General improvements to debugger.markdown

PR-URL: https://github.com/nodejs/node/pull/4436
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Minwoo Jung <jmwsoft@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-12-30 11:21:13 -08:00
James M Snell
a0130e16e5 doc: improvements to events.markdown copy
General improvements to events.markdown copy including a
bit of restructuring and improved examples

PR-URL: https://github.com/nodejs/node/pull/4468
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
2015-12-30 10:50:52 -08:00
James M Snell
7ee1685d74 doc: improvements to dns.markdown copy
General improvements to dns.markdown copy and examples

PR-URL: https://github.com/nodejs/node/pull/4449
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
2015-12-30 10:48:10 -08:00
James M Snell
e4c835e1cb doc: improvements to console.markdown copy
Several improvements including a few new examples

PR-URL: https://github.com/nodejs/node/pull/4428
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
2015-12-30 10:42:29 -08:00
James M Snell
7d5c1b5b1a doc: improve child_process.markdown copy
General improvements to child_process.markdown

PR-URL: https://github.com/nodejs/node/pull/4383
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2015-12-30 10:29:48 -08:00
Rich Trott
f241d6685b doc: copyedit setTimeout() documentation
Copyedit the documentation for setTimeout() and enforce wrapping at 80
characters in the markdown file for nearby text.

PR-URL: https://github.com/nodejs/node/pull/4434
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: jasnell - James M Snell <jasnell@gmail.com>
Reviewed-By: Stephan Belanger <admin@stephenbelanger.com>
2015-12-29 19:13:13 -08:00
Rich Trott
312b4d6371 doc: fix formatting in process.markdown
All the other properties get an h2/## but process.connected gets an
h3/### for no discernible reason. Change it to h2/## like the others.

PR-URL: https://github.com/nodejs/node/pull/4433
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Stephan Belanger <admin@stephenbelanger.com>
Reviewed-By: Roman Klauke <romaaan.git@gmail.com>
2015-12-29 19:06:23 -08:00
James M Snell
3e648eb2ca doc: improve assert.markdown copy
General improvements to assert.markdown copy including
new and improved examples

PR-URL: https://github.com/nodejs/node/pull/4360
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
2015-12-28 12:14:49 -08:00
Adri Van Houdt
2fd3d8aee6 doc: improve grammar in tls docs
Fix: #4246
PR-URL: https://github.com/nodejs/node/pull/4315
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Fedor Indutny <fedor@indutny.com>
2015-12-23 17:17:51 -08:00
James M Snell
67b109a4b4 doc: improvements to buffer.markdown copy
General improvements to buffer.markdown including new examples,
a few fixes to existing examples, consistent formatting and
others

PR-URL: https://github.com/nodejs/node/pull/4370
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
2015-12-23 13:47:54 -08:00
James M Snell
d5863bc0f4 doc: improve addons.markdown copy
General improvements to the documentation in addons.markdown.

PR-URL: https://github.com/nodejs/node/pull/4320
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2015-12-23 12:19:42 -08:00
James M Snell
9b21119e17 doc: fix, modernize examples in docs
* Use single quotes consistently
* Modernize examples to use template strings and arrow funcs
* Fix a few typos
* Example edits for consistency

PR-URL: https://github.com/nodejs/node/pull/4282
Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2015-12-17 08:07:29 -08:00
chrisjohn404
f2bddc14f6 doc: Typo in buffer.markdown referencing buf.write()
The buffer's write function is documented below the
buf.toString function and all of the docs reference
"buf" instead of "buffer".

PR-URL: https://github.com/nodejs/node/pull/4324
Reviewed-By: James M Snell <jasnell@gmail.com>
2015-12-17 07:55:09 -08:00
Nicholas Young
4637168f81 doc: fix link in addons.markdown
Update link from github.com/rvagg to github.com/nodejs

PR-URL: https://github.com/nodejs/node/pull/4331
Reviewed-By: James M Snell <jasnell@gmail.com>
2015-12-17 07:48:33 -08:00
Jackson Tian
a8854e5b59 doc: document the cache parameter for fs.realpathSync
PR-URL: https://github.com/nodejs/node/pull/4285
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2015-12-16 08:41:45 -08:00
Jan Schär
9e1b7aa874 doc: document backlog for server.listen() variants
The backlog parameter is supported by all variations of
net.Server.listen(), but wasn't consistently documented. This
commit brings the documentation into a more consistent state.

Refs: https://github.com/nodejs/node/pull/4056
PR-URL: https://github.com/nodejs/node/pull/4025
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
2015-12-16 10:58:51 -05:00
Bryan English
7a518788e9 doc, test: symbols as event names
* Document that Symbol can used as event names.
* Add test for using Symbol as event names

PR-URL: https://github.com/nodejs/node/pull/4151
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2015-12-14 15:31:32 -08:00
Lenny Markus
9538fd02e5 doc: clarify error events in HTTP module documentation
Make it clear that error with throw if error listener is
not registered.

PR-URL: https://github.com/nodejs/node/pull/4275
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2015-12-14 15:11:18 -08:00
Hideki Yamamura
c6efd535e4 doc: fix improper http.get sample code
Refs: https://github.com/nodejs/node-v0.x-archive/pull/25471
Refs: https://github.com/nodejs/node-v0.x-archive/issues/8443
PR-URL: https://github.com/nodejs/node/pull/4263
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2015-12-14 14:54:22 -08:00
Arthur Gautier
671347cf13 doc: fixup socket.remoteAddress
remoteAddress may be undefined under certain conditions

Signed-off-by: Arthur Gautier <baloo@gandi.net>

PR-URL: https://github.com/nodejs/node/pull/4198
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
2015-12-14 17:25:36 +11:00
Rich Trott
f050cab3d8 doc: copyedit console doc
PR-URL: https://github.com/nodejs/node/pull/4225
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2015-12-11 21:19:57 -08:00
Fedor Indutny
c5b4f6bc99 tls: introduce secureContext for tls.connect
Add `secureContext` option to `tls.connect`. It is useful for caching
client certificates, key, and CA certificates.

PR-URL: https://github.com/nodejs/node/pull/4246
Reviewed-By: James M Snell <jasnell@gmail.com>
2015-12-11 19:53:30 -05:00
janriemer
1a21a5368b doc: move description of 'equals' method to right place
the description of buffer.equals(otherBuffer) was at the wrong
place; move it underneath the method signature

PR-URL: https://github.com/nodejs/node/pull/4227
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2015-12-11 10:40:56 -08:00
Tom Gallacher
9a9c5259bf doc: Fixing broken links to the v8 wiki
PR-URL: https://github.com/nodejs/node/pull/4241
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Minwoo Jung <jmwsoft@gmail.com>
2015-12-11 10:24:46 -08:00
Alexander Martin
67e181986a buffer: add includes() for parity with TypedArray
Add Buffer#includes() by wrapping an indexOf and performing a strict
equals check to -1.

The includes method takes the search value, byteOffset, and encoding as
arguments.

The test is a modified version of the indexOf test.

Fixes: https://github.com/nodejs/node/issues/3552
PR-URL: https://github.com/nodejs/node/pull/3567
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2015-12-10 13:41:40 -07:00
Rich Trott
37ed05b8c1 doc: copyedit child_process doc
PR-URL: https://github.com/nodejs/node/pull/4188
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Minwoo Jung <jmwsoft@gmail.com>
2015-12-09 16:56:26 -08:00
Rich Trott
e47ae5808b doc: copyedit buffer doc
PR-URL: https://github.com/nodejs/node/pull/4187
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
2015-12-09 16:49:04 -08:00
Rich Trott
70fb06a90b doc: clarify assert.fail doc
PR-URL: https://github.com/nodejs/node/pull/4186
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Roman Klauke <romaaan.git@gmail.com>
Reviewed-By: Minwoo Jung <jmwsoft@gmail.com>
2015-12-09 16:43:48 -08:00
Rich Trott
e3187cc81e doc: copyedit addons doc
PR-URL: https://github.com/nodejs/node/pull/4185
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
2015-12-09 16:37:13 -08:00
Ben Noordhuis
73a9a6fc92 doc: harmonize description of ca argument
Different sections said different things about what the `ca` argument
should look like.  This commit harmonizes them.

Ref: https://github.com/nodejs/node/pull/4099
PR-URL: https://github.com/nodejs/node/pull/4213
Reviewed-By: Roman Reiss <me@silverwind.io>
2015-12-09 22:29:37 +01:00
Roman Klauke
dfc8bedbc5 doc: change references from node to Node.js
Some API doc referenced Node.js with "node" or "node.js". This commit
replaces these references.

PR-URL:https://github.com/nodejs/node/pull/4177
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Minwoo Jung <jmwsoft@gmail.com>
2015-12-10 00:09:38 +09:00
Michael Ruddy
322b36c0a1 crypto: simplify using pre-existing keys with ECDH
These changes simplify using ECDH with private keys that are not
dynamically generated with ECDH.generateKeys.

Support for computing the public key corresponding to the given private
key was added. Validity checks to reduce the possibility of computing
a weak or invalid shared secret were also added.

Finally, ECDH.setPublicKey was softly deprecated.

PR-URL: https://github.com/nodejs/node/pull/3511
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Shigeki Ohtsu <ohtsu@iij.ad.jp>
2015-12-07 12:44:46 +01:00
yorkie
8c35903ba3 fs,doc: use target instead of destination
PR-URL: https://github.com/nodejs/node/pull/3912
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Bert Belder <bertbelder@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2015-12-05 18:25:05 -08:00
fansworld-claudio
2a29b70b37 doc: url.format - true slash postfix behaviour
Change url.format's references to slash postfixing to reflect
true behaviour (it only automatically postfixes slashes to the
slashedProtocols when host is present).

Fixes: #3361

PR-URL: https://github.com/nodejs/node/pull/4119
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Minwoo Jung <jmwsoft@gmail.com>
2015-12-06 09:02:55 +09:00
yorkie
cc2ceb6cb9 doc: improve child_process.markdown wording
PR-URL: https://github.com/nodejs/node/pull/4138
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Minwoo Jung <jmwsoft@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2015-12-04 10:26:29 -08:00
jpersson
7e4f22ca13 doc: update links to use https where possible
PR-URL: https://github.com/nodejs/node/pull/4054
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
2015-12-03 13:40:10 -08:00
jpersson
14b3aab7d2 doc: add links and backticks around names
* add backticks around names
* add single quotes around event names
* add parenthesis after function names
* add internal links between different sections
* add external links to MDN for some JavaScript references
* sort the link definitions alphabetically

PR-URL: https://github.com/nodejs/node/pull/4054
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
2015-12-03 13:39:09 -08:00
Scott Buchanan
816e66f0ec doc: standardize references to node.js in docs
trivial commit to fix a couple inconsistent references to
the name of the project

PR-URL: https://github.com/nodejs/node/pull/4136
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Roman Klauke <romaaan.git@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
2015-12-03 12:28:10 -08:00
Jan Krems
8eb153d00b doc: reword https.Agent example text
PR-URL: https://github.com/nodejs/node/pull/4075
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2015-12-02 11:01:29 -05:00
Luigi Pinca
15dc37ff4f doc: fix internal link to child.send()
PR-URL: https://github.com/nodejs/node/pull/4089
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2015-12-01 10:05:07 -05:00
yorkie
2fb34b6132 doc: fix the exception description
A value shouldn't be described as doing inherit from some class, more
strictly, the value is an instance of the class `Error`.

PR-URL: https://github.com/nodejs/node/pull/3658
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Stephan Belanger <admin@stephenbelanger.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2015-11-30 18:29:52 -08:00
Nathan Woltman
d1000b4137 path: make format() consistent and more functional
Make the win32 and posix versions of path.format() consistent in when
they add a directory separator between the dir and base parts of the
path (always add it unless the dir part is the same as the root).

Also, path.format() is now more functional in that it uses the name
and ext parts of the path if the base part is left out and it uses
the root part if the dir part is left out.

Reviewed-By: João Reis <reis@janeasystems.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/2408
2015-11-27 11:53:33 +00:00
Bryan English
6f87aa9a12 doc: message.header duplication correction
The old version of the text here was slightly incorrect, so it
just defers the details to the section in which they're fully
described.

PR-URL: https://github.com/nodejs/node/pull/3997
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
2015-11-24 16:16:01 +01:00
Lewis Cowper
3becac2e60 doc: replace sane with reasonable
Removing ableist language because we don't need to make the comparison
to people with mental health issues to get our point across.

PR-URL: https://github.com/nodejs/node/pull/3980
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2015-11-23 14:47:55 +01:00
Tom Gallacher
d16def5326 doc: Adding best practises for crypto.pbkdf2
Added some information around usages of how to use iterations, how to
choose decent salts and updating the example to have a significant
work factor and to use sha512.

PR-URL: https://github.com/nodejs/node/pull/3290
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: Shigeki Ohtsu <ohtsu@iij.ad.jp>
2015-11-23 17:49:52 +09:00
Carl Lei
615fba3bcf doc: numeric flags to fs.open
This has been supperted for long but never tested nor documented.

PR-URL: https://github.com/nodejs/node/pull/3641
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
2015-11-22 13:35:09 +01:00
Carl Lei
3f4409e571 doc: clarify that fs streams expect blocking fd
This clarifies that fs.createReadStream and fs.createWriteStream, when
passed a fd, expects the fd to be blocking, and suggests net.Socket as
an alternative.

PR-URL: https://github.com/nodejs/node/pull/3641
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
2015-11-22 13:34:30 +01:00
Tristian Flanagan
dfee4e3712 module: fix column offsets in errors
Because Node modules are wrapped, errors on the first line
of a file leak the wrapper to the user and report the wrong
column number. This commit adds a line break to the module
wrapper so that the first line is treated the same as all
other lines. To compensate for the additional line, a line
offset of -1 is also applied to errors.

Fixes: https://github.com/nodejs/node/issues/2860
PR-URL: https://github.com/nodejs/node/pull/2867
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2015-11-20 16:26:24 -05:00
Alexander Gromnitsky
94c3507f5c doc: fix broken references
PR-URL: https://github.com/nodejs/node/pull/3944
Reviewed-By: targos - Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Myles Borins <mborins@us.ibm.com>
2015-11-20 11:52:23 -08:00
Martin Forsberg
55b1eccae6 doc: move fs.existsSync() deprecation message
This commit moves the deprecation message for fs.existsSync()
above the function description, making message placement
uniform across the documentation.

PR-URL: https://github.com/nodejs/node/pull/3942
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2015-11-20 14:11:02 -05:00
cjihrig
5900d14966 doc: clarify module loading behavior
The module loading system will not append node_modules to a
path already ending in node_modules. This used to be documented,
but it was lost.

Fixes: https://github.com/nodejs/node/issues/3873
PR-URL: https://github.com/nodejs/node/pull/3920
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
2015-11-19 13:12:00 -05:00
cjihrig
5f3ed61094 doc: add reference for buffer.inspect()
This commit refers readers to util.inspect() for an explanation
of buffer.inspect().

Fixes: https://github.com/nodejs/node/issues/3918
PR-URL: https://github.com/nodejs/node/pull/3921
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
2015-11-19 13:02:32 -05:00
Wyatt Preul
007cfea308 util: remove pump
Remove util.pump and associated tests

PR-URL: https://github.com/nodejs/node/pull/2531
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2015-11-18 14:28:35 -08:00
Wyatt Preul
a2c0aa84e0 tty: Remove deprecated setRawMode wrapper
PR-URL: https://github.com/nodejs/node/pull/2528
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2015-11-18 13:16:02 -08:00
Jackson Tian
b33e9da8f9 debugger: introduce exec method for debugger
In debugger, the usage of `repl` very ugly. I'd like there is a `p`
like gdb. So the `exec` is coming.

Usage:

```
$ ./iojs debug ~/git/node_research/server.js
< Debugger listening on port 5858
connecting to 127.0.0.1:5858 ... ok
break in /Users/jacksontian/git/node_research/server.js:1
> 1 var http = require('http');
  2
  3 http.createServer(function (req, res) {
debug> exec process.title
/Users/jacksontian/git/io.js/out/Release/iojs
debug>
```

And the `repl`:

```
debug> repl
Press Ctrl + C to leave debug repl
> process.title
'/Users/jacksontian/git/io.js/out/Release/iojs'
debug>
(^C again to quit)
```

The enter and leave debug repl is superfluous.

R-URL: https://github.com/nodejs/node/pull/1491
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2015-11-17 12:11:40 -08:00
Tristian Flanagan
e3949b2ca1 doc: sort repl alphabetically
Reorders, with no contextual changes, the repl documentation with class
definitions at the top and alphabetically.

PR-URL: https://github.com/nodejs/node/pull/3859
Reviewed-By: Roman Klauke <romaaan.git@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2015-11-16 22:45:53 -08:00
Stefan Budeanu
df268f97bc tls: use SHA1 for sessionIdContext
FIPS 140-2 disallows use of MD5, which is used to derive the
default sessionIdContext for tls.createServer().

PR-URL: https://github.com/nodejs/node/pull/3866
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2015-11-16 17:26:23 -05:00
Stefan Budeanu
424ae5d4ac tls: Use SHA1 for sessionIdContext in FIPS mode
FIPS 140-2 disallows use of MD5, which is used to derive the
default sessionIdContext for tls.createServer().

PR-URL: https://github.com/nodejs/node/pull/3755
Reviewed-By: Fedor Indutny <fedor@indutny.com>
2015-11-16 16:47:00 -05:00
Bryan English
cd1123a0fb doc: consistent reference-style links
Moved all the URLs in API docs to the bottom of the files as
reference-style links.

PR-URL: https://github.com/nodejs/node/pull/3845
Reviewed-By: James M Snell <jasnell@gmail.com>
2015-11-16 07:36:59 -08:00
Jesse McCarthy
b445938a93 doc: add link to [customizing util.inspect colors].
PR-URL: https://github.com/nodejs/node/pull/3749
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2015-11-13 14:44:24 -08:00
Tom Gallacher
4270e7f0f7 doc: Updated streams simplified constructor API
The examples for implementing the simplified constructor API
was missing some details on its correct usages.

PR-URL: https://github.com/nodejs/node/pull/3602
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Chris Dickinson <chris@neversaw.us>
2015-11-13 13:27:11 -08:00
Roman Klauke
406c596fbf doc: add warning about Windows process groups
This commit adds a warning for Windows platforms. `process.kill` wont
kill a process group on Windows and instead it throws an error.

Refs: https://github.com/nodejs/node/issues/3617
PR-URL: https://github.com/nodejs/node/pull/3681
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
2015-11-13 13:19:39 -08:00
Manuel B
3c56d5e9e3 doc: added what buf.copy returns
as of https://github.com/nodejs/node/blob/v5.x/src/node_buffer.cc#L555

buf.copy returns the number of bytes copied.

PR-URL: https://github.com/nodejs/node/pull/3555
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2015-11-13 13:15:37 -08:00
Tristian Flanagan
934149a808 doc: reword message.headers to indicate they are not read-only
message.headers states that the headers are read-only, when in fact they
are not. This change rewords the docs to a more appropriate description,
while not promoting this kind of behavior.

Fixes: #3146
PR-URL: https://github.com/nodejs/node/pull/3814
Reviewed-By: Roman Klauke <romaaan.git@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2015-11-13 12:15:01 -08:00
Bryan English
4008961a07 doc: clarify duplicate header handling
This commit documents how duplicate HTTP headers are handled.

PR-URL: https://github.com/nodejs/node/pull/3810
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
2015-11-13 13:25:39 -05:00
Bryan English
061b2c8f2c doc: repl: add defineComand and displayPrompt
Also some minor edits so the additions make sense.

PR-URL: https://github.com/nodejs/node/pull/3765
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2015-11-13 04:10:00 -08:00
Tristian Flanagan
f8390fdd75 doc: sort tls alphabetically
Reorders, with no contextual changes, the tls documentation
alphabetically.

PR-URL: https://github.com/nodejs/node/pull/3662
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2015-11-12 17:41:10 -08:00
Tristian Flanagan
4efa7deeb2 doc: sort stream alphabetically
Reorders, with no contextual changes, the stream documentation
alphabetically.

PR-URL: https://github.com/nodejs/node/pull/3662
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2015-11-12 17:41:06 -08:00
Tristian Flanagan
403d2bffa6 doc: sort net alphabetically
Reorders, with minimal contextual duplication, the net documentation
alphabetically.

PR-URL: https://github.com/nodejs/node/pull/3662
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2015-11-12 17:41:03 -08:00
Tristian Flanagan
42a9cc70c7 doc: sort process alphabetically
Reorders, with no contextual changes, the process documentation
alphabetically.

PR-URL: https://github.com/nodejs/node/pull/3662
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2015-11-12 17:40:58 -08:00
Tristian Flanagan
e50d32c642 doc: sort zlib alphabetically
Reorders, with some contextual changes, the zlib documentation
alphabetically.

- Put Convenience Methods children under the Convenience Methods header
- Renamed Options to Class Options and put above the Class definitions

PR-URL: https://github.com/nodejs/node/pull/3662
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2015-11-12 17:40:50 -08:00
Tristian Flanagan
8c703cd040 doc: sort util alphabetically
Reorders, with no contextual changes, the util documentation
alphabetically.

PR-URL: https://github.com/nodejs/node/pull/3662
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2015-11-12 17:40:47 -08:00
Tristian Flanagan
54d8bdbab9 doc: sort https alphabetically
Reorders, with no contextual changes, the https documentation
alphabetically.

PR-URL: https://github.com/nodejs/node/pull/3662
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2015-11-12 17:40:43 -08:00
Tristian Flanagan
f4c259ab94 doc: sort http alphabetically
Reorders, with no contextual changes, the http documentation
alphabetically.

PR-URL: https://github.com/nodejs/node/pull/3662
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2015-11-12 17:40:40 -08:00
Tristian Flanagan
0ca44b093d doc: sort modules alphabetically
Reorders, with no contextual changes, the modules documentation
alphabetically.

PR-URL: https://github.com/nodejs/node/pull/3662
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2015-11-12 17:40:37 -08:00
Tristian Flanagan
6e6103b1e2 doc: sort readline alphabetically
Reorders, with no contextual changes, the readline documentation
alphabetically.

PR-URL: https://github.com/nodejs/node/pull/3662
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2015-11-12 17:40:33 -08:00
Tristian Flanagan
8a245ea99d doc: sort repl alphabetically
Reorders, with no contextual changes, the repl documentation
alphabetically.

PR-URL: https://github.com/nodejs/node/pull/3662
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2015-11-12 17:40:30 -08:00
Tristian Flanagan
16f9ba0bc8 doc: sort string_decoder alphabetically
Reorders, with no contextual changes, the string_decode documentation
alphabetically.

PR-URL: https://github.com/nodejs/node/pull/3662
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2015-11-12 17:40:26 -08:00
Tristian Flanagan
7e5a6b3272 doc: sort timers alphabetically
Reorders, with no contextual changes, the timers documentation
alphabetically.

PR-URL: https://github.com/nodejs/node/pull/3662
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2015-11-12 17:40:23 -08:00
Tristian Flanagan
e4009b6341 doc: sort tty alphabetically
Reorders, with no contextual changes, the tty documentation
alphabetically.

PR-URL: https://github.com/nodejs/node/pull/3662
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2015-11-12 17:40:19 -08:00
Tristian Flanagan
32d0d67700 doc: sort url alphabetically
Reorders, with no contextual changes, the url documentation
alphabetically.

PR-URL: https://github.com/nodejs/node/pull/3662
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2015-11-12 17:40:15 -08:00
Tristian Flanagan
cff45b98b0 doc: sort vm alphabetically
Reorders, with no contextual changes, the vm documentation alphabetically.

PR-URL: https://github.com/nodejs/node/pull/3662
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2015-11-12 17:40:11 -08:00