platform/upstream/nodejs.git
9 years agoprocess: reintroduce ares to versions
Johan Bergström [Wed, 14 Jan 2015 00:12:05 +0000 (11:12 +1100)]
process: reintroduce ares to versions

ares version info was accidentally removed in c80f8fa8f.

PR-URL: https://github.com/iojs/io.js/pull/347
Reviewed-By: Fedor Indutny <fedor@indutny.com>
9 years agodeps: update http_parser to 2.4.0
Fedor Indutny [Tue, 13 Jan 2015 23:57:45 +0000 (02:57 +0300)]
deps: update http_parser to 2.4.0

PR-URL: https://github.com/iojs/io.js/pull/345
Reviewed-By: Rod Vagg <rod@vagg.org>
9 years agodeps: make node-gyp fetch tarballs from iojs.org
Ben Noordhuis [Tue, 13 Jan 2015 22:22:49 +0000 (23:22 +0100)]
deps: make node-gyp fetch tarballs from iojs.org

Apply a small patch that makes node-gyp fetch the tarballs from
https://iojs.org/ instead of http://nodejs.org/

A patch better suited for inclusion upstream will be put together
shortly.

PR-URL: https://github.com/iojs/io.js/pull/343
Reviewed-By: Rod Vagg <rod@vagg.org>
9 years agodoc: update AUTHORS list
Rod Vagg [Tue, 13 Jan 2015 21:39:45 +0000 (08:39 +1100)]
doc: update AUTHORS list

Update AUTHORS file using tools/update-authors.sh

PR-URL: https://github.com/iojs/io.js/pull/342
Reviewed-By: Ben Noorhduis <info@bnoordhuis.nl>
9 years agodoc: add io.js LICENSE block
Rod Vagg [Sun, 11 Jan 2015 23:59:30 +0000 (10:59 +1100)]
doc: add io.js LICENSE block

PR-URL: https://github.com/iojs/io.js/pull/294
Reviewed-By: Ben Noorhduis <info@bnoordhuis.nl>
Reviewed-By: Bert Belder <bertbelder@gmail.com>
Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
Discussed in TC meeting 2015-01-13, merge but accept changes
if better advice comes along

9 years agotest: disable fs-readfile-error on FreeBSD
Fedor Indutny [Tue, 13 Jan 2015 13:35:08 +0000 (16:35 +0300)]
test: disable fs-readfile-error on FreeBSD

FreeBSD does not return EISDIR when reading "/".

PR-URL: https://github.com/iojs/io.js/pull/332
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agotest: fix setproctitle on FreeBSD
Fedor Indutny [Tue, 13 Jan 2015 13:28:56 +0000 (16:28 +0300)]
test: fix setproctitle on FreeBSD

PR-URL: https://github.com/iojs/io.js/pull/332
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agotest: loosen timeout in spawnsync-test for FreeBSD
Fedor Indutny [Tue, 13 Jan 2015 13:23:21 +0000 (16:23 +0300)]
test: loosen timeout in spawnsync-test for FreeBSD

PR-URL: https://github.com/iojs/io.js/pull/332
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agodns: remove AI_V4MAPPED hint flag on FreeBSD
Fedor Indutny [Tue, 13 Jan 2015 13:16:15 +0000 (16:16 +0300)]
dns: remove AI_V4MAPPED hint flag on FreeBSD

FreeBSD does not support V4MAPPED.

PR-URL: https://github.com/iojs/io.js/pull/332
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agodeps: fix v8 build on FreeBSD
Fedor Indutny [Tue, 13 Jan 2015 15:54:17 +0000 (15:54 +0000)]
deps: fix v8 build on FreeBSD

clang++ on FreeBSD was blaming v8 for using invalid casts from nullptr:

    reinterpret_cast from 'nullptr_t' to '...' is not allowed

Replace casts with NULL, or NULL with 0 where applicable.

Fix #324
PR-URL: https://github.com/iojs/io.js/pull/332
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agodoc: remove tracing link in toc
Yosuke Furukawa [Tue, 13 Jan 2015 15:10:44 +0000 (00:10 +0900)]
doc: remove tracing link in toc

PR-URL: https://github.com/iojs/io.js/pull/334
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agosrc: limit .gitattributes eol to vcbuild.bat
Rod Vagg [Tue, 13 Jan 2015 11:31:41 +0000 (22:31 +1100)]
src: limit .gitattributes eol to vcbuild.bat

Fixes: https://github.com/iojs/io.js/issues/330
PR-URL: https://github.com/iojs/io.js/pull/331

9 years agobuild: initialize variable before use
Johan Bergström [Tue, 13 Jan 2015 02:52:44 +0000 (13:52 +1100)]
build: initialize variable before use

found with make --warn-undefined-variables

PR-URL: https://github.com/iojs/io.js/pull/320
Reviewed-By: Rod Vagg <rod@vagg.org>
9 years agobuild: create smaller build artifacts
Johan Bergström [Tue, 13 Jan 2015 01:51:34 +0000 (12:51 +1100)]
build: create smaller build artifacts

check if xz exists on the host system and use if available, which makes
xz-tarballs available for distribution. also remove deps/zlib/contrib
since it's not in use -- shaves additional size from the tarballs.

also, slightly modify the .gitignore file to ignore these new archives.

PR-URL: https://github.com/iojs/io.js/pull/319
Reviewed-By: Rod Vagg <rod@vagg.org>
9 years agotest: create test-ci, modify test-all, fix cpplint
Ben Noordhuis [Mon, 12 Jan 2015 22:40:51 +0000 (23:40 +0100)]
test: create test-ci, modify test-all, fix cpplint

test: add test/addons to default test list

`make test-all` and `python tools/test.py` will now also run the addon
tests in test/addons.

test: remove test-npm from test-all make target

The test-npm target builds documentation, changes versioned files,
clutters the current working directory with artifacts, etc.  In short,
it doesn't seem quite ready for inclusion in `make test-all`.

test: add test-ci target, reduced test-all

Add a test-ci target that is like test-all minus the (slow) pummel and
gc test suites.

This is primarily intended for the continuous integration, where we want
decent coverage but don't want to wait for ages for tests to complete.

cpplint: add -license/copyright to default filters

Commit 3e1b1dd ("Remove excessive copyright/license boilerplate") trips
up the copyright boilerplate style check.  Disable it.

PR-URL: https://github.com/iojs/io.js/pull/314
Reviewed-By: Rod Vagg <rod@vagg.org>
9 years agotest: use assert.throw to test exceptions
Sam Roberts [Tue, 13 Jan 2015 02:21:29 +0000 (03:21 +0100)]
test: use assert.throw to test exceptions

The test wasn't checking directly that an assertion was thrown. Instead,
it was checking that spawn did not sucessfully spawn a non-existent
command.

However, the command chosen, dir, exists in GNU coreutils, so it exists
on Linux (though not on BSD derived OS X). The test as written passed on
Linux, even with the TypeError it is supposed to be checking for deleted
from spawn(). It would also pass on Windows if a ls.exe existed.

The approach is unnecessarily obscure, assert.throw() is for asserting
code throws, using it is more clear and works regardless of what
commands do or do not exist.

PR-URL: https://github.com/joyent/node/pull/8454
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
Cherry-picked-from: https://github.com/joyent/node/commit/2ff29cc7e35f486daf86710fd2db48275442c788

Conflicts:
test/parallel/test-child-process-spawn-typeerror.js

9 years agotest: check for multi-localhost support
Timothy J Fontaine [Sat, 10 Jan 2015 20:36:16 +0000 (21:36 +0100)]
test: check for multi-localhost support

Cherry-picked-from: https://github.com/joyent/node/commit/2b7c8a2f02c2e132c2dbc59bd05e0e7246e10196

9 years agosys: Mark as deprecated
Wyatt Preul [Tue, 13 Jan 2015 00:41:07 +0000 (18:41 -0600)]
sys: Mark as deprecated

PR-URL: https://github.com/iojs/io.js/pull/317
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
discussed at TC meeting, deprecate, don't remove

9 years agohttp: optimize on_headers_complete
Bert Belder [Tue, 13 Jan 2015 01:32:09 +0000 (02:32 +0100)]
http: optimize on_headers_complete

Use an array instead of an object to pass a parsed header chunk from c++
to javascript. This offers a 5-10% speedup on the http_simple benchmark,
as evidenced by running:

  ab -k -t 100 -c 100 http://127.0.0.1:8000/bytes/100

PR: https://github.com/iojs/io.js/pull/292
Reviewed-by: Ben Noordhuis <info@bnoordhuis.nl>
9 years agodeps: don't build docs on 'make npm-test'
Forrest L Norvell [Tue, 13 Jan 2015 01:21:49 +0000 (17:21 -0800)]
deps: don't build docs on 'make npm-test'

PR-URL: https://github.com/iojs/io.js/pull/318
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agobuild,src: remove sslv3 support
Ben Noordhuis [Mon, 12 Jan 2015 23:45:31 +0000 (00:45 +0100)]
build,src: remove sslv3 support

SSLv3 is susceptible to downgrade attacks.  Provide secure defaults,
disable v3 protocol support entirely.

PR-URL: https://github.com/iojs/io.js/pull/315
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
9 years agotest: fix message tests regression
Ben Noordhuis [Tue, 13 Jan 2015 00:04:59 +0000 (01:04 +0100)]
test: fix message tests regression

Commit 3e1b1dd ("Remove excessive copyright/license boilerplate") broke
some of the message tests because without the license boilerplate at
the top, the line numbers no longer match up.

PR-URL: https://github.com/iojs/io.js/pull/316
Reviewed-By: Bert Belder <bertbelder@gmail.com>
9 years agoRemove excessive copyright/license boilerplate
isaacs [Mon, 12 Jan 2015 19:59:19 +0000 (11:59 -0800)]
Remove excessive copyright/license boilerplate

The copyright and license notice is already in the LICENSE file.  There
is no justifiable reason to also require that it be included in every
file, since the individual files are not individually distributed except
as part of the entire package.

9 years agodocs: improve Writable/Transform stream docs
Vladimir Guguiev [Wed, 10 Dec 2014 23:06:01 +0000 (00:06 +0100)]
docs: improve Writable/Transform stream docs

Slightly fix and supplement the documentation for Writable#write and
Transform#transform methods. Make it more consistent. Mention passing
'buffer' as an encoding param in case chunk is a Buffer.

PR: https://github.com/iojs/io.js/pull/142
Reviewed-by: Bert Belder <bertbelder@gmail.com>
Reviewed-by: Rod Vagg <rod@vagg.org>
9 years agosrc: rename node to io.js for Windows installer
Rod Vagg [Sun, 11 Jan 2015 05:49:45 +0000 (05:49 +0000)]
src: rename node to io.js for Windows installer

* quote "NODE_VERSION_STRING" in node.rc to allow for complex version
  strings
* change user-facing strings
* make sure .bat files are crlf

PR-URL: https://github.com/iojs/io.js/pull/291
Reviewed-By: Bert Belder <bertbelder@gmail.com>
Reviewed-By: Nikolai Vavilov <vvnicholas@gmail.com>
9 years agotest: fix `make test-addons` target
Ben Noordhuis [Mon, 12 Jan 2015 22:10:34 +0000 (23:10 +0100)]
test: fix `make test-addons` target

I broke the python script in commit edaf7af but because test-all does
not run test-addons, it slipped under the radar.  Mea culpa.

Fixes the following test runner error:

    Traceback (most recent call last):
      File "tools/test.py", line 1522, in <module>
        sys.exit(Main())
      File "tools/test.py", line 1454, in Main
        test_list = root.ListTests([], path, context, arch, mode)
      File "tools/test.py", line 720, in ListTests
        test.AddTestsToList(result, full_path, path, context, arch, mode)
      File "tools/test.py", line 690, in AddTestsToList
        arch, mode)
      File "/home/bnoordhuis/src/v1.x/test/gc/../testpy/__init__.py", line 176, in ListTests
        result.append(SimpleTestCase(test, file_path, mode, self.context, self))
    TypeError: __init__() takes at least 7 arguments (6 given)

PR-URL: https://github.com/iojs/io.js/pull/313
Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
9 years agowin,msi: create npm folder in AppData directory
Steven Rockarts [Mon, 12 Jan 2015 22:06:06 +0000 (23:06 +0100)]
win,msi: create npm folder in AppData directory

Create the empty npm folder in Roaming\Appdata so that non-Administrator
users have a place to store global packages. This fixes the error Error:
ENOENT, stat error that occurs when a user tries to run the npm install
<package> command.

Bug: https://github.com/joyent/node/issues/8141
PR: https://github.com/joyent/node/pull/8838
Reviewed-by: Bert Belder <bertbelder@gmail.com>
Please enter the commit message for your changes. Lines starting

9 years agoaddon: update NODE_MODULE_VERSION macro
Ben Noordhuis [Mon, 12 Jan 2015 21:01:27 +0000 (22:01 +0100)]
addon: update NODE_MODULE_VERSION macro

io.js v1.0.0 is not ABI-compatible with joyent/node@v0.12, update
the NODE_MODULE_VERSION macro to reflect that.  Update to a much
larger value to avoid future clashes with joyent/node.

PR-URL: https://github.com/iojs/io.js/pull/312
Reviewed-By: Bert Belder <bertbelder@gmail.com>
9 years agodoc: update style for iojs
Chris Dickinson [Mon, 12 Jan 2015 05:40:45 +0000 (21:40 -0800)]
doc: update style for iojs

* updates the styling for the iojs docs
* pulls the processing step for markdown files into
  a separate module
* adds the ability to insert comments into the markdown

PR-URL: https://github.com/iojs/io.js/pull/297
Fixes: https://github.com/iojs/iojs.github.io/issues/23
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
9 years agofs: undeprecate exists() and existsSync()
cjihrig [Mon, 12 Jan 2015 14:24:30 +0000 (09:24 -0500)]
fs: undeprecate exists() and existsSync()

fs.exists() and fs.existsSync() were deprecated in #103. This
commit removes the deprecation message, in order to stay more
in sync with joyent/node for the io.js 1.0.0 release.

Fixes: https://github.com/iojs/io.js/issues/257
PR-URL: https://github.com/iojs/io.js/pull/307
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Bert Belder <bertbelder@gmail.com>
9 years agoassert: throw when block is not a function
cjihrig [Mon, 12 Jan 2015 16:13:18 +0000 (11:13 -0500)]
assert: throw when block is not a function

Currently, anything passed as the block argument to throws()
and doesNotThrow() is interpreted as a function, which can
lead to unexpected results. This commit checks the type of
block, and throws a TypeError if it is not a function.

Fixes: https://github.com/iojs/io.js/issues/275
PR-URL: https://github.com/iojs/io.js/pull/308
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agogyp: remove vanished masm file from openssl build
Fedor Indutny [Sun, 11 Jan 2015 15:33:19 +0000 (18:33 +0300)]
gyp: remove vanished masm file from openssl build

PR-URL: https://github.com/iojs/io.js/pull/289
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agotest: fix crypto-stream after openssl update
Fedor Indutny [Sun, 11 Jan 2015 13:08:27 +0000 (16:08 +0300)]
test: fix crypto-stream after openssl update

PR-URL: https://github.com/iojs/io.js/pull/289
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agoopenssl: fix build failure on windows
Fedor Indutny [Thu, 8 Jan 2015 19:05:43 +0000 (19:05 +0000)]
openssl: fix build failure on windows

Backport of: https://github.com/openssl/openssl/commit/5c5e7e

Original commit message:

    Fix build failure on Windows due to undefined cflags identifier

Reviewed-by: Tim Hudson <tjh@openssl.org>
PR-URL: https://github.com/iojs/io.js/pull/289
Reviewed-By: Fedor Indutny <fedor@indutny.com>
9 years agoopenssl: fix keypress requirement in apps on win32
Fedor Indutny [Wed, 11 Dec 2013 17:19:04 +0000 (21:19 +0400)]
openssl: fix keypress requirement in apps on win32

Original source:

http://openssl.6102.n7.nabble.com/PATCH-s-client-Fix-keypress-requirement-with-redirected-input-on-Windows-td46787.html

Reviewed-By: Fedor Indutny <fedor@indutny.com>
9 years agodeps: update openssl to 1.0.1k
Fedor Indutny [Sun, 11 Jan 2015 13:08:14 +0000 (16:08 +0300)]
deps: update openssl to 1.0.1k

PR-URL: https://github.com/iojs/io.js/pull/289
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agotest: move sequential/test-debug-port-cluster
Ben Noordhuis [Mon, 12 Jan 2015 13:14:23 +0000 (14:14 +0100)]
test: move sequential/test-debug-port-cluster

Move sequential/test-debug-port-cluster to test/parallel.  This test
is safe to run in parallel with other debugger tests, it doesn't use
fixed port numbers.

PR-URL: https://github.com/iojs/io.js/pull/306
Reviewed-By: Miroslav Bajtoš <miroslav@strongloop.com>
9 years agotest: move sequential/test-debug-signal-cluster
Ben Noordhuis [Mon, 12 Jan 2015 13:12:50 +0000 (14:12 +0100)]
test: move sequential/test-debug-signal-cluster

Move sequential/test-debug-signal-cluster to test/parallel.  Per the
previous commit, it can now run in parallel with other debugger tests.

PR-URL: https://github.com/iojs/io.js/pull/306
Reviewed-By: Miroslav Bajtoš <miroslav@strongloop.com>
9 years agolib: make --debug-port work with cluster
Ben Noordhuis [Mon, 12 Jan 2015 13:07:55 +0000 (14:07 +0100)]
lib: make --debug-port work with cluster

Make the cluster module intercept the `--debug-port=<port>` command line
switch and replace it with the debug port of the child process.

A happy coincidence of this change is that it finally makes it possible
to run the sequential/test-debug-signal-cluster in parallel, it now no
longer needs the default port numbers.

PR-URL: https://github.com/iojs/io.js/pull/306
Reviewed-By: Miroslav Bajtoš <miroslav@strongloop.com>
9 years agotest: delete sequential/test-debug-cluster
Ben Noordhuis [Mon, 12 Jan 2015 10:58:17 +0000 (11:58 +0100)]
test: delete sequential/test-debug-cluster

The test does not work well with concurrent invocations of the test
runner because it uses fixed port numbers.  The functionality it tests
is covered by sequential/test-debug-port-cluster, a verbatim copy with
the only difference being that it doesn't use fixed port numbers.

PR-URL: https://github.com/iojs/io.js/pull/306
Reviewed-By: Miroslav Bajtoš <miroslav@strongloop.com>
9 years agodoc: add TC meeting 2015-01-07 minutes
Rod Vagg [Wed, 7 Jan 2015 23:06:31 +0000 (10:06 +1100)]
doc: add TC meeting 2015-01-07 minutes

PR-URL: https://github.com/iojs/io.js/pull/248
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agodoc: clarified & split up contribution docs
Rod Vagg [Fri, 2 Jan 2015 11:52:50 +0000 (22:52 +1100)]
doc: clarified & split up contribution docs

- clarified the role of "collaborators"
- split out a governance doc
- split out a collaborator guide
- cleaned up the contributing doc
- cleaned up the readme & added collaborators list

PR-URL: https://github.com/iojs/io.js/pull/233
Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
Reviewed-By: Mikeal Rogers <mikeal.rogers@gmail.com>
(Note: no explicit "LGTM" from Mikeal)

Discussed at TC meeting 2015-01-07, agreed to push further
amendments to governance to future PRs.

9 years agoRevert "url: support `path` for url.format"
Ben Noordhuis [Mon, 12 Jan 2015 10:13:49 +0000 (11:13 +0100)]
Revert "url: support `path` for url.format"

This reverts commit d312b6d15c69cf4c438ed7d884e6396c481a57f6.

Reverted for breaking `npm install` with git+ssh URLs.

Conflicts:
    doc/api/url.markdown

Fixes: https://github.com/iojs/io.js/issues/295
PR-URL: https://github.com/iojs/io.js/pull/303
Reviewed-By: Rod Vagg <rod@vagg.org>
9 years agourl: fix parsing of ssh urls
Evan Lucas [Mon, 12 Jan 2015 06:13:17 +0000 (00:13 -0600)]
url: fix parsing of ssh urls

Fix regression introduced in 61204720361824881aefd64f5bccda7d7be6617a
that broke parsing of some ssh: urls.

An example url is ssh://git@github.com:npm/npm.git

PR-URL: https://github.com/iojs/io.js/pull/299
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agobuild: move armv6 snapshot test to configure_arm()
Rod Vagg [Mon, 12 Jan 2015 04:49:55 +0000 (15:49 +1100)]
build: move armv6 snapshot test to configure_arm()

fails on windows because is_arch_armv6() calls CC to get properties,
so moved to a scope where we know we're at least on ARM

PR-URL: https://github.com/iojs/io.js/pull/296
Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
9 years agobuild: Warn when using snapshot on Armv6
Cydox [Sat, 10 Jan 2015 22:32:40 +0000 (23:32 +0100)]
build: Warn when using snapshot on Armv6

Building io.js on armv6 with snapshot enabled does not work due to a bug in v8,
so it now warns when building on armv6 and having snapshot enabled.

PR-URL: https://github.com/iojs/io.js/pull/282
Reviewed-By: Rod Vagg <rod@vagg.org>
9 years agonet: remove TODO for moving isIP to dns
Evan Lucas [Sun, 11 Jan 2015 20:33:08 +0000 (14:33 -0600)]
net: remove TODO for moving isIP to dns

It is not really DNS-specific so keeping it in net makes more sense.

PR-URL: https://github.com/iojs/io.js/pull/286
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agobuild,src: remove sslv2 support
Ben Noordhuis [Sun, 11 Jan 2015 00:53:20 +0000 (01:53 +0100)]
build,src: remove sslv2 support

SSLv2 has been deprecated and known broken for nearly twenty years now.

I made SSLv2 support opt-in well over a year ago in commit 39aa894 and
now this commit removes it entirely.

PR-URL: https://github.com/iojs/io.js/pull/290
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
9 years agosrc: only append "-pre" to version if no tag
Rod Vagg [Sun, 11 Jan 2015 06:29:36 +0000 (17:29 +1100)]
src: only append "-pre" to version if no tag

removed because nightly builds use the TAG make variable
to create a prerelease tag after the version yet `-pre` is
also appended beyond that. `-pre` is unnecessary if another
prerelease tag is being used.

Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agodoc: remove changelog.html from doc make target
Rod Vagg [Sun, 11 Jan 2015 02:15:30 +0000 (13:15 +1100)]
doc: remove changelog.html from doc make target

not essential for doc build and currently broken because
tools/build_changelog.sh requires ./node.

leaving as separate make target so it can be invoked
separately in future.

PR-URL: https://github.com/iojs/io.js/pull/285
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agotest: fix bad assumption in pummel/test-vm-memleak
Ben Noordhuis [Sat, 10 Jan 2015 17:06:34 +0000 (18:06 +0100)]
test: fix bad assumption in pummel/test-vm-memleak

pummel/test-vm-memleak is an old test that assumes the fairly
aggressive heuristics that were common with the old collector.

The current garbage collector has a more laissez-faire attitude.
Put an upper limit on the size of the old space and update the
test's expectations.

PR-URL: https://github.com/iojs/io.js/pull/280
Reviewed-By: Bert Belder <bertbelder@gmail.com>
9 years agowin,test: try again if file unlink fails
Bert Belder [Sun, 11 Jan 2015 00:49:33 +0000 (01:49 +0100)]
win,test: try again if file unlink fails

Now that parallel tests are enabled, the test runner spits out a ton of
'access denied' errors while running the tests. These happen because a
virus scanner or the indexing service temporarily open the file after it
has been updated, and the test runner tries to unlink() them at the same
time.

This patch resolves this issue by attempting to unlink the file until it
succeeds.

PR-URL: https://github.com/iojs/io.js/pull/284
Reviewed-by: Ben Noordhuis <info@bnoordhuis.nl>
9 years agofs: use ES6 octal literals for mode
Vladimir Kurchatkin [Sat, 10 Jan 2015 20:12:37 +0000 (23:12 +0300)]
fs: use ES6 octal literals for mode

Update docs, comments and code to use ES6 octal literals instead of
decimal + comment.

PR-URL: https://github.com/iojs/io.js/pull/281
Reviewed-by: Bert Belder <bertbelder@gmail.com>
Reviewed-by: Colin Ihrig <cjihrig@gmail.com>
9 years agozlib: do not unref() if wasn't ref()ed
Fedor Indutny [Thu, 6 Nov 2014 19:03:08 +0000 (22:03 +0300)]
zlib: do not unref() if wasn't ref()ed

In very unlikely case, where `deflateInit2()` may return error (right
now happening only on exhausting all memory), the `ZCtx::Error()` will
be called and will try to `Unref()` the handle. But the problem is that
this handle was never `Ref()`ed, so it will trigger an assertion error
and crash the program.

Reviewed-by: Ben Noordhuis <info@bnoordhuis.nl>
PR-URL: https://github.com/joyent/node/pull/8687

Cherry-picked-from: https://github.com/joyent/node/commit/8c868989be778246bc4b9558f087d0f93724b83d

9 years agosrc: remove icu_config
Trevor Norris [Mon, 15 Dec 2014 23:36:00 +0000 (15:36 -0800)]
src: remove icu_config

ICU support in v0.12 generates a new icu_config.gypi. This was
accidentally committed after switching branches. The file has been removed
and added to .gitignore.

Cherry-picked-from: https://github.com/joyent/node/commit/813114dab05231b71f3cdc4f5889b9833d9a1d06

9 years agosrc: check if NODE_WANT_INTERNALS is defined
Fedor Indutny [Sat, 10 Jan 2015 20:35:14 +0000 (21:35 +0100)]
src: check if NODE_WANT_INTERNALS is defined

Otherwise a warning could be printed on some systems.
This fixes joyent/node#8419.

Cherry-picked-from: https://github.com/joyent/node/commit/d87ae24dfe148e8bd524c57cfd2c9fe0d3dfce93

9 years agodoc: improve dns module's documentation
Julien Gilli [Tue, 18 Nov 2014 20:56:28 +0000 (12:56 -0800)]
doc: improve dns module's documentation

Make the difference between dns.lookup and other functions even clearer.

PR-URL: https://github.com/joyent/node/pull/8747
Signed-off-by: Timothy J Fontaine <tjfontaine@gmail.com>
Cherry-picked-from: https://github.com/joyent/node/commit/542234ad984fd1fd90958f07f7f122530e7fb9c6

9 years agodoc: clarify dns.lookup vs dns.resolve
Julien Gilli [Fri, 14 Nov 2014 18:58:54 +0000 (10:58 -0800)]
doc: clarify dns.lookup vs dns.resolve

Clarify and emphasize the differences between dns.lookup and the rest of
the functions in the dns module.

PR-URL: https://github.com/joyent/node/pull/8726
Reviewed-by: Chris Dickinson <christopher.s.dickinson@gmail.com>
Cherry-picked-from: https://github.com/joyent/node/commit/5ff59453a483a43f1563504989f8e2d0ec253de1

9 years agodoc: clarify url.format documentation
Julien Gilli [Sat, 10 Jan 2015 20:41:12 +0000 (21:41 +0100)]
doc: clarify url.format documentation

The original documentation was slightly confusing. It seemed that the
list of items described the properties of the urlObj object, while it
was actually describing the formatting process. This change makes this
clearer.

Reviewed-by: Chris Dickinson <christopher.s.dickinson@gmail.com>
Cherry-picked-from: https://github.com/joyent/node/commit/0603c8345b7c40f9723277d5ae1f44041627dbab

9 years agodoc: clarify buffer api documentation
James M Snell [Sat, 10 Jan 2015 20:20:13 +0000 (21:20 +0100)]
doc: clarify buffer api documentation

Better wording for start and end parameters, also document .length
should be considered read-only.

PR-URL: https://github.com/joyent/node/pull/8910
Signed-off-by: Timothy J Fontaine <tjfontaine@gmail.com>
Cherry-picked-from: https://github.com/joyent/node/commit/102a861ec2e79ee78d8b8526fa410aac5db18753

9 years agodoc: clarify add/removeListener semantics
James M Snell [Fri, 19 Dec 2014 17:53:20 +0000 (09:53 -0800)]
doc: clarify add/removeListener semantics

Clarify that adding or removing a listener is not idempotent.

PR-URL: https://github.com/joyent/node/pull/8911
Signed-off-by: Timothy J Fontaine <tjfontaine@gmail.com>
Cherry-picked-from: https://github.com/joyent/node/commit/48536394c954b2e3e41dcaee3778373ea79e2c25

9 years agodoc: clearer log messages in net code samples
pkcs [Sun, 23 Nov 2014 23:54:21 +0000 (00:54 +0100)]
doc: clearer log messages in net code samples

Code examples in documentation for net.createServer and
net.createConnection contained confusing log messages. This change makes
them clearer.

Signed-off-by: Julien Gilli <julien.gilli@joyent.com>
Cherry-picked-from: https://github.com/joyent/node/commit/8120015f4078e05ad350bb71b2839f1ce7bbc7f9

9 years agodoc: cover stdio option in child_process
Sam Roberts [Sat, 10 Jan 2015 20:40:02 +0000 (21:40 +0100)]
doc: cover stdio option in child_process

- Add hyperlinks from spawn options to subsections detailing what
those options do.
- Clarify some verbiage around ChildProcess.prototype.std{in,out,err}.
- Remove second-person pronoun.

PR-URL: https://github.com/joyent/node/pull/8639
Reviewed-by: Chris Dickinson <christopher.s.dickinson@gmail.com>
Cherry-picked-from: https://github.com/joyent/node/commit/3a08b7c3e0bc6757e70889196

9 years agodoc: document the fds behind stdin/out/err
Sam Roberts [Mon, 27 Oct 2014 18:03:13 +0000 (11:03 -0700)]
doc: document the fds behind stdin/out/err

Its common knowledge on unix, but node documentation depends on knowing
this, as it exposes both streams named after stdio, and the fd numbers,
so make this explicit.

Fixes: https://github.com/joyent/node/pull/8624
PR-URL: https://github.com/joyent/node/pull/8454
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
Cherry-picked-from: https://github.com/joyent/node/commit/13a992b1c2e1d0e69567fb94bc35f978c4c37ce5

9 years agodoc: update openssl commands to use best practices
Eric Mill [Fri, 7 Nov 2014 15:05:00 +0000 (10:05 -0500)]
doc: update openssl commands to use best practices

This updates key size to 2048 and default hash function to sha256.

Reviewed-by: Fedor Indutny <fedor@indutny.com>
PR-URL: https://github.com/joyent/node/pull/8690

Cherry-picked-from: https://github.com/joyent/node/commit/88bd95cfef5973de0027b8eb5210e5e97252c7e2

9 years agodoc: add note about key derivation
Calvin Metcalf [Sun, 19 Oct 2014 14:31:22 +0000 (10:31 -0400)]
doc: add note about key derivation

adds a note to the crypto docs passing along
the advice that openssl gives about what
key derivation function they recommend.

PR-URL: https://github.com/joyent/node/pull/8580
Reviewed-by: Fedor Indutny <fedor@indutny.com>
Cherry-picked-from: https://github.com/joyent/node/commit/7dbc024c8573670170d4f561c01ae892d06399db

9 years agodoc: document _transform callback takes 2 args
Calvin Metcalf [Wed, 3 Sep 2014 13:01:15 +0000 (09:01 -0400)]
doc: document _transform callback takes 2 args

Expands the paragraph in the transform stream
implementation docs about the callback that is passed
to the _transform method to include details about how
two arguments may be passed, error and data.  A code
example is also included.

Reviewed-by: Fedor Indutny <fedor@indutny.com>
Cherry-picked-from: https://github.com/joyent/node/commit/c8e0bdd7cf628ee2f3f79e5538132467bbc50b4a

9 years agodoc: add changelog notes for some node v0.10 releases
Bert Belder [Sat, 10 Jan 2015 20:37:51 +0000 (21:37 +0100)]
doc: add changelog notes for some node v0.10 releases

9 years agoRevert "dgram: implicit binds should be exclusive"
Ben Noordhuis [Sat, 10 Jan 2015 03:10:03 +0000 (04:10 +0100)]
Revert "dgram: implicit binds should be exclusive"

This reverts commit a32b92dbcfc8a3a8b2409bb2ace2233ebe327888.

Reverted for breaking the parallel/test-cluster-dgram-2 test on all
platforms.

PR-URL: https://github.com/iojs/io.js/pull/279
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
9 years agodgram: implicit binds should be exclusive
Sam Roberts [Sat, 10 Jan 2015 03:25:07 +0000 (04:25 +0100)]
dgram: implicit binds should be exclusive

Server sockets should be shared by default, and client sockets should be
exclusive by default. For net/TCP, this is how it is, for dgram/UDP, its
a little less clear what a client socket is, but a socket that is
auto-bound during a dgram.send() is not usefully shared among cluster
workers, any more than an outgoing TCP connection would be usefully
shared.

Since implicit binds become exclusive, implicit/client dgram sockets can
now be used with cluster on Windows. Before, neither explicit nor
implicitly bound sockets could be used, causing dgram to be completely
unsupported with cluster on Windows. After this change, they become half
supported.

PR-URL: https://github.com/joyent/node/pull/8643
Reviewed-by: Bert Belder <bertbelder@gmail.com>
9 years agocluster: cluster.disconnect() should check status
Sam Roberts [Sat, 10 Jan 2015 02:23:06 +0000 (03:23 +0100)]
cluster: cluster.disconnect() should check status

Workers that are already disconnected but not yet exited should not be
disconnected, trying to do so raises exceptions.

PR-URL: https://github.com/joyent/node/pull/8642
Reviewed-by: Bert Belder <bertbelder@gmail.com>
9 years agocluster: don't assume all workers bind same ports
Sam Roberts [Sat, 10 Jan 2015 03:40:40 +0000 (04:40 +0100)]
cluster: don't assume all workers bind same ports

For shared handles that do not get connection close messages (UDP/dgram
is the only example of this), cluster must not assume that a port
listened on by one worker is listened on by all workers.

PR-URL: https://github.com/joyent/node/pull/8642
Reviewed-by: Bert Belder <bertbelder@gmail.com>
9 years agodeps: don't build minizip into zlib
Bert Belder [Sat, 10 Jan 2015 01:37:22 +0000 (02:37 +0100)]
deps: don't build minizip into zlib

It's an optional extension that node/iojs doesn't use.

PR-URL: https://github.com/iojs/io.js/pull/276
Reviewed-by: Ben Noordhuis <info@bnoordhuis.nl>
9 years agodeps: don't set zlib's product_name
Bert Belder [Sat, 10 Jan 2015 01:36:17 +0000 (02:36 +0100)]
deps: don't set zlib's product_name

PR-URL: https://github.com/iojs/io.js/pull/276
Reviewed-by: Ben Noordhuis <info@bnoordhuis.nl>
9 years agodeps: fix zlib -Wimplicit-function-declaration
Ben Noordhuis [Fri, 9 Jan 2015 16:14:57 +0000 (17:14 +0100)]
deps: fix zlib -Wimplicit-function-declaration

Build the bundled zlib with -DZ_HAVE_UNISTD_H to make the definition of
close(), read() and other unistd.h functions available to gzread.c and
gzwrite.c. It's kind of silly that we have to jump through hoops here
because we never call any of the functions that do I/O directly, but at
least it squelches the -Wimplicit-function-declaration warnings.

PR-URL: https://github.com/iojs/io.js/pull/273
Reviewed-by: Bert Belder <bertbelder@gmail.com>
9 years agotools: enable ctrl-c for parallel tests
Chris Dickinson [Fri, 9 Jan 2015 22:15:29 +0000 (14:15 -0800)]
tools: enable ctrl-c for parallel tests

use a threading.Event instead of a boolean attribute.

PR-URL: https://github.com/iojs/io.js/pull/277
Fixes: https://github.com/iojs/io.js/issues/260
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agosrc: disable harmony object literals
Ben Noordhuis [Fri, 9 Jan 2015 16:03:21 +0000 (17:03 +0100)]
src: disable harmony object literals

Per the discussion in https://github.com/iojs/io.js/pull/272, upstream
V8 has disabled Harmony object literals for the time being.  Do the
same for feature parity.

PR-URL: https://github.com/iojs/io.js/pull/272
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Domenic Denicola <domenic@domenicdenicola.com>
9 years agosrc: disable harmony classes
Ben Noordhuis [Fri, 9 Jan 2015 01:39:46 +0000 (02:39 +0100)]
src: disable harmony classes

The V8 development branch has unshipped ES6 classes pending resolution
of a number of inheritance edge cases.  Disable classes in io.js for
the sake of feature parity.

See https://github.com/iojs/io.js/issues/251 for background and
discussion.

PR-URL: https://github.com/iojs/io.js/pull/272
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Domenic Denicola <domenic@domenicdenicola.com>
9 years agosrc: zlib: revert concatenated-stream changes
Chris Dickinson [Tue, 6 Jan 2015 21:15:09 +0000 (13:15 -0800)]
src: zlib: revert concatenated-stream changes

Revert "src: fix windows build error" and "zlib: support
concatenated gzip files".

This reverts commits be413ac732f59ffe621f264239e5e22b77d32025
and 1183ba47dfc2bc8b39f0c10d8dc9e9299a4470bf.

Treating subsequent bytes as a concatenated zlib stream
breaks npm install.

Conflicts:
test/parallel/test-zlib-from-multiple-gzip-with-garbage.js
test/parallel/test-zlib-from-multiple-gzip.js
test/parallel/test-zlib-from-multiple-huge-gzip.js

Fixes: https://github.com/joyent/node/issues/8962
PR-URL: https://github.com/iojs/io.js/pull/240
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agobuild: fix `process.platform`
Vladimir Kurchatkin [Fri, 9 Jan 2015 12:38:09 +0000 (15:38 +0300)]
build: fix `process.platform`

e1fe270 introduces the NODE_PLATFORM macro which had to be redefined in
node.gyp for `process.platform` to return expected values.

PR-URL: https://github.com/iojs/io.js/pull/271
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Bert Belder <bertbelder@gmail.com>
9 years agocore: throw TypeError if chdir() args are wrong
Caitlin Potter [Fri, 9 Jan 2015 16:38:28 +0000 (11:38 -0500)]
core: throw TypeError if chdir() args are wrong

PR-URL: https://github.com/iojs/io.js/pull/274
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agodoc: update the zlib license after upgrading
Shigeki Ohtsu [Wed, 3 Dec 2014 05:07:14 +0000 (14:07 +0900)]
doc: update the zlib license after upgrading

Reviewed-By: Bert Belder <bertbelder@gmail.com>
9 years agodeps: update zlib.gyp for zlib 1.2.8
Shigeki Ohtsu [Mon, 1 Dec 2014 05:18:53 +0000 (14:18 +0900)]
deps: update zlib.gyp for zlib 1.2.8

This adds the new gzip source files to the zlib.gyp The changes are
derived from third_party/zlib/zlib.gyp in the Chromium repository.

Reviewed-By: Bert Belder <bertbelder@gmail.com>
9 years agodeps: upgrade zlib to 1.2.8
Shigeki Ohtsu [Tue, 2 Dec 2014 23:28:24 +0000 (15:28 -0800)]
deps: upgrade zlib to 1.2.8

Reviewed-By: Bert Belder <bertbelder@gmail.com>
9 years agonpm: upgrade to v2.1.18
Forrest L Norvell [Thu, 8 Jan 2015 22:37:26 +0000 (14:37 -0800)]
npm: upgrade to v2.1.18

PR-URL: https://github.com/iojs/io.js/pull/266
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agowin,nodevars: run iojs.exe to get node version
Bert Belder [Thu, 8 Jan 2015 15:18:23 +0000 (16:18 +0100)]
win,nodevars: run iojs.exe to get node version

PR-URL: https://github.com/iojs/io.js/pull/263
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agowin,msi: rename node.exe to iojs.exe
Bert Belder [Thu, 8 Jan 2015 15:17:52 +0000 (16:17 +0100)]
win,msi: rename node.exe to iojs.exe

This change is strictly limited to the name of the binary. The shortcut
name, install folder, docs website links etc. are all unchanged.

PR-URL: https://github.com/iojs/io.js/pull/263
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agowin,build: rename node.exe to iojs.exe
Bert Belder [Thu, 8 Jan 2015 15:10:36 +0000 (16:10 +0100)]
win,build: rename node.exe to iojs.exe

  * Sign iojs.exe
  * Run license2rtf.js through iojs

PR-URL: https://github.com/iojs/io.js/pull/263
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agowin: regenerate perfctr provider files
Bert Belder [Thu, 8 Jan 2015 15:06:11 +0000 (16:06 +0100)]
win: regenerate perfctr provider files

PR-URL: https://github.com/iojs/io.js/pull/263
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agowin,tracing: node -> iojs in perfctr/etw manifests
Bert Belder [Thu, 8 Jan 2015 15:20:50 +0000 (16:20 +0100)]
win,tracing: node -> iojs in perfctr/etw manifests

PR-URL: https://github.com/iojs/io.js/pull/263
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agowin,src: node -> iojs in executable manifest
Bert Belder [Thu, 8 Jan 2015 15:19:20 +0000 (16:19 +0100)]
win,src: node -> iojs in executable manifest

PR-URL: https://github.com/iojs/io.js/pull/263
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agowin,build: remove upload target from vcbuild.bat
Bert Belder [Thu, 8 Jan 2015 15:22:37 +0000 (16:22 +0100)]
win,build: remove upload target from vcbuild.bat

PR-URL: https://github.com/iojs/io.js/pull/263
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agoinstall: install iojs -> node compat symlink
Ben Noordhuis [Thu, 8 Jan 2015 13:21:26 +0000 (14:21 +0100)]
install: install iojs -> node compat symlink

Install a symlink for compatibility with scripts that expect a binary
called `node` or have a /path/to/node shebang.  Only done on UNIX
platforms because symlinks on Windows require elevated privileges.

PR-URL: https://github.com/iojs/io.js/pull/262
Reviewed-By: Bert Belder <bertbelder@gmail.com>
9 years agobuild: rename binary from node to iojs
Ben Noordhuis [Thu, 8 Jan 2015 13:00:43 +0000 (14:00 +0100)]
build: rename binary from node to iojs

* rename the build targets

* update the test runner to use `out/{Debug,Release}/iojs`

* update the installer to install the iojs binary

* update one test that explicitly checks for the binary name

PR-URL: https://github.com/iojs/io.js/pull/262
Reviewed-By: Bert Belder <bertbelder@gmail.com>
9 years agotest: remove --use-http1 test runner flag
Ben Noordhuis [Thu, 8 Jan 2015 12:37:32 +0000 (13:37 +0100)]
test: remove --use-http1 test runner flag

The flag was used for a short while during the v0.5 development cycle,
four years ago.  Remove it, it's long overdue.

PR-URL: https://github.com/iojs/io.js/pull/262
Reviewed-By: Bert Belder <bertbelder@gmail.com>
9 years agodoc: update v8 options in man page
Ben Noordhuis [Thu, 8 Jan 2015 12:54:45 +0000 (13:54 +0100)]
doc: update v8 options in man page

Update the outdated list of V8 options in the man page.

PR-URL: https://github.com/iojs/io.js/pull/262
Reviewed-By: Bert Belder <bertbelder@gmail.com>
9 years agodoc: s/node/iojs/ in iojs.1
Ben Noordhuis [Fri, 2 Jan 2015 16:09:45 +0000 (17:09 +0100)]
doc: s/node/iojs/ in iojs.1

The binary is about to be renamed from `node` to `iojs`; preemptively
update the man page.

PR-URL: https://github.com/iojs/io.js/pull/262
Reviewed-By: Bert Belder <bertbelder@gmail.com>
9 years agodoc: rename node.1 -> iojs.1
Ben Noordhuis [Fri, 2 Jan 2015 16:07:43 +0000 (17:07 +0100)]
doc: rename node.1 -> iojs.1

PR-URL: https://github.com/iojs/io.js/pull/262
Reviewed-By: Bert Belder <bertbelder@gmail.com>
9 years agobuild: remove upload targets from makefile
Ben Noordhuis [Fri, 2 Jan 2015 16:03:03 +0000 (17:03 +0100)]
build: remove upload targets from makefile

The targets upload to nodejs.org but that is the joyent/node website.

PR-URL: https://github.com/iojs/io.js/pull/262
Reviewed-By: Bert Belder <bertbelder@gmail.com>
9 years agobuild: don't run make recursively
Ben Noordhuis [Fri, 2 Jan 2015 16:00:27 +0000 (17:00 +0100)]
build: don't run make recursively

For targets that need the binary: don't invoke `make all` as part of the
recipe, just depend on the $(NODE_EXE) target.

PR-URL: https://github.com/iojs/io.js/pull/262
Reviewed-By: Bert Belder <bertbelder@gmail.com>