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

2900 Commits

Author SHA1 Message Date
Rich Trott
112b9cdad7 doc: improve debugger doc prose
PR-URL: https://github.com/nodejs/node/pull/7007
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-05-29 19:28:18 -07:00
Rich Trott
f3971ff117 doc: update labels and CI info in onboarding doc
PR-URL: https://github.com/nodejs/node/pull/7006
Reviewed-By: Robert Jefe Lindstaedt <robert.lindstaedt@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2016-05-29 19:26:59 -07:00
Tim Kuijsten
5207526ec8
doc: buffers are not sent over IPC with a socket
If a socket is sent to a child, any data that is buffered in the socket
will not be sent to the child. The child will only receive data from the
socket that is sent after the child has the socket.

PR-URL: https://github.com/nodejs/node/pull/6951
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2016-05-29 22:58:05 +02:00
Sakthipriyan Vairamani
435e673efd doc: minor improvements to util.md
PR-URL: https://github.com/nodejs/node/pull/6932
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Robert Jefe Lindstaedt <robert.lindstaedt@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
2016-05-29 12:25:03 +05:30
Anna Henningsen
16f98e589c
doc: add added: information for vm
Ref: https://github.com/nodejs/node/issues/6578
PR-URL: https://github.com/nodejs/node/pull/7011
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Julian Duque <julianduquej@gmail.com>
2016-05-28 16:12:50 +02:00
Adrian Estrada
51b8a79bd4
doc: add added: information for console
Information extracted from git history.

Ref: https://github.com/nodejs/node/issues/6578
PR-URL: https://github.com/nodejs/node/pull/6995
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Julian Duque <julianduquej@gmail.com>
2016-05-28 16:06:05 +02:00
Ehsan Akhgari
de5020292e build: re-add --ninja option to configure
Ninja is a build backend supported by gyp which is much faster than
Make and is able to parallelize builds across all of the available
cores very well. On my machine, this reduces the average build time
from 5:14 minutes to 4:33 minutes.

Refs: https://github.com/nodejs/node/pull/467
Refs: de224d6e6c
PR-URL: https://github.com/nodejs/node/pull/6780
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2016-05-27 18:13:41 -04:00
Michael Dawson
8af25a39d3 doc: add info on what's used for fswatch on AIX
Info is provided on for the other OS's. Add similar
level of info for AIX.

PR-URL: https://github.com/nodejs/node/pull/6837
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
2016-05-27 16:44:32 -04:00
doug.wade
e916218ba5 doc: update process.hrtime docs to include optional parameter
Adds more explicit documentation for the single optional parameter
to process.hrtime to the process docs.

PR-URL: https://github.com/nodejs/node/pull/6585
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Robert Jefe Lindstaedt <robert.lindstaedt@gmail.com>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
2016-05-27 09:28:48 -07:00
Rich Trott
6306b10c48 doc: improve server.listen() documentation prose
PR-URL: https://github.com/nodejs/node/pull/7000
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Yuval Brik <yuval@brik.org.il>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
2016-05-27 09:00:58 -07:00
Rich Trott
2783978847 doc: improve server.address() doc text
PR-URL: https://github.com/nodejs/node/pull/7001
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
2016-05-27 08:59:01 -07:00
James M Snell
5d2c0ac9f2 doc: general improvements to tty.md
PR-URL: https://github.com/nodejs/node/pull/6931
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2016-05-27 08:51:34 -07:00
Rich Trott
90675818ee doc: add added: data for cli.md
PR-URL: https://github.com/nodejs/node/pull/6960
Refs: https://github.com/nodejs/node/issues/6578
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
2016-05-26 21:02:54 -07:00
Anna Henningsen
27d2267066
doc: add added: information for child_process
Ref: https://github.com/nodejs/node/issues/6578
PR-URL: https://github.com/nodejs/node/pull/6927
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2016-05-27 04:29:31 +02:00
James M Snell
dbdea02a99 doc: general improvements to url.md copy
General cleanup and restructuring of the doc. Added
additional detail to how URLs are serialized.

PR-URL: https://github.com/nodejs/node/pull/6904
Reviewed-By: Robert Jefe Lindstaedt <robert.lindstaedt@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
2016-05-26 18:09:18 -07:00
James M Snell
1b6a468c72 doc: general improvements to tls.md copy
Restructuring and clarifications to the tls.md copy
to improve readability and flow.

PR-URL: https://github.com/nodejs/node/pull/6933
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Shigeki Ohtsu <ohtsu@iij.ad.jp>
2016-05-26 08:12:33 -07:00
Anna Henningsen
048b3de22d
doc: fix broken references
Fix minor broken references in crypto.md, net.md and domains.md
(which uses `EventEmitter` as a type, of which the anchor in
`events.md` has changed).

PR-URL: https://github.com/nodejs/node/pull/6941
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
2016-05-26 00:52:36 +02:00
Anna Henningsen
b5f76dbd3e
doc: fix broken references in changelogs
Some references to a few versions were broken, likely in part
due to the transition to a split changelog format.

PR-URL: https://github.com/nodejs/node/pull/6942
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
2016-05-26 00:51:38 +02:00
James M Snell
9140b97848 doc: general improvements to string_decoder.md copy
PR-URL: https://github.com/nodejs/node/pull/6940
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Brian White <mscdex@mscdex.net>
2016-05-25 08:53:34 -07:00
Rod Machen
ed11ac6080 doc: remove "\" within backticks
Ref: https://github.com/nodejs/node/issues/6911
Ref: https://github.com/nodejs/node/pull/5075

PR-URL: https://github.com/nodejs/node/pull/6952
Reviewed-By: Robert Jefe Lindstaedt <robert.lindstaedt@gmail.com>
2016-05-24 23:55:28 +02:00
Myles Borins
e03c32696e 2016-05-24, Version 4.4.5 'Argon' (LTS)
Notable changes:

* **buffer**:
  * Buffer no longer errors if you call lastIndexOf with a search term
    longer than the buffer (Anna Henningsen)
    https://github.com/nodejs/node/pull/6511

* contextify:
  * Context objects are now properly garbage collected, this solves a
    problem some individuals were experiencing with extreme memory
    growth (Ali Ijaz Sheikh)
    https://github.com/nodejs/node/pull/6871

* deps:
  * update npm to 2.15.5 (Rebecca Turner)
    https://github.com/nodejs/node/pull/6663

* http:
  * Invalid status codes can no longer be sent. Limited to 3 digit
    numbers between 100 - 999 (Brian White)
    https://github.com/nodejs/node/pull/6291
2016-05-24 11:53:27 -07:00
Steve Mao
cc6a78ebb2
doc: clarify buffer class
Fixes: https://github.com/nodejs/node/issues/6891
PR-URL: https://github.com/nodejs/node/pull/6914
Reviewed-By: Claudio Rodriguez <cjrodr@yahoo.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2016-05-24 16:54:18 +02:00
Kevin Donahue
af61ebf6e2 doc: fix typos in timers topic to aid readability
Typos in the `setTimeout` vs. `setImmediate` section were hindering
readability. Fixed these typos.

PR-URL: https://github.com/nodejs/node/pull/6916
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Robert Jefe Lindstaedt <robert.lindstaedt@gmail.com>
2016-05-24 09:54:58 +02:00
Anna Henningsen
2193a2efcf
doc: reference list of language-specific globals
Fixes: https://github.com/nodejs/node/issues/6894
PR-URL: https://github.com/nodejs/node/pull/6900
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Robert Jefe Lindstaedt <robert.lindstaedt@gmail.com>
2016-05-24 01:21:15 +02:00
James M Snell
ef9778cb9b doc: general improvements to util.md
PR-URL: https://github.com/nodejs/node/pull/6897
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Robert Jefe Lindstaedt <robert.lindstaedt@gmail.com>
2016-05-23 08:00:41 -07:00
Anna Henningsen
b49df88916
doc: add added: information for zlib
Ref: https://github.com/nodejs/node/issues/6578
PR-URL: https://github.com/nodejs/node/pull/6840
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Robert Jefe Lindstaedt <robert.lindstaedt@gmail.com>
2016-05-23 15:04:13 +02:00
Marian
c161849bfa doc: make the api doc print-friendly
Fixes: https://github.com/nodejs/node/issues/6743

PR-URL: https://github.com/nodejs/node/pull/6748
Reviewed-By: Robert Jefe Lindstaedt <robert.lindstaedt@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
2016-05-23 12:26:21 +02:00
James M Snell
1b7bb2799d doc: general improvements to v8.md copy
PR-URL: https://github.com/nodejs/node/pull/6829
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2016-05-20 08:37:45 -07:00
Mohsen
409418a209 doc: fix typo in Error.captureStackTrace
PR-URL: https://github.com/nodejs/node/pull/6811
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2016-05-20 08:32:04 -07:00
Sakthipriyan Vairamani
2ef83590ce doc: make param names consistent & fix doc link
The parameter to `fs.mkdtemp` is actually `prefix`, not `template`,
because the string passed is appended with the randomly generated
string.

The doc link for `fs.mkdtemp()` was missing and it is included in this
patch.

PR-URL: https://github.com/nodejs/node/pull/6832
Reviewed-By: Claudio Rodriguez <cjrodr@yahoo.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-05-20 07:39:21 -07:00
Anna Henningsen
e11221c76d doc: add added: info for process.cpuUsage
Refs: https://github.com/nodejs/node/issues/6578
PR-URL: https://github.com/nodejs/node/pull/6863
Reviewed-By: Claudio Rodriguez <cjrodr@yahoo.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-05-20 07:37:43 -07:00
Sakthipriyan Vairamani
acc1142e25 doc: fix mkdtemp example by removing hyphen
The example uses only `/tmp`, not `/tmp-`. So, the result cannot be
`/tmp-abc123`, but just `/tmpabc123`.

PR-URL: https://github.com/nodejs/node/pull/6834
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2016-05-20 07:36:01 -07:00
James M Snell
baeed8b3d9 doc: improve vm.md copy
General improvements to vm module documentation

PR-URL: https://github.com/nodejs/node/pull/6827
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2016-05-19 17:40:00 -07:00
Doug Wade
bd728574b7
doc: Add resolveNaptr and naptr rrtype docs
Updates the dns module documentation to include documentation on
the resolveNaptr method, and also adds the option NAPTR to the
list of valid values for rrtype in dns.resolve(hostname[, rrtype],
callback).

PR-URL: https://github.com/nodejs/node/pull/6586
Fixes: https://github.com/nodejs/node/issues/6507
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
2016-05-19 22:18:49 +02:00
Robert Jefe Lindstaedt
ae0f68d6e1 doc: add note for fs.watch virtualized env
Fixes: https://github.com/nodejs/node/issues/6765
PR-URL: https://github.com/nodejs/node/pull/6809
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2016-05-19 15:43:04 +02:00
Daniel Wang
b90c52e38d doc: add added: information for punycode
PR-URL: https://github.com/nodejs/node/pull/6805
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-05-19 11:58:53 +02:00
Rich Trott
1ef4916ab9 doc: add added: info for dgram.*Membership()
Since I was doing the necessary git archaeology anyway, I took the time
to add YAML information to the docs about when `addMembership()` and
`dropMembership()` first appeared in their current forms.

PR-URL: https://github.com/nodejs/node/pull/6753
Ref: https://github.com/nodejs/node/issues/6578
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2016-05-18 22:52:15 -07:00
James M Snell
2ccba1f9fa doc: clarify fs.mkdtemp prefix argument
Per: https://github.com/nodejs/node/issues/6142

Clarify the prefix argument.

Fixes: https://github.com/nodejs/node/issues/6142
PR-URL: https://github.com/nodejs/node/pull/6800
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Roman Klauke <romaaan.git@gmail.com>
2016-05-17 20:50:18 -07:00
Anna Henningsen
ba10ea8f3a
doc: add added: information for fs
Ref: https://github.com/nodejs/node/issues/6578
PR-URL: https://github.com/nodejs/node/pull/6717
Reviewed-By: Robert Lindstaedt <robert.lindstaedt@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-05-17 23:16:34 +02:00
Evan Lucas
26120e2eb0 2016-05-17, Version 6.2.0 (Stable)
- **buffer**: fix lastIndexOf and indexOf in various edge cases (Anna
  Henningsen) [#6511](https://github.com/nodejs/node/pull/6511)
- **child_process**: use /system/bin/sh on android (Ben Noordhuis)
  [#6745](https://github.com/nodejs/node/pull/6745)
- **deps**:
  - upgrade npm to 3.8.9 (Rebecca Turner)
    [#6664](https://github.com/nodejs/node/pull/6664)
  - upgrade to V8 5.0.71.47 (Ali Ijaz Sheikh)
    [#6572](https://github.com/nodejs/node/pull/6572)
  - upgrade libuv to 1.9.1 (Saúl Ibarra Corretgé)
    [#6796](https://github.com/nodejs/node/pull/6796)
  - Intl: ICU 57 bump (Steven R. Loomis)
    [#6088](https://github.com/nodejs/node/pull/6088)
- **repl**:
  - copying tabs shouldn't trigger completion (Eugene Obrezkov)
    [#5958](https://github.com/nodejs/node/pull/5958)
  - exports `Recoverable` (Blake Embrey)
    [#3488](https://github.com/nodejs/node/pull/3488)
- **src**: add O_NOATIME constant (Rich Trott)
  [#6492](https://github.com/nodejs/node/pull/6492)
- **src,module**: add --preserve-symlinks command line flag (James M
  Snell) [#6537](https://github.com/nodejs/node/pull/6537)
- **util**: adhere to `noDeprecation` set at runtime (Anna Henningsen)
  [#6683](https://github.com/nodejs/node/pull/6683)

As of this release the 6.X line now includes 64-bit binaries for Linux
on Power Systems running in big endian mode in addition to the existing
64-bit binaries for running in little endian mode.

PR-URL: https://github.com/nodejs/node/pull/6810
2016-05-17 16:09:13 -05:00
Kirill Fomichev
00b200fc34
doc: remove link to Sign in crypto.md
PR-URL: https://github.com/nodejs/node/pull/6812
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
2016-05-17 21:53:45 +02:00
Rich Trott
d3f3e183bf doc: add added: in for tty
Refs: https://github.com/nodejs/node/issues/6578
PR-URL: https://github.com/nodejs/node/pull/6783
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-05-17 12:31:47 -07:00
silverwind
50261929bd
doc: update openssl.org hash links
The hash link format has changed from #HASH_LINK to #HASH-LINK.

PR-URL: https://github.com/nodejs/node/pull/6817
Reviewed-By: Roman Klauke <romankl@users.noreply.github.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-05-17 21:24:41 +02:00
James M Snell
dcccbfdc79 src: refactor require('constants')
The require('constants') module is currently undocumented and mashes
together unrelated constants. This refactors the require('constants')
in favor of distinct os.constants, fs.constants, and crypto.constants
that are specific to the modules for which they are relevant. The
next step is to document those within the specific modules.

PR-URL: https://github.com/nodejs/node/pull/6534
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Robert Lindstaedt <robert.lindstaedt@gmail.com>
2016-05-17 11:05:18 -07:00
Kirill Fomichev
ffc708daad doc: fix links in socket.connecting
PR-URL: https://github.com/nodejs/node/pull/6657
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-05-16 18:38:07 -07:00
Rich Trott
b55becd0dc doc: copyedit maxBuffer note for child_process
PR-URL: https://github.com/nodejs/node/pull/6760
Reviewed-By: Roman Klauke <romaaan.git@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2016-05-16 18:29:03 -07:00
Rich Trott
5f31b7e014 doc: add added info for dgram.setBroadcast()
Since I was doing the necessary git spelunking anyway, I took the time
to add the YAML information into the docs about when `setBroadcast()`
first appeared in its current form.

PR-URL: https://github.com/nodejs/node/pull/6750
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-05-16 14:50:45 -07:00
James M Snell
477d35848c doc: improve zlib docs
General improvements to zlib doc copy

PR-URL: https://github.com/nodejs/node/pull/6746
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2016-05-16 09:29:58 -07:00
Arve Seljebu
1ba5a56f49
doc: readline.emitKeypressEvents and raw mode
`readline.emitKeypressEvents` needs `stream` to be in raw mode.

PR-URL: https://github.com/nodejs/node/pull/6628
Fixes: https://github.com/nodejs/node/issues/6626
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Roman Klauke <romaaan.git@gmail.com>
2016-05-16 16:01:57 +02:00
Ben Noordhuis
f17b9494e1 doc: update vm.runInDebugContext() example
The debugger needs to be active now before one is allowed to query the
list of scripts.  Replace the example with one that works without
installing a debug event listener first.

Fixes: https://github.com/nodejs/node/issues/4862
PR-URL: https://github.com/nodejs/node/pull/6757
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
2016-05-16 08:09:36 +02:00
Rich Trott
eb089e7ccd doc: add added: info for string_decoder
PR-URL: https://github.com/nodejs/node/pull/6741
Ref: https://github.com/nodejs/node/issues/6578
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Roman Klauke <romaaan.git@gmail.com>
2016-05-15 22:56:51 -07:00
DavidCai
32b46d91a7 doc: update fs callback example error stack
Update the error stack printed in the default callback
example in the fs doc, matching the latest lib/fs.js.
Truncates the stack to make it easier to update in the future.

PR-URL: https://github.com/nodejs/node/pull/6617
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-05-15 15:01:49 +01:00
Roman Reiss
bef1ec086d
doc: fix issues related to page scrolling
Moved the sidebar to a fixed position and moved the main column to the
page's body, which results in back/forward navigation through hash
links and search highlight working again.

Fixes: https://github.com/nodejs/node/issues/6637
Fixes: https://github.com/nodejs/node/issues/6751
Based on: https://github.com/nodejs/node/pull/5716
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Robert Lindstaedt <robert.lindstaedt@gmail.com>
2016-05-15 13:47:32 +02:00
Anna Henningsen
a4564f3649
util: adhere to noDeprecation set at runtime
Until now, the docs stated that `process.noDeprecation` could be set
at runtime, but before any modules were loaded. That was not true,
because `lib/internal/util.js` was loaded during the process startup
process, so setting the flag at runtime was pointless.

Minimal test case:

    process.noDeprecation = true;
    process.EventEmitter;

This patch moves checking `process.noDeprecation` to the place where
it was actually used.

PR-URL: https://github.com/nodejs/node/pull/6683
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2016-05-13 21:33:42 +02:00
James M Snell
5d38d543cd src,module: add --preserve-symlinks command line flag
Add the `--preserve-symlinks` flag. This makes the changes added
in #5950 conditional. By default the old behavior is used. With
the flag set, symlinks are preserved, switching to the new
behavior. This should be considered to be a temporary solution
until we figure out how to solve the symlinked peer dependency
problem in a more general way that does not break everything
else.

Additional test cases are included.

PR-URL: https://github.com/nodejs/node/pull/6537
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2016-05-13 11:43:47 -07:00
Rich Trott
f52b2f116b doc: add added: information for assert
PR-URL: https://github.com/nodejs/node/pull/6688
Ref: https://github.com/nodejs/node/issues/6578
Reviewed-By: Claudio Rodriguez <cjrodr@yahoo.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Roman Klauke <romaaan.git@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2016-05-13 09:49:05 -07:00
Faiz Halde
fc96fdaf68 doc: appendFileSync accepts fd as well
Refs: https://github.com/nodejs/node/issues/6508
PR-URL: https://github.com/nodejs/node/pull/6707
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-05-13 09:32:41 -07:00
Eugene Obrezkov
ae178838eb
repl: copying tabs shouldn't trigger completion
PR-URL: https://github.com/nodejs/node/pull/5958
Fixes: https://github.com/nodejs/node/issues/5954
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2016-05-13 17:18:40 +02:00
Evan Lucas
d13b9d3f7f doc: fix exec example in child_process
Previously, the example was checking for error by strict equality to
null. The error could be undefined though which would fail that check.

PR-URL: https://github.com/nodejs/node/pull/6660
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Jeremy Whitlock <jwhitlock@apache.org>
2016-05-13 08:04:11 -05:00
Saúl Ibarra Corretgé
a661e26300 doc: undocument fs.open's 'rs' mode
Using O_SYNC with O_RDONLY is basically a noop.

Closes: https://github.com/nodejs/node/issues/6730
PR-URL: https://github.com/nodejs/node/pull/6732
Reviewed-By: Ben Noorhduis <info@bnoordhuis.nl>
2016-05-13 12:08:02 +02:00
Rich Trott
b3bc36209f doc: add added: information for v8
PR-URL: https://github.com/nodejs/node/pull/6684
Ref: https://github.com/nodejs/node/issues/6578
Reviewed-By: Ben Noorhduis <info@bnoordhuis.nl>
Reviewed-By: Claudio Rodriguez <cjrodr@yahoo.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2016-05-12 21:49:25 -07:00
Blake Embrey
9552e3b4af repl: exports Recoverable
Allow REPL consumers to callback with a `Recoverable` error instance
and trigger multi-line REPL prompts.

Fixes: https://github.com/nodejs/node/issues/2939
PR-URL: https://github.com/nodejs/node/pull/3488
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2016-05-12 10:03:06 -04:00
Jean Regisser
4c24fbf317
doc: server.listen truncates socket path on unix
Internally it ends up calling `uv_pipe_bind` with the given path which
itself is documented to truncate the path. See
http://docs.libuv.org/en/v1.x/pipe.html#c.uv_pipe_bind

This is NOT a bug, but a restriction of the unix
socket api, as it stores the path in `sockaddr_un.sun_path` (104 chars
on OS X, 108 chars on Linux), see `man unix`.

PR-URL: https://github.com/nodejs/node/pull/6659
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Alexander Makarenko <estliberitas@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2016-05-12 08:44:41 +02:00
James M Snell
118162ee67 doc: update releases.md with new changelog structure
PR-URL: https://github.com/nodejs/node/pull/6503
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Robert Lindstaedt <robert.lindstaedt@gmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2016-05-11 09:25:52 -07:00
James M Snell
c663a6db05 doc: refactor the changelog by version
The changelog was getting rather huge and difficult
to manage. It also wasn't very useful in terms of
being able to quickly find specific Node.js versions,
or tracking the history for a single major release
stream.

This reorganizes the changelog by versions separated
out over multiple files. An index of the most recent
versions is provided in the main log.

PR-URL: https://github.com/nodejs/node/pull/6503
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Robert Lindstaedt <robert.lindstaedt@gmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2016-05-11 09:25:45 -07:00
Anchika Agarwal
000ef895d7 doc: "a" -> "an" in api/documentation.md
Fixes: https://github.com/nodejs/node/issues/6642
PR-URL: https://github.com/nodejs/node/pull/6689
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Alexander Makarenko <estliberitas@gmail.com>
Reviewed-By: Jeremiah Senkpiel <Fishrock123@rocketmail.com>
2016-05-11 11:17:29 -04:00
Ben Noordhuis
2c75a6b39f doc: fix deprecation warnings in addon examples
Use the overload of `v8::Function::NewInstance()` that returns a
`v8::MaybeLocal<v8::Object>`.  The overloads that return a simple
`v8::Local<v8::Object>` are deprecated.

PR-URL: https://github.com/nodejs/node/pull/6652
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2016-05-10 17:10:33 +02:00
Matt Harrison
7164003fbe doc: mention existence/purpose of module wrapper
Included a block in the modules.md file to explain the existence and
purpose of the module wrapper.

PR-URL: https://github.com/nodejs/node/pull/6433
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-05-10 06:48:36 -05:00
yorkie
6e9a4abb03 doc,events: fix a link typo
PR-URL: https://github.com/nodejs/node/pull/6640
Reviewed-By: Alexander Makarenko <estliberitas@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
2016-05-10 06:40:12 -05:00
Michael Dawson
7f1111b1bb Add CTC meeting minutes for 2016-05-04
PR-URL: https://github.com/nodejs/node/pull/6579
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: thefourtheye - Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2016-05-09 17:37:07 -04:00
Jeremiah Senkpiel
2fee50658f doc: improve onboarding-extras.md formatting
Fixes some formatting, improves some formatting, updates minor nits.

Refs: https://github.com/nodejs/node/issues/6655
PR-URL: https://github.com/nodejs/node/pull/6548
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2016-05-09 13:22:46 -04:00
Jeremiah Senkpiel
4b107d049d doc: fix linewrap in node.1
PR-URL: https://github.com/nodejs/node/pull/6532
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-05-09 12:42:04 -04:00
Jeremiah Senkpiel
e3e2745906 doc: v8 options can use either _ or -
This adds docs to the man page and online cli docs that v8 options can
be used with either dashes or underscores.

Refs: https://github.com/nodejs/node/pull/6377#issuecomment-215601789
PR-URL: https://github.com/nodejs/node/pull/6532
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-05-09 12:42:03 -04:00
Bryan English
95d0feeb99
doc: v8 functions as methods on v8
For consistency with other docs, show v8 functions as being on the v8
object.

PR-URL: https://github.com/nodejs/node/pull/6615
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
2016-05-09 14:32:24 +02:00
Robert Jefe Lindstaedt
9daf4a2937 doc: discourage use of util.inherits
util.inherits breaks the prototype chain. A fix does not seem
useful, since ES6 extends provides language level support for the
same functionality.

This commit starts fasing out mentions of the method.

Fixes: https://github.com/nodejs/node/issues/6512
Fixes: https://github.com/nodejs/node/issues/4179

PR-URL: https://github.com/nodejs/node/pull/6514
Reviewed-By: James Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2016-05-09 14:10:41 +02:00
Bryan English
5a8c66a252
doc: add added: information for os
Via git spelunking, mostly.
Some functions have been renamed. Used the version in which they were
renamed.

Ref: https://github.com/nodejs/node/issues/6578
PR-URL: https://github.com/nodejs/node/pull/6609
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
2016-05-09 13:53:09 +02:00
Bryan English
ec67abe4a7
doc: add added: information for process
Most of the information is gleaned from changelogs. The rest is inferred
from git history.

Omitted cpuUsage() since it's not yet in a release.

Also omitted the streams, events and signals, since I didn't really
think it made sense for those.

Ref: https://github.com/nodejs/node/issues/6578
PR-URL: https://github.com/nodejs/node/pull/6589
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Alexander Makarenko <estliberitas@gmail.com>
2016-05-09 13:52:55 +02:00
Bryan English
43e4bafcaf
doc: add added: information for url
Module introduced in 7ff04c1f8.

Ref: https://github.com/nodejs/node/issues/6578
PR-URL: https://github.com/nodejs/node/pull/6593
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2016-05-09 13:46:09 +02:00
Bryan English
f773073338
doc: add added: information for querystring
Module introduced in 7ff04c1f8.

Ref: https://github.com/nodejs/node/issues/6578
PR-URL: https://github.com/nodejs/node/pull/6593
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2016-05-09 13:44:15 +02:00
Jackson Tian
b8573d0555 doc: correct anchors for buffer.md
the `buf.fill()` and `Buffer#indexOf` don't have correctly anchors

PR-URL: https://github.com/nodejs/node/pull/6542
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-05-06 10:47:04 -07:00
Anna Henningsen
4dcc692cad
doc: add added: information for buffer
Add `added:` and `deprecated:` entries to buffer.md.
These are incomplete (particularly for some of the ancient features),
but correct to the best of my knowledge. This serves as a
demonstration of how the `added:`/`deprecated:` metadata may be
implemented in 'real' docs.

PR-URL: https://github.com/nodejs/node/pull/6495
Reviewed-By: Robert Jefe Lindstaedt <robert.lindstaedt@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2016-05-05 01:15:11 +02:00
Tristian Flanagan
015f4fda0e
tools: parse documentation metadata
This commit introduces the Documentation YAML metadata concept to the
documentation.

- Parses added or Added for HTML
- Parses all data for JSON

Ref: https://github.com/nodejs/node/pull/3867
Ref: https://github.com/nodejs/node/issues/3713
Ref: https://github.com/nodejs/node/issues/6470
PR-URL: https://github.com/nodejs/node/pull/6495
Reviewed-By: Robert Jefe Lindstaedt <robert.lindstaedt@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2016-05-05 01:15:10 +02:00
James M Snell
a2e57192eb util: truncate inspect array and typed array
As an alternative to https://github.com/nodejs/node/pull/5070,
set the max length of Arrays/TypedArrays in util.inspect() to
`100` and provide a `maxArrayLength` option to override.

PR-URL: https://github.com/nodejs/node/pull/6334
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
2016-05-03 11:38:11 -07:00
Jenna Vuong
2aa376914b
doc: adds 'close' events to fs.ReadStream and fs.WriteStream
Add 'close' event to doc/api/fs.md --> fs.ReadStream
Add 'close' event to doc/api/fs.md --> fs.WriteStream
Add 'close event to doc/api/stream.md --> stream.Writable

From squashed history:
Add 'close' event to stream.Writable per Issue #6484
Add #### prefix to Event: 'close' and backticks to 'close'
similar to stream.Readable event: 'close' section
Add more specifics to 'close' events for fs.ReadStream
and fs.WriteStream
Fix/Changed 'close' event from 'fs.ReadStream' to 'fs.WriteStream'
wrapped long lines at 80 chars, reworded
per Issue #6484
including the 'close' event as optional
add 'close' event as optional in stream.Readable
per issue #6484
doc: Add 'close' events to fs.ReadStream, 80char nit

Fixes: #6484
PR-URL: https://github.com/nodejs/node/pull/6499
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Robert Jefe Lindstaedt <robert.lindstaedt@gmail.com>
2016-05-03 20:35:50 +02:00
Kevin Donahue
51e7bc8f79 doc: linkify remaining references to fs.Stats object
One reference to the `fs.Stats object` is linkified, while two other
similarly made references to the object are not linkified.
Linking the remaining references makes sense due to similar context.

PR-URL: https://github.com/nodejs/node/pull/6485
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-05-03 10:19:23 -07:00
yorkie
8637c27b77 doc: fix the lint of an example in cluster.md
PR-URL: https://github.com/nodejs/node/pull/6516
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-05-03 10:13:23 -07:00
James M Snell
ba6196f843 util: fix inspecting of proxy objects
In certain conditions, inspecting a Proxy object can lead to a
max call stack error. Avoid that by detecting the Proxy object
and outputting information about the Proxy object itself.

Fixes: https://github.com/nodejs/node/issues/6464
PR-URL: https://github.com/nodejs/node/pull/6465
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2016-05-03 10:08:24 -07:00
Kevin Donahue
eb12f93b79 doc: add missing underscore for markdown italics
A closing underscore was missing from the `poll` section of the event
loop doc. Also emboldened a word for continuity and readability.

PR-URL: https://github.com/nodejs/node/pull/6529
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2016-05-03 12:45:27 -04:00
justshiv
8ebec086a5 doc: ensure consistent grammar in node.1 file
PR-URL: https://github.com/nodejs/node/pull/6426
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2016-05-02 11:42:54 -04:00
Rich Trott
9f8d0ea6db doc: fix sentence fragment in fs doc
PR-URL: https://github.com/nodejs/node/pull/6488
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Alexander Makarenko <estliberitas@gmail.com>
2016-05-01 14:45:40 -07:00
cjihrig
d09c972fde doc: remove obsolete comment in isError() example
One of the util.isError() examples states that a harmony flag
is required. As of v6.0.0, this is no longer true. This commit
removes the out of date reference.

Refs: https://github.com/nodejs/node/pull/5414
PR-URL: https://github.com/nodejs/node/pull/6486
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2016-05-01 14:43:38 -07:00
William Luo
81aef8c1c0 doc: fix a typo in __dirname section
PR-URL: https://github.com/nodejs/node/pull/6473
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Robert Lindstaedt <robert.lindstaedt@gmail.com>
2016-05-01 14:40:38 -07:00
phette23
cebd52539e doc: fix fs.realpath man pg links
There is no realpath(2), only in sections 1 & 3
causes broken link on nodejs.org/api/ docs

PR-URL: https://github.com/nodejs/node/pull/6451
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-05-01 14:37:11 -07:00
vsemozhetbyt
563c9f8687 doc: extra clarification of historySize option
History caching in the `readline` io is active only for terminal
interaction. Appropriate variables are initialized and relevant
`_addHistory()` function is called only if exposed `terminal` option
of `readline.createInterface()` is set `true` by user or internal
output check.

This clarification is useful to assure users there will be now wasted
overhead connected with history caching if `readline` is used not
for terminal interaction (e.g. for reading files line by line).

Particularly this fix is helpful after #6352 landing.

PR-URL: https://github.com/nodejs/node/pull/6397
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Alexander Makarenko <estliberitas@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2016-05-01 14:33:28 -07:00
Allen Hernandez
a45ab97ab6 doc: clarifies http.serverResponse implementation
Since http.serverResponse does not inherit from Stream.writable
it does not pass the test `serverResponse instanceof stream.Writable`.
This commit clarifies that serverResponse does not inherit from
stream.Writable and therefore should not be expected to pass the above
test

Fixes: https://github.com/nodejs/node/issues/6046
PR-URL: https://github.com/nodejs/node/pull/6072
Reviewed-By: Claudio Rodriguez <cjrodr@yahoo.com>
Reviewed-By: Robert Lindstaedt <robert.lindstaedt@gmail.com>
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-05-01 14:24:49 -07:00
Rich Trott
f1cd33c3af doc: use Node.js in synopsis document
Change an instance of `Node` in the synopsis document to `Node.js.`

PR-URL: https://github.com/nodejs/node/pull/6476
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2016-05-01 13:28:34 -07:00
Claudio Rodriguez
7fdffb66d7 doc: remove all scrollbar styling
Returns the doc custom scrollbar to native style.

Fixes: https://github.com/nodejs/node/issues/6443
PR-URL: https://github.com/nodejs/node/pull/6479
Reviewed-By: Robert Lindstaedt <robert.lindstaedt@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
2016-05-01 16:23:57 +01:00
Alexander Makarenko
bcce05dba4 doc: make writable.setDefaultEncoding() return this
Let this function return `this` for parity with `readable.setEncoding()`.

PR-URL: https://github.com/nodejs/node/pull/5040
Fixes: https://github.com/nodejs/node/issues/5013

Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Calvin Metcalf <calvin.metcalf@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-04-30 12:55:46 -04:00
Сковорода Никита Андреевич
c1f2df9782 doc: fix EventEmitter#eventNames() example
Replace myErr with myEE in one place.
Fix the expected output to have the actual formatting.

PR-URL: https://github.com/nodejs/node/pull/6417
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
2016-04-29 23:22:07 -07:00
Evan Lucas
4b0dda0dd9 doc: fix incorrect syntax in examples
The cluster docs had a period instead of a semicolon at the end of two
lines.

PR-URL: https://github.com/nodejs/node/pull/6463
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Jackson Tian <shvyo1987@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2016-04-29 23:03:13 -07:00
Juan
8190359094 doc: Remove extra space in REPL example
PR-URL: https://github.com/nodejs/node/pull/6447
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
2016-04-29 23:01:12 -07:00
Ben Page
541965ff4f doc: added note warning about change to console.endTime()
Unintended functionality was removed from console.endTime by
https://github.com/nodejs/node/pull/3562. Prior to that, you could
call console.endTime multiple times for the same label.

PR-URL: https://github.com/nodejs/node/pull/6454
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Robert Lindstaedt <robert.lindstaedt@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Jeremy Whitlock <jwhitlock@apache.org>
2016-04-29 22:58:11 -07:00
James M Snell
c2bbfe2a5c doc: expand documentation for process.exit()
The fact that process.exit() interrupts pending async operations
such as non-blocking i/o is becoming a bit more pronounced with
the recent libuv update. This commit expands the documentation
for `process.exit()` to explain clearly how it affects async
operations.

PR-URL: https://github.com/nodejs/node/pull/6410
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Robert Lindstaedt <robert.lindstaedt@gmail.com>
2016-04-29 16:13:59 -07:00
Patrick Mueller
52cb410402 process: add process.cpuUsage() - implementation, doc, tests
Add process.cpuUsage() method that returns the user and system
CPU time usage of the current process

PR-URL: https://github.com/nodejs/node/pull/6157
Reviewed-By: Robert Lindstaedt <robert.lindstaedt@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
2016-04-29 16:07:06 -07:00
Jeremiah Senkpiel
0a3472613b doc: subdivide TOC, add auxiliary links
PR-URL: https://github.com/nodejs/node/pull/6167
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Robert Jefe Lindstädt <robert.lindstaedt@gmail.com>
2016-04-29 13:27:18 -04:00
Jeremiah Senkpiel
f11eee72b1 doc: no Node.js(1)
Node.js(1) does not make sense.
Node(1) would, but this isn’t a `man` page.

PR-URL: https://github.com/nodejs/node/pull/6167
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Robert Jefe Lindstädt <robert.lindstaedt@gmail.com>
2016-04-29 13:27:10 -04:00
Jeremiah Senkpiel
739f228f1b doc: better example & synopsis
PR-URL: https://github.com/nodejs/node/pull/6167
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Robert Jefe Lindstädt <robert.lindstaedt@gmail.com>
2016-04-29 13:26:30 -04:00
Lance Ball
23818c6d0b doc: correctly document the behavior of ee.once().
Addresses #5566. The `ee.once()` function is currently documented as
invoking the listener, and then removing it when the event is
triggered. However, this is not really the case. The listener is removed
and _then_ invoked. This only matters in a narrow set of use cases, but
when it matters, it matters that the docs are correct.

See the issue (#5566) for a discussion on why the code has not been
modified to match the documentation, but instead the documentation has
been modified to match the code.

Fixes: https://github.com/nodejs/node/issues/5566
PR-URL: https://github.com/nodejs/node/pull/6371
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Robert Lindstaedt <robert.lindstaedt@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
2016-04-26 22:49:37 -07:00
Jackson Tian
e556dd3856 doc: use Buffer.from() instead of new Buffer()
Use new API of Buffer to developers in most documents.

PR-URL: https://github.com/nodejs/node/pull/6367
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
2016-04-27 13:23:41 +08:00
Fedor Indutny
cee4c25c92 net: introduce Socket#connecting property
There is no official way to figure out if the socket that you have on
hand is still connecting to the remote host. Introduce
`Socket#connecting`, which is essentially an unprefixed `_connecting`
property that we already had.

PR-URL: https://github.com/nodejs/node/pull/6404
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2016-04-27 00:41:15 -04:00
Myles Borins
cc5d9767af meta: split CHANGELOG into two files
The unfortunate has happened, our CHANGELOG is now over 1 MB and cannot
be viewed on github. This commit breaks the CHANGELOG into two files
so that we can continue to show our changes rendered in the github UI.

Closes: https://github.com/nodejs/node/issues/5533

PR-URL: https://github.com/nodejs/node/pull/6337
Reviewed-By: Claudio Rodriguez <cjrodr@yahoo.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Roman Reiss <me@silverwind.io>
2016-04-26 13:16:01 -07:00
Jeremiah Senkpiel
2011f2c6dc doc: fix position of fs.readSync()
PR-URL: https://github.com/nodejs/node/pull/6399
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-04-26 12:55:56 -04:00
Myles Borins
29a6c7c1f0 doc: change references to Stable to Current
With v6 we plan to rename the Stable release line to Current.
This commit updates all references to Stable in the codebase. It will
have to land along side updates to other repos within the org.

Refs: https://github.com/nodejs/nodejs.org/issues/669
PR-URL: https://github.com/nodejs/node/pull/6318
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
2016-04-26 09:52:44 -07:00
Yuval Brik
31de5cc436 doc, tls: deprecate createSecurePair
createSecurePair uses tls_legacy and the legacy Connection from
node_crypto.cc. Deprecate them in favor of TLSSocket.

PR-URL: https://github.com/nodejs/node/pull/6063
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-04-26 09:05:12 -07:00
surya panikkal
0303a2552e
readline: allow history to be disabled
1.  The `historySize` to default to `30` only if `undefined`.
2.  If `historySize` is set to 0, then disable caching the line.
3.  Added unit tests.
4.  Updated documentation.

Fixes: https://github.com/nodejs/node/issues/6336
PR-URL: https://github.com/nodejs/node/pull/6352
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2016-04-26 02:31:05 +02:00
Evan Lucas
4f619bde4c cluster: migrate from worker.suicide
Replace it with worker.exitedAfterDisconnect. Print deprecation
message when getting or setting until it is removed.

PR-URL: https://github.com/nodejs/node/pull/3743
Fixes: https://github.com/nodejs/node/issues/3721
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
2016-04-25 19:24:37 -05:00
Jackson Tian
236b7e8dd1 doc: doc-only deprecation for util.log()
There are more powerful loggers in user land like `debug`, soft
deprecate it.

PR-URL: https://github.com/nodejs/node/pull/6161
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Evan Lucas <evanlucas@me.com>
2016-04-25 08:39:22 -07:00
dcposch@dcpos.ch
6c1e5ad3ab buffer: add Buffer.prototype.lastIndexOf()
* Remove unnecessary templating from SearchString

  SearchString used to have separate PatternChar and SubjectChar template type
  arguments, apparently to support things like searching for an 8-bit string
  inside a 16-bit string or vice versa. However, SearchString is only used from
  node_buffer.cc, where PatternChar and SubjectChar are always the same. Since
  this is extra complexity that's unused and untested (simplifying to a single
  Char template argument still compiles and didn't break any unit tests), I
  removed it.

* Use Boyer-Hoore[-Horspool] for both indexOf and lastIndexOf

  Add test cases for lastIndexOf. Test the fallback from BMH to
  Boyer-Moore, which looks like it was totally untested before.

* Extra bounds checks in node_buffer.cc

* Extra asserts in string_search.h

* Buffer.lastIndexOf: clean up, enforce consistency w/ String.lastIndexOf

* Polyfill memrchr(3) for non-GNU systems

PR-URL: https://github.com/nodejs/node/pull/4846
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
2016-04-25 08:24:28 -07:00
Alexander Gromnitsky
983a809456 doc: fix broken references
PR-URL: https://github.com/nodejs/node/pull/6350
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Minwoo Jung <jmwsoft@gmail.com>
2016-04-22 19:08:48 -07:00
Robert Jefe Lindstaedt
ae991e7577 doc: add note for platform specific flags fs.open()
Note describing platform specific differences in fs.open

E.g. fs.open('<directory>', 'a+', console.log)

Fixes: https://github.com/nodejs/node/issues/3643
PR-URL: https://github.com/nodejs/node/pull/6136
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-04-22 11:32:22 -07:00
James M Snell
0e7d57af35 events: add prependListener() and prependOnceListener()
A handful of modules (including readable-streams) make
inappropriate use of the internal _events property. One
such use is to prepend an event listener to the front
of the array of listeners.

This adds EE.prototype.prependListener() and
EE.prototype.prependOnceListener() methods to add handlers
to the *front* of the listener array.

Doc update and test case is included.

Fixes: https://github.com/nodejs/node/issues/1817
PR-URL: https://github.com/nodejs/node/pull/6032
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
2016-04-22 09:28:37 -07:00
Alexander Makarenko
f85412d49b doc: improvements to child_process, process docs
Sort links in lexical order. Add missing links.
Add `disconnect` event description in Process doc.
Fix typos.

R-URL: https://github.com/nodejs/node/pull/5075
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Robert Jefe Lindstädt <robert.lindstaedt@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
2016-04-22 08:38:15 -07:00
Robert Jefe Lindstaedt
6815a3b7f9 doc: add vm example, be able to require modules
The intention behind is to present the user a way to
execute code in a vm context. The current API doesn't
allow this out-of-the-box, since it is neither passing a require
function nor creating context with one.
The missing docs for this behaviour have produced a number of
Q&A items and have also been discussed in the node-archive repo.
In both cases there was no real canonical answer.

Refs: nodejs/node-v0.x-archive#9211, #4955
PR-URL: https://github.com/nodejs/node/pull/5323
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2016-04-21 21:44:41 -07:00
James M Snell
7f11634a46 doc: note that process.config can and will be changed
PR-URL: https://github.com/nodejs/node/pull/6266
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2016-04-21 11:37:32 -07:00
Robert Jefe Lindstaedt
0800c0aa72 doc: git mv to .md
* doc: rename .markdown references in content
* doc: rename to .md in tools
* doc: rename to .md in CONTRIBUTING.md

PR-URL: https://github.com/nodejs/node/pull/4747
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: techjeffharris
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2016-04-20 16:34:27 -07:00
Anna Henningsen
5f0fcd6245
doc: add full example for zlib.flush()
Add a full example using `zlib.flush()` for the common use
case of writing partial compressed HTTP output to the client.

PR-URL: https://github.com/nodejs/node/pull/6172
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Robert Jefe Lindstädt <robert.lindstaedt@gmail.com>
2016-04-20 18:28:39 +02:00
Anna Henningsen
9c2b8ecc54
doc: note that zlib.flush acts after pending writes
Describe that `zlib.flush()` may wait for pending writes and
until output is being read from the stream.

Fixes: https://github.com/nodejs/node/issues/3782
PR-URL: https://github.com/nodejs/node/pull/6172
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Robert Jefe Lindstädt <robert.lindstaedt@gmail.com>
2016-04-20 18:28:39 +02:00
abouthiroppy
9a9beefe23 doc: replace functions with arrow functions
PR-URL: https://github.com/nodejs/node/pull/6203
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-04-18 16:29:23 -07:00
Igor Klopov
4c234df264 doc: path.resolve ignores zero-length strings
https://github.com/nodejs/node/blob/master/lib/path.js#L187
https://github.com/nodejs/node/blob/master/lib/path.js#L1189

PR-URL: https://github.com/nodejs/node/pull/5928
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Robert Jefe Lindstädt <robert.lindstaedt@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-04-18 16:16:47 -07:00
Matthew Douglass
a974e852c6 doc: fix http response event, Agent#getName
Removes the options block from the http 'response' event and attaches
it to Agent#getName where it belongs. Removes socketPath and documents
localAddress option.

PR-URL: https://github.com/nodejs/node/pull/5993
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-04-18 16:05:30 -07:00
Nikolai Vavilov
cf29b2f815 doc: document intention and dangers of fs module Buffer API
PR-URL: https://github.com/nodejs/node/pull/6020
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-04-18 16:03:04 -07:00
Alexander Gromnitsky
3641ca9849 doc: fix broken references
PR-URL: https://github.com/nodejs/node/pull/6100
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-04-18 15:50:55 -07:00
James M Snell
40a5761969 doc: explain differences in console.assert between node and browsers
Provide an example for implementing browser like behavior for console.assert.

This "fixes" https://github.com/nodejs/node/issues/5340 by providing an
alternative to changing Node.js' implemented behavior. Instead, we
document the differences and show how to work around them if
browser like semantics are desired.

Fixes: https://github.com/nodejs/node/issues/5340
PR-URL: https://github.com/nodejs/node/pull/6169
Reviewed-By: Robert Jefe Lindstädt <robert.lindstaedt@gmail.com>
Reviewed-By: Jeff Harris <@techjeffharris>
2016-04-18 15:42:29 -07:00
Anna Henningsen
39d905e293 node: make builtin libs available for --eval
Make the builtin libraries available for the `--eval` and
`--print` CLI options, using the same mechanism that the
REPL uses.

This renders workarounds like `node -e 'require("fs").doStuff()'`
unnecessary.

As part of this, the list of builtin modules and the code for
adding the corresponding properties to the target context is moved
to `internal/module.js`, and the previously missing `repl` entry
is added.

PR-URL: https://github.com/nodejs/node/pull/6207
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2016-04-18 15:31:32 -07:00
Bryan English
5c14d695d2 doc: native module reloading is not supported
Clarify in docs for require.cache that reloading native modules
isn't supported.

Related: #6160
PR-URL: https://github.com/nodejs/node/pull/6168
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-04-18 15:17:41 -07:00
Alexander Makarenko
eafd31a4eb tools,doc: parse types in braces everywhere
Also add `EvalError`, `RangeError`, `ReferenceError`, `SyntaxError`,
`TypeError`, `URIError` to list of global types. Fix errors.markdown
copy accordingly.

Fixes: https://github.com/nodejs/node/issues/5325.
PR-URL: https://github.com/nodejs/node/pull/5329
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-04-18 09:53:52 -07:00
Joran Dirk Greef
88c35e70a0 doc: clarify fs.watch() and inodes on linux, os x
On Linux and OS X systems, `fs.watch()` resolves the watched path to an
inode. This clarifies that `fs.watch()` watches the inode and not the
path. If the inode of the path subsequently changes, `fs.watch()` will
continue watching the original inode and events for the path will no
longer be emitted. This is expected behavior.

Fixes: https://github.com/nodejs/node/issues/5039
PR-URL: https://github.com/nodejs/node/pull/6099
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-04-18 09:50:37 -07:00
Anna Henningsen
978166796e
zlib: Make the finish flush flag configurable
Up to now, `Z_FINISH` was always the flushing flag that was used
for the last chunk of input data. This patch makes this choice
configurable so that advanced users can perform e.g. decompression of
partial data using `Z_SYNC_FLUSH`, if that suits their needs.

Add tests to make sure that an error is thrown upon encountering
invalid `flush` or `finishFlush` flags.

Fixes: https://github.com/nodejs/node/issues/5761
PR-URL: https://github.com/nodejs/node/pull/6069
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-04-17 17:01:55 +02:00
Trevor Norris
4a74fc9776 doc: add domain postmortem
Do to various reasons, outlined in the committed document, domains were
only in core for 2 years before being deprecated. This outline explains
why they received criticism from the community and never gained traction
with module authors.

Also included is an example script that accompanies the postmortem
analysis.

PR-URL: https://github.com/nodejs/node/pull/6159
Reviewed-By: Robert Lindstädt <robert.lindstaedt@gmail.com>
Reviewed-By: Kelvin Knighton <keltheceo@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
2016-04-15 15:12:26 -06:00
James M Snell
a0579c0dc7 doc: minor copy improvement in buffer.markdown
PR-URL: https://github.com/nodejs/node/pull/5833
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2016-04-15 10:36:13 -07:00
James M Snell
3fe204c700 buffer: docs-only deprecate SlowBuffer
With the addition of `Buffer.allocUnsafeSlow(size)`
`SlowBuffer` can be deprecated... but docs-only for now.

PR-URL: https://github.com/nodejs/node/pull/5833
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2016-04-15 10:36:08 -07:00
James M Snell
627524973a buffer: add Buffer.allocUnsafeSlow(size)
Aligns the functionality of SlowBuffer with the new Buffer
constructor API. Next step is to docs-only deprecate
SlowBuffer.

Replace the internal uses of SlowBuffer with
`Buffer.allocUnsafeSlow(size)`

PR-URL: https://github.com/nodejs/node/pull/5833
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2016-04-15 10:36:01 -07:00
Yuval Brik
b488b19eaf
fs: optimize realpath using uv_fs_realpath()
Remove realpath() and realpathSync() cache.
Use the native uv_fs_realpath() which is faster
then the JS implementation by a few orders of magnitude.

PR-URL: https://github.com/nodejs/node/pull/3594
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
2016-04-15 03:46:55 -04:00
Rich Trott
1df84f4f75 debugger: run last command on presssing enter
PR-URL: https://github.com/nodejs/node/pull/6090
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: bnoordhuis - Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Claudio Rodriguez <cjrodr@yahoo.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Fixes: https://github.com/nodejs/node/issues/2895
2016-04-14 10:53:07 -07:00
Amery
a432935211 doc: fix incorrect references in buffer docs
PR-URL: https://github.com/nodejs/node/pull/6194
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
2016-04-14 08:50:23 -04:00
cjihrig
d6e56fd843 os: add userInfo() method
os.userInfo() calls libuv's uv_os_get_passwd() function. It returns
an object containing the current effective user's username, uid,
gid, shell, and home directory. On Windows, the uid and gid are
-1, and the shell is null.

Refs: https://github.com/nodejs/node/issues/5582
PR-URL: https://github.com/nodejs/node/pull/6104
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-04-12 17:21:29 -04:00
James M Snell
ad2df3ac1f doc: clarification for maxBuffer and Unicode output
Clarify caveats on `maxBuffer` with regards to Unicode output.

Refs: https://github.com/nodejs/node/issues/1901
PR-URL: https://github.com/nodejs/node/pull/6030
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2016-04-10 16:17:17 -07:00
Robert Jefe Lindstaedt
8f4fdc93f0 doc: describe child.kill() pitfalls on linux
This commit refines the documentation around child.kill(), where kill
attempts against shells will lead to unexpected results. Namely, on
linux the child process of a child process will not terminate, when
its parent gets terminated. This is different across the the
platforms.

PR-URL: https://github.com/nodejs/node/issues/2098
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Closes: https://github.com/nodejs/node/issues/2098
2016-04-10 11:16:10 +03:00
Luigi Pinca
d2577def93
doc: fix scrolling on iOS devices
Fixes an issue that prevented scrolling from going past large code
blocks on iOS devices. Also fixes a few minor styling issues that
came up in the discussion.

Fixes: https://github.com/nodejs/node/issues/5861
PR-URL: https://github.com/nodejs/node/pull/5878
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Robert Lindstädt <robert.lindstaedt@gmail.com>
2016-04-09 18:21:05 +02:00
James M Snell
a2466896dd buffer: add Buffer.prototype.compare by offset
Adds additional `targetStart`, `targetEnd`, `sourceStart,
and `sourceEnd` arguments to `Buffer.prototype.compare`
to allow comparison of sub-ranges of two Buffers without
requiring Buffer.prototype.slice()

Fixes: https://github.com/nodejs/node/issues/521
PR-URL: https://github.com/nodejs/node/pull/5880
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
2016-04-08 20:16:46 -07:00
John Eversole
820844d673 doc: path.format provide more examples
This change was to add upon the algorithm description of path.format
by adding examples for unix systems that clarified behavior in
various scenarios.

PR-URL: https://github.com/nodejs/node/pull/5838
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Roman Klauke <romaaan.git@gmail.com>
2016-04-08 17:39:35 -07:00
Jeff Harris
e67fee0fb5 doc: add topic - event loop, timers, nextTick()
Adds a new topic that provides an overview of the event loop, timers, and
`process.nextTick()` that is based upon a NodeSource "Need to Node" presentation
hosted by @trevnorris: Event Scheduling and the Node.js Event
Loop (https://nodesource.com/resources).

PR-URL: #4936
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Calvin W. Metcalf <calvin.metcalf@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2016-04-08 14:11:58 -04:00
Brad Hill
945454894b doc: add example using algorithms not directly exposed
PR-URL: https://github.com/nodejs/node/pull/6108
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
2016-04-08 09:24:57 -07:00
Brendon Pierson
1879e1ef17 doc: simple doc typo fix
decipher.setAuthPadding canged to decipher.setAutoPadding

PR-URL: https://github.com/nodejs/node/pull/6041
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Roman Klauke <romaaan.git@gmail.com>
2016-04-07 09:37:22 -07:00
cjihrig
3de9bc9429 readline: document emitKeypressEvents()
This commit adds documentation to the already publicly available
readline.emitKeypressEvents() method.

PR-URL: https://github.com/nodejs/node/pull/6024
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
2016-04-05 10:48:47 -04:00
Rich Trott
539cede426 doc: note assert.throws() pitfall
PR-URL: https://github.com/nodejs/node/pull/6029
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-04-04 09:22:06 -07:00
James M Snell
64bf4b31c6 doc: document unspecified behavior for buf.write* methods
Per https://github.com/nodejs/node/issues/1161, when the
buf.write*() methods are given anything other than what
they expect, indicate that the behavior is unspecified.

Fixes: https://github.com/nodejs/node/issues/1161
PR-URL: https://github.com/nodejs/node/pull/5925
Reviewed-By: Claudio Rodriguez <cjrodr@yahoo.com>
2016-04-03 11:29:23 -07:00
James M Snell
6fd26dcc20 doc: clarify stdout/stderr arguments to callback
Clarify that the arguments to child_process.execFile
and child_process.exec callback can be Buffer or strings.

Fixes: https://github.com/nodejs/node/issues/3389
PR-URL: https://github.com/nodejs/node/pull/6015
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2016-04-02 19:37:58 -07:00
firedfox
ba0b769c7b doc: add 'Command Line Options' to 'View on single page'
Includes cli.markdown in all.markdown

PR-URL: https://github.com/nodejs/node/pull/6011
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2016-04-02 17:10:44 -07:00
James M Snell
63e743db38 doc: minor argument formatting in stream.markdown
Fixes: https://github.com/nodejs/node/issues/4350
PR-URL: https://github.com/nodejs/node/pull/6016
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Roman Klauke <romaaan.git@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2016-04-02 16:39:21 -07:00
James M Snell
c06824b4b7 doc: clarify that __dirname is module local
Fixes: https://github.com/nodejs/node/issues/5525
PR-URL: https://github.com/nodejs/node/pull/6018
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Roman Klauke <romaaan.git@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2016-04-02 16:37:52 -07:00
Bryan English
33003a52d2 doc: consolidate timers docs in timers.markdown
Rather than attempting to keep two versions of docs for timers up to
date, keep them in timers.markdown, and leave references to them in
globals.markdown.

Add setImmediate and clearImmediate to globals.markdown.

Change "To schedule" to "Schedules" in timers.markdown.

PR-URL: https://github.com/nodejs/node/pull/5837
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Claudio Rodriguez <cjrodr@yahoo.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2016-04-02 14:06:25 -03:00
Robert Jefe Lindstaedt
82c2996e2d doc: refine child_process detach behaviour
this adds an example of a long running node process that actually
executes node code.
Also it mentions the not to harmonic detach behaviours of the
different platforms, whereas detaching on unix requires ignoring
the child_process' stdio explicitely.

PR-URL: https://github.com/nodejs/node/pull/5330
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-04-01 22:57:08 -07:00
Colin Ihrig
39de601e1c net: support DNS hints in createConnection()
This commit adds support for passing DNS lookup hints to
createConnection().

PR-URL: https://github.com/nodejs/node/pull/6000
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-04-01 17:03:42 -04:00
firedfox
d939152230 doc: fix typo in fs writeSync param list
Rename `buffer` to `data` in param list of
fs.writeSync(fd, data[, position[, encoding]])

PR-URL: https://github.com/nodejs/node/pull/5984
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-04-01 09:47:36 -07:00
firedfox
4039ef1a58 doc: remove redundant parameter comments from fs
Some old version parameter comments are left in fs.markdown. Remove
them.

PR-URL: https://github.com/nodejs/node/pull/5952
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Robert Lindstädt <robert.lindstaedt@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
2016-03-31 00:28:52 +02:00
Jackson Tian
293fd04535 buffer: make byteLength work with ArrayBuffer & DataView
Convert anything to string, but Buffer, TypedArray and ArrayBuffer

```
var uint8 = new Uint8Array([0xf0, 0x9f, 0x90]);
Buffer.byteLength(uint8); // should be 3, but returns 11
Buffer.byteLength(uint8.buffer); // should be 3, but return 20
```

PR-URL: https://github.com/nodejs/node/pull/5255
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-03-27 09:19:39 -07:00
ghaiklor
1213535701 doc: fix doc for Buffer.readInt32LE()
Update example of readInt32LE method. buf.readInt32LE(1) is supposed to
throw an error as it has only four elements and it tries to read 32
bits from three bytes.

Fixes: https://github.com/nodejs/node/issues/5889
PR-URL: https://github.com/nodejs/node/pull/5890
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2016-03-27 12:21:09 +05:30
James M Snell
060e5f0c00 fs: Buffer and encoding enhancements to fs API
This makes several changes:

1. Allow path/filename to be passed in as a Buffer on fs methods
2. Add `options.encoding` to fs.readdir, fs.readdirSync, fs.readlink,
   fs.readlinkSync and fs.watch.
3. Documentation updates

For 1... it's now possible to do:

```js
fs.open(Buffer('/fs/foo/bar'), 'w+', (err, fd) => { });
```

For 2...
```js
fs.readdir('/fs/foo/bar', {encoding:'hex'}, (err,list) => { });

fs.readdir('/fs/foo/bar', {encoding:'buffer'}, (err, list) => { });
```

encoding can also be passed as a string

```js
fs.readdir('/fs/foo/bar', 'hex', (err,list) => { });
```

The default encoding is set to UTF8 so this addresses the
discrepency that existed previously between fs.readdir and
fs.watch handling filenames differently.

Fixes: https://github.com/nodejs/node/issues/2088
Refs: https://github.com/nodejs/node/issues/3519
PR-URL: https://github.com/nodejs/node/pull/5616
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
2016-03-25 14:21:27 -07:00
James M Snell
4d4f3535a9 doc: general improvements to fs.markdown
PR-URL: https://github.com/nodejs/node/pull/5616
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
2016-03-25 14:21:23 -07:00
Jeremiah Senkpiel
be68b68d48 doc: add instructions to only sign a release
PR-URL: https://github.com/nodejs/node/pull/5876
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-03-24 21:25:23 -07:00
James M Snell
c6656db352 process: add 'warning' event and process.emitWarning()
In several places throughout the code we write directly to stderr
to report warnings (deprecation, possible eventemitter memory leak).
The current design of simply dumping the text to stderr is less
than ideal. This PR introduces a new "process warnings" mechanism
that emits 'warning' events on the global process object. These are
invoked with a `warning` argument whose value is an Error object.

By default, these warnings will be printed to stderr. This can be
suppressed using the `--no-warnings` and `--no-deprecation` command
line flags. For warnings, the 'warning' event will still be emitted
by the process, allowing applications to handle the warnings in custom
ways. The existing `--no-deprecation` flag will continue to supress
all deprecation output generated by the core lib.

The `--trace-warnings` command line flag will tell Node.js to print
the full stack trace of warnings as part of the default handling.

The existing `--no-deprecation`, `--throw-deprecation` and
`--trace-deprecation` flags continue to work as they currently do,
but the exact output of the warning message is modified to occur
on process.nextTick().

The stack trace for the warnings and deprecations preserve and point
to the correct call site.

A new `process.emitWarning()` API is provided to permit userland
to emit warnings and deprecations using the same consistent
mechanism.

Test cases and documentation are included.

PR-URL: https://github.com/nodejs/node/pull/4782
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Wyatt Preul <wpreul@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2016-03-24 13:19:11 -07:00
Benjamin Gruenbaum
ea52f47790 doc: use consistent event name parameter
Implementing the suggestion in
https://github.com/nodejs/node/issues/4554 this pull request renames
the parameter name in all the places that accept an event name as a parameter.

Previously, the parameter has been called `event` or `type`. Now as suggested
it is consistently called `eventName`.

PR-URL: https://github.com/nodejs/node/pull/5850
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2016-03-24 15:26:37 +02:00
James M Snell
f429fe1b88 crypto: fail early when loading crypto without openssl
Fail early in require('crypto'), require('tls'),
require('https'), etc when crypto is not available
(rather than depending on an internal try/catch).

Add documentation for detecting when crypto is not available.

PR-URL: https://github.com/nodejs/node/pull/5611
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2016-03-23 10:34:40 -07:00
James M Snell
7d73e60f60 buffer: add swap16() and swap32() methods
Adds Buffer.prototype.swap16() and Buffer.prototype.swap32()
methods that mutate the Buffer instance in-place by swapping the
16-bit and 32-bit byte-order.

Example:

```js
const buf = Buffer([0x1, 0x2, 0x3, 0x4]);
buf.swap16();
console.log(buf);
  // prints Buffer(0x2, 0x1, 0x4, 0x3);

buf.swap32();
console.log(buf);
  // prints Buffer(0x3, 0x4, 0x1, 0x2);
```

PR-URL: https://github.com/nodejs/node/pull/5724
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
2016-03-23 08:52:44 -07:00
John Eversole
d16d9047ea doc: explain path.format expected properties
Explain the expected properties in path.format

Fixes: https://github.com/nodejs/node/issues/5746
PR-URL: https://github.com/nodejs/node/pull/5801
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2016-03-22 23:46:33 +02:00
Corey Kosak
e301f979de doc: typo: interal->internal.
Fixes a copy typo in the events.md docs.

PR-URL: https://github.com/nodejs/node/pull/5849
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-03-22 23:26:27 +02:00
Tom Gallacher
03e07d32ac src: override v8 thread defaults using cli options
Based on the conversation in #4243 this implements a way to increase
and decrease the size of the thread pool used in v8.

Currently v8 restricts the thread pool size to `kMaxThreadPoolSize`
which at this commit is (4). So it is only possible to
decrease the thread pool size at the time of this commit. However with
changes upstream this could change at a later date.
If set to 0 then v8 would choose an appropriate size of the thread pool
based on the number of online processors.

PR-URL: https://github.com/nodejs/node/pull/4344
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2016-03-22 07:55:53 -07:00
Bill Automata
e136c179c1 doc: update crypto docs to use good defaults
[Diffie-Hellman](https://en.wikipedia.org/wiki/Diffie%E2%80%93Hellman_key_exchange#Cryptographic_explanation)
keys are composed of a `generator` a `prime` a `secret_key`
and the `public_key` resulting from the math operation:

```
(generator ^ secret_key) mod prime = public_key
```

Diffie-Hellman keypairs will compute a matching shared secret
if and only if the generator and prime match for both
recipients.  The generator is usually **2** and the prime is
what is called a [Safe Prime](https://en.wikipedia.org/wiki/Safe_prime).

Usually this matching is accomplished by using
[standard published groups](http://tools.ietf.org/html/rfc3526).
We expose access those groups with the `crypto.getDiffieHellman`
function.

`createDiffieHellman` is trickier to use.  The original example
had the user creating 11 bit keys, and creating random groups of
generators and primes. 11 bit keys are very very small, can be
cracked by a single person on a single sheet of paper.  A
byproduct of using such small keys were that it was a high
likelihood that two calls of `createDiffieHellman(11)` would
result in using the same 11 bit safe prime.

The original example code would fail when the safe primes generated
at 11 bit lengths did not match for alice and bob.

If you want to use your own generated safe `prime` then the proper
use of `createDiffieHellman` is to pass the `prime` and `generator`
to the recipient's constructor, so that when they compute the shared
secret their `prime` and `generator` match, which is fundamental to
the algorithm.

PR-URL: https://github.com/nodejs/node/pull/5505
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-03-21 16:49:46 -07:00
Rod Vagg
bac6c85056 doc: add CTC meeting minutes 2016-02-10
PR-URL: https://github.com/nodejs/node/pull/5273
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-03-21 15:54:35 -07:00
Rod Vagg
5aebbaeb49 doc: add CTC meeting minutes 2016-02-03
PR-URL: https://github.com/nodejs/node/pull/5272
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-03-21 15:53:26 -07:00
Jackson Tian
d2b93e55cc lib: reduce usage of self = this
Remove unnecessary `self = this`.

PR-URL: https://github.com/nodejs/node/pull/5231
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-03-21 15:48:51 -07:00
Wolfgang Steiner
f70c71f168 doc: explain error message on missing main file
Added a hint saying that node uses the default "Cannot find module"
error when requiring a module for which the "main" file specified in
the package.json is missing.

PR-URL: https://github.com/nodejs/node/pull/5812
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-03-21 14:59:13 -07:00
Jeremiah Senkpiel
91cf55ba8e doc: add a cli options doc page
This page is mostly a mirror of the updated manual page.

PR-URL: https://github.com/nodejs/node/pull/5787
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell jasnell@gmail.com>
Reviewed-By: Bryan English <bryan@bryanenglish.com>
Reviewed-By: Robert Lindstädt <robert.lindstaedt@gmail.com>
2016-03-21 17:33:42 -04:00
Mithun Patel
54e6a8d6d7 doc: Add windows example for Path.format
PR-URL: https://github.com/nodejs/node/pull/5700
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2016-03-21 09:11:56 -07:00
Bryan English
0fd3327879 doc: grammar, clarity and links in timers doc
Added appropriate in-document links. Clarified a bit of
`setImmediate`, including a quick grammar fix (plural possessive
apostrophe).

PR-URL: https://github.com/nodejs/node/pull/5792
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2016-03-21 09:48:54 +02:00
Florian MARGAINE
e5f8a6a2fa fs: add the fs.mkdtemp() function.
This uses libuv's mkdtemp function to provide a way to create a
temporary folder, using a prefix as the path. The prefix is appended
six random characters. The callback function will receive the name
of the folder that was created.

Usage example:

fs.mkdtemp('/tmp/foo-', function(err, folder) {
    console.log(folder);
        // Prints: /tmp/foo-Tedi42
});

The fs.mkdtempSync version is also provided. Usage example:

console.log(fs.mkdtemp('/tmp/foo-'));
    // Prints: tmp/foo-Tedi42

This pull request also includes the relevant documentation changes
and tests.

PR-URL: https://github.com/nodejs/node/pull/5333
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-03-20 11:49:02 +02:00
Stefano Vozza
4f6ad5c1dd doc: align doc/api/tls.markdown with style guide
Brings tls.markdown into alignment with the node.js
styleguide, specifically regarding the use of
personal pronouns. Also, fixes various typos,
punctuation errors, missing definite/indefinite
articles and other minor grammatical issues.

PR-URL: https://github.com/nodejs/node/pull/5706
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-03-20 10:42:04 +02:00
Jarrett Widman
5f1eb434ee doc: topic blocking vs non-blocking
The need for an overview of blocking vs non-blocking was
identified in the docs WG Q1 roadmap. As there are several
topics also pending creation, this one tries to hit the correct
level of detail based on completion of the others.  One
which is referenced is
https://github.com/nodejs/node/pull/4936/files and URLs
within this PR need to change based on where that will land
on the node website.

PR-URL: https://github.com/nodejs/node/pull/5326
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
2016-03-19 15:19:15 +02:00
Lance Ball
ad8257fa5b repl: Assignment of _ allowed with warning
This commit addresses https://github.com/nodejs/node/issues/5431 by
changing the way that the repl handles assignment to the global _
variable.

Prior to this commit, node sets the result of the last expression
evaluated in the repl to `_`. This causes problems for users of
underscore, lodash and other packages where it is common to assign
`_` to the package, e.g. `_ = require('lodash');`.

Changes in this commit now result in the following behavior.

- If unassigned on the repl, `_` continues to refer to the last
  evaluated expression.
- If assigned, the default behavior of assigning `_` to the last
  evaluated expression is disabled, and `_` now references whatever
  value was explicitly set. A warning is issued on the repl -
  'expression assignment to _ now disabled'.
- If `_` is assigned multiple times, the warning is only displayed once.
- When `.clear` is executed in the repl, `_` continues to refer to its
  most recent value, whatever that is (this is per existing behavior).
  If `_` had been explicitly set prior to `.clear` it will not change
  again with the evaluation of the next expression.

PR-URL: https://github.com/nodejs/node/pull/5535
Fixes: https://github.com/nodejs/node/issues/5431
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-03-18 21:03:40 +01:00
Andrea Giammarchi
ac6af73a6d doc: fix typo in synchronous randomBytes example
The string template was closed after `${buf.length}`
causing a syntax error within the example.

PR-URL: https://github.com/nodejs/node/pull/5781
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-03-18 10:54:21 -07:00
HUANG Wei
545b8fd8d8 net: emit host in lookup event
Previously, we emitted ip and addressType. This change includes the host
as the last argument to the lookup event.

PR-URL: https://github.com/nodejs/node/pull/5598
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
2016-03-18 11:04:02 -05:00
Brian White
08085c49b6 path: assert inputs are strings
This commit makes input type checking consistent across all path
functions.

PR-URL: https://github.com/nodejs/node/pull/5348
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
2016-03-17 23:20:12 -04:00
Brian White
af09a9cc1b doc: fix crypto update() signatures
PR-URL: https://github.com/nodejs/node/pull/5500
Reviewed-By: Shigeki Ohtsu <ohtsu@iij.ad.jp>
2016-03-17 22:30:20 -04:00
Claudio Rodriguez
929b5b92a5 doc: fix multiline return comments in querystring
Changes the multiline return example commments in querystring
which have the example out-of-comment, into single comment
lines to remain consistent with other docs.

PR-URL: https://github.com/nodejs/node/pull/5705
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2016-03-17 17:15:06 -03:00
Rich Trott
9eb0ef4c2c doc: fix invalid path doc comments
The format of certain code comments in the `path` documentation results
in the code blocks being invalid. I also find it confusing at least as
formatted on the website. This change is intended to improve those
comments.

PR-URL: https://github.com/nodejs/node/pull/5670
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
2016-03-16 21:14:04 -07:00
Rich Trott
a97dfa0027 doc: explain path.format() algorithm
PR-URL: https://github.com/nodejs/node/pull/5688
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Claudio Rodriguez <cjrodr@yahoo.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Fixes: https://github.com/nodejs/node/issues/2305
2016-03-16 14:59:47 -07:00
Benjamin Gruenbaum
d8290286b3 doc: document deprecation of util._extend
Document that util._extend was never intended to be used
and should be considered deprecated.

PR-URL: https://github.com/nodejs/node/pull/4903
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
2016-03-16 12:55:55 -07:00
Felix Böhm
939d6efe0f doc: fix return value of write methods
Fixes: https:github.com/nodejs/node/issues/5682
PR-URL: https://github.com/nodejs/node/pull/5736
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2016-03-16 12:40:19 -07:00
Jeremiah Senkpiel
f9e6191f85 doc: reformat & improve node.1 manual page
Uses better troff formatting.
Removes v8 options from the man page.

Also edits `node -h` in node.cc slightly.

PR-URL: https://github.com/nodejs/node/pull/5497
Reviewed-By: James Snell <jasnell@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2016-03-16 13:49:40 -04:00