Commit Graph

11987 Commits (a2e43412cf07be750ea077319e9e1de6b10b74c2)

Author SHA1 Message Date
Ben Noordhuis a2e43412cf tools: make add-on scraper print filenames
Make the tool that generates add-ons from doc/api/addons.markdown print
the names of the files it writes out.  Before this commit, it printed a
rather unhelpful "Done."

PR-URL: https://github.com/nodejs/node/pull/2428
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: Rod Vagg <rod@vagg.org>
2015-08-25 12:05:16 +02:00
Ben Noordhuis 1aa9d3a2ab build: make ci test addons in test/addons
Make `make test-addons` part of the `make test-ci` target.

Use order-only prerequisites to make generating and building the add-ons
concurrency-safe when $JOBS > 1 and fudge the dependency on $(NODE_EXE)
so that add-ons are only rebuilt when needed instead of all the time.

PR-URL: https://github.com/nodejs/node/pull/2428
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: Rod Vagg <rod@vagg.org>
2015-08-25 12:03:57 +02:00
Rod Vagg f9539c19e8 doc: update changelog for io.js v3.2.0
Notable changes:

* events: Added EventEmitter#listenerCount(event) as a replacement for
  EventEmitter.listenerCount(emitter, event), which has now been
  marked as deprecated in the docs. (Sakthipriyan Vairamani) #2349
* module: Fixed an error with preloaded modules when the current
  working directory doesn't exist. (Bradley Meck) #2353
* node: Startup time is now about 5% faster when not passing V8 flags.
  (Evan Lucas) #2483
* repl: Tab-completion now works better with arrays.
  (James M Snell) #2409
* string_bytes: Fixed an unaligned write in the handling of UCS2
  encoding. (Fedor Indutny) #2480
* tls: Added a new --tls-cipher-list flag that can be used to override
  the built-in default cipher list. (James M Snell) #2412

PR-URL: https://github.com/nodejs/node/pull/2512
2015-08-25 15:48:50 +10:00
Rich Trott d6167689d9 test: refactor test-https-simple.js
This refactoring:

* eliminates the need for the external `curl` command
* speeds the test by running the two test requests simultaneously
* checks the type of error in the test that expects a failure
    (previously, any error type would cause the test to pass)

PR-URL: https://github.com/nodejs/node/pull/2433
Reviewed-By: Brendan Ashworth <brendan.ashworth@me.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2015-08-24 14:09:25 -07:00
Evan Lucas ecb840c14a build: use required platform in android-configure
The introduction of libuv 1.6.0 broke the android-configure script by
not specifying the correct platform. uv_os_homedir uses getpwuid_r
which was not made public until API level 21 on android.

The regression was introduced in a804026...b5cd2f0

PR-URL: https://github.com/nodejs/node/pull/2501
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-08-24 15:58:25 -05:00
Ben Noordhuis caa0d0c0a7 stream: rename poorly named function
roundUpToNextPowerOf2() does more than just rounding up to the next
power of two.  Rename it to computeNewHighWaterMark().

PR-URL: https://github.com/nodejs/node/pull/2479
Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2015-08-24 20:24:15 +02:00
Ben Noordhuis 3af8e451f2 stream: micro-optimize high water mark calculation
Don't iterate over all 32 bits, use some hacker's delight bit twiddling
to compute the next power of two.

The logic can be reduced to `n = 1 << 32 - Math.clz32(n)` but then it
can't easily be backported to v2.x; Math.clz32() was added in V8 4.3.

PR-URL: https://github.com/nodejs/node/pull/2479
Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2015-08-24 20:24:13 +02:00
Ben Noordhuis 1a3f4a87b6 stream: fix off-by-factor-16 error in comment
The high watermark is capped at 8 MB, not 128 MB like the comment
in lib/_stream_readable.js said.

PR-URL: https://github.com/nodejs/node/pull/2479
Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2015-08-24 20:21:22 +02:00
Bradley Meck 2d251e661a module: fix module preloading when cwd is ENOENT
Fixes a regression from 5759722cfa
that prevented modules from being preloaded if the cwd does not exist.
Absolute and builtin modules now preload correctly again.

Refs: https://github.com/nodejs/node/issues/1803
PR-URL: https://github.com/nodejs/node/pull/2353
Reviewed-By: Jeremiah Senkpiel <fishrock123@rockemail.com>
2015-08-24 10:46:14 -04:00
João Reis 6480f42288 test: remove test-timers-first-fire
According to the documentation, "io.js makes no guarantees
about the exact timing of when the callback will fire"
(https://iojs.org/api/timers.html#timers_settimeout_callback_delay_arg),
hence this test is not necessary.

PR-URL: https://github.com/nodejs/node/pull/2458
Reviewed-By: Ben Noordhuis <ben@strongloop.com>
Reviewed-By: Alexis Campailla <alexis@janeasystems.com>
2015-08-24 12:18:06 +01:00
João Reis bce1aea425 win: fix custom actions for WiX older than 3.9
This is a port of joyent/node@e192f61514 .

Original commit message:

  Older WiX versions included a header with extern "C" declaration,
  hence the custom action source must be C++.

  Reviewed-By: João Reis <reis@janeasystems.com>
  PR-URL: https://github.com/joyent/node/pull/25569

PR-URL: https://github.com/nodejs/node/pull/2365
Reviewed-By: Alexis Campailla <alexis@janeasystems.com>
2015-08-24 12:06:15 +01:00
Julien Gilli 0acc9b2795 win: fix custom actions on Visual Studio != 2013
This is a port of joyent/node@16bcd68dc5 .

Original commit message:

  The original change that added support for running custom actions
  during the install process
  (joyent/node@e7c84f82c7) assumed that
  Visual Studio 2013 is used to generate the installer file.

  However, that is not always the case, and older versions of Visual
  Studio should allow users to generate Windows installer files. This
  change makes the custom actions visual studio project use the visual
  studio version that is found by vcbuild.bat.

  Reviewed-By: João Reis <reis@janeasystems.com>
  PR-URL: https://github.com/joyent/node/pull/25569

PR-URL: https://github.com/nodejs/node/pull/2365
Reviewed-By: Alexis Campailla <alexis@janeasystems.com>
2015-08-24 12:05:15 +01:00
Sakthipriyan Vairamani 5c77031f95 doc: make the deprecations consistent
The deprecation messages in the documentations should be in the format

    Stability: 0 - Deprecated: Use [alternate] instead.

so that they will be consistent.

PR-URL: https://github.com/nodejs/node/pull/2450
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: James M Snell <jasnell@gmail.com>
2015-08-24 13:38:37 +05:30
Roman Reiss cded6e7993 doc: fix CHANGELOG.md on master
This patch applies the diff of CHANGELOG from v3.x branch to master,
corresponding to the 3.1.0 release.

Fixes: https://github.com/nodejs/node/issues/2456
Fixes: https://github.com/nodejs/node/issues/2502

PR-URL: https://github.com/nodejs/node/pull/2513
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2015-08-24 12:44:09 +05:30
Sakthipriyan Vairamani 93e2830686 doc: document deprecation of util.is* functions
This patch documentes the deprecation of util.is* functions.
As per the deprecation policy dicussion, nodejs/dev-policy/issues/49,
we need to start with documenting the deprecation. So, this is
the first step towards officially removing them.

PR-URL: https://github.com/nodejs/node/pull/2447
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2015-08-24 08:11:21 +05:30
cjihrig 3b602527d1 node: additional cleanup for node rename
Fixes: https://github.com/nodejs/node/issues/2361
PR-URL: https://github.com/nodejs/node/pull/2367
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
2015-08-23 17:59:43 -04:00
cjihrig 4f50d3fb90 process: make process.release.name "node"
This commit sets the value of process.release.name to "node".

Fixes: https://github.com/nodejs/node/issues/2361
PR-URL: https://github.com/nodejs/node/pull/2367
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
2015-08-23 17:59:43 -04:00
Frederic Hemberger 45a2046f5d installer: fix installers for node.js rename
This commit completes the io.js to Node.js rename in the
Windows installer.

Fixes: https://github.com/nodejs/node/issues/2418
PR-URL: https://github.com/nodejs/node/pull/2367
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: João Reis <reis@janeasystems.com>
2015-08-23 17:59:43 -04:00
cjihrig a69ab27ab4 node: rename from io.js to node
This commit replaces instances of io.js with Node.js, based on the
recent convergence. There are some remaining instances of io.js,
related to build and the installer.

Fixes: https://github.com/nodejs/node/issues/2361
PR-URL: https://github.com/nodejs/node/pull/2367
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: João Reis <reis@janeasystems.com>
2015-08-23 17:59:43 -04:00
Rich Trott ae8d436623 test: use reserved IP in test-net-connect-timeout
Use reserved IP in test-net-connect-timeout.js rather than arbitrary
IP.

PR-URL: https://github.com/nodejs/node/pull/2257
Fixes: https://github.com/nodejs/node/issues/2469
Reviewed By: Ben Noordhuis <ben@strongloop.com>
2015-08-23 14:30:01 -07:00
Minwoo Jung f3c3b23d55 doc: fix comments in tls_wrap.cc and _http_client.js
fixed grammatically wrong expressions to make it clear

Reviewed By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/2490
PR-URL: https://github.com/nodejs/node/pull/2489
2015-08-23 09:01:22 -07:00
James M Snell b897af4558 tools: add license boilerplate to check-imports.sh
Per: https://github.com/joyent/node/pull/6962

This applies only the first commit from https://github.com/joyent/node/pull/6962.

/cc @bnoorduis

Reviewed By: Ben Noordhuis <ben@strongloop.com>
PR-URL: https://github.com/nodejs/node/pull/2386
2015-08-23 08:55:12 -07:00
James M Snell 5ba868f024 tls: add --tls-cipher-list command line switch
This adds a new `--tls-cipher-list` command line switch
that can be used to override the built-in default cipher
list. The intent of this is to make it possible to enforce
an alternative default cipher list at the process level.
Overriding the default cipher list is still permitted at
the application level by changing the value of
`require('tls').DEFAULT_CIPHERS`.

As part of the change, the built in default list is moved
out of tls.js and into node_constants.h and node_constants.cc.
Two new constants are added to require('constants'):

  * defaultCipherList (the active default cipher list)
  * defaultCoreCipherList (the built-in default cipher list)

A test case and doc changes are included.

A new NODE_DEFINE_STRING_CONSTANT macro is also created in
node_internals.h

When node_constants is initialized, it will pick up either
the passed in command line switch or fallback to the default
built-in suite.

Within joyent/node, this change had originaly been wrapped
up with a number of other related commits involving the
removal of the RC4 cipher. This breaks out this isolated
change.

/cc @mhdawson, @misterdjules, @trevnorris, @indutny, @rvagg

Reviewed By: Ben Noordhuis <ben@strongloop.com>
PR-URL: https://github.com/nodejs/node/pull/2412
2015-08-23 08:52:01 -07:00
hackerjs 3a7be23f98 doc: document response.finished in http.markdown
Adds mention of response.finished to http.markdown
Originally submitted by @hackerjs. The original
commit needed a bit of cleanup on grammar.

Reviewed By: James M Snell <jasnell@gmail.com>
Reviewed By: Michaël Zasso <mic.besace@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/2414
2015-08-23 08:48:44 -07:00
Rod Vagg ba50c2d85d doc: update AUTHORS list
Update AUTHORS list using tools/update-authors.sh
Fix @muddletoes' .mailmap entry

PR-URL: https://github.com/nodejs/node/pull/2505
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-08-23 21:59:45 +10:00
Brendan Ashworth 96a2b2d54d tools: enable space-after-keywords in eslint
Requires that you do:

  if (x) { ... }

Rather than:

  if(x) { ... }
2015-08-22 18:01:53 -07:00
Brendan Ashworth 8af5962608 test: add spaces after keywords
eg changes:

  if(x) { ... }

to:

  if (x) { ... }
2015-08-22 18:01:53 -07:00
Roman Klauke b125ad186c fs: replace bad_args macro with concrete error msg
Instead of throwing an error with `Bad arguments` the fs methods
return a concrete error message. If an argument is missing, the
methods throw an error with the information, what is missing.
In case of a type mismatch, they throw an error with some hints,
what datatype is expected.

PR-URL: https://github.com/nodejs/node/pull/2495
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2015-08-23 02:09:49 +05:30
Sakthipriyan Vairamani 31188b796e tools: fix anchors in generated documents
When an anchor tag is used within a pre tag, the link is not
distinguishable. This patch makes sure that the links are highlighted
by underlining them.

PR-URL: https://github.com/nodejs/node/pull/2491
Reviewed-By: Roman Reiss <me@silverwind.io>
2015-08-23 00:15:18 +05:30
Rod Vagg ccc790b628 doc: update AUTHORS list
Update AUTHORS list using tools/update-authors.sh

PR-URL: https://github.com/nodejs/node/pull/2318
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-08-22 20:09:07 +10:00
Rod Vagg 4b1c27f94e doc: add TSC meeting minutes 2015-07-29
PR-URL: https://github.com/nodejs/node/pull/2437
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-08-22 20:07:24 +10:00
Rod Vagg 9eecbac848 doc: add TSC meeting minutes 2015-08-19
PR-URL: https://github.com/nodejs/node/pull/2460
Reviewed-By: James M Snell <jasnell@gmail.com>
2015-08-22 20:05:39 +10:00
Rod Vagg f196e44ec6 doc: add TSC meeting minutes 2015-06-03
PR-URL: https://github.com/nodejs/node/pull/2453
Reviewed-By: James M Snell <jasnell@gmail.com>
2015-08-22 20:05:39 +10:00
Rod Vagg 51cf983eb3 doc: fix links to original converged repo
nodejs/node -> nodejs/node-convergence-archive

PR-URL: https://github.com/nodejs/node/pull/2454
Reviewed-By: James M Snell <jasnell@gmail.com>
2015-08-22 20:05:36 +10:00
Rod Vagg b96cd52ed8 doc: fix links to original gh issues for TSC meetings
nodejs/node -> nodejs/node-convergence-archive

PR-URL: https://github.com/nodejs/node/pull/2454
Reviewed-By: James M Snell <jasnell@gmail.com>
2015-08-22 20:05:23 +10:00
Rod Vagg d9f9fcb48a doc: add audio recording links to TSC meeting minutes
PR-URL: https://github.com/nodejs/node/pull/2454
Reviewed-By: James M Snell <jasnell@gmail.com>
2015-08-22 20:05:06 +10:00
James M Snell ce145bf358 repl: filter integer keys from repl tab complete list
Refactored version of https://github.com/joyent/node/pull/25819

Removes integer keys (and keys starting with numbers) from
candidate list on repl tab complete. Refactored the originally
submitted change to simplify and ensure that the integer keys
do not show up on objects either.

Reviewed By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/2409
2015-08-21 21:40:44 -07:00
Fedor Indutny 43660ad37b buffer: reapply 07c0667
Original commit message:

    buffer: align chunks on 8-byte boundary

    When slicing global pool - ensure that the underlying buffer's data
    ptr is 8-byte alignment to do not ruin expectations of 3rd party C++
    addons.

    NOTE: 0.10 node.js always returned aligned pointers and io.js should
    do this too for compatibility.

PR-URL: https://github.com/nodejs/node/pull/2487
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
2015-08-21 14:12:49 -07:00
Fedor Indutny 68e53ddcba string_bytes: fix unaligned write in UCS2
Support unaligned output buffer when writing out UCS2 in
`StringBytes::Write`.

Fix: https://github.com/nodejs/node/issues/2457
PR-URL: https://github.com/nodejs/node/pull/2480
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
2015-08-21 12:26:03 -07:00
Evan Lucas 1c20b87d19 src: improve startup time
Previously, V8:SetFlagsFromCommandLine was being called even if v8_argc
was 0. This change prevents that from being called unless v8 arguments
are actually passed.

Improves startup time by about 5%.

PR-URL: https://github.com/nodejs/node/pull/2483
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2015-08-21 14:13:32 -05:00
Rod Vagg 5ce0f63fa6 doc: add TSC meeting minutes 2015-07-22
PR-URL: https://github.com/nodejs/node/pull/2436
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-08-21 20:15:56 +10:00
Karl Skomski 34985a1cbd crypto: fix mem {de}allocation in ExportChallenge
Use correct deallocator for returned buffera.
Don't free internal structure via ASN1_STRING_data.
Deallocate NETSCAPE_SPKI.

PR-URL: https://github.com/nodejs/node/pull/2359
Reviewed-By: Fedor Indutny <fedor@indutny.com>
2015-08-20 22:01:09 -07:00
Mike Atkins f1810ed1b8 tls: handle empty cert in checkServerIndentity
This resolves joyent/node#9272. `tlsSocket.getPeerCertificate` will
return an empty object when the peer does not provide a certificate,
but, prior to this, when the certificate is empty, `checkServerIdentity`
would throw because the `subject` wasn't present on the cert.
`checkServerIdentity` must return an error, not throw one, so this
returns an error when the cert is empty instead of throwing
a `TypeError`.

PR-URL: https://github.com/nodejs/node/pull/2343
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: Shigeki Ohtsu <ohtsu@iij.ad.jp>
2015-08-21 11:24:51 +09:00
Jacob Edelman ec6e5c7999 doc: fix spelling mistake in node.js comment
Per: https://github.com/joyent/node/pull/8876

PR-URL: https://github.com/nodejs/node/pull/2391
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Roman Reiss <me@silverwind.io>
2015-08-20 20:29:35 +02:00
Michaël Zasso 2235fad11b test: remove unreachable code
There is no way a line can be called after throwing an exception.

PR-URL: https://github.com/nodejs/node/pull/2289
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Brendan Ashworth <brendan.ashworth@me.com>
2015-08-20 20:16:47 +02:00
Michaël Zasso 518a4d08cb test: disallow unreachable code
PR-URL: https://github.com/nodejs/node/pull/2289
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Brendan Ashworth <brendan.ashworth@me.com>
2015-08-20 20:12:44 +02:00
Todd Kennedy 3849750a09 repl: dont throw ENOENT on NODE_REPL_HISTORY_FILE
If you have no history file written to disk, but the environment
variable set, `fs.readFileSync` will throw an ENOENT error,
but there's nothing to convert. The converter should ignore
ENOENT on that `fs.readFileSync` call.

Fixes: https://github.com/nodejs/node/issues/2449
PR-URL: https://github.com/nodejs/node/pull/2451
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2015-08-20 10:29:35 -04:00
Fedor Indutny 291b310e21 stream_base: various improvements
Expose and use in TLSWrap an `v8::External` wrap of the
`StreamBase*` pointer instead of guessing the ancestor C++ class in
`node_wrap.h`.

Make use of `StreamBase::Callback` structure for storing/passing both
callback and context in a single object.

Introduce `GetObject()` for future user-land usage, when a child class
is not going to be inherited from AsyncWrap.

PR-URL: https://github.com/nodejs/node/pull/2351
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
2015-08-20 01:14:37 -07:00
Brendan Ashworth 0d39d35739 test: reduce timeouts in test-net-keepalive
Previously 1000-1200ms, they're now (platform dependent) 50-100ms.

Improves test run time on my machine from 0m1.335s to 0m0.236s.

PR-URL: https://github.com/nodejs/node/pull/2429
Reviewed-By: Rich Trott <rtrott@gmail.com>
2015-08-20 00:49:01 -07:00
Brendan Ashworth 2052941149 test: improve test-net-server-pause-on-connect
Previously the test had a massive timeout (3s!), reduce this to a
platform specific timeout of 50ms.

This test runs two servers at the same time in an attempt to compare
behaviour. I've added a check to make sure one event fires before the
other event, as is expected, but that is a possible race condition.

Improves test run time on my machine from 0m3.141s to 0m0.356s.

PR-URL: https://github.com/nodejs/node/pull/2429
Reviewed-By: Rich Trott <rtrott@gmail.com>
2015-08-20 00:48:56 -07:00