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

13275 Commits

Author SHA1 Message Date
Felix Becker
c3e50cadac build: fix build when python path contains spaces
PR-URL: https://github.com/nodejs/node/pull/4841
Reviewed-By: Benjamin Gruenbaum <inglor@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
2016-02-09 13:23:33 +01:00
Prince J Wesley
211018fe72 repl: handle quotes within regexp literal
PR-URL: https://github.com/nodejs/node/pull/5117
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Minwoo Jung <jmwsoft@gmail.com>
2016-02-09 13:21:09 +01:00
Alejandro Oviedo
3da7d13e59 doc: merging behavior of writeHead vs setHeader
PR-URL: https://github.com/nodejs/node/pull/5081
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
2016-02-09 13:17:38 +01:00
Claudio Rodriguez
47e926a8d6 doc: fix type references for link gen, link css
Fixes several type references in the docs so that the
doc html gen tool that parses them can put the correct
links in.

Changes css styling for the generated type links.

PR-URL: https://github.com/nodejs/node/pull/4741
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Chris Dickinson <chris@neversaw.us>
Reviewed-By: Roman Reiss <me@silverwind.io>
2016-02-09 13:12:21 +01:00
Claudio Rodriguez
e517efafd8 tools: parse types into links in doc html gen
Changes the parsing of parameter types in the doc html gen
Links to either MDN or nodejs docs depending on type
See #4350

PR-URL: https://github.com/nodejs/node/pull/4741
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Chris Dickinson <chris@neversaw.us>
Reviewed-By: Roman Reiss <me@silverwind.io>
2016-02-09 13:09:56 +01:00
Ruben Bridgewater
88307974e6 node: improve process.nextTick performance
Prevent deoptimization of process.nextTick by removing the try finally
block. This is not necessary as the next tick queue will be reset
anyway, no matter if the callback throws or not.

Use a predefined array size prevents resizing the array and is therefor
faster.

PR-URL: https://github.com/nodejs/node/pull/5092
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-02-09 02:46:43 -07:00
Matteo Collina
7764b6cb96 streams: 5% throughput gain when sending small chunks
Improves the performance when moving small buffers by 5%,
and it adds a benchmark to avoid regression in that area.
In all other cases it is equally performant to current master.

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

PR-URL: https://github.com/nodejs/node/pull/4354
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-02-09 09:30:12 +00:00
Shigeki Ohtsu
dccccbbbe7 test: enable to work pkcs12 test in FIPS mode
The pfx file created by pkcs12 command of openssl causes an error in
FIPS mode because its certificate is encrypted with RC2 by default.
Adding `-descert` option resolves the error.

Fix: https://github.com/nodejs/node/pull/5144
Fix: https://github.com/nodejs/node/pull/5109
PR-URL: https://github.com/nodejs/node/pull/5150
Reviewed-By: Rich Trott <rtrott@gmail.com>
2016-02-09 13:05:48 +09:00
Fedor Indutny
c64d051cf6 test: disable gh-5100 test when in FIPS mode
This is a follow-up fix for half-broken test in 23196fe, and an attempt
to recover some dignity after breaking CI.

PR-URL: https://github.com/nodejs/node/pull/5144
Reviewed-By: Rich Trott <rtrott@gmail.com>
2016-02-08 14:02:12 -08:00
Rich Trott
394556e9f5 doc: fix dgram doc indentation
PR-URL: https://github.com/nodejs/node/pull/5118
Reviewed-By: Roman Reiss <me@silverwind.io>
2016-02-08 13:25:23 -08:00
Ben Noordhuis
791eef0cbb deps: reapply c-ares floating patch
PR-URL: https://github.com/nodejs/node/pull/5090
Reviewed-By: Fedor Indutny <fedor@indutny.com>
2016-02-08 14:44:41 -05:00
Cheng Zhao
cfafba68c6 src,deps: replace LoadLibrary by LoadLibraryW
On Windows, when compiling with `UNICODE` defined, `LoadLibrary` becomes
`LoadLibraryW`. When an ASCII string is passed to that function it
crashes.

PR-URL: https://github.com/iojs/io.js/pull/226
Reviewed-By: Bert Belder <bertbelder@gmail.com>
2016-02-08 14:44:40 -05:00
Fedor Indutny
1258b0166d deps: sync with upstream bagder/c-ares@2bae2d5
PR-URL: https://github.com/nodejs/node/pull/5090
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2016-02-08 14:44:19 -05:00
Fedor Indutny
106c6cfe98 crypto: fix memory leak in LoadPKCS12
`sk_X509_pop_free` should be used instead of `sk_X509_free` to free all
items in queue too, not just the queue itself.

PR-URL: https://github.com/nodejs/node/pull/5109
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Shigeki Ohtsu <ohtsu@iij.ad.jp>
2016-02-08 14:39:25 -05:00
Fedor Indutny
23196fe9c1 crypto: add pfx certs as CA certs too
According to documentation all certificates specified in `pfx` option
should be treated as a CA certificates too. While it doesn't seem to be
logically correct to me, we can't afford to break API stability at this
point.

Fix: #5100
PR-URL: https://github.com/nodejs/node/pull/5109
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Shigeki Ohtsu <ohtsu@iij.ad.jp>
2016-02-08 14:38:45 -05:00
Julie Pagano
1e146e7c26 doc: clarify code of conduct reporting
Clarifies the code of conduct by making the following changes:

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

PR-URL: https://github.com/nodejs/node/pull/5107
Reviewed-By: Myles Borins <mborins@us.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Kat Marchán <kzm@sykosomatic.org>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2016-02-08 11:55:03 -05:00
Daniel Turing
dbdbdd4998 dns: add resolvePtr to query plain DNS PTR records
Resolving plain PTR records is used beyond reverse DNS, most
prominently with DNS-SD (RFC6763). This adds dns.resolvePtr(),
and uses it (instead of dns.reverse()) in dns.resolve().

PR-URL: https://github.com/nodejs/node/pull/4921
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Brian White <mscdex@mscdex.net>
2016-02-08 17:30:38 +01:00
Daniel Turing
c4ab861a49 dns: add failure test for dns.resolveXXX
test whether the various resolve functions cause ENOTFOUND when trying
to resolve a known invalid domain/hostname.

PR-URL: https://github.com/nodejs/node/pull/4921
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Brian White <mscdex@mscdex.net>
2016-02-08 17:29:03 +01:00
Matteo Collina
76bc4c75bf doc: clarify dgram socket.send() multi-buffer support
Fixes: #5124
See: https://github.com/nodejs/node/pull/4374
PR-URL: https://github.com/nodejs/node/pull/5130
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-02-08 16:15:34 +00:00
Ben Noordhuis
eaa9e0e776 doc: console is asynchronous unless it's a file
Mea culpa, looks like I forgot to update console.markdown in commit
dac1d38 ("doc: stdout/stderr can block when directed to file").
This commit rectifies that.

Refs: https://github.com/nodejs/node/issues/5131
PR-URL: https://github.com/nodejs/node/pull/5133
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Evan Lucas <evanlucas@me.com>
2016-02-07 23:28:21 +01:00
Rich Trott
478c68284f tools: lint for empty character classes in regex
Enable linting rule to forbid empty character classes in regular
expressions. See http://eslint.org/docs/rules/no-empty-character-class

Organize "Possible Error" rules in .eslintrc in alphabetical order to
match eslint documentation.

PR-URL: https://github.com/nodejs/node/pull/5115
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-02-07 13:20:45 -08:00
Rich Trott
987e9e3d64 test: fix flaky test-dgram-pingpong
There is no guarantee UDP messages will be received. Accommodate the
occasional dropped message.

This is a functionality test, not a performance benchmark. Speed up the
test by not sending 1500 messages across three ports.

Fixes: https://github.com/nodejs/node/issues/4526
PR-URL: https://github.com/nodejs/node/pull/5125
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-02-07 13:01:05 -08:00
dcposch@dcpos.ch
2c55cc2d2c buffer: remove deprecated Buffer.write branch
* Explit throw on deprecated Buffer.write(...)
* Update tests, remove obsolete Buffer.write(...)
* Add comment for obsolete Buffer.write(...)

PR-URL: https://github.com/nodejs/node/pull/5048
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-02-07 12:30:03 -08:00
Jackson Tian
9aebb002b0 src: clean up usage of __proto__
Prefer using Object.setPrototypeOf() instead.

PR-URL: https://github.com/nodejs/node/pull/5069
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-02-07 12:27:09 -08:00
Rich Trott
07424705a6 doc: fix typo in dgram doc
Remove stray square brackets from dgram documentation.

PR-URL: https://github.com/nodejs/node/pull/5114
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2016-02-07 08:16:59 -08:00
Rich Trott
6e3bccbc03 test: mark flaky tests on Raspberry Pi
A few tests have started failing on Raspberry Pi devices in CI.
https://ci.nodejs.org/job/node-test-binary-arm/943/

PR-URL: https://github.com/nodejs/node/pull/5082
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Roman Klauke <romaaan.git@gmail.com>
Ref: https://github.com/nodejs/node/issues/4830
Ref: https://github.com/nodejs/node/issues/3635
Ref: https://github.com/nodejs/node/issues/4526
2016-02-06 08:42:34 -08:00
Myles Borins
4897f94ec6 node_contextify: do not incept debug context
Currently a debug context is created for various calls to util.

If the node debugger is being run the main context is the debug
context. In this case node_contextify was freeing the debug context
and causing everything to explode.

This change moves around the logic and no longer frees the context.

There is a concern about the dangling pointer

The regression test was adapted from code submitted by @3y3 in #4815

Fixes: https://github.com/nodejs/node/issues/4440
Fixes: https://github.com/nodejs/node/issues/4815
Fixes: https://github.com/nodejs/node/issues/4597
Fixes: https://github.com/nodejs/node/issues/4952

PR-URL: https://github.com/nodejs/node/issues/4815

Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2016-02-05 15:40:56 -08:00
Myles Borins
878bcd43f8 querystring: check that maxKeys is finite
There was a very subtle change in behavior introduced with 27def4f

In the past if querystring.parse was given Infinity for maxKeys,
everything worked as expected.

Check to see is maxKeys is Infinity before forwarding the value to
String.prototype.split which causes this regression

PR-URL: https://github.com/nodejs/node/pull/5066
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2016-02-05 13:58:50 -08:00
Sakthipriyan Vairamani
1124de2d76 fs: deprecate fs.read's string interface
`fs.read` supports a deprecated string interface version, which is
not documented. It was intended to be deprecated in this commit in 2010
c93e0aaf06
This patch issues a deprecation message saying the usage of this
interface is deprecated.

PR-URL: https://github.com/nodejs/node/pull/4525
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2016-02-05 09:43:24 +05:30
HUANG Wei
c0bfac6ba9 buffer: remove duplicated code in fromObject
Add fromArrayLike() to handle logic of copying in values from array-like
argument.

PR-URL: https://github.com/nodejs/node/pull/4948
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
2016-02-04 17:03:07 -07:00
Evan Lucas
25751bedfe node: deprecate process.EventEmitter
The comment stating it was deprecated was added in 2011 via
4ef8f06fe6. It is time to
actually deprecate it.

PR-URL: https://github.com/nodejs/node/pull/5049
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
2016-02-04 13:43:15 -06:00
Rich Trott
7406cd3a59 tools: lint for spacing around unary operators
Enable `space-unary-ops` in `.eslintrc`. This prohibits things like:

    i ++        // use `i++` instead
    typeof(foo) // use `typeof foo` or `typeof (foo)` instead

Ref: https://github.com/nodejs/node/pull/4772#discussion_r51732299
PR-URL: https://github.com/nodejs/node/pull/5063
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-02-04 10:56:17 -08:00
Alexander Makarenko
c714b2e21c doc: fix links order in Buffer doc
Sort links in lexical order

PR-URL: https://github.com/nodejs/node/pull/5076
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Roman Klauke <romaaan.git@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-02-04 10:53:24 -08:00
Rod Vagg
e31bda81dd doc: add CTC meeting minutes 2016-01-20
PR-URL: https://github.com/nodejs/node/pull/4904
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Roman Reiss <me@silverwind.io>
2016-02-04 19:30:37 +01:00
Alexander Makarenko
39d0797449 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-02-04 19:25:07 +01:00
Rod Vagg
ce11a37c4a doc: add CTC meeting minutes 2016-01-27
PR-URL: https://github.com/nodejs/node/pull/5057
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-02-04 10:17:47 -08:00
Alexander Makarenko
13a3685e43 doc: fix links in Addons docs
Put links in a lexical order. Add missing links. Remove duplicates.

PR-URL: https://github.com/nodejs/node/pull/5072
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-02-04 10:14:46 -08:00
Brian White
01dd8ed113 doc: fix inconsistent styling
PR-URL: https://github.com/nodejs/node/pull/4996
Reviewed-By: Rich Trott <rtrott@gmail.com>
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-02-04 10:11:07 -08:00
Santiago Gimeno
538813c455 test: fix net-socket-timeout-unref flakiness
From time to time this test is failing in OS X because at least one of
the connections takes quite a long time (around 5 seconds) causing some
of the timers may fire before the test exited. To solve this, wait for
all the connections to be established before setting the timeouts and
unrefing the sockets.

PR-URL: https://github.com/nodejs/node/pull/4772
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-02-04 10:03:09 -08:00
Timothy Gu
ac0d92e4d1 doc: fix link in cluster documentation
PR-URL: https://github.com/nodejs/node/pull/5068
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-02-04 10:00:10 -08:00
Rich Trott
34f39670cf tools: enable no-redeclare rule for linter
PR-URL: https://github.com/nodejs/node/pull/5047
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-02-04 09:52:17 -08:00
Rich Trott
c14c12e6ba tools: fix redeclared vars in doc/json.js
PR-URL: https://github.com/nodejs/node/pull/5047
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-02-04 09:52:02 -08:00
Minwoo Jung
34a5019b6b doc: fix reference to API hash.final
fix a reference to a non-existent API, `hash.final()`.
It should be `hash.digest()`.

PR-URL: https://github.com/nodejs/node/pull/5050
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
2016-02-04 22:15:30 +09:00
Brian White
c41c09375b doc: correct tlsSocket.getCipher() description
getCipher() actually includes the protocol version that the cipher was
first supported and *not* the negotiated protocol of the current
connection.

PR-URL: https://github.com/nodejs/node/pull/4995
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-02-03 21:36:40 -05:00
Brian White
2c357a7e3b tls: add getProtocol() to TLS sockets
This commit adds a new method for TLS sockets that returns the
negotiated protocol version.

PR-URL: https://github.com/nodejs/node/pull/4995
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-02-03 21:34:06 -05:00
Michaël Zasso
4501a28ad9 doc: clarify optional arguments of Buffer methods
PR-URL: https://github.com/nodejs/node/pull/5008
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
2016-02-03 19:54:50 +01:00
Rainer Oviir
977159f149 doc: uppercase 'RSA-SHA256' in crypto.markdown
Fixes: https://github.com/nodejs/node/issues/5031
PR-URL: https://github.com/nodejs/node/pull/5044
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-02-03 01:10:58 +01:00
Ben Noordhuis
924cc6c633 src: upgrade to new v8::Private api
Stop using the deprecated `GetHiddenValue()` and `SetHiddenValue()`
methods, start using `GetPrivate()` and `SetPrivate()` instead.

This commit turns some of the entries in the per-isolate string table
into private symbols.

PR-URL: https://github.com/nodejs/node/pull/5045
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
2016-02-03 01:04:31 +01:00
Rich Trott
7ea34fd624 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-02-02 16:13:02 -08:00
Rich Trott
6504a0fec3 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-02-02 15:10:14 -08:00