platform/upstream/nodejs.git
8 years agodoc: document unspecified behavior for buf.write* methods
James M Snell [Sun, 27 Mar 2016 15:34:13 +0000 (08:34 -0700)]
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>
8 years agobuild: introduce ci targets for lint/benchmark
Johan Bergström [Sun, 27 Mar 2016 06:12:47 +0000 (17:12 +1100)]
build: introduce ci targets for lint/benchmark

Introduce two new targets we will populate with actions
once merged into all branches we need to support through CI.

PR-URL: https://github.com/nodejs/node/pull/5921
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: João Reis <reis@janeasystems.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
8 years agotest: add known_issues test for GH-2148
Rich Trott [Sun, 27 Mar 2016 02:33:48 +0000 (19:33 -0700)]
test: add known_issues test for GH-2148

PR-URL: https://github.com/nodejs/node/pull/5920
Refs: https://github.com/nodejs/node/issues/2148
Reviewed-By: Brian White <mscdex@mscdex.net>
8 years agobuild: add missing `openssl_fips%` to common.gypi
Fedor Indutny [Sun, 27 Mar 2016 00:23:07 +0000 (20:23 -0400)]
build: add missing `openssl_fips%` to common.gypi

See: atom/node@cba512d493d968afb203e28ed01e8d345fc9c9f4

PR-URL: https://github.com/nodejs/node/pull/5919
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
8 years agotest: ensure _handle property existence
Rich Trott [Sat, 26 Mar 2016 22:26:15 +0000 (15:26 -0700)]
test: ensure _handle property existence

`test-stdtout-close-unref.js` will fail if `process.stdin._handle` does
not exist. On UNIX-like operating systems, you can see this failure this
way:

    ./node test/parallel/test-stdout-close-unref.js < /dev/null

This issue has been experienced by @bengl and @drewfish in a Docker
container. I'm not sure why they are experiencing it in their
environment, but since it is possible that the `_handle` property does
not exist, let's use `child_process.spawn()` to make sure it exists.

PR-URL: https://github.com/nodejs/node/pull/5916
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
8 years agodoc: fix scrolling on iOS devices
Luigi Pinca [Wed, 23 Mar 2016 18:45:35 +0000 (19:45 +0100)]
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>
8 years agoquerystring: don't stringify bad surrogate pair
Brian White [Wed, 23 Mar 2016 08:45:46 +0000 (04:45 -0400)]
querystring: don't stringify bad surrogate pair

Fixes: https://github.com/nodejs/node/issues/3702
PR-URL: https://github.com/nodejs/node/pull/5858
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
8 years agodoc: path.format provide more examples
John Eversole [Tue, 22 Mar 2016 01:20:16 +0000 (18:20 -0700)]
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>
8 years agotest: fix flaky test-repl
Brian White [Fri, 25 Mar 2016 18:31:57 +0000 (14:31 -0400)]
test: fix flaky test-repl

PR-URL: https://github.com/nodejs/node/pull/5914
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
8 years agotest: move dns test to test/internet
Ben Noordhuis [Fri, 25 Mar 2016 17:40:09 +0000 (18:40 +0100)]
test: move dns test to test/internet

parallel/test-dns-cares-domains needs a working internet connection
to function (or a local DNS resolver that returns an answer quickly),
otherwise it times out.  Move it to test/internet.

PR-URL: https://github.com/nodejs/node/pull/5905
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
8 years agotest: fix flaky test-net-socket-timeout
Brian White [Thu, 24 Mar 2016 22:05:48 +0000 (18:05 -0400)]
test: fix flaky test-net-socket-timeout

Fixes: https://github.com/nodejs/node/issues/5892
PR-URL: https://github.com/nodejs/node/pull/5902
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
8 years agodoc: fix doc for Buffer.readInt32LE()
ghaiklor [Thu, 24 Mar 2016 18:45:43 +0000 (20:45 +0200)]
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>
8 years agochild_process: refactor self=this in socket_list
Benjamin Gruenbaum [Wed, 23 Mar 2016 09:49:12 +0000 (11:49 +0200)]
child_process: refactor self=this in socket_list

The socket list module (used by child_process) currently uses the
`var self = this;` pattern for context in several places, this PR
replaces this with arrow functions or passing a parameter in where
appropriate.

Note that the `var self = this` in the _request is intentioanlly
left in place since it is not trivial to refactor it and the current
pattern isn't bad given the use case.

PR-URL: https://github.com/nodejs/node/pull/5860
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
8 years agotest: fix flaky test-http-set-timeout
Rich Trott [Wed, 23 Mar 2016 03:12:45 +0000 (20:12 -0700)]
test: fix flaky test-http-set-timeout

Increase timeout on Raspberry Pi to alleviate flakiness.

Fixes: https://github.com/nodejs/node/issues/5854
PR-URL: https://github.com/nodejs/node/pull/5856
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
8 years agotest: fix test-debugger-client.js
Rich Trott [Tue, 22 Mar 2016 22:11:53 +0000 (15:11 -0700)]
test: fix test-debugger-client.js

Fix long-broken test-debugger-client by adding missing `\r\n\r\n`
separator.

PR-URL: https://github.com/nodejs/node/pull/5851
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
8 years agodns: Use object without protoype for map
Benjamin Gruenbaum [Tue, 22 Mar 2016 13:40:36 +0000 (15:40 +0200)]
dns: Use object without protoype for map

Currently we use `{}` for the `lookup` function to find the relevant
resolver to the dns.resolve function. It is preferable to use an
object without a Object.prototype, currently for example you can do
something like:

```js
dns.resolve("google.com", "toString", console.log);
```

And get `[Object undefined]` logged and the callback would never be
called. This is unexpected and strange behavior in my opinion.
In addition, if someone adds a property to `Object.prototype` might
also create unexpected results.

This pull request fixes it, with it an appropriate error is thrown.

PR-URL: https://github.com/nodejs/node/pull/5843
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
8 years agodoc: consolidate timers docs in timers.markdown
Bryan English [Mon, 21 Mar 2016 23:03:41 +0000 (16:03 -0700)]
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>
8 years agolib: refactor code with startsWith/endsWith
Jackson Tian [Thu, 17 Mar 2016 04:23:52 +0000 (12:23 +0800)]
lib: refactor code with startsWith/endsWith

reduce using RegExp for string test. This pull reuqest replaces
various usages of regular expressions in favor of the ES2015
startsWith and endsWith methods.

PR-URL: https://github.com/nodejs/node/pull/5753
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
8 years agoetw: fix descriptors of events 9 and 23
João Reis [Wed, 16 Mar 2016 16:31:18 +0000 (16:31 +0000)]
etw: fix descriptors of events 9 and 23

Event 9 must include the string terminator in the last descriptor.
Event 23 must be published with no descriptors, in accordance with
the manifest.

PR-URL: https://github.com/nodejs/node/pull/5742
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
8 years agodeps: backport 8d00c2c from v8 upstream
Ben Noordhuis [Sun, 6 Mar 2016 11:12:22 +0000 (12:12 +0100)]
deps: backport 8d00c2c from v8 upstream

Original commit message:

    Unbreak --gdbjit for embedders.

    Embedders don't use d8.cc.  Move gdbjit initialization to api.cc.

    Review URL: https://codereview.chromium.org/1710253002

Fixes: https://github.com/nodejs/node/issues/2076
PR-URL: https://github.com/nodejs/node/pull/5577
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
8 years agometa: add "joining a wg" section to WORKING_GROUPS.md
Matteo Collina [Mon, 29 Feb 2016 11:13:22 +0000 (12:13 +0100)]
meta: add "joining a wg" section to WORKING_GROUPS.md

In the WORKING_GROUPS.md documentation, it is described how to start a
wg, but not how to join an existing wg. This commit addresses that
issue.

Fixes: https://github.com/nodejs/node/issues/5448
PR-URL: https://github.com/nodejs/node/pull/5488
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: James M Snell <jasnell@gmail.com>
8 years agodoc: refine child_process detach behaviour
Robert Jefe Lindstaedt [Fri, 19 Feb 2016 20:17:24 +0000 (21:17 +0100)]
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>
8 years agofs: Remove unused branches
Benjamin Gruenbaum [Tue, 22 Mar 2016 10:11:40 +0000 (12:11 +0200)]
fs: Remove unused branches

a few places the code was refactored to use `maybeCallback` which
always returns a function. Checking for `if (callback)` always
returns true anyway.

PR-URL: https://github.com/nodejs/node/pull/5289
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: thefourtheye <thechargingvolcano@gmail.com>
8 years agodoc: add topic - event loop, timers, `nextTick()`
Jeff Harris [Fri, 8 Apr 2016 18:11:58 +0000 (11:11 -0700)]
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>
8 years agotest: ensure win32.isAbsolute() is consistent
Brian White [Sun, 3 Apr 2016 12:37:04 +0000 (08:37 -0400)]
test: ensure win32.isAbsolute() is consistent

Adds test cases to ensure win32.isAbsolute is consistent.

This is a backport from 3072546feb

Refs: https://github.com/nodejs/node/pull/6028
PR-URL: https://github.com/nodejs/node/pull/6043
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Roman Reiss <me@silverwind.io>
8 years agosrc,tools: use template literals
Rich Trott [Fri, 18 Mar 2016 05:04:22 +0000 (22:04 -0700)]
src,tools: use template literals

Convert string concatenation to template literals. Enforce with lint
rule.

PR-URL: https://github.com/nodejs/node/pull/5778
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
8 years agodeps: completely upgrade npm in LTS to 2.15.1
Forrest L Norvell [Fri, 1 Apr 2016 21:54:05 +0000 (14:54 -0700)]
deps: completely upgrade npm in LTS to 2.15.1

PR-URL: https://github.com/nodejs/node/pull/5989
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
8 years agoWorking on v4.4.3
Myles Borins [Fri, 1 Apr 2016 01:30:49 +0000 (18:30 -0700)]
Working on v4.4.3

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

8 years ago2016-03-31, Version v4.4.2 'Argon' (LTS) v4.4.2
Myles Borins [Wed, 30 Mar 2016 20:30:51 +0000 (13:30 -0700)]
2016-03-31, Version v4.4.2 'Argon' (LTS)

Notable Changes

* https:
  - Under certain conditions ssl sockets may have been causing a memory
  leak when keepalive is enabled. This is no longer the case.
    - (Alexander Penev) https://github.com/nodejs/node/pull/5713

* lib:
  - The way that we were internally passing arguments was causing a
  potential leak. By copying the arguments into an array we can avoid this
    - (Nathan Woltman) https://github.com/nodejs/node/pull/4361

* npm:
  - Upgrade to v2.15.1. Fixes a security flaw in the use of authentication
  tokens in HTTP requests that would allow an attacker to set up a server
  that could collect tokens from users of the command-line interface.
  Authentication tokens have previously been sent with every request made
  by the CLI for logged-in users, regardless of the destination of the
  request. This update fixes this by only including those tokens for
  requests made against the registry or registries used for the current
  install. (Forrest L Norvell)

* repl:
  - Previously if you were using the repl in strict mode the column number
  would be wrong in a stack trace. This is no longer an issue.
    - (Prince J Wesley) https://github.com/nodejs/node/pull/5416

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

8 years agodoc: typo: interal->internal.
Corey Kosak [Tue, 22 Mar 2016 21:18:02 +0000 (17:18 -0400)]
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>
8 years agoAdd @mhdawson back to the CTC
James M Snell [Wed, 9 Mar 2016 21:05:09 +0000 (13:05 -0800)]
Add @mhdawson back to the CTC

Now that the CTC has expanded, this PR calls for a vote of the CTC
to reinstate Michael Dawson (@mhdawson) as a full voting member.

Voted on and approved by the CTC on 2016-03-23

PR-URL: https://github.com/nodejs/node/pull/5633
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Alexis Campailla <orangemocha@nodejs.org>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
8 years agodoc: add instructions to only sign a release
Jeremiah Senkpiel [Wed, 23 Mar 2016 18:47:12 +0000 (14:47 -0400)]
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>
8 years agodeps: upgrade npm in LTS to 2.15.1
Forrest L Norvell [Wed, 30 Mar 2016 05:43:40 +0000 (22:43 -0700)]
deps: upgrade npm in LTS to 2.15.1

PR-URL: https://github.com/npm/node/pull/5
Reviewed-By: Myles Borins <mborins@us.ibm.com>
8 years agodoc: grammar, clarity and links in timers doc
Bryan English [Fri, 18 Mar 2016 20:00:20 +0000 (13:00 -0700)]
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>
8 years agobuffer: changing let in for loops back to var
Gareth Ellis [Mon, 21 Mar 2016 09:46:42 +0000 (09:46 +0000)]
buffer: changing let in for loops back to var

Using let in for loops showed a regression in 4.4.0. @ofrobots
suggested that we avoid using let in for loops until TurboFan becomes
the default optimiser.

The regression that was detected was when looking at how long it took
to create a new buffer from an array of data.

When using `for (let i=0; i<length; i++) ` we saw the operation take
almost 40% longer compared to `var i=0`.

PR-URL: https://github.com/nodejs/node/pull/5819
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Trevor Norris <trevnorris@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Ref: http://github.com/nodejs/benchmarking/issues/38

8 years agodoc: fix order of end tags of list after heading
firedfox [Thu, 3 Mar 2016 08:18:09 +0000 (16:18 +0800)]
doc: fix order of end tags of list after heading

Current html result of a list after heading is <div
class="signature"><ul>...</div></ul>. Correct it to <div
class="signature"><ul>...</ul></div>.

PR-URL: https://github.com/nodejs/node/pull/5874
Fixes: https://github.com/nodejs/node/issues/5873
Reviewed-By: Roman Reiss <me@silverwind.io>
8 years agodoc: use consistent event name parameter
Benjamin Gruenbaum [Tue, 22 Mar 2016 21:21:46 +0000 (23:21 +0200)]
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>
8 years agotest: fix `test-cluster-worker-kill`
Santiago Gimeno [Sun, 20 Mar 2016 20:11:36 +0000 (21:11 +0100)]
test: fix `test-cluster-worker-kill`

Don't check that the `disconnect` event is emitted before the `exit`
event as the order is not guaranteed.

PR-URL: https://github.com/nodejs/node/pull/5814
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
8 years agotest: smaller chunk size for smaller person.jpg
Jérémy Lal [Sun, 20 Mar 2016 14:16:10 +0000 (15:16 +0100)]
test: smaller chunk size for smaller person.jpg

PR-URL: https://github.com/nodejs/node/pull/5813
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
8 years agotest: strip non-free icc profile from person.jpg
Jérémy Lal [Sun, 20 Mar 2016 14:15:13 +0000 (15:15 +0100)]
test: strip non-free icc profile from person.jpg

Fixes: https://github.com/nodejs/node/issues/5749
PR-URL: https://github.com/nodejs/node/pull/5813
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
8 years agodoc: explain error message on missing main file
Wolfgang Steiner [Sun, 20 Mar 2016 18:29:36 +0000 (19:29 +0100)]
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>
8 years agodns: use template literals
Benjamin Gruenbaum [Sun, 20 Mar 2016 13:13:51 +0000 (15:13 +0200)]
dns: use template literals

Prefer the use of template string literals over string concatenation
in the dns module, makes dns consistent with other modules basically
doing https://github.com/nodejs/node/pull/5778 for it.

PR-URL: https://github.com/nodejs/node/pull/5809
Reviewed-By: James M Snell <jasnell@gmail.com>
8 years agotest: fix flaky test-cluster-shared-leak
Claudio Rodriguez [Sat, 19 Mar 2016 18:03:14 +0000 (15:03 -0300)]
test: fix flaky test-cluster-shared-leak

Test was flaky on centos7-64 due to an uncaught ECONNRESET
on the worker code. This catches the error so the process
will exit with code 0.

Fixes: https://github.com/nodejs/node/issues/5604
PR-URL: https://github.com/nodejs/node/pull/5802
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
8 years agodoc: explain path.format expected properties
John Eversole [Sat, 19 Mar 2016 16:59:15 +0000 (09:59 -0700)]
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>
8 years agotest: make test-net-connect-options-ipv6.js better
Michael Dawson [Fri, 18 Mar 2016 19:57:55 +0000 (15:57 -0400)]
test: make test-net-connect-options-ipv6.js better

Improve the robustness of test-net-connect-options-ipv6.js

PPC Suse build team encountered intermittent failures related
to dns.  Improve test to make it more robust in the face
of intermittent dns issues.

PR-URL: https://github.com/nodejs/node/pull/5791
Reviewed-By: James M Snell <jasnell@gmail.com>
8 years agodoc: add a cli options doc page
Jeremiah Senkpiel [Fri, 18 Mar 2016 17:26:41 +0000 (13:26 -0400)]
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>
8 years agotools: remove unused imports
Sakthipriyan Vairamani [Thu, 17 Mar 2016 18:31:19 +0000 (00:01 +0530)]
tools: remove unused imports

PR-URL: https://github.com/nodejs/node/pull/5765
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
8 years agotest: remove the use of curl in the test suite
Santiago Gimeno [Wed, 16 Mar 2016 22:21:11 +0000 (23:21 +0100)]
test: remove the use of curl in the test suite

There were 2 tests using curl:

`test-http-304.js` is removed because it was initially included to test
that the 304 response does not contain a body, and this is already
covered by `test-http-chunked-304.js`.

`test-http-curl-chunk-problem` has been renamed and refactored so
instead of using curl, it uses 2 child node processes: one for sending
the HTTP request and the other to calculate the sha1sum. Originally,
this test was introduced to fix a bug in `nodejs@0.2.x`, and it was not
fixed until `nodejs@0.2.5`. A modified version of this test has been run
with `nodejs@0.2.0` and reproduces the problem. This same test has been
run with `nodejs@0.2.6` and runs correctly.

Fixes: https://github.com/nodejs/node/issues/5174
PR-URL: https://github.com/nodejs/node/pull/5750
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
8 years agotest: minimize test-http-get-pipeline-problem
Rich Trott [Tue, 15 Mar 2016 22:19:32 +0000 (15:19 -0700)]
test: minimize test-http-get-pipeline-problem

Reduce resoures required by test.

Clarify comment explaining source of test and what the test is looking
for.

Fixes: https://github.com/nodejs/node/issues/5725
PR-URL: https://github.com/nodejs/node/pull/5728
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
8 years agohttps: fix ssl socket leak when keepalive is used
Alexander Penev [Mon, 14 Mar 2016 15:56:02 +0000 (17:56 +0200)]
https: fix ssl socket leak when keepalive is used

SSL sockets leak whenever keep alive is enabled, ca option is set in
the global agent, and requests are sent without the ca property.
In the following case at Agent.prototype.createSocket a socket will
be created with a hashtag name that includes data from the global
agents’ ca property.

On subsequent requests at Agent.prototype.addRequest we do not find
the free socket, because the hashtag name generated there does not
take into account the global agents’ ca property, thus creating a new
socket and leaving the first socket to timeout. closes: #5699

PR-URL: https://github.com/nodejs/node/pull/5713
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
8 years agodoc: fix multiline return comments in querystring
Claudio Rodriguez [Mon, 14 Mar 2016 21:48:26 +0000 (18:48 -0300)]
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>
8 years agodoc: Add windows example for Path.format
Mithun Patel [Mon, 14 Mar 2016 15:50:50 +0000 (10:50 -0500)]
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>
8 years agotest: add batch of known issue tests
cjihrig [Fri, 11 Mar 2016 02:08:35 +0000 (21:08 -0500)]
test: add batch of known issue tests

This commit adds tests for several known issues.

Refs: https://github.com/nodejs/node/issues/1901
Refs: https://github.com/nodejs/node/issues/728
Refs: https://github.com/nodejs/node/issues/4778
Refs: https://github.com/nodejs/node/issues/947
Refs: https://github.com/nodejs/node/issues/2734
PR-URL: https://github.com/nodejs/node/pull/5653
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
8 years agoconsole: check that stderr is writable
Rich Trott [Wed, 9 Mar 2016 23:26:34 +0000 (15:26 -0800)]
console: check that stderr is writable

`Console` constructor checks that `stdout.write()` is a function but
does not do an equivalent check for `stderr.write()`. If `stderr` is not
specified in the constructor, then `stderr` is set to be `stdout`.
However, if `stderr` is specified, but `stderr.write()` is not a
function, then an exception is not thrown until `console.error()` is
called.

This change adds the same check for 'stderr' in the constructor that is
there for `stdout`. If `stderr` fails the check, then a `TypeError` is
thrown.

Took the opportunity to copyedit the `console` doc a little too.

PR-URL: https://github.com/nodejs/node/pull/5635
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
8 years agodeps: remove unused openssl files
Ben Noordhuis [Tue, 8 Mar 2016 22:21:50 +0000 (23:21 +0100)]
deps: remove unused openssl files

Refs: https://github.com/nodejs/node/issues/5615
PR-URL: https://github.com/nodejs/node/pull/5619
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: Rod Vagg <rod@vagg.org>
8 years agotest: improve test-npm-install
Santiago Gimeno [Tue, 8 Mar 2016 23:59:59 +0000 (00:59 +0100)]
test: improve test-npm-install

Make npm install a dependency that is defined as a relative path, so it
avoids any network interaction.

PR-URL: https://github.com/nodejs/node/pull/5613
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Claudio Rodriguez <cjrodr@yahoo.com>
8 years agotest: add test-npm-install to parallel tests suite
Myles Borins [Tue, 9 Feb 2016 18:32:32 +0000 (10:32 -0800)]
test: add test-npm-install to parallel tests suite

Currently we are not testing that `npm install` works.

This is a very naive / basic test that shells out to `npm install`
in an empty `tempDir`. While this test will not be able to check
that `npm install` is 100% working, it should catch certain edge
cases that break it.

PR-URL: https://github.com/nodejs/node/pull/5166
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Alexis Campailla <orangemocha@nodejs.org>
8 years agotest: repl tab completion test
Santiago Gimeno [Wed, 2 Mar 2016 20:59:17 +0000 (21:59 +0100)]
test: repl tab completion test

It checks that `eval` is called with `.scope` as an input string.

PR-URL: https://github.com/nodejs/node/pull/5534
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
8 years agodoc: update crypto docs to use good defaults
Bill Automata [Tue, 1 Mar 2016 17:26:32 +0000 (09:26 -0800)]
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>
8 years agodoc: fix crypto update() signatures
Brian White [Tue, 1 Mar 2016 02:03:14 +0000 (21:03 -0500)]
doc: fix crypto update() signatures

PR-URL: https://github.com/nodejs/node/pull/5500
Reviewed-By: Shigeki Ohtsu <ohtsu@iij.ad.jp>
8 years agonet: make `isIPv4` and `isIPv6` more efficient
Vladimir Kurchatkin [Sun, 28 Feb 2016 16:44:39 +0000 (19:44 +0300)]
net: make `isIPv4` and `isIPv6` more efficient

`isIPv4` and `isIPv6` are implemented on top of `isIP`, which in turn
checks the sting for being both IPv4 and IPv6, which can be inefficient
in some scenarios. This commit makes them use `uv_inet_pton` directly
instead.

PR-URL: https://github.com/nodejs/node/pull/5478
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
8 years agorepl: fix stack trace column number in strict mode
Prince J Wesley [Wed, 24 Feb 2016 18:56:41 +0000 (00:26 +0530)]
repl: fix stack trace column number in strict mode

On strict mode, "'use strict'; void 0; " is added as prefix
in order to prevent "use strict" as the result value
for let/const statements. It causes wrong column number in
stack trace.

PR-URL: https://github.com/nodejs/node/pull/5416
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
8 years agolib: simplify code with String.prototype.repeat()
Jackson Tian [Fri, 19 Feb 2016 03:01:11 +0000 (11:01 +0800)]
lib: simplify code with String.prototype.repeat()

use String.prototype.repeat() to simplify code, less code,
more semantically.

PR-URL: https://github.com/nodejs/node/pull/5359
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
8 years agolib: reduce usage of `self = this`
Jackson Tian [Mon, 15 Feb 2016 04:53:17 +0000 (12:53 +0800)]
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>
8 years agonet: remove unused `var self = this` from old code
Benjamin Gruenbaum [Sun, 14 Feb 2016 15:27:17 +0000 (17:27 +0200)]
net: remove unused `var self = this` from old code

Removed an unused `var self = this` that is no longer required.

PR-URL: https://github.com/nodejs/node/pull/5224
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
8 years agotest: remove timer from test-http-1.0
Santiago Gimeno [Sun, 7 Feb 2016 09:20:50 +0000 (10:20 +0100)]
test: remove timer from test-http-1.0

It's possible that the `end` event is emitted after the timeout fires
causing the test to fail. Just remove the timer. If for some reason the
`end` would never fire, the test will fail with a timeout.

PR-URL: https://github.com/nodejs/node/pull/5129
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
8 years agolib: copy arguments object instead of leaking it
Nathan Woltman [Sun, 20 Dec 2015 07:01:34 +0000 (02:01 -0500)]
lib: copy arguments object instead of leaking it

Instead of leaking the arguments object by passing it as an
argument to a function, copy it's contents to a new array,
then pass the array. This allows V8 to optimize the function
that contains this code, improving performance.

PR-URL: https://github.com/nodejs/node/pull/4361
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
8 years agodoc: reformat & improve node.1 manual page
Jeremiah Senkpiel [Mon, 29 Feb 2016 21:49:30 +0000 (16:49 -0500)]
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: #5497
Reviewed-By: James Snell <jasnell@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
8 years agodoc: updated fs #5862 removed irrelevant data in fs.markdown
topal [Wed, 23 Mar 2016 19:53:18 +0000 (22:53 +0300)]
doc: updated fs #5862 removed irrelevant data in fs.markdown

fs.readFile, fs.writeFile and fs.appendFile doc changes
pulled back from master included details not relevant to
v4.

PR-URL: https://github.com/nodejs/node/pull/5877
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
8 years agoWorking on v4.4.2
Myles Borins [Tue, 22 Mar 2016 22:53:18 +0000 (15:53 -0700)]
Working on v4.4.2

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

8 years ago2016-03-22, Version v4.4.1 'Argon' (LTS) v4.4.1
Myles Borins [Mon, 21 Mar 2016 20:28:46 +0000 (13:28 -0700)]
2016-03-22, Version v4.4.1 'Argon' (LTS)

This LTS release comes with 113 commits, 56 of which are doc related,
18 of which are build / tooling related, 16 of which are test related
and 7 which are benchmark related.

Notable Changes:

* build:
  - Updated Logos for the OSX + Windows installers
    - (Rod Vagg) https://github.com/nodejs/node/pull/5401
    - (Robert Jefe Lindstaedt) https://github.com/nodejs/node/pull/5531
  - New option to select your VS Version in the Windows installer
    - (julien.waechter) https://github.com/nodejs/node/pull/4645
  - Support Visual C++ Build Tools 2015
    - (João Reis) https://github.com/nodejs/node/pull/5627
* tools:
  - Gyp now works on OSX without XCode
    - (Shigeki Ohtsu) https://github.com/nodejs/node/pull/1325

8 years agodoc: fix typo in synchronous randomBytes example
Andrea Giammarchi [Fri, 18 Mar 2016 12:22:22 +0000 (12:22 +0000)]
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>
8 years agodeps: update openssl config
Shigeki Ohtsu [Sun, 6 Mar 2016 22:48:44 +0000 (07:48 +0900)]
deps: update openssl config

OPENSSL_NO_SSL2 and OPENSSL_NO_WEAK_SSL_CIPHERS are defined in
opensslconf.h

Fixes: https://github.com/nodejs/LTS/issues/85
PR-URL: https://github.com/nodejs/node/pull/5630
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Fedor Indutny <fedor@indutny.com>
8 years agobuild: don't install github templates
Johan Bergström [Wed, 9 Mar 2016 00:21:27 +0000 (11:21 +1100)]
build: don't install github templates

Avoid putting github templates in the source tarballs.

PR-URL: https://github.com/nodejs/node/pull/5612
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Rich Trott <rtrott@gmail.com>
8 years agodoc: topic blocking vs non-blocking
Jarrett Widman [Fri, 19 Feb 2016 17:24:32 +0000 (11:24 -0600)]
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>
8 years agotest: eval a strict function
Kári Tristan Helgason [Mon, 15 Feb 2016 22:55:35 +0000 (22:55 +0000)]
test: eval a strict function

PR-URL: https://github.com/nodejs/node/pull/5250
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
8 years agotools: fix gyp to work on MacOSX without XCode
Shigeki Ohtsu [Tue, 10 Feb 2015 00:27:52 +0000 (09:27 +0900)]
tools: fix gyp to work on MacOSX without XCode

This issue has already submitted to the upstream in
https://code.google.com/p/gyp/issues/detail?id=477
Use this commit until the upstream is to be fixed.

PR-URL: https://github.com/iojs/io.js/pull/1325
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
8 years agotools: update gyp to b3cef02
Imran Iqbal [Mon, 19 Oct 2015 19:57:06 +0000 (15:57 -0400)]
tools: update gyp to b3cef02

Includes two patches for AIX. Adds support for both 32-bit and 64-bit
files[0] and uses -RPf for cp instead of -af (which is unsupported)[1]

[0] https://codereview.chromium.org/1319663007
[1] https://codereview.chromium.org/1368133002

PR-URL: https://github.com/nodejs/node/pull/3487
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Shigeki Ohtsu <ohtsu@iij.ad.jp>
8 years agotest: bug repro for vm function redefinition
cjihrig [Wed, 2 Mar 2016 17:41:46 +0000 (12:41 -0500)]
test: bug repro for vm function redefinition

This commit adds a failing test case for the vm module.
Currently, if runInContext() defines a function, and a later call
to runInContext() redefines the same function, the original
function is not overwritten.

Refs: https://github.com/nodejs/node/issues/548
Backport-URL: https://github.com/nodejs/node/pull/5785
PR-URL: https://github.com/nodejs/node/pull/5528
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Wyatt Preul <wpreul@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
8 years agotools: support testing known issues
cjihrig [Wed, 2 Mar 2016 17:12:47 +0000 (12:12 -0500)]
tools: support testing known issues

This commit adds a known_issues directory to the test directory
for scripts that reproduce known bugs. Since these scripts are
expected to fail, it also adds a --expect-fail flag to test.py
which reports tests as successful when they fail.

Refs: https://github.com/nodejs/testing/issues/18
Backport-URL: https://github.com/nodejs/node/pull/5785
PR-URL: https://github.com/nodejs/node/pull/5528
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Wyatt Preul <wpreul@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Conflicts:
tools/test.py

8 years agotools: enable linting for benchmarks
Rich Trott [Thu, 17 Mar 2016 23:57:27 +0000 (16:57 -0700)]
tools: enable linting for benchmarks

PR-URL: https://github.com/nodejs/node/pull/5773
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
8 years agobenchmark: fix linting issues
Rich Trott [Thu, 17 Mar 2016 23:55:46 +0000 (16:55 -0700)]
benchmark: fix linting issues

PR-URL: https://github.com/nodejs/node/pull/5773
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
8 years agobenchmark: use strict mode
Rich Trott [Sat, 20 Feb 2016 01:03:16 +0000 (17:03 -0800)]
benchmark: use strict mode

Apply strict mode to benchmark code.

PR-URL: https://github.com/nodejs/node/pull/5773
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
8 years agobenchmark: refactor to eliminate redeclared vars
Rich Trott [Sun, 28 Feb 2016 05:56:18 +0000 (21:56 -0800)]
benchmark: refactor to eliminate redeclared vars

In order to comply with linting rules used in the rest of the code base,
eliminate redeclared variables. A conservative approach is used so as to
avoid unintentional performance issues (for example, as might be seen in
some situations when using `let` instead of `var`).

PR-URL: https://github.com/nodejs/node/pull/5773
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
8 years agotools,benchmark: increase lint compliance
Rich Trott [Thu, 25 Feb 2016 06:30:10 +0000 (22:30 -0800)]
tools,benchmark: increase lint compliance

In the hopes of soon having the benchmark code linted, this change
groups all the likely non-controversial lint-compliance changes such as
indentation, semi-colon usage, and single-vs.-double quotation marks.

Other lint rules may have subtle performance implications in the V8
currently shipped with Node.js. Those changes will require more careful
review and will be in a separate change.

PR-URL: https://github.com/nodejs/node/pull/5773
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
8 years agobenchmark: fix lint errors
Rich Trott [Wed, 2 Mar 2016 21:38:23 +0000 (13:38 -0800)]
benchmark: fix lint errors

PR-URL: https://github.com/nodejs/node/pull/5773
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
8 years agodoc: fix invalid path doc comments
Rich Trott [Fri, 11 Mar 2016 23:57:43 +0000 (15:57 -0800)]
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/5797
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
8 years agodoc: update release tweet template
Jeremiah Senkpiel [Wed, 9 Mar 2016 16:43:53 +0000 (11:43 -0500)]
doc: update release tweet template

PR-URL: https://github.com/nodejs/node/pull/5628
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: James M Snell <jasnell@gmail.com>
8 years agodoc: fix typo in child_process docs
Benjamin Gruenbaum [Sun, 13 Mar 2016 08:32:01 +0000 (10:32 +0200)]
doc: fix typo in child_process docs

Fixes a typo in the child process docs.
Fixes: https://github.com/nodejs/nodejs.org/issues/573

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

Reviewed-By: thefourtheye <thechargingvolcano@gmail.com>
8 years agocollaborator_guide: clarify commit message rules
Wyatt Preul [Fri, 11 Mar 2016 21:03:25 +0000 (15:03 -0600)]
collaborator_guide: clarify commit message rules

Italicize the full URL being required in metadata.

PR-URL: https://github.com/nodejs/node/pull/5661
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James Snell <jasnell@gmail.com>
8 years agodoc: update fansworld-claudio username on README
Claudio Rodriguez [Sun, 13 Mar 2016 06:57:03 +0000 (03:57 -0300)]
doc: update fansworld-claudio username on README

Updating collaborator username: fansworld-claudio
changed to claudiorodriguez

PR-URL: https://github.com/nodejs/node/pull/5680
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
8 years agobuild: update Node.js logo on OSX installer
Rod Vagg [Wed, 24 Feb 2016 02:51:50 +0000 (13:51 +1100)]
build: update Node.js logo on OSX installer

PR-URL: https://github.com/nodejs/node/pull/5401
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: kahwee
Reviewed-By: fhemberger
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
8 years agodoc: fix return value of write methods
Felix Böhm [Wed, 16 Mar 2016 10:27:32 +0000 (11:27 +0100)]
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>
8 years agodoc: Add note about use of JSON.stringify()
Mithun Patel [Tue, 15 Mar 2016 16:12:41 +0000 (11:12 -0500)]
doc: Add note about use of JSON.stringify()

process.send and child.send use JSON.stringify to serialize
the message.

Fixes: https://github.com/nodejs/node/issues/5453
PR-URL: https://github.com/nodejs/node/pull/5723
Reviewed-By: Jeremy Whitlock <jwhitlock@apache.org>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
8 years agodocs: fix man pages link if tok type is code
Mithun Patel [Tue, 15 Mar 2016 15:11:26 +0000 (10:11 -0500)]
docs: fix man pages link if tok type is code

Do not call the linkManPages if the tok type is code

Fixes: https://github.com/nodejs/node/issues/5686
PR-URL: https://github.com/nodejs/node/pull/5721
Reviewed-By: James M Snell <jasnell@gmail.com>
8 years agotls: fix assert in context._external accessor
Ben Noordhuis [Wed, 2 Mar 2016 13:04:42 +0000 (14:04 +0100)]
tls: fix assert in context._external accessor

* Restrict the receiver to instances of the FunctionTemplate.
* Use `args.This()` instead of `args.Holder()`.

Fixes: https://github.com/nodejs/node/issues/3682
PR-URL: https://github.com/nodejs/node/pull/5521
Reviewed-By: Fedor Indutny <fedor@indutny.com>
8 years agodoc: explain path.format() algorithm
Rich Trott [Sun, 13 Mar 2016 20:40:25 +0000 (13:40 -0700)]
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

8 years agodoc: clarify type of first argument in zlib
Kirill Fomichev [Sun, 13 Mar 2016 16:16:15 +0000 (19:16 +0300)]
doc: clarify type of first argument in zlib

The current documentation for Convenience Methods specifies that
the first argument can be either
`string or buffer`, `string` or `raw Buffer`.
This commit replaces all these instances with `Buffer or string`.

PR-URL: https://github.com/nodejs/node/pull/5685
Reviewed-By: Claudio Rodriguez <cjrodr@yahoo.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
8 years agodoc: fix typo in api/addons
Daijiro Wachi [Sun, 13 Mar 2016 21:37:54 +0000 (22:37 +0100)]
doc: fix typo in api/addons

PR-URL: https://github.com/nodejs/node/pull/5678
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
8 years agodoc: remove non-standard use of hyphens
Stefano Vozza [Sat, 12 Mar 2016 18:10:31 +0000 (18:10 +0000)]
doc: remove non-standard use of hyphens

Identifies the non-idiomatic usages of the '-' character
and either removes them or replaces them with colons.

Fixes: https://github.com/nodejs/node/issues/5672
R-URL: https://github.com/nodejs/node/pull/5677
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Claudio Rodriguez <cjrodr@yahoo.com>