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

2359 Commits

Author SHA1 Message Date
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
Matt Loring
49440b7ea2 tools: add --prof-process flag to node binary
This change cleans up outstanding comments on #3032. It improves error
handling when no isolate file is provided and adds the --prof-process
flag to the node binary which executes the tick processor on the
provided isolate file.

PR-URL: https://github.com/nodejs/node/pull/4021
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Evan Lucas <evanlucas@me.com>
2015-12-08 02:00:46 +01: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
jpersson
f4f1e89bf1 doc: fix color of linked code blocks
Links nested in backticks were not visually distinguishable before, this
fixes them.

PR-URL: https://github.com/nodejs/node/pull/4068
Reviewed-By: Roman Reiss <me@silverwind.io>
2015-11-30 18:56:36 +01: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
Roman Reiss
8b75030249 doc: fix rare case of misaligned columns
By using the same unit for the offset of the main column as used for the
left column width, we ensure that browsers render the columns
conistently.

Ref: https://github.com/nodejs/help/issues/32

PR-URL: https://github.com/nodejs/node/pull/3948
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2015-11-27 01:52:33 +01: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