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

1766 Commits

Author SHA1 Message Date
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
Tristian Flanagan
ed1f10de95 doc: sort querystring alphabetically
Reorders, with no contextual changes, the querystring 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:07 -08:00
Tristian Flanagan
69cbaf691e doc: sort punycode alphabetically
Reorders, with no contextual changes, the punycode 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:03 -08:00
Tristian Flanagan
a58f389779 doc: sort path alphabetically
Reorders, with no contextual changes, the path 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:39:59 -08:00
Tristian Flanagan
39a7fdf83d doc: sort os alphabetically
Reorders, with no contextual changes, the os 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:39:55 -08:00
Tristian Flanagan
b690c78241 doc: sort globals alphabetically
Reorders, with no contextual changes, the globals 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:39:52 -08:00
Tristian Flanagan
b35c57b70c doc: sort fs alphabetically
Reorders, with no contextual changes, the fs 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:39:49 -08:00
Tristian Flanagan
6009c4b159 doc: sort events alphabetically
Reorders, with minimal contextual duplication, the events 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:39:45 -08:00
Tristian Flanagan
084e540397 doc: sort errors alphabetically
Reorders, with no contextual changes, the errors 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:39:42 -08:00
Tristian Flanagan
4315601252 doc: sort dgram alphabetically
Reorders, with no contextual changes, the dgram 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:39:38 -08:00
Tristian Flanagan
6f8e481085 doc: sort crypto alphabetically
Reorders, with no contextual changes, the crypto 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:39:35 -08:00
Tristian Flanagan
bf5e177913 doc: sort dns alphabetically
Reorders, with no contextual changes, the dns 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:39:31 -08:00
Tristian Flanagan
42d6431287 doc: sort console alphabetically
Reorders, with no contextual changes, the console 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:39:26 -08:00
Tristian Flanagan
4c912206f8 doc: sort cluster alphabetically
Reorders, with no contextual changes, the cluster 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:39:21 -08:00
Tristian Flanagan
f7169d2336 doc: sort child_process alphabetically
Reorders, with no contextual changes, the child_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:39:17 -08:00
Tristian Flanagan
c0360c1de8 doc: sort buffer alphabetically
Reorders, with minimal contextual duplication, the buffer 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:39:11 -08:00
Tristian Flanagan
e16c669a65 doc: sort assert alphabetically
Reorders, with no contextual changes, the assert 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:38:34 -08:00
Evan Lucas
7cb3a5427d doc: add note to util.isBuffer
Since util.isBuffer is deprecated, we should be explicit that
Buffer.isBuffer should be used instead.

PR-URL: https://github.com/nodejs/node/pull/3790
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2015-11-12 12:47:15 -06:00
Tyler Henkel
eff8c3e024 doc: add note on tls connection meta data methods
PR-URL: https://github.com/nodejs/node/pull/3746
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-11-10 23:05:06 +01:00
Roman Reiss
9aee2c0e26 console: use 'label' argument for time and timeEnd
Turns out the argument is actually called label in the console spec,
while being wrongly named on MDN. This reverts commit
8c043c1245.

MDN has been updated in:

https://developer.mozilla.org/en-US/docs/Web/API/Console/timeEnd$compare?locale=en-US&to=947893&from=918571
https://developer.mozilla.org/en-US/docs/Web/API/Console/time$compare?locale=en-US&to=947891&from=896987

PR-URL: https://github.com/nodejs/node/pull/3590
Reviewed-By: targos - Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2015-11-10 15:37:06 +01:00
Alejandro Oviedo
d26927c679 doc: add method links in events.markdown
Added referenced method links.

PR-URL: https://github.com/nodejs/node/pull/3187
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
2015-11-06 16:15:01 +01:00
Shigeki Ohtsu
017fc5b391 doc: add caveats of algs and key size in crypto
Add description of user responsibility in the choice of cypto
algorithms and its key length. Some of recommendations for the safer
use are also described.

PR-URL: https://github.com/nodejs/node/pull/3479
Reviewed-By: James M Snell <jasnell@gmail.com>
2015-11-05 10:47:28 -08:00
fansworld-claudio
30ce3ebca3 docs: fs - change links to buffer encoding to Buffer class anchor
PR-URL: https://github.com/nodejs/node/pull/2796
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: James M Snell <jasnell@gmail.com>
2015-11-05 09:32:45 -08:00
fansworld-claudio
2e38079ea4 docs: fs - remove encoding list and link to buffer 2015-11-05 09:31:35 -08:00
Ben Noordhuis
dac1d38a02 doc: stdout/stderr can block when directed to file
Update the documentation for `process.stdout` and `process.stdout` to
clarify that writes can block when stdio is redirected to a file.  In
all other cases, it's non-blocking.

PR-URL: https://github.com/nodejs/node/pull/3170
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2015-11-05 17:27:45 +01:00
David Woods
471aa5a989 doc:fix function param order in assert doc
PR-URL: https://github.com/nodejs/node/pull/3533
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2015-11-03 13:13:07 -08:00
Guilherme Souza
ac7dd5fc6c doc: add note about timeout delay > TIMEOUT_MAX
When setTimeout() and setInterval() are called with `delay` greater than
TIMEOUT_MAX (2147483647), the supplied value is ignored and 1 is used
instead. Add a note about this in the timers docs.

PR-URL: https://github.com/nodejs/node/pull/3512
Reviewed-By: Trevor Norris <trev.norris@gmai.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2015-11-02 13:38:39 -07:00
Jason Gerfen
9e3aa451a1 doc: fix crypto spkac function descriptions
Fix regarding description of the following functions:

Certificate.exportPublicKey(spkac)
Certificate.exportChallenge(spkac)

The descriptions were applied incorrectly.

PR-URL: https://github.com/nodejs/node/pull/3614
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-11-01 23:57:28 +01:00
Rich Trott
cdcf00a0b9 lib,doc: return boolean from child.send()
The documentation indicates that child.send() returns a boolean but it
has returned undefinined at since v0.12.0. It now returns a boolean per
the (slightly updated) documentation.

PR-URL: https://github.com/nodejs/node/pull/3516
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-10-28 16:21:36 -07:00
Sakthipriyan Vairamani
5d5a4c4c18 doc: createServer's key option can be an array
The `tls` module's `createServer` and `createSecureContext` accept
`key` option and it can be an array of keys as well. This patch
explains the format of the entries in that array.

Corresponding code:
https://github.com/nodejs/node/blob/v4.1.1/lib/_tls_common.js#L73-L90

PR-URL: https://github.com/nodejs/node/pull/3123
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
2015-10-28 07:46:27 +05:30
Shigeki Ohtsu
802a2e79e1 tls, crypto: add ALPN Support
ALPN is added to tls according to RFC7301, which supersedes NPN.
When the server receives both NPN and ALPN extensions from the client,
ALPN takes precedence over NPN and the server does not send NPN
extension to the client. alpnProtocol in TLSSocket always returns
false when no selected protocol exists by ALPN.
In https server, http/1.1 token is always set when no
options.ALPNProtocols exists.

PR-URL: https://github.com/nodejs/node/pull/2564
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-10-27 01:31:47 +09:00
Martii
e32aca698e doc: clarify API buffer.concat
* Add a simple example for buffer.concat
* Change grammar slightly.

Fixes: #3219
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/3255
2015-10-22 16:20:45 -07:00
Kyle Smith
60a3dd4810 doc: clarify the use of option.detached
This paragraph conveys that detached child processes do not stay
running in the background in general. Instead clarify that this
refers to the parent process exiting before the detached child
process is complete.

Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/3250
2015-10-21 12:34:59 -07:00
Domenic Denicola
d381290854 doc: more use-cases for promise events
This adds an example of a semi-common promise pattern that could
result in false-positive 'unhandledRejection' events, to help motivate
why there is a dual 'rejectionHandled' event. I anticipate it being
helpful to users who encounter 'unhandledRejection' events that do not
stem from obvious typos such as the JSON.pasre example.

Also cleans up the promise rejection tracking sample. By using a Map
instead of array we can get O(1) deletion and actually record the errors.
And, fixed indentation and backtick usage there to align with the rest of
the document.

Reviewed-By: Stephan Belanger <admin@stephenbelanger.com>
Reviewed-By: Petka Antonov <petka.antonov@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/3438
2015-10-21 10:38:41 -07:00
Yuval Brik
adfd20b6fd tls: TLSSocket options default isServer false
Upon creating a TLSSocket object, set the default isServer option to false
Updated tls docs and added test-tls-socket-default-options

PR-URL: https://github.com/nodejs/node/pull/2614
Reviewed-By: Fedor Indutny <fedor@indutny.com>
2015-10-20 16:14:22 -04:00
fansworld-claudio
49f965c41c docs: add missing shell option to execSync
Adds the "shell" option from child_process.exec to
child_process.execSync on the api docs.

Fixes: #3387
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/3440
2015-10-20 12:09:35 -07:00
Trevor Norris
57f99a9479 doc: binary encoding is not deprecated
When v8 implemented proper one-byte string support Node's internal
"binary" encoding implementation was removed in favor of it. The result
was that "binary" encoding effectively became "latin-1" encoding.
Because of this and because one-byte strings are natively supported by
v8 the buffer encoding is not deprecated and will not be removed.

Ref: 83261e7 "deps: update v8 to 3.17.13"
PR-URL: https://github.com/nodejs/node/pull/3441
Reviewed-By: Ben Noordhuis <ben@strongloop.com>
2015-10-20 11:46:49 -06:00
Rich Trott
f875c73325 doc: add information about Assert behavior and maintenance
Assert is now locked. Userland alternatives should be used. Assert is
for testing Node.js itself.

Document potentially surprising use of enumerable properties only in
deep equality assertions.

Ref: https://github.com/nodejs/node/pull/3124
Ref: https://github.com/nodejs/node/issues/3122

PR-URL: https://github.com/nodejs/node/pull/3330
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
2015-10-19 11:49:22 -07:00
calebboyd
ff8fa5150f doc: show keylen in pbkdf2 as a byte length
Ensure that keylen for pbkdf2 is documented as a length of bytes and not
bits.

PR-URL: https://github.com/nodejs/node/pull/3334
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2015-10-19 13:45:39 -04:00
Коренберг Марк
d8db75730f tls: add options argument to createSecurePair
Helps in implementation of #6204, where some options passed to
`createSecurePair()` are ignored before this patch.

These options are very helpful if someone wants to pass
`options.servername` or `options.SNICallback` to securepair.

PR-URL: https://github.com/nodejs/node/pull/2441
Reviewed-By: Fedor Indutny <fedor@indutny.com>
2015-10-17 11:53:45 -04:00
Johannes Wüller
0803962860 fs: add file descriptor support to *File() funcs
These changes affect the following functions and their synchronous
counterparts:

 * fs.readFile()
 * fs.writeFile()
 * fs.appendFile()

If the first parameter is a uint32, it is treated as a file descriptor.
In all other cases, the original implementation is used to ensure
backwards compatibility. File descriptor ownership is never taken from
the user.

The documentation was adjusted to reflect these API changes. A note was
added to make the user aware of file descriptor ownership and the
conditions under which a file descriptor can be used by each of these
functions.

Tests were extended to test for file descriptor parameters under the
conditions noted in the relevant documentation.

PR-URL: https://github.com/nodejs/node/pull/3163
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
2015-10-16 17:14:21 -06:00
Michaël Zasso
8c043c1245 console: rename argument of time and timeEnd
Name it timerName instead of label. It is clearer that way and matches
the description in the doc. It is also how it's named in MDN.

PR-URL: https://github.com/nodejs/node/pull/3166
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
2015-10-16 21:03:44 +02:00
Michaël Zasso
fc72a578e6 doc: reword description of console.time
PR-URL: https://github.com/nodejs/node/pull/3166
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
2015-10-16 21:03:30 +02:00
Michaël Zasso
419f7d4726 console: sub-millisecond accuracy for console.time
This makes the output of console.timeEnd in line with major browsers.

PR-URL: https://github.com/nodejs/node/pull/3166
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
2015-10-16 21:00:51 +02:00
Shigeki Ohtsu
f72e178a78 tls: add minDHSize option to tls.connect()
Add a new option to specifiy a minimum size of an ephemeral DH
parameter to accept a tls connection. Default is 1024 bit.

PR-URL: https://github.com/nodejs/node/pull/1831
Reviewed-By: indutny - Fedor Indutny <fedor.indutny@gmail.com>
Reviewed-By: bnoordhuis - Ben Noordhuis <info@bnoordhuis.nl>
2015-10-16 11:39:54 +09:00
Shigeki Ohtsu
6d92ebac11 tls: add TLSSocket.getEphemeralKeyInfo()
Returns an object representing a type, name and size of an ephemeral
key exchange in a client connection. Currently only DHE and ECHE are
supported.

This api only works on on a client connection. When it is called on a
server connection, null is returned. When its key exchange is not
ephemeral, an empty object is returned.

PR-URL: https://github.com/nodejs/node/pull/1831
Reviewed-By: indutny - Fedor Indutny <fedor.indutny@gmail.com>
Reviewed-By: bnoordhuis - Ben Noordhuis <info@bnoordhuis.nl>
2015-10-16 11:39:45 +09:00
Roman Reiss
503f279527 doc: fix indent in tls resumption example
Markdown requires 4-space indent to correctly format code blocks. This
fixes the example so it's correctly presented as code.

PR-URL: https://github.com/nodejs/node/pull/3372
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2015-10-15 11:30:44 +02:00
David Boivin
8e213096df doc: update the assert module summary
The current wording "This module is used for writing unit tests for your
applications, you can access it with require('assert')." implies that
this module should only be used in development while unit testing.

The article "Error Handling in Node.js" by Joyent
(https://www.joyent.com/developers/node/design/errors) uses the assert
module in an efficient way to validate required function arguments.

PR-URL: https://github.com/nodejs/node/pull/2799
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
2015-10-11 19:24:39 +02:00
Roman Klauke
0474bf57d9 doc: replace node-gyp link with nodejs/node-gyp
The node-gyp is now in the nodejs/node-gyp. This commit replaces the
repository owner link with the new nodejs/node-gyp link.

PR-URL: https://github.com/nodejs/node/pull/3320
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
2015-10-11 17:03:30 +02:00
Balázs Galambosi
b9279aa193 doc: remove old note, 'cluster' is marked stable
Fixes: https://github.com/nodejs/node/issues/3313
PR-URL: https://github.com/nodejs/node/pull/3314
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2015-10-10 13:37:15 -07:00
Jason Karns
775c01e3aa doc: recommend Infinity on emitter.setMaxListeners
Instead of recommending `0` as the magic value to set max listeners to
unlimited, recommend `Infinity`. This paves the way for `0` as a magic
value eventually being deprecated and finally removed.

PR-URL: https://github.com/nodejs/node/pull/2559
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: targos - Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Brendan Ashworth <brendan.ashworth@me.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
2015-10-09 19:01:29 +02:00
Dave Hodder
048c8f2c4b doc: Amend capitalization of word JavaScript
PR-URL: https://github.com/nodejs/node/pull/3285
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
2015-10-09 18:42:58 +02:00
Alejandro Oviedo
2146f62065 doc: add method links in child_process.markdown
Added links to referenced methods.

PR-URL: https://github.com/nodejs/node/pull/3186
Reviewed-By: Roman Reiss <me@silverwind.io>
2015-10-09 18:41:09 +02:00
Alejandro Oviedo
70c78c9469 doc: add method links in dns.markdown
Added links to referenced methods.

PR-URL: https://github.com/nodejs/node/pull/3196
Reviewed-By: Roman Reiss <me@silverwind.io>>
2015-10-09 18:39:11 +02:00
Roman Reiss
07a84191c0 doc: add TLS session resumption example
Using TLS session resumption correctly is not obvious. This added
example code should help new users understand how to use it correctly.

Related issue: https://github.com/nodejs/node/issues/3132
PR-URL: https://github.com/nodejs/node/pull/3147
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
2015-10-07 20:50:47 +02:00
Rod Machen
20b68e5b42 doc: fix spelling in Buffer documentation
Change b.writeUint16LE(0x90ab, 0) to b.writeUInt16LE(0x90ab, 0).

PR-URL: https://github.com/nodejs/node/pull/3226
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
2015-10-06 19:09:54 -05:00
Minwoo Jung
d32363ff20 doc: fix outdated 'try/catch' statement in sync
Fixes description about crypto.randomBytes.

Fixes: https://github.com/nodejs/node/issues/3081
PR-URL: https://github.com/nodejs/node/pull/3087
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Brendan Ashworth <brendan.ashworth@me.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2015-09-30 19:59:10 -07:00
Rich Trott
0e4b772d6c doc: copyedit fs.watch() information
Removed "Only FSEvents supports this type of file watching so it is
unlikely any additional platforms will be added soon."

Per @saghul, "FSEvents" refers to the OSX API, but since we added
Windows support it may not be  unlikely that we add more.

PR-URL: https://github.com/nodejs/node/pull/3097
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2015-09-29 23:32:23 -07:00
Evan Lucas
30b8bb0aab src: add process.versions.icu
If i18n support is present, add the icu version
to process.versions

Fixes: https://github.com/nodejs/node/issues/3089
PR-URL: https://github.com/nodejs/node/pull/3102
Reviewed-By: Steven R Loomis <srloomis@us.ibm.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Rod Vagg <rod@vagg.org>
2015-09-29 08:18:03 -05:00
James M Snell
6192c9892f http: add checkIsHttpToken check for header fields
Ref: https://github.com/nodejs/node-convergence-archive/issues/13

This adds a new check for header and trailer fields names and method
names to ensure that they conform to the HTTP token rule. If they do
not, a `TypeError` is thrown.

Previously this had an additional `strictMode` option that has been
removed in favor of making the strict check the default (and only)
behavior.

Doc and test case are included.

On the client-side
```javascript
var http = require('http');
var url = require('url');
var p = url.parse('http://localhost:8888');
p.headers = {'testing 123': 123};
http.client(p, function(res) { }); // throws
```

On the server-side
```javascript
var http = require('http');
var server = http.createServer(function(req,res) {
  res.setHeader('testing 123', 123); // throws
  res.end('...');
});
```

Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Trevor Norris <trevnorris@nodejs.org>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
PR-URL: https://github.com/nodejs/node/pull/2526
2015-09-25 08:37:57 -07:00
Fabio Oliveira
79ebeabd08 docs: Clarify assert.doesNotThrow behavior
The documentation for assert.doesNotThrow now reflects all the inputs
the function accepts, as well as the errors thrown for each combination
of parameter types.

PR-URL: https://github.com/nodejs/node/pull/2807
Reviewed-By: Rich Trott <rtrott@gmail.com>
2015-09-23 15:07:59 -07:00
Laurent Fortin
2d21092400 doc: rearrange execSync and execFileSync
Changed the ordering so it is in line with the async methods.

PR-URL: https://github.com/nodejs/node/pull/2940
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
2015-09-23 22:20:18 +02:00
Laurent Fortin
28da400d47 doc: make execFileSync in line with execFile
PR-URL: https://github.com/nodejs/node/pull/2940
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
2015-09-23 22:19:12 +02:00
reggi
ffdbe9d4f1 doc: fix typos in cluster & errors
PR-URL: https://github.com/nodejs/node/pull/3011
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
2015-09-23 22:06:43 +02:00
Sakthipriyan Vairamani
7953c83b85 doc: remove usage of events.EventEmitter
The `events` module already exports `EventEmitter` constructor function
So, we don't have to use `events.EventEmitter` to access it.

Refer: https://github.com/nodejs/node/pull/2896

PR-URL: https://github.com/nodejs/node/pull/2921
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
2015-09-23 00:22:11 +05:30
Christopher J. Brody
451acc7559 doc: remove extra using v8::HandleScope statement
v8::HandleScope does not seem to be required for addon functions.

PR-URL: https://github.com/nodejs/node/pull/2983
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-09-21 17:58:11 +02:00
Rich Trott
4fb4c14b61 doc: clarify description of assert.ifError()
This fixes a few typographical errors (comma splices and the like) and
clarifies the description of assert.ifError(). It also standardizes the
document on "inequality" rather than having both "inequality" and "non-
equality".

PR-URL: https://github.com/nodejs/node/pull/2941
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2015-09-18 23:46:36 -07:00
Rich Trott
4dcf24cfab doc: refine process.kill() and exit explanations
Add corrections about when exit event fires and how .kill() works on
Windows.

PR-URL: https://github.com/nodejs/node/pull/2918
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
2015-09-17 15:03:04 -07:00
Rich Trott
43cb1ddb00 doc: process exit event is not guaranteed to fire
This change:

* notes that the exit event is not guaranteed to fire
* provides an example situation where the exit event may not fire
* makes a minor copyediting change
* enforces 80 character wrap in one place where it was not honored

Fixes: https://github.com/nodejs/node/issues/2853
PR-URL: https://github.com/nodejs/node/pull/2861
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-09-16 13:56:48 -07:00
Sam Roberts
6cb9e8a9c4 doc: remove incorrect reference to TCP in net docs
createServer() can create socket of types other than TCP.

PR-URL: https://github.com/nodejs/node/pull/2903
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2015-09-16 10:52:12 -07:00
Sam Roberts
e148dcce45 doc: correct buffer.slice arg syntax
PR-URL: https://github.com/nodejs/node/pull/2903
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2015-09-16 10:52:03 -07:00
Sam Roberts
a12628bd97 doc: describe spawn option.detached
PR-URL: https://github.com/nodejs/node/pull/2903
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2015-09-16 10:51:37 -07:00
Sam Roberts
94e663ac5f timer: ref/unref return self
Most calls to ref() and unref() are chainable, timers should be
chainable, too.

Typical use:

    var to = setTimeout(ontimeout, 123).unref();

PR-URL: https://github.com/nodejs/node/pull/2905
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trevor Norris <trevnorris@nodejs.org>
2015-09-16 10:29:13 -07:00
Sven Slootweg
360d0faf44 doc: add missing backtick in buffer.markdown
Fixes: https://github.com/nodejs/node/issues/2880
PR-URL: https://github.com/nodejs/node/pull/2881
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2015-09-15 13:59:45 -04:00
Yazhong Liu
1f842c2c61 fs: consider NaN/Infinity in toUnixTimestamp
PR-URL: https://github.com/nodejs/node/pull/2387
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
2015-09-14 16:55:15 -06:00
Danny Nemer
a85f4b5ce5 doc: fix broken link in repl.markdown
PR-URL: https://github.com/nodejs/node/pull/2827
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2015-09-14 17:29:01 -04:00
Jeremiah Senkpiel
892bf65d9a doc: fix two doc errors in stream and process
`process.stdout` always blocks as of
20176a9841

`WritableState.buffer` is `getBuffer()` as of
91586661c9

PR-URL: https://github.com/nodejs/node/pull/2549
Reviewed-By: Alexis Campailla <orangemocha@nodejs.org>
Reviewed-By: Evan Lucas <evanlucas@me.com>
2015-09-14 09:39:59 -04:00
Tristian Flanagan
abb2a4b8fe doc: fixed io.js references in process.markdown
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/2846
2015-09-13 13:42:26 -07:00
Minwoo Jung
958a94e19d doc: use "Calls" over "Executes" for consistency
"Calls" is used frequently throughout the docs except for this line.
Use "Calls" over "Executes" to make it consistent.

PR-URL: https://github.com/nodejs/node/pull/2800
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2015-09-11 11:10:37 -04:00
Anne-Gaelle Colom
e1fb0e8289 doc: use US English for consistency
behaviour -> behavior

PR-URL: https://github.com/nodejs/node/pull/2784
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Brendan Ashworth <brendan.ashworth@me.com>
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
2015-09-10 14:39:16 -07:00
Anne-Gaelle Colom
d2f70fee13 doc: use 3rd person singular for consistency
PR-URL: https://github.com/nodejs/node/pull/2765
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2015-09-10 06:03:54 -07:00
Sam Roberts
f442904a27 doc: describe process API for IPC
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
PR-URL: https://github.com/nodejs/node/pull/1978
2015-09-09 09:46:20 -07:00
Rich Trott
8f87169805 doc: fix comma splice in Assertion Testing doc
This fixes a minor typographical error in the Assertion Testing doc.

PR-URL: https://github.com/nodejs/node/pull/2728
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
2015-09-08 14:42:27 -07:00
Sakthipriyan Vairamani
f0a75ab2d3 doc,test: enable recursive file watching in Windows
Recursive file watching is supported by libuv since 1.7.0. Refer
https://github.com/nodejs/node/blob/master/deps/uv/ChangeLog#L126. This
patch notes that in the docs and enables testing this feature. It also
adds proper TAP plugin parsable message for other platforms.

PR-URL: https://github.com/nodejs/node/pull/2649
Fixes: https://github.com/nodejs/node/issues/375
Reviewed-By: rvagg - Rod Vagg <rod@vagg.org>
Reviewed-By: silverwind - Roman Reiss <me@silverwind.io>
2015-09-06 21:38:07 +10:00
Jeremiah Senkpiel
65844affe9 doc: update url doc to account for escaping
Fixes: https://github.com/nodejs/node/issues/2113
Ref: 17a379ec39
PR-URL: https://github.com/nodejs/node/pull/2605
Reviewed-By: jasnell - James M Snell <jasnell@gmail.com>
Reviewed-By: cjihrig - Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: mscdex - Brian White <mscdex@mscdex.net>
2015-09-06 21:37:59 +10:00
Ben Noordhuis
607aa3ac82 child_process: add callback parameter to .send()
Add an optional callback parameter to `ChildProcess.prototype.send()`
that is invoked when the message has been sent.

Juggle the control channel's reference count so that in-flight messages
keep the event loop (and therefore the process) alive until they have
been sent.

`ChildProcess.prototype.send()` and `process.send()` used to operate
synchronously but became asynchronous in commit libuv/libuv@393c1c5
("unix: set non-block mode in uv_{pipe,tcp,udp}_open"), which landed
in io.js in commit 07bd05b ("deps: update libuv to 1.2.1").

Fixes: https://github.com/nodejs/node/issues/760
PR-URL: https://github.com/nodejs/node/pull/2620
Reviewed-By: trevnorris - Trevor Norris <trev.norris@gmail.com>
Reviewed-By: jasnell - James M Snell <jasnell@gmail.com>
2015-09-06 21:37:58 +10:00
Jeremiah Senkpiel
4c5fc3b1d4 doc: clarify cluster behaviour with no workers
Fixes: https://github.com/nodejs/node/issues/1239
Ref: 41b75ca926
PR-URL: https://github.com/nodejs/node/pull/2606
Reviewed-By: bnoordhuis - Ben Noordhuis <info@bnoordhuis.nl>
2015-08-28 20:32:56 -04:00
Ben Noordhuis
de88255b0f Revert "lib,src: add unix socket getsockname/getpeername"
This reverts commit 6cd0e2664b.
This reverts commit 7a999a1376.
This reverts commit f337595441.

It turns out that on Windows, uv_pipe_getsockname() is a no-op for
client sockets.  It slipped through testing because of a CI snafu.

PR-URL: https://github.com/nodejs/node/pull/2584
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2015-08-28 00:14:13 +02:00
Ben Noordhuis
6cd0e2664b doc: update io.js reference
Commit f337595 ("lib,src: add unix socket getsockname/getpeername")
accidentally left in a reference to io.js v1.5.0 in the documentation.
Update it to say "Node.js v4.0.0", the upcoming release.

PR-URL: https://github.com/nodejs/node/pull/2580
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2015-08-27 18:00:55 +02:00
Ben Noordhuis
7a999a1376 lib: add net.Socket#localFamily property
Complements the existing net.Socket#remoteFamily property.

PR-URL: https://github.com/nodejs/node/pull/956
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
2015-08-27 17:45:29 +02:00
Ben Noordhuis
f337595441 lib,src: add unix socket getsockname/getpeername
The implementation is a minor API change in that socket.address() now
returns a `{ address: '/path/to/socket' }` object, like it does for TCP
and UDP sockets.  Before this commit, it returned `socket._pipeName`,
which is a string when present.

Change common.PIPE on Windows from '\\\\.\\pipe\\libuv-test' to
'\\\\?\\pipe\\libuv-test'.  Windows converts the '.' to a '?' when
creating a named pipe, meaning that common.PIPE didn't match the
result from NtQueryInformationFile().

Fixes: https://github.com/nodejs/node/issues/954
PR-URL: https://github.com/nodejs/node/pull/956
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
2015-08-27 17:45:04 +02:00
Сковорода Никита Андреевич
d6714ff1a4 doc: minor clarification in buffer.markdown
Replaced "contents is" with "contents are".
Added a note that initial Buffer contents could contain sensitive data.

PR-URL: https://github.com/nodejs/node/pull/2574
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
2015-08-27 18:08:13 +03:00
James M Snell
2e8bb62011 doc: fix bad merge on modules.markdown
My previous commit landed a bad merge on modules.markdown.
This fixes it.
2015-08-25 19:00:02 -07:00
James M Snell
09768e306c doc: minor additional corrections and improvements
Per feedback from @thefourtheye: (a) improve word on the
description of the `close` event in stream.markdown and
(b) remove `[module section]: modules.html` from
globals.markdown

Reviewed By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/2378
2015-08-25 18:52:52 -07:00
James M Snell
758d02e4e9 doc: minor grammatical update in crypto.markdown
Per: https://github.com/joyent/node/pull/8878

Originally submitted by @jacksonhoose

Reviewed By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/2378
2015-08-25 18:52:47 -07:00
James M Snell
b11ba2791c doc: minor grammatical update
Per: https://github.com/joyent/node/pull/9009

Originally submitted by @peerwit

Reviewed By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/2378
2015-08-25 18:52:42 -07:00
James M Snell
c58a63a18e doc: remove repeated statement in globals.markdown
Per: https://github.com/joyent/node/pull/25102

Originally reported by @kuldipem

Reviewed By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/2378
2015-08-25 18:52:37 -07:00
James M Snell
ac0563f97d doc: remove 'dudes' from documentation
per: https://github.com/joyent/node/pull/25572#discussion_r33197896

Reviewed By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/2378
2015-08-25 18:52:32 -07:00
James M Snell
a5b7852292 doc: update tense in child_process.markdown
per: https://github.com/joyent/node/pull/25826

originally submitted by: @ClimbsRocks

Reviewed By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/2378
2015-08-25 18:52:28 -07:00
James M Snell
89788dc347 doc: fixed worker.id type
per: https://github.com/joyent/node/pull/25459

originally submitted by @sonnyp

Reviewed By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/2378
2015-08-25 18:52:25 -07:00
James M Snell
c549c8b30c doc: port is optional for socket.bind()
per: https://github.com/joyent/node/pull/25356

originally submitted by @dcousens

Reviewed By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/2378
2015-08-25 18:52:20 -07:00
James M Snell
281be6ce65 doc: fix minor types and grammar in fs docs
per: https://github.com/joyent/node/pull/7431

originally submitted by @linclark

Reviewed By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/2378
2015-08-25 18:52:13 -07:00
James M Snell
0679dcc9b7 doc: update parameter name in net.markdown
per: https://github.com/joyent/node/pull/7112

originally submitted by @Peekmo

Reviewed By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/2378
2015-08-25 18:52:09 -07:00
James M Snell
3cecff35ce doc: small typo in domain.markdown
per: https://github.com/joyent/node/pull/7715

originally submitted by @tonylukasavage

Reviewed By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/2378
2015-08-25 18:52:05 -07:00
James M Snell
36151d698d doc: fixed typo in net.markdown (missing comma)
per: https://github.com/joyent/node/pull/7930

originally submitted by @pbrewczynski

Reviewed By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/2378
2015-08-25 18:52:01 -07:00
James M Snell
7860977524 doc: update description of fs.exists in fs.markdown
per: https://github.com/joyent/node/pull/7944

originally submitted by @oconnore

Minor update to the description in `fs.exists()`

Reviewed By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/2378
2015-08-25 18:51:57 -07:00
James M Snell
db4cb338be doc: clarification on the 'close' event
per: https://github.com/joyent/node/pull/8209

originally submitted by @jeromew

Reviewed By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/2378
2015-08-25 18:51:53 -07:00
James M Snell
5299a743d5 doc: improve working in stream.markdown
per: https://github.com/joyent/node/pull/8430

originally submitted by @mscdex

Reviewed By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/2378
2015-08-25 18:51:47 -07:00
James M Snell
aebc2d1aab doc: update path.extname documentation
per: https://github.com/joyent/node/pull/8509

originally submitted by @thauburger

Adding an additional example to path.extname documentation
to demonstrate the case where the first character of the last
path component is '.'. This case is interesting, as something
like path.extname('.txt') returns an empty string. In this
case, .txt can be used as a valid file name (while arguably
maintaining an extension). I agree with Node's behavior in this
case, but I think the added example provides additional clarity
for the developer.

Reviewed By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/2378
2015-08-25 18:51:41 -07:00
James M Snell
dc27ff4d85 doc: small clarifications to modules.markdown
per: https://github.com/joyent/node/pull/8708

A modified version of the original PR submitted by @builtbylane.

Reviewed By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/2378
2015-08-25 18:51:37 -07:00
James M Snell
4215d28f9f doc: code style cleanups in repl.markdown
per: https://github.com/joyent/node/pull/8778

originally submitted by @reggi

Reviewed By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/2378
2015-08-25 18:51:31 -07:00
James M Snell
e7e0706946 doc: correct grammar in cluster.markdown
per: https://github.com/joyent/node/pull/14352

originally submitted by @AlexKVal

Reviewed By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/2378
2015-08-25 18:51:23 -07:00
James M Snell
cc912b99c6 doc: Clarify the module.parent is set once
Per: 54a7f79a4a

Fixes: https://github.com/joyent/node/issues/6149

Originally submitted by @jorrit

Reviewed By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/2378
2015-08-25 18:50:24 -07:00
Sakthipriyan Vairamani
5c77031f95 doc: make the deprecations consistent
The deprecation messages in the documentations should be in the format

    Stability: 0 - Deprecated: Use [alternate] instead.

so that they will be consistent.

PR-URL: https://github.com/nodejs/node/pull/2450
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: James M Snell <jasnell@gmail.com>
2015-08-24 13:38:37 +05:30
Sakthipriyan Vairamani
93e2830686 doc: document deprecation of util.is* functions
This patch documentes the deprecation of util.is* functions.
As per the deprecation policy dicussion, nodejs/dev-policy/issues/49,
we need to start with documenting the deprecation. So, this is
the first step towards officially removing them.

PR-URL: https://github.com/nodejs/node/pull/2447
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2015-08-24 08:11:21 +05:30
cjihrig
3b602527d1 node: additional cleanup for node rename
Fixes: https://github.com/nodejs/node/issues/2361
PR-URL: https://github.com/nodejs/node/pull/2367
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
2015-08-23 17:59:43 -04:00
cjihrig
4f50d3fb90 process: make process.release.name "node"
This commit sets the value of process.release.name to "node".

Fixes: https://github.com/nodejs/node/issues/2361
PR-URL: https://github.com/nodejs/node/pull/2367
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
2015-08-23 17:59:43 -04:00
cjihrig
a69ab27ab4 node: rename from io.js to node
This commit replaces instances of io.js with Node.js, based on the
recent convergence. There are some remaining instances of io.js,
related to build and the installer.

Fixes: https://github.com/nodejs/node/issues/2361
PR-URL: https://github.com/nodejs/node/pull/2367
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: João Reis <reis@janeasystems.com>
2015-08-23 17:59:43 -04:00
James M Snell
5ba868f024 tls: add --tls-cipher-list command line switch
This adds a new `--tls-cipher-list` command line switch
that can be used to override the built-in default cipher
list. The intent of this is to make it possible to enforce
an alternative default cipher list at the process level.
Overriding the default cipher list is still permitted at
the application level by changing the value of
`require('tls').DEFAULT_CIPHERS`.

As part of the change, the built in default list is moved
out of tls.js and into node_constants.h and node_constants.cc.
Two new constants are added to require('constants'):

  * defaultCipherList (the active default cipher list)
  * defaultCoreCipherList (the built-in default cipher list)

A test case and doc changes are included.

A new NODE_DEFINE_STRING_CONSTANT macro is also created in
node_internals.h

When node_constants is initialized, it will pick up either
the passed in command line switch or fallback to the default
built-in suite.

Within joyent/node, this change had originaly been wrapped
up with a number of other related commits involving the
removal of the RC4 cipher. This breaks out this isolated
change.

/cc @mhdawson, @misterdjules, @trevnorris, @indutny, @rvagg

Reviewed By: Ben Noordhuis <ben@strongloop.com>
PR-URL: https://github.com/nodejs/node/pull/2412
2015-08-23 08:52:01 -07:00
hackerjs
3a7be23f98 doc: document response.finished in http.markdown
Adds mention of response.finished to http.markdown
Originally submitted by @hackerjs. The original
commit needed a bit of cleanup on grammar.

Reviewed By: James M Snell <jasnell@gmail.com>
Reviewed By: Michaël Zasso <mic.besace@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/2414
2015-08-23 08:48:44 -07:00
Sakthipriyan Vairamani
8f58fb92ff events: deprecate static listenerCount function
As per the discussion in #734, this patch deprecates the usage of
`EventEmitter.listenerCount` static function in the docs, and introduces
the `listenerCount` function in the prototype of `EventEmitter` itself.

PR-URL: https://github.com/nodejs/node/pull/2349
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
2015-08-20 03:17:08 +05:30
Rich Trott
3ba9793d53 doc: clarify options for fs.watchFile()
The explanation for the `options` argument to `fs.watchFile()` had
missing punctuation. I took the opportunity to try to rewrite the
paragraph for greater clarity.

PR-URL: https://github.com/nodejs/node/pull/2425
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Brendan Ashworth <brendan.ashworth@me.com>
2015-08-18 11:07:16 -07:00
Roman Klauke
ad7f74453d src: add total_available_size to v8 statistics
v8 introduced the new flag `total_available_size` in version 4.4
and upwards. This flag is now available on `v8.getHeapStatistics`
with the name `total_available_size`. It contains the total
available heap size of v8.

Introduced with commit: v8/v8-git-mirror@0a1352a7

PR-URL: https://github.com/nodejs/io.js/pull/2348
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-08-11 22:51:50 +02:00
James M Snell
936c9ffb0f doc: multiple documentation updates cherry picked from v0.12
* doc: improve http.abort description
 * doc: mention that mode is ignored if file exists
 * docs: Fix default options for fs.createWriteStream()
 * Documentation update about Buffer initialization
 * doc: add a note about readable in flowing mode
 * doc: Document http.request protocol option
 * doc, comments: Grammar and spelling fixes
 * updated documentation for fs.createReadStream
 * Update child_process.markdown, spelling
 * doc: Clarified read method with specified size argument.
 * docs:events clarify emitter.listener() behavior
 * doc: two minor stream doc improvements
 * doc: clarify Readable._read and Readable.push
 * doc: stream.unshift does not reset reading state
 * doc: readable event clarification
 * doc: additional refinement to readable event

Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noorduis <ben@strongloop.com>
PR-URL: https://github.com/nodejs/io.js/pull/2302
2015-08-05 08:44:55 -07:00
Rod Vagg
13332e161c doc: fix heading levels for new repl documentation
PR-URL: https://github.com/nodejs/io.js/pull/2299
Reviewed-by: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2015-08-04 14:07:07 -07:00
Jeremiah Senkpiel
1721968b22 doc: document repl persistent history changes
PR-URL: https://github.com/nodejs/io.js/pull/2224
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
2015-08-04 11:56:18 -07:00
Rod Vagg
04fd4fad46 src: introduce process.release object
PR-URL: https://github.com/nodejs/io.js/pull/2154
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2015-08-04 11:56:16 -07:00
Ben Noordhuis
70d1f32f56 deps: update v8 to 4.4.63.9
Upgrade the bundled V8 and update code in src/ and lib/ to the new API.

Notable backwards incompatible changes are the removal of the smalloc
module and dropped support for CESU-8 decoding.  CESU-8 support can be
brought back if necessary by doing UTF-8 decoding ourselves.

This commit includes https://codereview.chromium.org/1192973004 to fix
a build error on python 2.6 systems.  The original commit log follows:

    Use optparse in js2c.py for python compatibility

    Without this change, V8 won't build on RHEL/CentOS 6 because the
    distro python is too old to know about the argparse module.

PR-URL: https://github.com/nodejs/io.js/pull/2022
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
2015-08-04 11:56:14 -07:00
Sakthipriyan Vairamani
eea66e2a7b buffer: fix case of one buffer passed to concat
Fix Buffer.concat() so a copy is always returned regardless of the
number of buffers that were passed.

Previously if the array length was one then the same same buffer was
returned. This created a special case for the user where there was a
chance mutating the buffer returned by .concat() could mutate the buffer
passed in.

Also fixes an inconsistency when throwing if an array member was not a
Buffer instance. For example:

    Buffer.concat([42]);      // Returns 42
    Buffer.concat([42, 1]);  // Throws a TypeError

Now .concat() will always throw if an array member is not a Buffer
instance.

See: https://github.com/nodejs/io.js/issues/1891
PR-URL: https://github.com/nodejs/io.js/pull/1937
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2015-08-04 11:56:12 -07:00
Matteo Collina
ef2c8cd4ec dgram: make send cb act as "error" event handler
Modifies the dgram send() method to not emit errors when a DNS
lookup fails if there is a callback. Given that the same UDP
socket can be used to send messages to different hosts, the socket
can be reused even if one of those send() fails.

This slightly changes the behavior of a stable API, so that it behaves
as users would expect to.

This is based on https://github.com/joyent/node/pull/7738, which
landed in 77266d7fad.

Fixes: https://github.com/joyent/node/issues/4846
Refs: https://github.com/joyent/node/pull/7738
PR-URL: https://github.com/nodejs/io.js/pull/1796
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-08-04 11:56:12 -07:00
Chris Dickinson
3da057fef6 dgram: make send cb act as "error" event handler
This allows users to provide a callback that handles potential
errors resulting from a `socket.send` call. The original behavior
of emitting the error event on the socket is preserved.

Fixes: https://github.com/joyent/node/issues/4846
PR-URL: https://github.com/joyent/node/pull/7738
PR-URL: https://github.com/nodejs/io.js/pull/1796
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-08-04 11:56:12 -07:00
Julien Gilli
9bc2e26720 net: do not set V4MAPPED on FreeBSD
V4MAPPED is not supported on recent FreeBSD versions, at least on 10.1.
Thus, do not set this flag in net.connect on FreeBSD.

Fixes: https://github.com/joyent/node/issues/8540
Fixes: https://github.com/joyent/node/issues/9204
PR-URL: https://github.com/joyent/node/pull/18204
PR-URL: https://github.com/iojs/io.js/pull/1555
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-08-04 11:56:10 -07:00
Sakthipriyan Vairamani
ed85c95a9c doc,test: documents behaviour of non-existent file
As per the discussion in
https://github.com/nodejs/io.js/pull/2093#discussion_r34343965, this
patch documents the behavior of calling fs.watchFile() with a path that
does not yet exist.

This patch also includes a test which checks if a file not present, the
callback is invoked at least once and if the file is created after
the callback is invoked, it will be invoked again with new stat
objects.

PR-URL: https://github.com/nodejs/io.js/pull/2169
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Brendan Ashworth <brendan.ashworth@me.com>
2015-08-04 22:31:01 +05:30
Sakthipriyan Vairamani
d168d01b04 doc: properly inheriting from EventEmitter
There are so many buggy code out there, just because not inheriting
properly from `EventEmitter`. This patch gives an official
recommendation.

PR-URL: https://github.com/nodejs/io.js/pull/2168
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
2015-07-29 14:57:58 +05:30
Sam Roberts
500f2538cc doc: a listener, not "an" listener
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
PR-URL: https://github.com/nodejs/io.js/pull/1025
2015-07-28 11:06:14 -07:00
Sam Roberts
54627a919d doc: server close event does not have an argument
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
PR-URL: https://github.com/nodejs/io.js/pull/1025
2015-07-28 11:06:02 -07:00
Sakthipriyan Vairamani
d9f857df3b doc: note about custom inspect functions
See: https://github.com/nodejs/io.js/issues/1798

When an Object is printed in REPL, the actual representation can be
overriden by defining `inspect` method on the objects. This patch
includes a note about the same in the REPL documentation.

PR-URL: https://github.com/nodejs/io.js/pull/2142
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
2015-07-25 00:09:56 +05:30
Sam Roberts
66fc8ca22b cluster: emit 'message' event on cluster master
For consistency with the worker 'exit', 'online', 'disconnect', and
'listening' events which are emitted on worker and cluster, also emit
'message' on cluster.

Reviewed-by: Sam Roberts <vieuxtech@gmail.com>
Reviewed-by: Christian Tellnes <christian@tellnes.no>
Reviewed-by: Stephen Belanger <admin@stephenbelanger.com>
PR-URL: https://github.com/nodejs/io.js/pull/861
2015-07-23 14:51:10 -07:00
Fedor Indutny
e11fc67225 tls: add getTicketKeys()/setTicketKeys()
Introduce two new APIs for getting/settings the TLS Server Ticket Keys.

Fix: #1465
PR-URL: https://github.com/nodejs/io.js/pull/2227
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-07-23 11:13:26 -07:00
Yosuke Furukawa
4ef2b5fbfb doc: Replace util.debug with console.error
PR-URL: https://github.com/nodejs/io.js/pull/2214
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2015-07-24 02:45:32 +09:00
Jeremiah Senkpiel
0ab81e6f58 docs: link to more up-to-date v8 docs
PR-URL: https://github.com/nodejs/io.js/pull/2196
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>

Fixes: https://github.com/nodejs/io.js/pull/2155
2015-07-16 15:57:06 -07:00
Sakthipriyan Vairamani
65963ec26f doc,test: empty strings in path module
The path module's `join, normalize, isAbsolute, relative and resolve`
functions return/use the current directory if they are passed zero
length strings.

    > process.version
    'v2.3.4-pre'
    > path.win32.join('')
    '.'
    > path.posix.join('')
    '.'
    > path.win32.normalize('')
    '.'
    > path.posix.normalize('')
    '.'
    > path.win32.isAbsolute('')
    false
    > path.posix.isAbsolute('')
    false
    > path.win32.relative('', '')
    ''
    > path.posix.relative('', '')
    ''
    > path.win32relative('.', '')
    ''
    > path.posix.relative('.', '')
    ''
    > path.posix.resolve('')
    '/home/thefourtheye/Desktop'
    > path.win32.resolve('')
    '\\home\\thefourtheye\\Desktop'

Since empty paths are not valid in any of the operating systems people
normally use, this behaviour might be a surprise to the users. This
commit introduces "Notes" about this, wherever applicable in `path`'s
documentation.

The tests makes sure that the behaviour is intact between
commits.

PR-URL: https://github.com/nodejs/io.js/pull/2106
Reviewed-By: Rich Trott <rtrott@gmail.com>
2015-07-14 08:56:50 -07:00
Brendan Ashworth
23efb05cc3 doc: document fs.watchFile behaviour on ENOENT
When fs.watchFile encounters an ENOENT error, it invokes the given
callback with some error data. This caused an issue as it was different
behaviour than Node v0.10. Instead of changing this behaviour, document
it and add a test.

Ref: https://github.com/nodejs/io.js/issues/1745
Ref: https://github.com/nodejs/io.js/pull/2028
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
PR-URL: https://github.com/nodejs/io.js/pull/2093
2015-07-10 14:24:50 -07:00
Benjamin Gruenbaum
0f09b8db28 doc: don't recommend domains for error handling
Remove the suggestion to use domains for exception handling. Add clarity
to "unhandledException".

Fixes: https://github.com/nodejs/io.js/issues/2055
PR-URL: https://github.com/nodejs/io.js/pull/2056
Reviewed-By: Trev Norris <trev.norris@gmail.com>
Reviewed-By: Chris Dickinson <chris@neversaw.us>
2015-07-03 15:22:27 -06:00
Ivan Yan
c370bd3aea doc: make the abbreviation 1MM clear
Refs: https://github.com/nodejs/io.js/pull/2050
PR-URL: https://github.com/nodejs/io.js/pull/2053
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2015-06-25 11:42:09 -04:00
Сковорода Никита Андреевич
96165f9be2 doc: minor clarification in the modules API doc.
PR-URL: https://github.com/nodejs/io.js/pull/1983
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-06-16 05:42:05 +03:00
Roman Reiss
9f3a03f0d4 doc: add references to crypto.getCurves()
This adds references to the newly available crypto.getCurves method
where appropriate.

PR-URL: https://github.com/nodejs/io.js/pull/1918
Reviewed-By: Brian White <mscdex@mscdex.net>
2015-06-09 22:17:55 +02:00
Brian White
38d1afc24d crypto: add getCurves() to get supported ECs
PR-URL: https://github.com/nodejs/io.js/pull/1914
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-06-08 12:35:41 -04:00
Rich Trott
ff39ecb914 doc: remove comma splice
Remove comma splice. Edit for clarity and concision.

PR-URL: https://github.com/nodejs/io.js/pull/1900
Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
2015-06-07 22:25:24 +02:00
Ryan Petschek
deb8b87dc9 doc: add note about available ECC curves
Added instructions on how to get the elliptic curves supported by the
OpenSSL installation in the crypto.createECDH() constructor. Also made
a few minor grammar fixes within the same paragraph.

PR-URL: https://github.com/nodejs/io.js/pull/1913
Reviewed-By: Roman Reiss <me@silverwind.io>
2015-06-07 20:47:55 +02:00
cjihrig
6e78e5feaa os: add homedir()
os.homedir() calls libuv's uv_os_homedir() to retrieve the current
user's home directory.

PR-URL: https://github.com/nodejs/io.js/pull/1791
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Rod Vagg <rod@vagg.org>
2015-06-05 22:58:14 -04:00
Yosuke Furukawa
353e26e3c7 fs: Add string encoding option for Stream method
Add string encoding option for fs.createReadStream and
fs.createWriteStream. and check argument type more strictly

PR-URL: https://github.com/nodejs/io.js/pull/1845
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2015-06-05 10:30:32 +09:00
Yosuke Furukawa
8357c5084b fs: set encoding on fs.createWriteStream
Enable encoding option on fs.createWriteStream.

PR-URL: https://github.com/nodejs/io.js/pull/1844
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2015-06-03 03:01:35 +09:00
Сковорода Никита Андреевич
89a5b9040e doc: fix http.IncomingMessage.socket documentation
Remove the reference to net.Socket.verifyPeer().
That was removed in ea540c9 and was missed in the 032f80e.

Refer to the net.Socket instance by the .socket property.
This avoids unneeded confusion.
'.socket' is the variant that is used internally.

Add a markdown link to net.Socket.getPeerCertificate().

PR-URL: https://github.com/nodejs/io.js/pull/1867
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-06-02 00:04:21 +02:00
Tyler Anton
a79dece8ad docs: add return value for sync fs functions
Clarify that synchronous functions in fs with no return value return
undefined.

Specify that fs.openSync() returns an integer and fs.existsSync()
returns true or false.

Fixes: https://github.com/joyent/node/issues/9313

PR: https://github.com/joyent/node/pull/9359
Reviewed-By: Julien Gilli <julien.gilli@joyent.com>

PORT-FROM: joyent/node @ 51fe319faf
PR-URL: https://github.com/nodejs/io.js/pull/1770
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>

Conflicts:
	doc/api/fs.markdown
2015-06-01 14:11:10 -04:00
Rich Trott
ff794498e7 doc: fs.*File() also accept encoding strings
Fixes: https://github.com/nodejs/io.js/issues/1797
PR-URL: https://github.com/nodejs/io.js/pull/1806
Reviewed-By: fishrock123@rocketmail.com
2015-05-27 15:53:14 -04:00
Steve Sharp
98649fd31a doc: add documentation for AtExit hook
Fixes: https://github.com/nodejs/io.js/issues/999
PR-URL: https://github.com/nodejs/io.js/pull/1014
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-05-26 18:15:06 +02:00
Rich Trott
eb1856dfd1 doc: clarify stability of fs.watch and relatives
Fixes: https://github.com/nodejs/io.js/issues/1754
PR-URL: https://github.com/nodejs/io.js/pull/1775
Reviewed-By: Brendan Ashworth <brendan.ashworth@me.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2015-05-26 11:26:02 -04:00
Josh Gummersall
a74c2c9458 doc: state url decoding behavior
Explicitly states the fact that no decoding is performed on the url
path or pathname or the query string by default in the URL module.

Fixes: https://github.com/nodejs/io.js/issues/1538
PR-URL: https://github.com/nodejs/io.js/pull/1731
Reviewed-By: Roman Reiss <me@silverwind.io>
2015-05-25 13:50:53 +02:00
Roman Reiss
cb381fe3e0 net: return this from setNoDelay and setKeepAlive
Modifies the Socket.setNoDelay and Socket.setKeepAlive methods to return
the socket instance instead of undefined, to allow for chaining.

PR-URL: https://github.com/nodejs/io.js/pull/1779
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2015-05-23 18:10:32 +02:00
Roman Reiss
39dde3222e net,dgram: return this from ref and unref methods
Modifies the following methods to return the instance instead
of undefined, to allow for chaining these methods:

- net.Server.ref
- net.Server.unref
- net.Socket.ref
- net.Socket.unref
- dgram.Socket.ref
- dgram.Socket.unref

PR-URL: https://github.com/nodejs/io.js/pull/1768
Reviewed-By: Evan Lucas <evanlucas@me.com>
2015-05-23 06:57:00 +02:00
Maurice Butler
515afc6367 doc: path is ignored in url.format
Made it obvious that path is ignored in url.format

PR-URL: https://github.com/nodejs/io.js/pull/1753
2015-05-22 14:58:32 +02:00
Shigeki Ohtsu
9b35be5810 tls: make server not use DHE in less than 1024bits
DHE key lengths less than 1024bits is already weaken as pointed out in
https://weakdh.org/ . 1024bits will not be safe in near future. We
will extend this up to 2048bits somedays later.

PR-URL: https://github.com/nodejs/io.js/pull/1739
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Fedor Indutny <fedor@indutny.com>
2015-05-21 00:02:44 +09:00
Rich Trott
86dd244d9b doc: add notes to child_process.fork() and .exec()
Adds notes about the difference to their POSIX counterparts.

PR-URL: https://github.com/nodejs/io.js/pull/1718
Fixes: https://github.com/nodejs/io.js/issues/224
Reviewed-By: Roman Reiss <me@silverwind.io>
2015-05-20 14:21:06 +02:00
smikes
7d90c90aaf doc: recommend against use of NODE_PATH
PR-URL: https://github.com/nodejs/io.js/pull/1708
Reviewed-By: Roman Reiss <me@silverwind.io>
2015-05-17 20:25:07 +02:00
Josh Gummersall
fbaef40e63 doc: fix connectListener description in net docs
`connectListener` is registered as a listener to the 'connect' event
once. Update the documentation to reflect that behavior.

Fixes: https://github.com/nodejs/io.js/issues/901
PR-URL: https://github.com/nodejs/io.js/pull/1717
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-05-17 13:59:28 +02:00
Yazhong Liu
6edc900b95 repl: support non-array .scope, document it
REPL evaluate `.scope` when it needs to get a list of the variable names
available in the current scope. Do not throw if the output of such
evaluation is not array, just ignore it.

PR-URL: https://github.com/nodejs/io.js/pull/1682
Reviewed-By: Fedor Indutny <fedor@indutny.com>
2015-05-17 12:22:26 +02:00
Evan Lucas
d4726cde57 http,net,tls: return this from setTimeout methods
Modifies the setTimeout methods for the following prototypes:

- http.ClientRequest
- http.IncomingMessage
- http.OutgoingMessage
- http.Server
- https.Server
- net.Socket
- tls.TLSSocket

Previously, the above functions returned undefined. They now return
`this`. This is useful for chaining function calls.

PR-URL: https://github.com/nodejs/io.js/pull/1699
Reviewed-By: Roman Reiss <me@silverwind.io>
2015-05-16 07:17:41 +02:00
Mike MacCana
5755fc099f tls: update default ciphers to use gcm and aes128
AES-GCM or CHACHA20_POLY1305 ciphers must be used in current version of
Chrome to avoid an 'obsolete cryptography' warning.

Prefer 128 bit AES over 192 and 256 bit AES considering attacks that
specifically affect the larger key sizes but do not affect AES 128.

PR-URL: https://github.com/iojs/io.js/pull/1660
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: Shigeki Ohtsu <ohtsu@iij.ad.jp>
Reviewed-By: Roman Reiss <me@silverwind.io>
2015-05-11 13:37:48 +02:00
Roman Klauke
931a0d4634 src: add type check to v8.setFlagsFromString()
Calling v8.setFlagsFromString with e.g a function as a flag argument
gave no exception or warning that the function call will fail.

There is now an exception if the function gets called with the wrong
flag type (string is required) or that a flag is expected.

Other APIs already provide exceptions if the argument has not the
expected type.

PR-URL: https://github.com/iojs/io.js/pull/1652
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-05-08 19:09:45 +02:00
Nick Raienko
2a3a1909ab doc: add require() lines to child.stdio example
PR-URL: https://github.com/iojs/io.js/pull/1504
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
2015-05-02 15:55:36 -07:00
Alexander Gromnitsky
02388dbf40 doc: fix some cross-references
PR-URL: https://github.com/iojs/io.js/pull/1584
Reviewed-By: Roman Reiss <me@silverwind.io>
2015-05-02 14:07:21 +02:00
Roman Reiss
b4ad5d7050 doc: improve http.request and https.request opts
This adds a few previously undocumented option to both functions.

PR-URL: https://github.com/iojs/io.js/pull/1551
Fixes: https://github.com/iojs/io.js/issues/1082
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2015-05-01 19:55:50 +02:00