Prayag Verma
51f69294cd
doc: fix typo in Readme.md
...
Spelling mistake - `begining` > `beginning`
PR-URL: https://github.com/nodejs/node/pull/5017
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
Reviewed-By: Michaël Zasso <mic.besace@gmail.com >
2016-03-02 14:01:11 -08:00
Brian White
c985acb692
test: fix inconsistent styling in test-url
...
PR-URL: https://github.com/nodejs/node/pull/5014
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Minwoo Jung <jmwsoft@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2016-03-02 14:01:11 -08:00
Alexander Makarenko
bd7d9e0828
doc: minor improvement in OS docs
...
Add links to `process.arch` and `process.platform`.
PR-URL: https://github.com/nodejs/node/pull/5006
Reviewed-By: Roman Klauke <romaaan.git@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Roman Reiss <me@silverwind.io >
2016-03-02 14:01:11 -08:00
Alexander Makarenko
f2b930d0a4
doc: improve styling consistency in VM docs
...
Improve functions styling. Connect sections with links.
PR-URL: https://github.com/nodejs/node/pull/5005
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2016-03-02 14:01:11 -08:00
Alexander Makarenko
368afcb8cb
doc: minor improvement to HTTPS doc
...
Add link to Buffer page.
PR-URL: https://github.com/nodejs/node/pull/5002
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
Reviewed-By: Chris Dickinson <chris@neversaw.us >
Reviewed-By: James M Snell <jasnell@gmail.com >
2016-03-02 14:01:11 -08:00
Rich Trott
bdcafd0aa2
test: fix redeclared vars in sequential tests
...
PR-URL: https://github.com/nodejs/node/pull/4999
Reviewed-By: Michaël Zasso <mic.besace@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Roman Klauke <romaaan.git@gmail.com >
2016-03-02 14:01:11 -08:00
Rich Trott
888be773c6
test: pummel test fixes
...
This fixes some variable redeclarations in pummel tests and, in the
process, gets `test-stream-pipe-multi.js` to run again. It had been
failing to run.
PR-URL: https://github.com/nodejs/node/pull/4998
Reviewed-By: Brian White <mscdex@mscdex.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
2016-03-02 14:01:11 -08:00
Rich Trott
6a0fad210c
test: fix redeclared vars in test-vm-*
...
PR-URL: https://github.com/nodejs/node/pull/4997
Reviewed-By: Michaël Zasso <mic.besace@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2016-03-02 14:01:11 -08:00
Rich Trott
5545dafdc3
test: fix redeclared vars in test-url
...
PR-URL: https://github.com/nodejs/node/pull/4993
Reviewed-By: Michaël Zasso <mic.besace@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2016-03-02 14:01:11 -08:00
Rich Trott
42346c13e1
dgram: scope redeclared variables
...
A few variables in `lib/dgram.js` are redeclared with `var` in a scope
where they have already been declared. These instances can be scoped
more narrowly with `const`, so that's what this change does.
PR-URL: https://github.com/nodejs/node/pull/4940
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2016-03-02 14:01:11 -08:00
Rich Trott
a0f72bdc9e
test: fix redeclared test-util-* vars
...
PR-URL: https://github.com/nodejs/node/pull/4994
Reviewed-By: Michaël Zasso <mic.besace@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Roman Klauke <romaaan.git@gmail.com >
2016-03-02 14:01:11 -08:00
Rich Trott
3733c032fc
test: fix variable redeclarations
...
I'm a fan of small changesets, but even I'm getting a little annoyed at
me for opening all these PRs weeding out variable redeclarations. So I'm
bundling a bunch of small changes here.
PR-URL: https://github.com/nodejs/node/pull/4992
Reviewed-By: Michaël Zasso <mic.besace@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2016-03-02 14:01:11 -08:00
Rich Trott
6c2d902c3d
test: fix redeclared test-path vars
...
PR-URL: https://github.com/nodejs/node/pull/4991
Reviewed-By: Michaël Zasso <mic.besace@gmail.com >
Reviewed-By: Roman Klauke <romaaan.git@gmail.com >
Reviewed-By: Johan Bergström <bugs@bergstroem.nu >
Reviewed-By: James M Snell <jasnell@gmail.com >
2016-03-02 14:01:11 -08:00
Rich Trott
54a40142cd
test: fix var redeclarations in test-os
...
PR-URL: https://github.com/nodejs/node/pull/4990
Reviewed-By: Michaël Zasso <mic.besace@gmail.com >
Reviewed-By: Roman Klauke <romaaan.git@gmail.com >
Reviewed-By: Johan Bergström <bugs@bergstroem.nu >
Reviewed-By: James M Snell <jasnell@gmail.com >
2016-03-02 14:01:11 -08:00
Rich Trott
52335f0100
test: fix test-net-* variable redeclarations
...
PR-URL: https://github.com/nodejs/node/pull/4989
Reviewed-By: Johan Bergström <bugs@bergstroem.nu >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Roman Klauke <romaaan.git@gmail.com >
2016-03-02 14:01:11 -08:00
Rich Trott
a0f3ccf8f9
test: fix redeclared test-intl var
...
PR-URL: https://github.com/nodejs/node/pull/4988
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Johan Bergström <bugs@bergstroem.nu >
Reviewed-By: Michaël Zasso <mic.besace@gmail.com >
2016-03-02 14:01:11 -08:00
Rich Trott
ecce231c58
test: fix redeclared test-http-* vars
...
PR-URL: https://github.com/nodejs/node/pull/4987
Reviewed-By: Michaël Zasso <mic.besace@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Roman Klauke <romaaan.git@gmail.com >
2016-03-02 14:01:11 -08:00
Rich Trott
befe3108f8
test: fix redeclared test-event-emitter-* vars
...
PR-URL: https://github.com/nodejs/node/pull/4985
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Johan Bergström <bugs@bergstroem.nu >
Reviewed-By: Michaël Zasso <mic.besace@gmail.com >
2016-03-02 14:01:11 -08:00
Rich Trott
11828c7dfa
test: remove redeclared var in test-domain
...
PR-URL: https://github.com/nodejs/node/pull/4984
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Johan Bergström <bugs@bergstroem.nu >
Reviewed-By: Michaël Zasso <mic.besace@gmail.com >
2016-03-02 14:01:11 -08:00
Fedor Indutny
51941a1aa5
https: evict cached sessions on error
...
Instead of using the same session over and over, evict it when the
socket emits error. This could be used as a mitigation of #3692 , until
OpenSSL fix will be merged/released.
See: https://github.com/nodejs/node/issues/3692
PR-URL: https://github.com/nodejs/node/pull/4982
Reviewed-By: Evan Lucas <evanlucas@me.com >
Reviewed-By: Shigeki Ohtsu <ohtsu@iij.ad.jp >
2016-03-02 14:01:11 -08:00
Rich Trott
5b7246e1be
test: remove var redeclarations in test-crypto-*
...
PR-URL: https://github.com/nodejs/node/pull/4981
Reviewed-By: Brian White <mscdex@mscdex.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
2016-03-02 14:01:11 -08:00
Rich Trott
51204b8e53
test: remove test-cluster-* var redeclarations
...
PR-URL: https://github.com/nodejs/node/pull/4980
Reviewed-By: Brian White <mscdex@mscdex.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
2016-03-02 14:01:11 -08:00
Santiago Gimeno
a358cdc898
test: fix test-http-extra-response flakiness
...
It can happen that the extra response is to be sent in a different chunk
from the rest of the data. At this moment, the client might have already
closed the socket causing an `ECONNRESET` error.
PR-URL: https://github.com/nodejs/node/pull/4979
Reviewed-By: Brian White <mscdex@mscdex.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
2016-03-02 14:01:11 -08:00
Rich Trott
d3e8e21b1f
lib: remove string_decoder.js var redeclarations
...
PR-URL: https://github.com/nodejs/node/pull/4978
Reviewed-By: Brian White <mscdex@mscdex.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
2016-03-02 14:01:11 -08:00
Rich Trott
ff7577214c
repl: remove variable redeclaration
...
`match` and `filter` are declared twice with `var` in `repl.js`.
Declare the variables only once.
PR-URL: https://github.com/nodejs/node/pull/4977
Reviewed-By: Brian White <mscdex@mscdex.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
2016-03-02 14:01:11 -08:00
Rich Trott
7fb5a03017
tools: apply linting to doc tools
...
Apply eslint rules to `tools/doc`.
PR-URL: https://github.com/nodejs/node/pull/4973
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com >
Reviewed-By: Roman Reiss <me@silverwind.io >
2016-03-02 14:01:11 -08:00
Timothy Gu
8fd9e646ec
tools: fix detecting constructor for JSON doc
...
Regex previous was not detecting cases like AssertionError as
a class name.
PR-URL: https://github.com/nodejs/node/pull/4966
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Chris Dickinson <chris@neversaw.us >
2016-03-02 14:01:11 -08:00
Rich Trott
4079b5e858
lib: scope loop variables
...
Refactor instances in `lib` where a loop variable is redeclared in the
same scope with `var`. In these cases, `let` can be used to scope the
variable declarations more precisely.
PR-URL: https://github.com/nodejs/node/pull/4965
Reviewed-By: Brian White <mscdex@mscdex.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
2016-03-02 14:01:11 -08:00
Rich Trott
46b6191ac5
net: refactor redeclared variables
...
`lib/net.js` contained four variables that were redeclared with `var` in
the same scope. This change refactors those redeclarations so they are
scoped properly.
PR-URL: https://github.com/nodejs/node/pull/4963
Reviewed-By: Brian White <mscdex@mscdex.net >
Reviewed-By: Roman Klauke <romaaan.git@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2016-03-02 14:01:11 -08:00
Rich Trott
298541792c
module: refactor redeclared variable
...
`homedir` was declared with `var` twice in the same scope in
`lib/module.js`. This change makes it a single declaration.
PR-URL: https://github.com/nodejs/node/pull/4962
Reviewed-By: Brian White <mscdex@mscdex.net >
Reviewed-By: Minwoo Jung <jmwsoft@gmail.com >
Reviewed-By: Roman Klauke <romaaan.git@gmail.com >
2016-03-02 14:01:11 -08:00
Rich Trott
1f8144200f
fs: refactor redeclared variables
...
Two variables are declared twice with `var` in the same scope in
`lib/fs.js`. This change refactors the code so the variable is declared
just once.
PR-URL: https://github.com/nodejs/node/pull/4959
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Brian White <mscdex@mscdex.net >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
2016-03-02 14:01:11 -08:00
Peter Lyons
4ed33b425c
doc: spell writable consistently
...
Docs have 108 instances of "writable" and only 1 "writeable" so
fix this one.
PR-URL: https://github.com/nodejs/node/pull/4954
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Roman Reiss <me@silverwind.io >
2016-03-02 14:01:11 -08:00
Rich Trott
5f25eabd8f
test: scope redeclared vars in test-child-process*
...
A handful of child process tests had variables declared multiple times
in the same scope using `var`. This change scopes those declarations.
PR-URL: https://github.com/nodejs/node/pull/4944
Reviewed-By: Michaël Zasso <mic.besace@gmail.com >
2016-03-02 14:01:11 -08:00
Rich Trott
a53cbf5b91
test: refactor switch
...
`test-child-process-fork-net2.js` has a switch statement with 6 cases.
Each case uses `child.send()`, passing an object for the callback.
`child.send()` ignores the callback because it is not a function.
Removing the unused argument.
PR-URL: https://github.com/nodejs/node/pull/4870
Reviewed-By: Alexis Campailla <orangemocha@nodejs.org >
2016-03-02 14:01:11 -08:00
Rich Trott
edc2df90a3
test: add common.platformTimeout() to dgram test
...
Use common.platformTimeout() to mitigate potential for CI to timeout
on slower devices.
Ref: https://github.com/nodejs/node/issues/4937
PR-URL: https://github.com/nodejs/node/pull/4938
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Myles Borins <mborins@us.ibm.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2016-03-02 14:01:11 -08:00
Rich Trott
efbb654e0f
test: fix flaky cluster test on Windows 10
...
test-cluster-shared-leak was flaky on Windows 10. Remove unnecessary
.send() calls and replace with .disconnect() to avoid spurious EPIPE.
Fixes: https://github.com/nodejs/node/issues/4887
PR-URL: https://github.com/nodejs/node/pull/4934
Reviewed-By: James M Snell <jasnell@gmail.com >
2016-03-02 14:01:11 -08:00
Kári Tristan Helgason
643b58164e
doc: update eol handling in readline
...
This commit explicitly calls out the end of line sequences
used to generate line events in the readline module.
Fixes: https://github.com/nodejs/node/issues/4916
PR-URL: https://github.com/nodejs/node/pull/4927
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2016-03-02 14:01:11 -08:00
Evan Lucas
1afa350efc
doc: add more details to process.env
...
process.env has a few quirks that deserve documenting.
The commit documents:
- How assigning to process.env will implicitly call `toString()`
- How to remove an environment variable from process.env
PR-URL: https://github.com/nodejs/node/pull/4924
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Roman Reiss <me@silverwind.io >
2016-03-02 14:01:11 -08:00
Alan Cohen
674415bd64
test: Add assertion for TLS peer certificate fingerprint
...
PR-URL: https://github.com/nodejs/node/pull/4923
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: James M Snell <jasnell@gmail.com >
2016-03-02 14:01:11 -08:00
Adam Langley
488821e611
crypto: use SSL_CTX_clear_extra_chain_certs.
...
The SSL_CTX_clear_extra_chain_certs function clears the extra
certificates associated with an SSL_CTX without reaching into the
SSL_CTX structure itself (which will become impossible in OpenSSL
1.1.0). The underlying implementation in OpenSSL[1] is the same what the
code was doing and OpenSSL has provided this function since 0.9.8 so
this change should be fully compatible.
[1] https://github.com/nodejs/node/blob/master/deps/openssl/openssl/ssl/s3_lib.c#L3899
PR-URL: https://github.com/nodejs/node/pull/4919
Reviewed-By: Fedor Indutny <fedor@indutny.com >
Reviewed-By: Shigeki Ohtsu <ohtsu@iij.ad.jp >
2016-03-02 14:01:11 -08:00
Adam Langley
e896c6bbbf
crypto: fix build when OCSP-stapling not provided
...
node_crypto.cc attempts to handle the case where OCSP stapling APIs
aren't provided by using NODE__HAVE_TLSEXT_STATUS_CB. But the build
would actually fail in this case because of a couple of places that were
missing #ifdefs.
With this change the build works although, as expected,
test-tls-ocsp-callback.js will fail.
PR-URL: https://github.com/nodejs/node/pull/4914
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Shigeki Ohtsu <ohtsu@iij.ad.jp >
2016-03-02 14:01:11 -08:00
Adam Langley
9c3302bb97
crypto: use a const SSL_CIPHER
...
SSL_CIPHER objects are conceptually const in any case and this allows
STACK_OF(SSL_CIPHER) to return a const pointer, as is done in BoringSSL
and, perhaps, OpenSSL in the future.
PR-URL: https://github.com/nodejs/node/pull/4913
Reviewed-By: Fedor Indutny <fedor@indutny.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2016-03-02 14:01:11 -08:00
Rich Trott
66ffc71b55
test,buffer: refactor redeclarations
...
Many variables in the buffer tests are redeclared. Change them so that
they are scoped appropriately.
PR-URL: https://github.com/nodejs/node/pull/4893
Reviewed-By: Roman Reiss <me@silverwind.io >
Reviewed-By: James M Snell <jasnell@gmail.com >
2016-03-02 14:01:11 -08:00
Santiago Gimeno
84ead62d8d
test: fix test-tls-zero-clear-in flakiness
...
It can happen that the server-side socket is destroyed before the
client-side socket has gracefully closed, thus causing a 'ECONNRESET'
error in this socket. To solve this, also close gracefully in the server
side too.
PR-URL: https://github.com/nodejs/node/pull/4888
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Fedor Indutny <fedor@indutny.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
2016-03-02 14:01:11 -08:00
Rich Trott
12a8427bab
buffer: refactor redeclared variables
...
A handful of variable declarations in `lib/buffer.js` redeclare the same
variable in the same scope. This change removes each redeclaration by
switching to `const`, switching to `let`, or explicitly hoisting the
`var` declaration.
PR-URL: https://github.com/nodejs/node/pull/4886
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Roman Klauke <romaaan.git@gmail.com >
2016-03-02 14:01:11 -08:00
Fedor Indutny
03944fe3e8
tls_wrap: reach error reporting for UV_EPROTO
...
Do not swallow error details when reporting UV_EPROTO asynchronously,
and when creating artificial errors.
Fix : #3692
PR-URL: https://github.com/nodejs/node/pull/4885
Reviewed-By: Shigeki Ohtsu <ohtsu@iij.ad.jp >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
2016-03-02 14:01:11 -08:00
Timothy Gu
55cc86bb41
tools: add property types in JSON documentation
...
PR-URL: https://github.com/nodejs/node/pull/4884
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Brian White <mscdex@mscdex.net >
2016-03-02 14:01:11 -08:00
Evan Lucas
6062b1c342
net: move isLegalPort to internal/net
...
isLegalPort can be used in more places than just net.js. This change
moves it to a new internal net module in preparation for using it in
the dns module.
PR-URL: https://github.com/nodejs/node/pull/4882
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
2016-03-02 14:01:11 -08:00
Kári Tristan Helgason
b4e783357c
url: change scoping of variables with let
...
Also changes some `var`s to `const` as they never change.
PR-URL: https://github.com/nodejs/node/pull/4867
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2016-03-02 14:01:11 -08:00
Roman Reiss
2323ae7868
test: fix irregular whitespace issue
...
PR-URL: https://github.com/nodejs/node/pull/4864
Reviewed-By: targos - Michaël Zasso <mic.besace@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Roman Klauke <romaaan.git@gmail.com >
2016-03-02 14:01:11 -08:00