0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-30 07:27:22 +01:00
Commit Graph

11689 Commits

Author SHA1 Message Date
Vladimir Kurchatkin
6d95f4ff92 smalloc: deprecate whole module
It makes no sense to allow people use constants from
`smalloc`, since it will be removed completely eventually.

PR-URL: https://github.com/nodejs/io.js/pull/1822
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-06-04 11:00:19 +03:00
Vladimir Kurchatkin
628845b816 util: introduce printDeprecationMessage function
`printDeprecationMessage` is used to deprecate modules
and execution branches.

PR-URL: https://github.com/nodejs/io.js/pull/1822
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-06-04 10:59:43 +03:00
Rich Trott
6537fd4b55 test: remove TODO
It's not clear what additional tests are wanted.
The current malformed URL test seems adequate.

PR-URL: https://github.com/nodejs/io.js/pull/1875
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
2015-06-04 11:38:57 +10:00
Saúl Ibarra Corretgé
b5cd2f0986 dgram: partially revert 18d457b
Revert "dgram: call send callback asynchronously" partially, since the
fix is now done in libuv.

Refs: https://github.com/nodejs/io.js/pull/1313
Refs: https://github.com/libuv/libuv/pull/371
PR-URL: https://github.com/nodejs/io.js/pull/1889
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2015-06-04 00:09:39 +02:00
Saúl Ibarra Corretgé
aa33db3238 deps: update libuv to version 1.6.0
Fixes: https://github.com/joyent/node/issues/9310
PR-URL: https://github.com/nodejs/io.js/pull/1889
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2015-06-04 00:09:05 +02:00
Santiago Gimeno
a804026c9b test: fix broken FreeBSD test
Fixes net-server-max-connections-close-makes-more-available
Handles connection 'error' event so the test ends.

PR-URL: https://github.com/nodejs/io.js/pull/1881
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Brendan Ashworth <brendan.ashworth@me.com>
2015-06-03 13:38:03 -07:00
Evan Lucas
43a82f8a71 test: fix test-sync-io-option
This test was failing occasionally both locally and on CI. Switched
from using spawn to execFile for a more reliable test.

Fixes: https://github.com/nodejs/io.js/issues/1837
PR-URL: https://github.com/nodejs/io.js/pull/1840
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
2015-06-03 13:23:25 -05:00
Shigeki Ohtsu
4ed25f664d test: add -no_rand_screen for tls-server-verify
This improves the performance of openssl s_client on Windows and
gains several seconds to finish test-tls-server-verify.

Fixes: https://github.com/nodejs/io.js/issues/1461
PR-URL: https://github.com/nodejs/io.js/pull/1836
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-06-03 19:11:23 +02:00
Shigeki Ohtsu
0ee497f0b4 deps: add -no_rand_screen to openssl s_client
In openssl s_client on Windows, RAND_screen() is invoked to initialize
random state but it takes several seconds in each connection.
This added -no_rand_screen to openssl s_client on Windows to skip
RAND_screen() and gets a better performance in the unit test of
test-tls-server-verify.
Do not enable this except to use in the unit test.

Fixes: https://github.com/nodejs/io.js/issues/1461
PR-URL: https://github.com/nodejs/io.js/pull/1836
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-06-03 19:11:22 +02:00
Shigeki Ohtsu
4cf323d23d test: kill child in tls-server-verify for speed up
For better performance of the test, the parent kills child processes
so as not to wait them to be ended.

Fixes: https://github.com/nodejs/io.js/issues/1461
PR-URL: https://github.com/nodejs/io.js/pull/1836
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-06-03 19:11:21 +02:00
João Reis
e6ccdcc1fe test: improve console output of tls-server-verify
When running in parallel, it is not easy to identify what server and
client failed when the test fails. This adds identifiers to all lines
of console output.

Fixes: https://github.com/nodejs/io.js/issues/1461
PR-URL: https://github.com/nodejs/io.js/pull/1836
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-06-03 19:11:20 +02:00
João Reis
975e5956f0 test: run tls-server-verify servers in parallel
Different servers must use different ports. Since we can count only on
common.PORT and common.PORT+1, run only 2 servers in parallel.

Fixes: https://github.com/nodejs/io.js/issues/1461
PR-URL: https://github.com/nodejs/io.js/pull/1836
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-06-03 19:11:19 +02:00
João Reis
b18604ba2c test: running tls-server-verify clients in parallel
OpenSSL s_client introduces some delay on Windows. With all clients
running sequentially, this delay is big enough to break CI. This fix runs
the clients in parallel (unless the test includes renegotiation),
reducing the total run time.

Fixes: https://github.com/nodejs/io.js/issues/1461
PR-URL: https://github.com/nodejs/io.js/pull/1836
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-06-03 19:11:17 +02:00
Rod Vagg
f78c722df5 test: remove hardwired references to 'iojs'
PR-URL: https://github.com/nodejs/io.js/pull/1882
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Roman Reiss <me@silverwind.io>
2015-06-03 16:53:05 +02:00
Rich Trott
bd99e8de8e test: more test coverage for maxConnections
If the server is not accepting connections because maxConnections
is exceeded, the server should start accepting connections again
when a connection closes.

PR-URL: https://github.com/nodejs/io.js/pull/1855
Reviewed-By: Brendan Ashworth <brendan.ashworth@me.com>
2015-06-02 21:01:21 -07:00
Ben Noordhuis
8c71a9241d src: hide InitializeICUDirectory symbol
Exporting it seems like an oversight.  It's not safe to call once
V8 is running so there doesn't seem to be a point in exporting it
to add-ons.  Un-export it.

PR-URL: https://github.com/nodejs/io.js/pull/1815
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2015-06-02 21:44:18 +02:00
Yosuke Furukawa
8357c5084b fs: set encoding on fs.createWriteStream
Enable encoding option on fs.createWriteStream.

PR-URL: https://github.com/nodejs/io.js/pull/1844
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2015-06-03 03:01:35 +09:00
Ben Noordhuis
a4dbf45b59 crypto: update root certificates
Update the list of root certificates in src/node_root_certs.h with
tools/mk-ca-bundle.pl.

PR-URL: https://github.com/nodejs/io.js/pull/1833
Reviewed-By: Shigeki Ohtsu <ohtsu@iij.ad.jp>
2015-06-02 19:28:14 +02:00
Ben Noordhuis
098354a9f8 tools: update certdata.txt
This is the latest certdata.txt from [0], last updated on 2015-04-20.

[0] https://hg.mozilla.org/mozilla-central/raw-file/aa275ad846f1/security/nss/lib/ckfw/builtins/certdata.txt

PR-URL: https://github.com/nodejs/io.js/pull/1833
Reviewed-By: Shigeki Ohtsu <ohtsu@iij.ad.jp>
2015-06-02 19:27:49 +02:00
Ben Noordhuis
a2d921d6a0 tools: customize mk-ca-bundle.pl
Remove unneeded functionality and tweak the generated output so we
can #include it in C++ source code.

This commit essentially reapplies the changes from commit e159073
("tools: customize mk-ca-bundle.pl") to the updated script.

PR-URL: https://github.com/nodejs/io.js/pull/1833
Reviewed-By: Shigeki Ohtsu <ohtsu@iij.ad.jp>
2015-06-02 19:27:47 +02:00
Ben Noordhuis
5be9efca40 tools: update mk-ca-bundle.pl to HEAD of upstream
PR-URL: https://github.com/nodejs/io.js/pull/1833
Reviewed-By: Shigeki Ohtsu <ohtsu@iij.ad.jp>
2015-06-02 19:27:13 +02:00
Santiago Gimeno
b9267189a5 test: fix test-child-process-stdout-flush-exit
Make sure all the stdout data is available before
performing the assertions.

Fixes: https://github.com/nodejs/io.js/issues/944
PR-URL: https://github.com/nodejs/io.js/pull/1868
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2015-06-02 19:25:22 +02:00
Yosuke Furukawa
d20f018dcf test: loosen condition to detect infinite loop
PR-URL: https://github.com/nodejs/io.js/pull/1857
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2015-06-03 01:46:23 +09:00
Сковорода Никита Андреевич
89a5b9040e doc: fix http.IncomingMessage.socket documentation
Remove the reference to net.Socket.verifyPeer().
That was removed in ea540c9 and was missed in the 032f80e.

Refer to the net.Socket instance by the .socket property.
This avoids unneeded confusion.
'.socket' is the variant that is used internally.

Add a markdown link to net.Socket.getPeerCertificate().

PR-URL: https://github.com/nodejs/io.js/pull/1867
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-06-02 00:04:21 +02:00
Ben Noordhuis
e0e96acc6f test: remove smalloc add-on test
The smalloc module is about to be deprecated and removed.  Remove the
add-on test now so it's not forgotten about in the upcoming purge.

PR-URL: https://github.com/nodejs/io.js/pull/1835
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
2015-06-01 23:17:52 +02:00
Rich Trott
8704c58fc4 test: remove unneeded comment task
PR-URL: https://github.com/nodejs/io.js/pull/1858
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2015-06-01 13:08:53 -07:00
Tyler Anton
a79dece8ad docs: add return value for sync fs functions
Clarify that synchronous functions in fs with no return value return
undefined.

Specify that fs.openSync() returns an integer and fs.existsSync()
returns true or false.

Fixes: https://github.com/joyent/node/issues/9313

PR: https://github.com/joyent/node/pull/9359
Reviewed-By: Julien Gilli <julien.gilli@joyent.com>

PORT-FROM: joyent/node @ 51fe319faf
PR-URL: https://github.com/nodejs/io.js/pull/1770
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>

Conflicts:
	doc/api/fs.markdown
2015-06-01 14:11:10 -04:00
Robert Kowalski
1cb72c14c4 docs: delete unused/duplicate css files
- `sh.css` already exists in `api_assets`
 - `sh_vim-dark.css` is unused, but used in the repo `node-website`
        now

Reviewed-by: Trevor Norris <trev.norris@gmail.com>
Signed-off-by: Julien Gilli <julien.gilli@joyent.com>

PORT-FROM: joyent/node @ 0c50195071
PR-URL: https://github.com/nodejs/io.js/pull/1770
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2015-06-01 14:07:47 -04:00
Evan Lucas
5b6f575c1f Revert "src: add getopt option parser"
This reverts commit c0e7bf2d8c.

There are a few edge cases that can cause a crash
and need to be properly handled.

PR-URL: https://github.com/nodejs/io.js/pull/1862
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-06-01 11:25:32 -05:00
Evan Lucas
c0e7bf2d8c src: add getopt option parser
Options have been moved into the NodeOptions class.
A new global, node_options now exists and is used
to access the options after the command line arguments
have been parsed.

PR-URL: https://github.com/nodejs/io.js/pull/1804
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-06-01 08:39:06 -05:00
Rod Vagg
d29034b34b doc: adjust changelog to clarify client revert
PR-URL: https://github.com/nodejs/io.js/pull/1859
Reviewed-By: Brendan Ashworth <brendan.ashworth@me.com>
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2015-06-01 20:25:05 +10:00
thefourtheye
1baba0580d tools: Fix copying contents of deps/npm
This fixes a platform inconsistency between BSD and GNU `cp` where
`deps/npm` would be copied into a subdirectory of `test-npm` on Linux,
but not on OS X.

PR-URL: https://github.com/nodejs/io.js/pull/1853
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
2015-06-01 07:19:36 +02:00
Rod Vagg
79bb5e10fb Working on v2.2.2 2015-06-01 14:08:27 +10:00
Rod Vagg
fe84797301 2015-06-01 io.js v2.2.1 Release
PR-URL: https://github.com/nodejs/io.js/pull/1856

Notable Changes:

* http: reverts the removal of an undocumented `client` property on client
  connections, this property is being used in the wild, most notably by
  https://github.com/request/request which is used by npm.
  (Michaël Zasso) [#1852](nodejs#1852).
2015-06-01 13:21:15 +10:00
Johan Bergström
c5a1009903 build: avoid passing empty strings to build flags
While checking the return values from icu-i18n, we didn't
validate the content before passing it to the build system.

Also make cflags parsing more robust by avoiding empty strings.

Fixes: https://github.com/nodejs/io.js/issues/1787
PR-URL: https://github.com/nodejs/io.js/pull/1789
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-06-01 07:34:29 +10:00
Michaël Zasso
4d6b768e5d http: revert deprecation of client property
The improper deprecation of the property broke a feature in the
request module used by the bundled npm. This reverts the deprecation
part of this change.

PR-URL: https://github.com/nodejs/io.js/pull/1852
Fixes: https://github.com/nodejs/io.js/issues/1850
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Roman Reiss <me@silverwind.io>
2015-05-31 20:37:44 +02:00
Rod Vagg
5d83401086 doc: put SEMVER-MINOR on pre-load module fix 2.2.0 2015-05-31 16:04:57 +10:00
Rod Vagg
f2de5e57da Working on v2.2.1 2015-05-31 16:03:28 +10:00
Rod Vagg
0c57de5b37 2015-05-31 io.js v2.2.0 Release
PR-URL: https://github.com/nodejs/io.js/pull/1808

Notable Changes:

* node: Speed-up require() by replacing usage of fs.statSync() and
  fs.readFileSync() with internal variants that are faster for this use-case
  and do not create as many objects for the garbage collector to clean up.
  The primary two benefits are: significant increase in application start-up
  time on typical applications and better start-up time for the debugger by
  eliminating almost all of the thousands of exception events.
  (Ben Noordhuis) #1801.
* node: Resolution of pre-load modules (-r or --require) now follows the
  standard require() rules rather than just resolving paths, so you can now
  pre-load modules in node_modules. (Ali Ijaz Sheikh) #1812.
* npm: Upgraded npm to v2.11.0. New hooks for preversion, version, and
  postversion lifecycle events, some SPDX-related license changes and license
  file inclusions. See the release notes for full details.
2015-05-31 16:00:27 +10:00
Rich Trott
8059393934 test: check error type from net.Server.listen()
This change eliminates an unnecessary setTimeout() in the test.

PR-URL: https://github.com/nodejs/io.js/pull/1821
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Brendan Ashworth <brendan.ashworth@me.com>
2015-05-30 18:24:36 +02:00
Ali Ijaz Sheikh
5759722cfa src: fix module search path for preload modules
When the preload module is not a abs/relative path, we should use
the standard search mechanism of looking into the node_modules folders
outwards. The current working directory is deemed to be the 'requiring
module', i.e. parent. The search path starts from cwd outwards.

Fixes: https://github.com/nodejs/io.js/issues/1803
PR-URL: https://github.com/nodejs/io.js/pull/1812
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2015-05-30 10:36:09 -04:00
Bert Belder
53e98cc1b4 win,node-gyp: enable delay-load hook by default
The delay-load hook allows node.exe/iojs.exe to be renamed. See efadffe
for more background.

This commit is a combined squash of the following previous patches:
ba93c583bc,
3bda6cbfa4,
0d6d3dda95.

PR-URL: https://github.com/nodejs/io.js/pull/1763
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2015-05-30 08:16:18 -04:00
cjihrig
f9fd554500 deps: make node-gyp work with io.js
Every npm version bump requires a few patches to be floated on
node-gyp for io.js compatibility. These patches are found in
03d199276e,
5de334c230, and
da730c76e9. This commit squashes
them into a single commit.

PR-URL: https://github.com/iojs/io.js/pull/990
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-05-30 08:16:17 -04:00
Forrest L Norvell
c1afa53648 deps: upgrade npm to 2.11.0
PR-URL: https://github.com/iojs/io.js/pull/1829
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2015-05-30 08:15:11 -04:00
Brendan Ashworth
a65762cab6 src: remove old code
The Socket writable only change was added and implemented in the
constructor around 5885f464f0, but this was never removed.

The libev counter issue is no longer prudent; the test remains in
test/sequential/test-regress-GH-1726.

PR-URL: https://github.com/nodejs/io.js/pull/1819
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-05-30 00:42:52 -07:00
Johan Bergström
8606793999 tools: pass constant to logger instead of string
On a few of our installations (namely CentOS), passing 'INFO'
resulted in a silent loglevel. Use a logging constant instead.

Fixes: https://github.com/nodejs/build/issues/104
PR-URL: https://github.com/nodejs/io.js/pull/1842
Reviewed-By: Rod Vagg <rod@vagg.org>
2015-05-30 14:46:22 +10:00
Vladimir Kurchatkin
2c686fd3ce http: flush stored header
`flushHeaders` should work for header written
with `writeHead`.

PR-URL: https://github.com/nodejs/io.js/pull/1695
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-05-29 16:19:12 +03:00
Ben Noordhuis
4e90c82cdb test: add heap profiler add-on regression test
Add a regression test for https://github.com/nodejs/io.js/pull/1827.

PR-URL: https://github.com/nodejs/io.js/pull/1828
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
2015-05-28 22:01:10 +02:00
Ben Noordhuis
3a1bc067d4 Revert "core: set PROVIDER type as Persistent class id"
This reverts commit 3c44100558.

Reverted for breaking node-heapdump[0].

AsyncWrap assigns a class id but does not set a v8::RetainedObjectInfo
provider callback with v8::HeapProfiler::SetWrapperClassInfoProvider().
The result is a null pointer dereference when taking a heap snapshot.

It can probably be solved by setting a generic provider callback inside
the AsyncWrap constructor but that may have performance ramifications
that need to be investigated first.  I move to revert it for now.

[0] https://github.com/bnoordhuis/node-heapdump

PR-URL: https://github.com/nodejs/io.js/pull/1827
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
2015-05-28 21:48:44 +02:00
Evan Lucas
a77c330c32 child_process: expose ChildProcess constructor
Creates two new internal modules (child_process and socket_list) for
better readability.

Exposes the ChildProcess constructor from the child_process module so
one can now `require(‘child_process’).ChildProcess`

Fixes: https://github.com/nodejs/io.js/issues/1751
PR-URL: https://github.com/nodejs/io.js/pull/1760
Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
2015-05-28 09:38:29 -05:00