platform/upstream/nodejs.git
8 years agodoc: document base64url encoding support
Tristan Slominski [Mon, 15 Feb 2016 17:44:53 +0000 (11:44 -0600)]
doc: document base64url encoding support

Documents that creating a buffer from base64 encoded string
transparently supports "URL and Filename Safe Alphabet" base64url
encoding.

PR-URL: https://github.com/nodejs/node/pull/5243
Reviewed-By: Ben Noorhduis <info@bnoordhuis.nl>
Reviewed-By: Benjamin Gruenbaum <inglor@gmail.com>
Reviewed-By: Alejandro Oviedo <alejandro.oviedo.g@gmail.com>
8 years agohttp: remove old, confusing comment
Brian White [Mon, 15 Feb 2016 09:51:05 +0000 (04:51 -0500)]
http: remove old, confusing comment

The comment refers to a property (called `_pendings`) that no longer
exists.

PR-URL: https://github.com/nodejs/node/pull/5233
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
8 years agohttp: remove unnecessary check
Brian White [Mon, 15 Feb 2016 09:47:06 +0000 (04:47 -0500)]
http: remove unnecessary check

The value passed to `process.nextTick()` which is passed to the
callback is already a valid object, so the conditional will always
evaluate to true.

PR-URL: https://github.com/nodejs/node/pull/5233
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
8 years agobuild: skip msi build if WiX is not found
Tsarevich Dmitry [Sat, 13 Feb 2016 21:17:23 +0000 (00:17 +0300)]
build: skip msi build if WiX is not found

If none of VS2013/VS2015 WiX installs are found on a builder
machine, skip node build and notify user about.

PR-URL: https://github.com/nodejs/node/pull/5220
Reviewed-By: João Reis <reis@janeasystems.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
8 years agodoc: update removeListener behaviour
Vaibhav [Fri, 12 Feb 2016 09:48:21 +0000 (15:18 +0530)]
doc: update removeListener behaviour

This commit updates events doc to describe removeListener behaviour
when it is called within a listener. An example is added to make
it more evident.

A test is also incuded to make this behaviour consistent in future
releases.

Fixes: nodejs/node#4759

PR-URL: https://github.com/nodejs/node/pull/5201

Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
8 years agodoc: add note for binary safe string reading
Anton Andesen [Tue, 9 Feb 2016 08:31:07 +0000 (08:31 +0000)]
doc: add note for binary safe string reading

`readable.setEncoding(null)` - may be the most preferable way to proxy
a binary data without any encoding/decoding overhead

PR-URL: https://github.com/nodejs/node/pull/5155
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
8 years agorepl: handle quotes within regexp literal
Prince J Wesley [Sat, 6 Feb 2016 06:44:27 +0000 (12:14 +0530)]
repl: handle quotes within regexp literal

PR-URL: https://github.com/nodejs/node/pull/5117
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Minwoo Jung <jmwsoft@gmail.com>
8 years agostring_decoder: fix performance regression
Brian White [Thu, 11 Feb 2016 15:31:47 +0000 (10:31 -0500)]
string_decoder: fix performance regression

This commit reverts the const usage introduced by 68a6abc
because v8 currently cannot optimize functions that contain
these uses of const (unsupported phi use of const variable).
The performance difference in this case can be up to ~130%
for non-ascii/binary string encodings.

PR-URL: https://github.com/nodejs/node/pull/5134
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
8 years agostream: prevent object map change in TransformState
Evan Lucas [Tue, 2 Feb 2016 00:17:48 +0000 (18:17 -0600)]
stream: prevent object map change in TransformState

TransformState has the writeencoding property that gets set on the
first _write. It is not declared when the transform state is initially
constructed and can cause a deopt.

PR-URL: https://github.com/nodejs/node/pull/5032
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
8 years agotest: remove unneeded bind() and related comments
Aayush Naik [Mon, 1 Feb 2016 10:34:14 +0000 (16:04 +0530)]
test: remove unneeded bind() and related comments

As mentioned in the comment of the changed file, "a libuv limitation
makes it necessary to bind()". But, that is not the case in this test.
The subsequent call to send() results in an implicit bind().

PR-URL: https://github.com/nodejs/node/pull/5023
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
8 years agobuffer: remove duplicated code in fromObject
HUANG Wei [Fri, 29 Jan 2016 10:15:32 +0000 (18:15 +0800)]
buffer: remove duplicated code in fromObject

Add fromArrayLike() to handle logic of copying in values from array-like
argument.

PR-URL: https://github.com/nodejs/node/pull/4948
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
8 years agodoc: clarify when writable.write callback is called
Kevin Locke [Fri, 22 Jan 2016 00:07:50 +0000 (16:07 -0800)]
doc: clarify when writable.write callback is called

The current documentation for writable.write only specifies that the
callback is called "once the data has been fully handled".  It is
ambiguous whether this means "successfully handled" and, if so,
whether the callback is called if the data can not be successfully
handled (i.e. an error occurs).

The ambiguity is not only in the documentation.  The stream class
implementations differ on this point.  stream.Writable invokes the
callback with any errors that occur during parameter checking or
during calls to _write.  However, not all classes return all errors
to _write. zlib.Zlib does pass argument and state errors to the
_write (_transform) callback, but does not pass data errors.
http.OutgoingMessage passes argument type errors and some other types
of errors, but not all.

This inconsistency is behind issue #1746 and, I suspect, other issues
in client code which passes a callback to write.

This commit takes no position on whether the callback error behavior
should changed, but simply attempts to document the current behavior
in a way that is open to changes so that users are not caught by
surprise.

PR-URL: https://github.com/nodejs/node/pull/4810
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jeremy Whitlock <jwhitlock@apache.org>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
8 years agotest: move cluster tests to parallel
Rich Trott [Wed, 20 Jan 2016 03:54:35 +0000 (19:54 -0800)]
test: move cluster tests to parallel

Two cluster tests have recently changed so that they are no longer
resource intensive. Move them back to parallel.

Ref: https://github.com/nodejs/node/pull/4736
Ref: https://github.com/nodejs/node/pull/4739
PR-URL: https://github.com/nodejs/node/pull/4774
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
8 years agostream: prevent object map change in ReadableState
Evan Lucas [Tue, 19 Jan 2016 14:53:38 +0000 (08:53 -0600)]
stream: prevent object map change in ReadableState

ReadableState has the resumeScheduled property that helps determine if
a stream should be resumed. It was not assigned in the constructor.
When stream.resume is called on a readable stream that is not flowing,
it is set to true. This changes the property map of the ReadableState
which can cause a deopt in onEofChunk and needMoreData.

PR-URL: https://github.com/nodejs/node/pull/4761
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
8 years agosrc: return UV_EAI_NODATA on empty lookup
cjihrig [Fri, 15 Jan 2016 21:54:13 +0000 (16:54 -0500)]
src: return UV_EAI_NODATA on empty lookup

AfterGetAddrInfo() can potentially return an empty array of
results without setting an error value. The JavaScript layer
expects the array to have at least one value if an error is
not returned. This commit sets a UV_EAI_NODATA error when an
empty result array is detected.

Fixes: https://github.com/nodejs/node/issues/4545
PR-URL: https://github.com/nodejs/node/pull/4715
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
8 years agobuild: add option to select VS version
julien.waechter [Tue, 12 Jan 2016 08:21:46 +0000 (09:21 +0100)]
build: add option to select VS version

This changes vcbuild.bat to accept a new parameter (vc2015 or vc2013)
to select the version of Visual Studio to use.

PR-URL: https://github.com/nodejs/node/pull/4645
Reviewed-By: João Reis <reis@janeasystems.com>
8 years agodoc: add info to docs on how to submit docs patch
Sequoia McDowell [Fri, 8 Jan 2016 18:32:50 +0000 (13:32 -0500)]
doc: add info to docs on how to submit docs patch

The docs mentioned that the docs source live in
the node source, but did not link to same.

PR-URL: https://github.com/nodejs/node/pull/4591
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: James M Snell <jasnell@gmail.com>
8 years agodoc: add onboarding resources
Jeremiah Senkpiel [Mon, 9 Nov 2015 22:52:43 +0000 (17:52 -0500)]
doc: add onboarding resources

PR-URL: https://github.com/nodejs/node/pull/3726
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
8 years agolib: freelist: use .pop() for allocation
Anton Khlynovskiy [Tue, 26 Jan 2016 12:13:12 +0000 (15:13 +0300)]
lib: freelist: use .pop() for allocation

Array#pop() is known to be faster than Array#shift().
To be exact, it's O(1) vs. O(n). In this case there's no difference
from which side of the "pool" array the object is retrieved,
so .pop() should be preferred.

PR-URL: https://github.com/nodejs/node/pull/2174
Reviewed-By: mscdex - Brian White <mscdex@mscdex.net>
Reviewed-By: jasnell - James M Snell <jasnell@gmail.com>
Reviewed-By: ofrobots - Ali Ijaz Sheikh <ofrobots@google.com>
8 years agowin,build: support Visual C++ Build Tools 2015
João Reis [Wed, 9 Mar 2016 11:58:06 +0000 (11:58 +0000)]
win,build: support Visual C++ Build Tools 2015

Invoke MSBuild specifying the target platform as generated by Gyp.

Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/5627

8 years agodoc: update V8 URL
Craig Akimoto [Wed, 2 Mar 2016 19:16:24 +0000 (11:16 -0800)]
doc: update V8 URL

https://code.google.com/p/v8/ redirects to the V8 issue tracker

PR-URL: https://github.com/nodejs/node/pull/5530
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
8 years agodoc: document fs.datasync(Sync)
Ron Korving [Wed, 24 Feb 2016 03:41:05 +0000 (12:41 +0900)]
doc: document fs.datasync(Sync)

The APIs are implemented but currently not documented.

PR-URL: https://github.com/nodejs/node/pull/5402
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Rod Vagg <rod@vagg.org>
8 years agodoc: add Evan Lucas to the CTC
Rod Vagg [Wed, 17 Feb 2016 11:17:57 +0000 (22:17 +1100)]
doc: add Evan Lucas to the CTC

8 years agodoc: add Rich Trott to the CTC
Rod Vagg [Wed, 17 Feb 2016 11:19:01 +0000 (22:19 +1100)]
doc: add Rich Trott to the CTC

Approved at CTC meeting
https://github.com/nodejs/node/issues/5409
Reviewers are CTC members who voted for this.

PR-URL: https://github.com/nodejs/node/pull/5276
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Shigeki Ohtsu <ohtsu@iij.ad.jp>
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Alexis Campailla <alexis@janeasystems.com>
Reviewed-By: Chris Dickinson <chris@neversaw.us>
8 years agodoc: add Ali Ijaz Sheikh to the CTC
Rod Vagg [Wed, 17 Feb 2016 11:19:41 +0000 (22:19 +1100)]
doc: add Ali Ijaz Sheikh to the CTC

Approved at CTC meeting
https://github.com/nodejs/node/issues/5409
Reviewers are CTC members who voted for this.

PR-URL: https://github.com/nodejs/node/pull/5277
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Shigeki Ohtsu <ohtsu@iij.ad.jp>
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Alexis Campailla <alexis@janeasystems.com>
Reviewed-By: Chris Dickinson <chris@neversaw.us>
8 years agodoc: add Сковорода Никита Андреевич to the CTC
Rod Vagg [Wed, 17 Feb 2016 11:20:24 +0000 (22:20 +1100)]
doc: add Сковорода Никита Андреевич to the CTC

Approved at CTC meeting
https://github.com/nodejs/node/issues/5409
Reviewers are CTC members who voted for this.

PR-URL: https://github.com/nodejs/node/pull/5278
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Shigeki Ohtsu <ohtsu@iij.ad.jp>
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Alexis Campailla <alexis@janeasystems.com>
Reviewed-By: Chris Dickinson <chris@neversaw.us>
8 years agodoc: add "building node with ninja" guide
Jeremiah Senkpiel [Tue, 19 Jan 2016 20:24:42 +0000 (15:24 -0500)]
doc: add "building node with ninja" guide

PR-URL: https://github.com/nodejs/node/pull/4767
Refs: https://github.com/nodejs/docs/pull/38
Reviewed-By: Bryan English <bryan@bryanenglish.com>
Reviewed-By: Stephan Belanger <admin@stephenbelanger.com>
8 years agohttp,util: fix typos in comments
Alexander Makarenko [Wed, 17 Feb 2016 11:40:55 +0000 (14:40 +0300)]
http,util: fix typos in comments

Fix several typos in comments.

PR-URL: https://github.com/nodejs/node/pull/5279
Reviewed-By: James M Snell <jasnell@gmail.com>
8 years agodoc: clarify code of conduct reporting
Julie Pagano [Fri, 5 Feb 2016 20:33:31 +0000 (12:33 -0800)]
doc: clarify code of conduct reporting

Clarifies the code of conduct by making the following changes:

- Adds section headings to make it easier to quickly parse.
- Adds easy to find contact information.
- Adds link to TSC moderation policies.
- Moves attribution to the bottom of the page.

PR-URL: https://github.com/nodejs/node/pull/5107
Reviewed-By: Myles Borins <mborins@us.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Kat Marchán <kzm@sykosomatic.org>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
8 years agodoc: fix links in Addons docs
Alexander Makarenko [Thu, 4 Feb 2016 10:20:03 +0000 (13:20 +0300)]
doc: fix links in Addons docs

Put links in a lexical order. Add missing links. Remove duplicates.

PR-URL: https://github.com/nodejs/node/pull/5072
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
8 years agostream: fix no data on partial decode
Brian White [Sun, 14 Feb 2016 17:25:40 +0000 (12:25 -0500)]
stream: fix no data on partial decode

Before this commit, it was possible to push a partial character
to a readable stream where it was decoded as an empty string and
then added to the internal buffer. This caused the stream to not
emit any data, even when the rest of the character bytes were pushed
separately, because of a non-zero length check of the first chunk in
the internal buffer.

Fixes: https://github.com/nodejs/node/issues/5223
PR-URL: https://github.com/nodejs/node/pull/5226
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
8 years agoWorking on v4.4.1
Myles Borins [Wed, 9 Mar 2016 06:47:06 +0000 (22:47 -0800)]
Working on v4.4.1

PR-URL: https://github.com/nodejs/node/pull/5301

8 years ago2016-03-08, Version 4.4.0 'Argon' (LTS) v4.4.0
Myles Borins [Thu, 18 Feb 2016 16:54:32 +0000 (08:54 -0800)]
2016-03-08, Version 4.4.0 'Argon' (LTS)

In December we announced that we would be doing a minor release in order to
get a number of voted on SEMVER-MINOR changes into LTS. Our ability to release this
was delayed due to the unforeseen security release v4.3. We are quickly bumping to
v4.4 in order to bring you the features that we had committed to releasing.

This release also includes over 70 fixes to our docs and over 50 fixes to tests.

The SEMVER-MINOR changes include:
  * deps:
    - An update to v8 that introduces a new flag --perf_basic_prof_only_functions (Ali Ijaz Sheikh) https://github.com/nodejs/node/pull/3609
  * http:
    - A new feature in http(s) agent that catches errors on *keep alived* connections (José F. Romaniello) https://github.com/nodejs/node/pull/4482
  * src:
    - Better support for Big-Endian systems (Bryon Leung) https://github.com/nodejs/node/pull/3410
  * tls:
    - A new feature that allows you to pass common SSL options to `tls.createSecurePair` (Коренберг Марк) https://github.com/nodejs/node/pull/2441
  * tools
    - a new flag `--prof-process` which will execute the tick processor on the provided isolate files (Matt Loring) https://github.com/nodejs/node/pull/4021

Notable semver patch changes include:

  * buld:
    - Support python path that includes spaces. This should be of particular interest to our Windows users who may have python living in `c:/Program Files` (Felix Becker) https://github.com/nodejs/node/pull/4841
  * https:
    - A potential fix for https://github.com/nodejs/node/issues/3692 HTTP/HTTPS client requests throwing EPROTO (Fedor Indutny) https://github.com/nodejs/node/pull/4982
  * installer:
    - More readable profiling information from isolate tick logs (Matt Loring) https://github.com/nodejs/node/pull/3032
  * *npm:
    - upgrade to npm 2.14.20 (Kat Marchán) https://github.com/nodejs/node/pull/5510
  * process:
    - Add support for symbols in event emitters. Symbols didn't exist when it was written ¯\_(ツ)_/¯ (cjihrig) https://github.com/nodejs/node/pull/4798
  * querystring:
    - querystring.parse() is now 13-22% faster! (Brian White) https://github.com/nodejs/node/pull/4675
  * streams:
    - performance improvements for moving small buffers that shows a 5% throughput gain. IoT projects have been seen to be as much as 10% faster with this change! (Matteo Collina) https://github.com/nodejs/node/pull/4354
  * tools:
    - eslint has been updated to version 2.1.0 (Rich Trott) https://github.com/nodejs/node/pull/5214

PR-URL: https://github.com/nodejs/node/pull/5301

8 years agodeps: upgrade to npm 2.14.20
Kat Marchán [Tue, 1 Mar 2016 18:35:25 +0000 (10:35 -0800)]
deps: upgrade to npm 2.14.20

PR-URL: https://github.com/nodejs/node/pull/5510
Review-by: Myles Borins <mborins@us.ibm.com>
8 years agodoc: remove out-of-date matter from internal docs
Rich Trott [Wed, 24 Feb 2016 22:21:16 +0000 (14:21 -0800)]
doc: remove out-of-date matter from internal docs

Remove out-of-date stability index material from `tools/doc/README.md`.
The stability index is documented in `doc/api/documentation.markdown`.

PR-URL: https://github.com/nodejs/node/pull/5421
Reviewed-By: Evan Lucas <evanlucas@me.com>
8 years agodoc: explicit about VS 2015 support in readme
Phillip Johnsen [Wed, 24 Feb 2016 07:19:36 +0000 (08:19 +0100)]
doc: explicit about VS 2015 support in readme

`vcbuild.bat` already supports both Visual Studio 2013 and 2015.

PR-URL: https://github.com/nodejs/node/pull/5406
Reviewed-By: Alexis Campailla <orangemocha@nodejs.org>
Reviewed-By: Rod Vagg <rod@vagg.org>
8 years agodoc: copyedit util doc
Rich Trott [Tue, 23 Feb 2016 23:05:26 +0000 (15:05 -0800)]
doc: copyedit util doc

Add verbs to make sentence fragments less fragmentary.

PR-URL: https://github.com/nodejs/node/pull/5399
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
8 years agodoc: mention prototype check in deepStrictEqual()
cjihrig [Mon, 22 Feb 2016 17:26:32 +0000 (12:26 -0500)]
doc: mention prototype check in deepStrictEqual()

The docs for assert.deepStrictEqual() do not currently mention
that prototypes are compared for objects. This commit adds that
information to the documentation.

Fixes: https://github.com/nodejs/node/issues/5365
PR-URL: https://github.com/nodejs/node/pull/5367
Reviewed-By: Robert Lindstädt <robert.lindstaedt@gmail.com>
Reviewed-By: Benjamin Gruenbaum <inglor@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
8 years agodoc: s/http/https in Myles Borins' GitHub link
Rod Vagg [Mon, 22 Feb 2016 05:20:08 +0000 (16:20 +1100)]
doc: s/http/https in Myles Borins' GitHub link

PR-URL: https://github.com/nodejs/node/pull/5356
Reviewed-By: Myles Borins <myles.borins@gmail.com>
8 years agodoc: clarify error handling in net.createServer
Dirceu Pereira Tiegs [Sun, 21 Feb 2016 18:07:27 +0000 (15:07 -0300)]
doc: clarify error handling in net.createServer

Remove indications that an error argument is sent to the `listen()` callback.

Fixes: https://github.com/nodejs/node/issues/5345
PR-URL: https://github.com/nodejs/node/pull/5353
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
8 years agodoc: `require` behavior on case-insensitive systems
Hugo Wood [Fri, 19 Feb 2016 20:55:23 +0000 (21:55 +0100)]
doc: `require` behavior on case-insensitive systems

This adds a paragraph in the Module Caching Caveats section about the
behavior of require when Node is running on top of a file system (e.g.
HFS) or operating system (e.g. Windows) that will not consider the case
of file paths to find files.

Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Alexis Campailla <orangemocha@nodejs.org>
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Roman Reiss <me@silverwind.io>
8 years agotest: remove flaky mark for test-debug-no-context
Rich Trott [Fri, 19 Feb 2016 04:23:22 +0000 (20:23 -0800)]
test: remove flaky mark for test-debug-no-context

test-debug-no-context flakiness was worked around in issue 5269 but the
flaky designation was left for the test. This change removes it.

Refs: https://github.com/nodejs/node/pull/5269
PR-URL: https://github.com/nodejs/node/pull/5317
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
8 years agotest: add test for https server close event
Braydon Fuller [Fri, 5 Feb 2016 20:38:32 +0000 (15:38 -0500)]
test: add test for https server close event

PR-URL: https://github.com/nodejs/node/pull/5106
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Fedor Indutny <fedor@indutny.com>
8 years agotest: use String.prototype.repeat() for clarity
Rich Trott [Thu, 18 Feb 2016 23:01:12 +0000 (15:01 -0800)]
test: use String.prototype.repeat() for clarity

There are a few places where tests repeatedly concatenate strings to
themselves in order to make them very long. Using `.repeat()` makes the
code clearer.

For example, before:

    for (var i = 0; i < 8; ++i) lots_of_headers += lots_of_headers;

After:

    lots_of_headers = lots_of_headers.repeat(256);

Using `.repeat()` makes it clear that the string will be repeated 256
times rather than 8 times. ("What?! That first one doesn't repeat 256
times! It only repeats 8... Oh, wait. Yes, I see your point now.")

PR-URL: https://github.com/nodejs/node/pull/5311
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
8 years agodoc: update repo docs to use 'CTC'
Alexis Campailla [Thu, 18 Feb 2016 17:26:43 +0000 (18:26 +0100)]
doc: update repo docs to use 'CTC'

PR-URL: https://github.com/nodejs/node/pull/5304
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
8 years agotest: mitigate flaky test-debug-no-context
Rich Trott [Wed, 17 Feb 2016 03:59:56 +0000 (19:59 -0800)]
test: mitigate flaky test-debug-no-context

Change test so that it passes on the occasional win10 access violation.

The workaround here can be undone when issue 5268 is resolved.

The test still detects the defect it was written to detect. There are
two assertions that detect the defect and only one was disabled.

Ref: https://github.com/nodejs/node/issues/5268
Fixes: https://github.com/nodejs/node/issues/4343
PR-URL: https://github.com/nodejs/node/pull/5269
Reviewed-By: James M Snell <jasnell@gmail.com>
8 years agonet: use `_server` for internal book-keeping
Fedor Indutny [Tue, 16 Feb 2016 20:09:31 +0000 (15:09 -0500)]
net: use `_server` for internal book-keeping

The role of `this.server` is now split between `this._server` and
`this.server`. Where the first one is used for counting active
connections of `net.Server`, and the latter one is just a public API for
users' consumption.

The reasoning for this is simple, `TLSSocket` instances wrap
`net.Socket` instances, thus both refer to the `net.Server` through the
`this.server` property. However, only one of them should be used for
`net.Server` connection count book-keeping, otherwise double-decrement
will happen on socket destruction.

Fix: #5083
PR-URL: https://github.com/nodejs/node/pull/5262
Reviewed-By: James M Snell <jasnell@gmail.com>
8 years agodoc: improvements to crypto.markdown copy
Alexander Makarenko [Mon, 15 Feb 2016 00:40:53 +0000 (03:40 +0300)]
doc: improvements to crypto.markdown copy

Fix several typos. Add missing links.

PR-URL: https://github.com/nodejs/node/pull/5230
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Kelvin Knighton <keltheceo@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
8 years agoconsole: apply null as `this` for util.format
Jackson Tian [Sun, 14 Feb 2016 07:32:33 +0000 (15:32 +0800)]
console: apply null as `this` for util.format

Util.format is just a stateless function. Apply current console
as `this` is unnecessary.

PR-URL: https://github.com/nodejs/node/pull/5222
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
8 years agocluster: dont rely on `this` in `fork`
Igor Klopov [Sat, 13 Feb 2016 11:35:40 +0000 (06:35 -0500)]
cluster: dont rely on `this` in `fork`

PR-URL: https://github.com/nodejs/node/pull/5216
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
8 years agonode: set process._eventsCount to 0 on startup
Evan Lucas [Fri, 12 Feb 2016 21:14:42 +0000 (15:14 -0600)]
node: set process._eventsCount to 0 on startup

process is an EventEmitter. There are operations that increment and
decrement the _eventsCount property of an EventEmitter.
process._eventsCount would previously get set to NaN. This change makes
process._eventsCount be calculated as expected.

PR-URL: https://github.com/nodejs/node/pull/5208
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
8 years agobuild: treat aarch64 as arm64
Johan Bergström [Thu, 11 Feb 2016 02:57:20 +0000 (13:57 +1100)]
build: treat aarch64 as arm64

`Makefile` is now consistent with `configure` regarding
how we treat aarch64.

PR-URL: https://github.com/nodejs/node/pull/5191
Fixes: https://github.com/nodejs/node/issues/5175
Reviewed-By: Rod Vagg <r@va.gg>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
8 years agotls: nullify `.ssl` on handle close
Fedor Indutny [Tue, 9 Feb 2016 21:00:24 +0000 (16:00 -0500)]
tls: nullify `.ssl` on handle close

This is an intermediate fix for an issue of accessing `TLSWrap` fields
after the parent handle was destroyed. While `close` listener cleans up
this field automatically, it can be done even earlier at the
`TLSWrap.close` call.

Proper fix is going to be submitted and landed after this one.

Fix: #5108
PR-URL: https://github.com/nodejs/node/pull/5168
Reviewed-By: Shigeki Ohtsu <ohtsu@iij.ad.jp>
8 years agodebugger: assert test before accessing this.binding
Prince J Wesley [Mon, 8 Feb 2016 22:03:19 +0000 (03:33 +0530)]
debugger: assert test before accessing this.binding

PR-URL: https://github.com/nodejs/node/pull/5145
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
8 years agocrypto: have fixed NodeBIOs return EOF
Adam Langley [Fri, 5 Feb 2016 19:22:49 +0000 (11:22 -0800)]
crypto: have fixed NodeBIOs return EOF

Prior to this change, the NodeBIO objects used to wrap fixed data had
`num` equal to -1. This caused them to return -1 and set the retry flags
when they ran out of data. Since the data is fixed, that's incorrect.
Instead they should return zero to signal EOF.

This change adds a new, static function, NodeBIO::NewFixed to create a
BIO that wraps fixed data and which returns zero when exhausted.

The practical impact of this is limited since most (all?) the parsing
functions that these BIOs get passed to consider any return value less
than one to be EOF and ignore the retry flags anyway.

PR-URL: https://github.com/nodejs/node/pull/5105
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Fedor Indutny <fedor@indutny.com>
8 years agobuild: add a help message and removed a TODO.
Ojas Shirekar [Fri, 5 Feb 2016 05:10:53 +0000 (10:40 +0530)]
build: add a help message and removed a TODO.

Add a help message for --systemtap-includes
optparse.SUPPRESS_HELP was replaced by help message
and the TODO comment was removed

Refs: https://github.com/nodejs/node/issues/4607
PR-URL: https://github.com/nodejs/node/pull/5080
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Rich Trott <rtrott@gmail.com>
8 years agobuild: remove redundant TODO in configure
Ojas Shirekar [Fri, 5 Feb 2016 05:05:17 +0000 (10:35 +0530)]
build: remove redundant TODO in configure

Remove a redundant TODO in configure:
"# TODO(srl295): EBCDIC should be 'e'"
as there is no plan to support EBCDIC systems any time soon.

Refs: https://github.com/nodejs/node/issues/4607
PR-URL: https://github.com/nodejs/node/pull/5080
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Rich Trott <rtrott@gmail.com>
8 years agobuild: remove Makefile.build
Ojas Shirekar [Fri, 5 Feb 2016 05:02:48 +0000 (10:32 +0530)]
build: remove Makefile.build

Remove Makefile.build, as it is not really used by anyone.

Refs: https://github.com/nodejs/node/issues/4607
PR-URL: https://github.com/nodejs/node/pull/5080
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Rich Trott <rtrott@gmail.com>
8 years agotest: refactor test-dgram-send-callback-recursive
Santiago Gimeno [Thu, 4 Feb 2016 17:33:44 +0000 (18:33 +0100)]
test: refactor test-dgram-send-callback-recursive

Just send 10 messages recursively and check that the send calls are
asynchronous by asserting that a `setImmediate` callback has been called
in-between. It avoids a race condition in the test when the recursive
limit is reached without having received at least 10 messages.

Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/5079

8 years agodoc: link to man pages
dcposch@dcpos.ch [Thu, 4 Feb 2016 12:11:17 +0000 (04:11 -0800)]
doc: link to man pages

This changes the doc generator to automatically link references such as
`open(2)` to a man page on man7.org or freebsd.org

PR-URL: https://github.com/nodejs/node/pull/5073
Reviewed-By: Ben Noorhduis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
8 years agochild_process: fix data loss with readable event
Brian White [Tue, 2 Feb 2016 05:57:24 +0000 (00:57 -0500)]
child_process: fix data loss with readable event

This commit prevents child process stdio streams from being
automatically flushed on child process exit/close if a 'readable'
event handler has been attached at the time of exit.

Without this, child process stdio data can be lost if the process
exits quickly and a `read()` (e.g. from a 'readable' handler)
hasn't had the chance to get called yet.

Fixes: https://github.com/nodejs/node/issues/5034
PR-URL: https://github.com/nodejs/node/pull/5036
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
8 years agobuild: fix build when python path contains spaces
Felix Becker [Sun, 24 Jan 2016 16:01:07 +0000 (17:01 +0100)]
build: fix build when python path contains spaces

PR-URL: https://github.com/nodejs/node/pull/4841
Reviewed-By: Benjamin Gruenbaum <inglor@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
8 years agobuffer: allow encoding param to collapse
Trevor Norris [Thu, 21 Jan 2016 20:51:09 +0000 (13:51 -0700)]
buffer: allow encoding param to collapse

Currently the signature is indexOf(val[, byteOffset[, encoding]])
Instead allow indexOf(val[, byteOffset][, encoding])
so that byteOffset does not need to be passed.

PR-URL: https://github.com/nodejs/node/pull/4803
Reviewed-By: James M Snell <jasnell@gmail.com>
8 years agobuffer: properly retrieve binary length of needle
Trevor Norris [Thu, 21 Jan 2016 21:00:59 +0000 (14:00 -0700)]
buffer: properly retrieve binary length of needle

If the needle contains an extended latin-1 character then using
String::Utf8Length() will be too large and the search will return early.
Instead use String::Length() when encoding is BINARY.

PR-URL: https://github.com/nodejs/node/pull/4803
Reviewed-By: James M Snell <jasnell@gmail.com>
8 years agohttp: remove reference to onParserExecute
Tom Atkinson [Tue, 19 Jan 2016 22:16:55 +0000 (23:16 +0100)]
http: remove reference to onParserExecute

Parsers hold a reference to the socket associated with the request
through onParserExecute. This must be removed when the parser is
freed so that the socket can be garbage collected when destroyed.

Regression introduced in commit 59b91f1 ("http_parser: consume
StreamBase instance").

PR-URL: https://github.com/nodejs/node/pull/4773
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
8 years agostreams: 5% throughput gain when sending small chunks
Matteo Collina [Wed, 16 Dec 2015 08:39:11 +0000 (09:39 +0100)]
streams: 5% throughput gain when sending small chunks

Improves the performance when moving small buffers by 5%,
and it adds a benchmark to avoid regression in that area.
In all other cases it is equally performant to current master.

Full performance results available at:
https://gist.github.com/mcollina/717c35ad07d15710b6b9.

PR-URL: https://github.com/nodejs/node/pull/4354
Reviewed-By: James M Snell <jasnell@gmail.com>
8 years agohttp: do not emit `upgrade` on advertisement
Fedor Indutny [Thu, 17 Dec 2015 22:23:46 +0000 (17:23 -0500)]
http: do not emit `upgrade` on advertisement

Do not emit `upgrade` if the server is just advertising its protocols
support as per RFC 7230 Section 6.7.

    A server MAY send an Upgrade header field in any other response
    to advertise that it implements support for upgrading to the
    listed protocols, in order of descending preference, when
    appropriate for a future request.

Fix: https://github.com/nodejs/node/issues/4334
PR-URL: https://github.com/nodejs/node/pull/4337
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
8 years agotools: run tick processor without forking
Matt Loring [Wed, 9 Dec 2015 19:37:51 +0000 (11:37 -0800)]
tools: run tick processor without forking

Using the tick processor no longer creates temporary files or spawns a
child process.

PR-URL: https://github.com/nodejs/node/pull/4224
Reviewed-By: bnoordhuis - Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: jasnell - James M Snell <jasnell@gmail.com>
8 years agotools: add --prof-process flag to node binary
Matt Loring [Wed, 25 Nov 2015 14:08:58 +0000 (06:08 -0800)]
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>
8 years agoinstaller: install the tick processor
Matt Loring [Tue, 22 Sep 2015 18:53:56 +0000 (11:53 -0700)]
installer: install the tick processor

The tick processor is used to provide readable profiling information
from isolate tick logs (produced by a call to node -prof).

This patch installs the file at $PREFIX/share/doc/node/tick-processor.

PR-URL: https://github.com/nodejs/node/pull/3032
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
8 years agotools: replace obsolete ESLint rules
Rich Trott [Mon, 15 Feb 2016 16:10:36 +0000 (08:10 -0800)]
tools: replace obsolete ESLint rules

Now that we are using ESLint 2, replace ESLint 1 rules with their ESLint
2 equivalents.

PR-URL: https://github.com/nodejs/node/pull/5214
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: jbergstroem - Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
8 years agotools: update ESLint to version 2.1.0
Rich Trott [Mon, 15 Feb 2016 22:45:53 +0000 (14:45 -0800)]
tools: update ESLint to version 2.1.0

Update ESLint to 2.1.0. ESLint has a number of potentially-useful new
features but this change attempts to be minimal in its changes.
However, some things could not be avoided reasonably.

ESLint 2.1.0 found a few lint issues that ESLing 1.x missed with
template strings that did not take advantage of any features of
template strings, and `let` declarations where `const` sufficed.

Additionally, ESLint 2.1.0 removes some granularity around enabling ES6
features. Some features (e.g., spread operator) that had been turned off
in our configuration for ESLint 1.x are now permitted.

PR-URL: https://github.com/nodejs/node/pull/5214
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: jbergstroem - Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
8 years agotools: remove obsolete lint rules
Rich Trott [Sat, 13 Feb 2016 21:57:34 +0000 (13:57 -0800)]
tools: remove obsolete lint rules

We are about to upgrade from ESlint 1 to ESLint 2. Remove lint rules
that will not exist in ESLint 2.

PR-URL: https://github.com/nodejs/node/pull/5214
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: jbergstroem - Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
8 years agosrc,test,tools: modify for more stringent linting
Rich Trott [Mon, 15 Feb 2016 15:46:58 +0000 (07:46 -0800)]
src,test,tools: modify for more stringent linting

ESLint 2.1.0 is coming. Some lint rules have been tightened.

PR-URL: https://github.com/nodejs/node/pull/5214
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: jbergstroem - Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
8 years agodoc,tools,test: lint doc-based addon tests
Rich Trott [Thu, 25 Feb 2016 01:07:45 +0000 (17:07 -0800)]
doc,tools,test: lint doc-based addon tests

PR-URL: https://github.com/nodejs/node/pull/5427
Fixes: https://github.com/nodejs/node/issues/5424
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
8 years agodoc: clarify child_process.execFile{,Sync} file arg
Kevin Locke [Thu, 18 Feb 2016 21:26:26 +0000 (13:26 -0800)]
doc: clarify child_process.execFile{,Sync} file arg

The changes to the file argument of execFile in #4504 make it appear
that execFile requires an absolute or relative path to the executable
file, when it also supports a filename which will be resolved using
$PATH.  Although the example makes this clear, assuming there isn't a
node binary in $CWD, it's easy to overlook.  This commit clarifies that
point.

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

PR-URL: https://github.com/nodejs/node/pull/5310
Reviewed-By: James M Snell <jasnell@gmail.com>
8 years agodoc: fix buf.length slice example
Chinedu Francis Nwafili [Tue, 16 Feb 2016 14:42:29 +0000 (09:42 -0500)]
doc: fix buf.length slice example

Previously tried to reassign a const.

PR-URL: https://github.com/nodejs/node/pull/5259
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
8 years agodoc: fix buffer[index] example
Chinedu Francis Nwafili [Tue, 16 Feb 2016 02:28:24 +0000 (21:28 -0500)]
doc: fix buffer[index] example

PR-URL: https://github.com/nodejs/node/pull/5253
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
8 years agodoc: fix template string
Rafael Cepeda [Mon, 15 Feb 2016 15:49:00 +0000 (09:49 -0600)]
doc: fix template string

Template string was syntactically incorrect. Copied Documentation code
would throw an error.

PR-URL: https://github.com/nodejs/node/pull/5240
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
8 years agodoc: improvements to console.markdown copy
Alexander Makarenko [Sun, 14 Feb 2016 17:01:45 +0000 (20:01 +0300)]
doc: improvements to console.markdown copy

Fix missing links. Fix styling of printf() - once #5073 lands,
link to man page will be auto-generated. Fix several typos.

PR-URL: https://github.com/nodejs/node/pull/5225
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: James M Snell <jasnell@gmail.com>
8 years agodoc: fix net.createConnection() example
Brian White [Sat, 13 Feb 2016 20:40:00 +0000 (15:40 -0500)]
doc: fix net.createConnection() example

PR-URL: https://github.com/nodejs/node/pull/5219
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
8 years agodoc: improve scrolling, various CSS tweaks
Roman Reiss [Thu, 11 Feb 2016 19:11:09 +0000 (20:11 +0100)]
doc: improve scrolling, various CSS tweaks

- Made scrolling of the sidebar not affect the main page by using a combination
  of overflow:hidden and overflow:scroll.
- Changed the scrollbar of the sidebar to be visible again for accessibilty
  reasons and removed the indication gradient because it was causing too much
  issues.
- In WebKit-based browsers, the scrollbar received custom styling making it
  appear to be outside of the sidebar.
- The main content is no longer limited to 702px width, but now uses all
  available space.
- Changed the background of the code blocks to a very similar, but neutral
  color and made inline blocks the same color.
- Made inline code blocks inside italic sections not italic.
- Simplified styling of api_stability classes by introducing a common class
  name for the stability levels.
- Fixed various issues related to the green hover background on links.
- Fixed code box overflow outside the main content area.
- Various minor tweaks to paddings and margins.
- Cleaned up numbers in the stylesheet, removing unnecessary units, decimals
  and empty selectors.

PR-URL: https://github.com/nodejs/node/pull/5198
Reviewed-By: James M Snell <jasnell@gmail.com>
8 years agodoc: console is asynchronous unless it's a file
Ben Noordhuis [Sun, 7 Feb 2016 22:15:03 +0000 (23:15 +0100)]
doc: console is asynchronous unless it's a file

Mea culpa, looks like I forgot to update console.markdown in commit
dac1d38 ("doc: stdout/stderr can block when directed to file").
This commit rectifies that.

Refs: https://github.com/nodejs/node/issues/5131
PR-URL: https://github.com/nodejs/node/pull/5133
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Evan Lucas <evanlucas@me.com>
8 years agodoc: merging behavior of writeHead vs setHeader
Alejandro Oviedo [Fri, 5 Feb 2016 13:48:41 +0000 (10:48 -0300)]
doc: merging behavior of writeHead vs setHeader

PR-URL: https://github.com/nodejs/node/pull/5081
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
8 years agodoc: fix reference to API `hash.final`
Minwoo Jung [Wed, 3 Feb 2016 02:44:22 +0000 (11:44 +0900)]
doc: fix reference to API `hash.final`

fix a reference to a non-existent API, `hash.final()`.
It should be `hash.digest()`.

PR-URL: https://github.com/nodejs/node/pull/5050
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
8 years agodoc: uppercase 'RSA-SHA256' in crypto.markdown
Rainer Oviir [Tue, 2 Feb 2016 19:11:07 +0000 (11:11 -0800)]
doc: uppercase 'RSA-SHA256' in crypto.markdown

Fixes: https://github.com/nodejs/node/issues/5031
PR-URL: https://github.com/nodejs/node/pull/5044
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
8 years agodoc: consistent styling for functions in TLS docs
Alexander Makarenko [Sun, 31 Jan 2016 12:51:08 +0000 (15:51 +0300)]
doc: consistent styling for functions in TLS docs

Provide links for functions where needed and fix function links style.

PR-URL: https://github.com/nodejs/node/pull/5000
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Roman Klauke <romaaan.git@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
8 years agodoc: apply consistent styling for functions
Rich Trott [Sat, 30 Jan 2016 19:12:55 +0000 (11:12 -0800)]
doc: apply consistent styling for functions

Always refer to (for example) `assert.deepEqual()` as
`assert.deepEqual()` and never as `assert.deepEqual`.

PR-URL: https://github.com/nodejs/node/pull/4974
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
8 years agodoc: fix `notDeepEqual` API
Minwoo Jung [Sat, 30 Jan 2016 15:47:14 +0000 (00:47 +0900)]
doc: fix `notDeepEqual` API

API calls in `assert` are `deepEqual()`, not `notDeepEqual()`.
use `notDeepEqual` to make it clear.

PR-URL: https://github.com/nodejs/node/pull/4971
Reviewed-By: Rich Trott <rtrott@gmail.com>
8 years agotest: refactor test-http-destroyed-socket-write2
Santiago Gimeno [Sat, 30 Jan 2016 10:00:20 +0000 (11:00 +0100)]
test: refactor test-http-destroyed-socket-write2

Remove the limit of requests to be sent (128) as in some conditions it
was reached without the `error` event being fired, causing the test to
fail.

Remove the initial timeout.

Remove some variables used to check the validity of the test and replace
them with `common.mustCall` and `common.fail` calls.

PR-URL: https://github.com/nodejs/node/pull/4970
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Roman Klauke <romaaan.git@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
8 years agodoc: show links consistently in deprecations
Sakthipriyan Vairamani [Wed, 27 Jan 2016 13:49:05 +0000 (19:19 +0530)]
doc: show links consistently in deprecations

PR-URL: https://github.com/nodejs/node/pull/4907
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: James M Snell <jasnell@gmail.com>
8 years agodoc: don't use "interface" as a variable name
ChALkeR [Wed, 27 Jan 2016 09:48:36 +0000 (12:48 +0300)]
doc: don't use "interface" as a variable name

In readline.markdown, don't use strict mode reserved keyword "interface"
as a variable name.

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

PR-URL: https://github.com/nodejs/node/pull/4900
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Minwoo Jung <jmwsoft@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
8 years agodoc: keep the names in sorted order
Sakthipriyan Vairamani [Tue, 26 Jan 2016 06:14:10 +0000 (11:44 +0530)]
doc: keep the names in sorted order

1. The release team's names were not in the sorted order and

2. the old list of releasers' names were not in bold

This patch fixes both of these issues

PR-URL: https://github.com/nodejs/node/pull/4876
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Roman Klauke <romaaan.git@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
8 years agodoc: fix JSON generation for aliased methods
Timothy Gu [Tue, 26 Jan 2016 03:56:21 +0000 (19:56 -0800)]
doc: fix JSON generation for aliased methods

Currently assert/assert.ok currently has the following signature:

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

The heading reads

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

Split them into two sections to make it working.

PR-URL: https://github.com/nodejs/node/pull/4871
Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
8 years agodoc: fix code type of markdowns
Jackson Tian [Mon, 25 Jan 2016 14:28:43 +0000 (22:28 +0800)]
doc: fix code type of markdowns

1. correct code type in addons.markdown
2. add missed code type in crypto.markdown

PR-URL: https://github.com/nodejs/node/pull/4858
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Roman Klauke <romaaan.git@gmail.com>
8 years agodoc: check for errors in 'listen' event
Benjamin Gruenbaum [Sun, 24 Jan 2016 09:35:35 +0000 (11:35 +0200)]
doc: check for errors in 'listen' event

In the docs we typically check for errors and surface them. This
is IMO a good idea and good practice. This PR adds a check for
errors in three places in the `net` docs where it was missing.

PR-URL: https://github.com/nodejs/node/pull/4834
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Roman Klauke <romaaan.git@gmail.com>>
8 years agodoc: Examples work when data exceeds buffer size
Glen Arrowsmith [Fri, 22 Jan 2016 02:04:39 +0000 (12:04 +1000)]
doc: Examples work when data exceeds buffer size

PR-URL: https://github.com/nodejs/node/pull/4811
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Shigeki Ohtsu <ohtsu@iij.ad.jp>
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
8 years agodoc: harmonize $ node command line notation
Robert Jefe Lindstaedt [Thu, 21 Jan 2016 22:21:22 +0000 (23:21 +0100)]
doc: harmonize $ node command line notation

PR-URL: https://github.com/nodejs/node/pull/4806
Reviewed-By: Stephan Belanger <admin@stephenbelanger.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
8 years agotest: shorten path for bogus socket
Rich Trott [Wed, 30 Dec 2015 07:09:25 +0000 (23:09 -0800)]
test: shorten path for bogus socket

This fixes CI failures for test-net-pipe-connect-errors on Raspberry Pi
devices.

PR-URL: https://github.com/nodejs/node/pull/4478
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: James M Snell <jasnell@gmail.com>
8 years agotools,doc: fix linting errors
Rich Trott [Tue, 9 Feb 2016 17:37:13 +0000 (09:37 -0800)]
tools,doc: fix linting errors

Refs: https://github.com/nodejs/node/pull/4741#issuecomment-181973382
PR-URL: https://github.com/nodejs/node/pull/5161
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Myles Borins <myles.borins@gmail.com>