platform/upstream/nodejs.git
6 years agorevise installing a license file 04/145404/1 tizen submit/tizen/20170830.015948
Youngjae Shin [Tue, 22 Aug 2017 07:55:28 +0000 (16:55 +0900)]
revise installing a license file

Change-Id: Ic7af885cc8350081456d3ed6b6c259dbd3b82047

6 years agodeps: backport IsValid changes from 4e8736d in V8 79/139779/1 accepted/tizen_4.0_unified accepted/tizen_5.0_unified accepted/tizen_5.5_unified accepted/tizen_5.5_unified_mobile_hotfix accepted/tizen_unified tizen_4.0 tizen_5.0 tizen_5.5 tizen_5.5_mobile_hotfix tizen_5.5_tv accepted/tizen/4.0/unified/20170816.011835 accepted/tizen/4.0/unified/20170828.222709 accepted/tizen/5.0/unified/20181102.030536 accepted/tizen/5.5/unified/20191031.011937 accepted/tizen/5.5/unified/mobile/hotfix/20201027.074323 accepted/tizen/unified/20170721.024603 submit/tizen/20170720.105540 submit/tizen_4.0/20170811.094300 submit/tizen_4.0/20170828.100006 submit/tizen_5.0/20181101.000007 submit/tizen_5.5/20191031.000007 submit/tizen_5.5_mobile_hotfix/20201026.185107 tizen_4.0.IoT.p1_release tizen_4.0.IoT.p2_release tizen_4.0.m2_release tizen_5.5.m2_release
min7.choi [Thu, 20 Jul 2017 09:55:45 +0000 (18:55 +0900)]
deps: backport IsValid changes from 4e8736d in V8

V8 erroneously did null pointer checks on `this`.
It can lead to a SIGSEGV crash if node is compiled with GCC 6.
Backport relevant changes from [1] that fix this issue.

[1]: https://codereview.chromium.org/1900423002
Fixes: https://github.com/nodejs/node/issues/6272
PR-URL: https://github.com/nodejs/node/pull/6669

Change-Id: I488cde214e1b22df424e74d8ffaed91c119b56a5
Signed-off-by: min7.choi <min7.choi@samsung.com>
6 years agoAvoid overflow in EVP_EncodeUpdate accepted/tizen/unified/20170612.170751 submit/tizen/20170612.052041
jaekuk, lee [Mon, 12 Jun 2017 04:34:26 +0000 (13:34 +0900)]
Avoid overflow in EVP_EncodeUpdate

https://nvd.nist.gov/vuln/detail/CVE-2016-2105

https://git.openssl.org/?p=openssl.git;a=commit;h=5b814481f3573fa9677f3a31ee51322e2a22ee6a
An overflow can occur in the EVP_EncodeUpdate function which is used for
Base64 encoding of binary data. If an attacker is able to supply very large
amounts of input data then a length check can overflow resulting in a heap
corruption. Due to the very large amounts of data involved this will most
likely result in a crash.
Internally to OpenSSL the EVP_EncodeUpdate function is primarly used by the
PEM_write_bio* family of functions. These are mainly used within the
OpenSSL command line applications, so any application which processes
data from an untrusted source and outputs it as a PEM file should be
considered vulnerable to this issue.
User applications that call these APIs directly with large amounts of
untrusted data may also be vulnerable.
Issue reported by Guido Vranken.
CVE-2016-2105

Change-Id: Ie90201c3ac5c6203583620c5843d2cd896a69955
Signed-off-by: jaekuk, lee <juku1999@samsung.com>
6 years agoCheck that we have enough padding characters
jaekuk, lee [Mon, 12 Jun 2017 04:30:54 +0000 (13:30 +0900)]
Check that we have enough padding characters

https://nvd.nist.gov/vuln/detail/CVE-2016-2107

https://git.openssl.org/?p=openssl.git;a=commit;h=68595c0c2886e7942a14f98c17a55a88afb6c292
Reviewed-by: Emilia Käsper <emilia@openssl.org>
CVE-2016-2107
MR: #2572

Change-Id: I63f9b88dab5cfeb85841578851a528407acdf1cb
Signed-off-by: jaekuk, lee <juku1999@samsung.com>
6 years agoCanonicalise input in CMS_verify
jaekuk, lee [Mon, 12 Jun 2017 04:27:11 +0000 (13:27 +0900)]
Canonicalise input in CMS_verify

https://nvd.nist.gov/vuln/detail/CVE-2015-1792

https://github.com/openssl/openssl/commit/cd30f03ac5bf2962f44bd02ae8d88245dff2f12c
If content is detached and not binary mode translate the input to
CRLF format. Before this change the input was verified verbatim
which lead to a discrepancy between sign and verify.

Change-Id: I29926675aabdec32c5857adc5937d4525cd24747
Signed-off-by: jaekuk, lee <juku1999@samsung.com>
6 years agoFix ASN1_INTEGER handling
jaekuk, lee [Mon, 12 Jun 2017 04:24:12 +0000 (13:24 +0900)]
Fix ASN1_INTEGER handling

https://nvd.nist.gov/vuln/detail/CVE-2016-2108

https://git.openssl.org/?p=openssl.git;a=commit;h=f5da52e308a6aeea6d5f3df98c4da295d7e9cc27
Only treat an ASN1_ANY type as an integer if it has the V_ASN1_INTEGER
tag: V_ASN1_NEG_INTEGER is an internal only value which is never used
for on the wire encoding.
Thanks to David Benjamin <davidben@google.com> for reporting this bug.
This was found using libFuzzer.
RT#4364 (part)CVE-2016-2108.

Change-Id: I51260381d49ce01ea061a35d028e13f8b4c120f7
Signed-off-by: jaekuk, lee <juku1999@samsung.com>
6 years agoAvoid some undefined pointer arithmetic
min7.choi [Mon, 12 Jun 2017 04:01:20 +0000 (13:01 +0900)]
Avoid some undefined pointer arithmetic

A common idiom in the codebase is:

 if (p + len > limit)
 {
     return; /* Too long */
 }

 Where "p" points to some malloc'd data of SIZE bytes and
 limit == p + SIZE

 "len" here could be from some externally supplied data (e.g. from a TLS
 message).

 The rules of C pointer arithmetic are such that "p + len" is only well
 defined where len <= SIZE. Therefore the above idiom is actually
 undefined behaviour.

 For example this could cause problems if some malloc implementation
 provides an address for "p" such that "p + len" actually overflows for
 values of len that are too big and therefore p + len < limit!w

Change-Id: Iafd9f2d3c35eb26b930a45b5a9461cb19f75bcb4
Signed-off-by: min7.choi <min7.choi@samsung.com>
6 years agoFix OOB read in TS_OBJ_print_bio()
min7.choi [Mon, 12 Jun 2017 01:57:03 +0000 (10:57 +0900)]
Fix OOB read in TS_OBJ_print_bio()

TS_OBJ_print_bio() misuses OBJ_txt2obj: it should print the result
as a null terminated buffer. The length value returned is the total
length the complete text reprsentation would need not the amount of
data written.

Change-Id: I5346552f8167079c2e1c3c63ea59eae31d7607e8
Signed-off-by: min7.choi <min7.choi@samsung.com>
6 years agoAvoid overflow in MDC2_Update()
min7.choi [Mon, 12 Jun 2017 01:37:37 +0000 (10:37 +0900)]
Avoid overflow in MDC2_Update()

Change-Id: I11dfad2f10827602680ff348534f7afe8299da54
Signed-off-by: min7.choi <min7.choi@samsung.com>
7 years agoApply ASLR 93/90293/1 accepted/tizen_3.0.m2_mobile accepted/tizen_3.0.m2_tv accepted/tizen_3.0.m2_wearable accepted/tizen_common accepted/tizen_ivi accepted/tizen_mobile accepted/tizen_tv accepted/tizen_wearable tizen_3.0.m2 accepted/tizen/3.0.m2/mobile/20170105.025206 accepted/tizen/3.0.m2/tv/20170105.025311 accepted/tizen/3.0.m2/wearable/20170105.025407 accepted/tizen/3.0/common/20161114.111344 accepted/tizen/3.0/ivi/20161011.055416 accepted/tizen/3.0/mobile/20161015.034002 accepted/tizen/3.0/tv/20161016.005517 accepted/tizen/3.0/wearable/20161015.083711 accepted/tizen/common/20160929.163704 accepted/tizen/ivi/20160929.234033 accepted/tizen/mobile/20160929.234027 accepted/tizen/tv/20160929.234025 accepted/tizen/unified/20170309.040301 accepted/tizen/wearable/20160929.234023 submit/tizen/20160929.094931 submit/tizen_3.0.m2/20170104.093754 submit/tizen_3.0_common/20161104.104000 submit/tizen_3.0_ivi/20161010.000005 submit/tizen_3.0_mobile/20161015.000005 submit/tizen_3.0_tv/20161015.000004 submit/tizen_3.0_wearable/20161015.000004 submit/tizen_unified/20170308.100415 tizen_4.0.m1_release
WonYoung Choi [Thu, 29 Sep 2016 09:37:23 +0000 (18:37 +0900)]
Apply ASLR

Change-Id: If0d83ce45ff6ba324a94fc8bb2f67ae4c8003465

7 years agoUpgrade to v4.4.3 accepted/tizen/common/20160502.183603 accepted/tizen/ivi/20160502.113911 accepted/tizen/mobile/20160502.113814 accepted/tizen/tv/20160502.113841 accepted/tizen/wearable/20160502.113859 submit/tizen/20160502.045449
WonYoung Choi [Thu, 28 Apr 2016 05:41:35 +0000 (14:41 +0900)]
Upgrade to v4.4.3

Change-Id: Ic853be5235850e3055d351334cdaf2036c68e072

7 years agoAdd LICENSE.Apache-2.0
WonYoung Choi [Tue, 29 Mar 2016 07:25:58 +0000 (16:25 +0900)]
Add LICENSE.Apache-2.0

Change-Id: I4c5d8fcf6bfa2885e7919f194a4d4de0e15efd61

7 years agoFix License
WonYoung Choi [Fri, 4 Mar 2016 04:31:06 +0000 (13:31 +0900)]
Fix License

Change-Id: I1e916e9797b502c58edd6aaffe678364ff2f9dbe

7 years agoUpdate to v4.2.6
WonYoung Choi [Tue, 26 Jan 2016 05:38:34 +0000 (14:38 +0900)]
Update to v4.2.6

Change-Id: I55d521f2aca669603100e1cbd621fbc33e44465e

7 years agoFix spec file to avoid building twice
WonYoung Choi [Tue, 5 Jan 2016 05:04:45 +0000 (14:04 +0900)]
Fix spec file to avoid building twice

The Makefile of nodejs is using phony target name for node executable.
Therefore when 'make install' is executed, the target for making the
node executable is started again.

Change-Id: Ia4b4358820bdacc693155b3f09e780e664ba1c0b

7 years agoSeparate npm tools to nodejs-npm package
WonYoung Choi [Fri, 18 Dec 2015 06:54:43 +0000 (15:54 +0900)]
Separate npm tools to nodejs-npm package

In general, the npm tool is not needed in runtime. If someone needs
to use npm tool, install nodejs-npm package manually.

Change-Id: Idcae9f40a56ed3887f280a72cd3bd2f85ea78e39

7 years agoUpdate to v4.2.3
WonYoung Choi [Fri, 11 Dec 2015 05:22:37 +0000 (14:22 +0900)]
Update to v4.2.3

Change-Id: I15c5c41e7baf3b6d0a119c3d6a44888d571ae2ab

7 years agoAdd npm tools
WonYoung Choi [Thu, 19 Nov 2015 23:23:11 +0000 (08:23 +0900)]
Add npm tools

Change-Id: I7d63c4a64192c3fce6ad393ac10ac5542c466450

7 years agoFix spec file to add --shared-openssl
WonYoung Choi [Thu, 5 Nov 2015 11:04:51 +0000 (20:04 +0900)]
Fix spec file to add --shared-openssl

Change-Id: I69266a815413e3bf31b7eb192f3c5c6950f16215

7 years agoAdd Tizen packaging
WonYoung Choi [Wed, 28 Oct 2015 07:45:37 +0000 (16:45 +0900)]
Add Tizen packaging

Change-Id: I54c3b8b63a02c23bbd409b0e49eb8788c2026d6e

8 years ago2016-04-12, Version 4.4.3 'Argon' (LTS) upstream upstream/4.4.3 v4.4.3
Myles Borins [Mon, 11 Apr 2016 17:48:18 +0000 (13:48 -0400)]
2016-04-12, Version 4.4.3 'Argon' (LTS)

Notable Changes:

deps:
  - Fix `--gdbjit` for embedders. Backported from v8 upstream.
    (Ben Noordhuis) https://github.com/nodejs/node/pull/5577

etw:
  - Correctly display descriptors for ETW events 9 and 23 on the
    windows platform.
    (João Reis) https://github.com/nodejs/node/pull/5742

querystring:
  - Restore throw when attempting to stringify bad surrogate pair.
    (Brian White) https://github.com/nodejs/node/pull/5858

8 years agodoc: update openssl LICENSE using license-builder.sh
Steven R. Loomis [Tue, 5 Apr 2016 21:38:28 +0000 (14:38 -0700)]
doc: update openssl LICENSE using license-builder.sh

* due to: openssl bump in 1f434787fcb36b2dea36dbfebc8ff7f899b6d262

PR-URL: https://github.com/nodejs/node/pull/6065
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
8 years agodoc: clarify that __dirname is module local
James M Snell [Sat, 2 Apr 2016 06:06:28 +0000 (23:06 -0700)]
doc: clarify that __dirname is module local

Fixes: https://github.com/nodejs/node/issues/5525
PR-URL: https://github.com/nodejs/node/pull/6018
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Roman Klauke <romaaan.git@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
8 years agogovernance: remove target size for CTC
Rich Trott [Wed, 23 Mar 2016 21:00:32 +0000 (14:00 -0700)]
governance: remove target size for CTC

PR-URL: https://github.com/nodejs/node/pull/5879
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
8 years agowin,build: build and test add-ons on test-ci
Bogdan Lobor [Thu, 24 Mar 2016 07:52:27 +0000 (09:52 +0200)]
win,build: build and test add-ons on test-ci

Added build-addons task, it allows to build and test native addons
during test-ci task. Basically it should work in same way like
Makefile "build-addons" task.

Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: João Reis <reis@janeasystems.com>
PR-URL: https://github.com/nodejs/node/pull/5886
Fixes: https://github.com/nodejs/node/issues/2537

8 years agodoc: simple doc typo fix
Brendon Pierson [Mon, 4 Apr 2016 18:43:35 +0000 (13:43 -0500)]
doc: simple doc typo fix

decipher.setAuthPadding canged to decipher.setAutoPadding

PR-URL: https://github.com/nodejs/node/pull/6041
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Roman Klauke <romaaan.git@gmail.com>
8 years agodoc: note about Android support
Rich Trott [Mon, 4 Apr 2016 17:48:34 +0000 (10:48 -0700)]
doc: note about Android support

PR-URL: https://github.com/nodejs/node/pull/6040
Refs: https://github.com/nodejs/node/issues/6035
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
8 years agodoc: note assert.throws() pitfall
Rich Trott [Sun, 3 Apr 2016 19:11:10 +0000 (12:11 -0700)]
doc: note assert.throws() pitfall

PR-URL: https://github.com/nodejs/node/pull/6029
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
8 years agotest: explicitly set global in test-repl
Rich Trott [Sun, 3 Apr 2016 06:20:12 +0000 (23:20 -0700)]
test: explicitly set global in test-repl

The test intentionally assigns a global. Use `global` namespace to make
it clear that it is intentional and not an accidental leak.

PR-URL: https://github.com/nodejs/node/pull/6026
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: use HTTPS for links where possible
Rich Trott [Sat, 2 Apr 2016 06:32:47 +0000 (23:32 -0700)]
doc: use HTTPS for links where possible

Provide encrypted links to freenode IRC.

PR-URL: https://github.com/nodejs/node/pull/6019
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Roman Klauke <romaaan.git@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
8 years agotest: be explicit about polluting of `global`
Rich Trott [Sat, 2 Apr 2016 05:39:35 +0000 (22:39 -0700)]
test: be explicit about polluting of `global`

There was a comment in `test-domain-crypto.js` indicating that the
pollution of the `global` object with a `domain` property was
intentional. Provide more information in the comment so someone may
easily determine why. Use `global.domain` rather than declaring `domain`
without the `var` keyword to more clearly signal that the pollution is
intentional.

PR-URL: https://github.com/nodejs/node/pull/6017
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
8 years agodoc: clarify stdout/stderr arguments to callback
James M Snell [Sat, 2 Apr 2016 05:23:16 +0000 (22:23 -0700)]
doc: clarify stdout/stderr arguments to callback

Clarify that the arguments to child_process.execFile
and child_process.exec callback can be Buffer or strings.

Fixes: https://github.com/nodejs/node/issues/3389
PR-URL: https://github.com/nodejs/node/pull/6015
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
8 years agotest: make use of globals explicit
Rich Trott [Sat, 2 Apr 2016 05:20:55 +0000 (22:20 -0700)]
test: make use of globals explicit

Use `global` to be explicit that a global variable is intended.

PR-URL: https://github.com/nodejs/node/pull/6014
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
8 years agodoc: add 'Command Line Options' to 'View on single page'
firedfox [Sat, 2 Apr 2016 03:15:07 +0000 (11:15 +0800)]
doc: add 'Command Line Options' to 'View on single page'

Includes cli.markdown in all.markdown

PR-URL: https://github.com/nodejs/node/pull/6011
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
8 years agotest: fix flaky test-net-socket-timeout-unref
Rich Trott [Tue, 29 Mar 2016 00:07:22 +0000 (17:07 -0700)]
test: fix flaky test-net-socket-timeout-unref

Throw immediately on socket timeout rather than checking boolean in exit
handler.

PR-URL: https://github.com/nodejs/node/pull/6003
Fixes: https://github.com/nodejs/node/issues/5128
Reviewed-By: Myles Borins <myles.borins@gmail.com>
8 years agodoc: add copy about how to curl SHA256.txt
Myles Borins [Fri, 8 Apr 2016 18:08:23 +0000 (14:08 -0400)]
doc: add copy about how to curl SHA256.txt

Currently we include instructions on how to check the sha of a
downloaded tar-ball, but do not include instruction on how to
get the `SHA256.txt` file. This has led to confusion with people
thinking that the SHA256.txt is included in that tarball.

This commit includes instructions on how to use curl to download the
`SHA256.txt` prior to the instructions on how to verify the sha.

Refs: https://github.com/nodejs/help/issues/113
Refs: https://github.com/nodejs/help/issues/137
PR-URL: https://github.com/nodejs/node/pull/6120
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
8 years agodoc: add example using algorithms not directly exposed
Brad Hill [Thu, 7 Apr 2016 22:38:00 +0000 (15:38 -0700)]
doc: add example using algorithms not directly exposed

PR-URL: https://github.com/nodejs/node/pull/6108
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
8 years agoassert: Check typed array view type in deepEqual
Anna Henningsen [Sat, 26 Mar 2016 02:29:13 +0000 (03:29 +0100)]
assert: Check typed array view type in deepEqual

Do not convert typed arrays to `Buffer` for deepEqual since
their values may not be accurately represented by 8-bit ints.
Instead perform binary comparison of underlying `ArrayBuffer`s,
but only when the array types match.

Never apply any kind of optimization for floating-point typed
arrays since bit pattern equality is not the right kind of check
for them.

PR-URL: https://github.com/nodejs/node/pull/5910
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Fixes: https://github.com/nodejs/node/issues/5907

8 years agotest: make arch available in status files
Santiago Gimeno [Fri, 1 Apr 2016 08:22:41 +0000 (10:22 +0200)]
test: make arch available in status files

The value is retrieved from `process.arch` in node itself.

PR-URL: https://github.com/nodejs/node/pull/5997
Reviewed-By: João Reis <reis@janeasystems.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
8 years agotest: fix test-dns.js flakiness
Rich Trott [Fri, 1 Apr 2016 13:38:00 +0000 (06:38 -0700)]
test: fix test-dns.js flakiness

Use empty string instead of `www.google.com` for tests where we are just
doing parameter evaluation. This will avoid DNS lookups which appear to
be causing flakiness on Raspberry Pi devices in CI.

PR-URL: https://github.com/nodejs/node/pull/5996
Fixes: https://github.com/nodejs/node/issues/5554
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
8 years agotools,doc: fix incomplete json produced by doctool
firedfox [Thu, 31 Mar 2016 03:55:59 +0000 (11:55 +0800)]
tools,doc: fix incomplete json produced by doctool

Doc tool produces incomplete json when it meets unordered lists that
directly following a heading. Add a default case to processList function
to handle the lists.

PR-URL: https://github.com/nodejs/node/pull/5966
Fixes: https://github.com/nodejs/node/issues/1545
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Robert Lindstädt <robert.lindstaedt@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
8 years agotest: add test for piping large input from stdin
Anna Henningsen [Tue, 29 Mar 2016 21:02:47 +0000 (23:02 +0200)]
test: add test for piping large input from stdin

Check that piping a large chunk of data from `process.stdin`
into `process.stdout` does not lose any data by verifying that
the output has the same size as the input.

This is a regression test for #5927 and fails for the commits
in the range [ace100945..89abe8680).

PR-URL: https://github.com/nodejs/node/pull/5949
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
8 years agotools: fix json doc generation
firedfox [Tue, 29 Mar 2016 10:42:17 +0000 (18:42 +0800)]
tools: fix json doc generation

Current processList function in tools/doc/json.js does not recognise
{"type":"loose_item_start"}. Fix it.

PR-URL: https://github.com/nodejs/node/pull/5943
Fixes: https://github.com/nodejs/node/issues/5942
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Robert Lindstädt <robert.lindstaedt@gmail.com>
8 years agotest: mitigate flaky test-https-agent
Rich Trott [Mon, 28 Mar 2016 21:35:06 +0000 (14:35 -0700)]
test: mitigate flaky test-https-agent

Reduce number of clients from 100 to 16 as Raspberry Pi in CI starts to
exhibit flakiness around 22 or so clients.

PR-URL: https://github.com/nodejs/node/pull/5939
Fixes: https://github.com/nodejs/node/issues/5938
Refs: https://github.com/nodejs/node/issues/5184
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
8 years agotest: fix offending max-len linter error
Sakthipriyan Vairamani [Thu, 31 Mar 2016 20:58:39 +0000 (02:28 +0530)]
test: fix offending max-len linter error

Refer: https://github.com/nodejs/node/pull/5935
PR-URL: https://github.com/nodejs/node/pull/5980
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Phillip Johnsen <johphi@gmail.com>
8 years agotest: stdin is not always a net.Socket
Jeremiah Senkpiel [Mon, 28 Mar 2016 15:24:34 +0000 (11:24 -0400)]
test: stdin is not always a net.Socket

`<`-ing a file into stdin actually results in a `fs.ReadStream`, rather
than a `tty.ReadStream`, and as such does not inherit from net.Socket,
unlike the other possible stdin options.

Refs: https://github.com/nodejs/node/pull/5916
PR-URL: https://github.com/nodejs/node/pull/5935
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
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>