PR-URL: https://github.com/iojs/io.js/pull/1679
Notable Changes:
* win,node-gyp: the delay-load hook for windows addons has now been
correctly enabled by default, it had wrongly defaulted to off in the
release version of 2.0.0 (Bert Belder) #1433
* os: tmpdir()'s trailing slash stripping has been refined to fix an
issue when the temp directory is at '/'. Also considers which slash is
used by the operating system. (cjihrig) #1673
* tls: default ciphers have been updated to use gcm and aes128 (Mike
MacCana) #1660
* build: v8 snapshots have been re-enabled by default as suggested by
the v8 team, since prior security issues have been resolved. This
should give some perf improvements to both startup and vm context
creation. (Trevor Norris) #1663
* src: fixed preload modules not working when other flags were used
before --require (Yosuke Furukawa) #1694
* dgram: fixed send()'s callback not being asynchronous (Yosuke
Furukawa) #1313
* readline: emitKeys now keeps buffering data until it has enough to
parse. This fixes an issue with parsing split escapes. (Alex Kocharin)
* cluster: works now properly emit 'disconnect' to cluser.worker (Oleg
Elifantiev) #1386
events: uncaught errors now provide some context (Evan Lucas) #1654
os.tmpdir() began stripping trailing slashes in
b57cc51d8d. This causes problems if
the temp directory is simply '/'. It also stripped trailing
slashes without first determining which slash type is used by
the current operating system. This commit only strips trailing
slashes if another character precedes the slash. On Windows, it
checks for ':', as not to strip slashes from something like 'C:\'.
It also only strips slashes that are appropriate for the user's
operating system.
Fixes: https://github.com/iojs/io.js/issues/1669
PR-URL: https://github.com/iojs/io.js/pull/1673
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Christian Tellnes <christian@tellnes.no>
The old pattern didn't include files in lib/internal. This changes the
pattern to directories which makes eslint apply to all subdirectories as
well.
PR-URL: https://github.com/iojs/io.js/pull/1686
Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
Extracts test-npm from Makefile and puts it in tools/test-npm.sh
Also improves test-npm to use a separate copy of deps/npm for testing.
PR-URL: https://github.com/iojs/io.js/pull/1662
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Previously, in the event of an unhandled error event, if the error is a
not an actual Error, then a default error is thrown. Now, the argument
is appended to the error message and added as the `context` property
of the error.
PR-URL: https://github.com/iojs/io.js/pull/1654
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
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>
Certain cases with comments inside arrays or object literals fail to
pass eslint's comma-spacing rule. This change sets the comma-spacing
rule to the 'warn' level.
Once https://github.com/eslint/eslint/issues/2408 is resolved and
released, this rule should be set back to 'error' level.
PR-URL: https://github.com/iojs/io.js/pull/1672
Reviewed-By: Yosuke Furukawa <yosuke.furukawa@gmail.com>
AES-GCM or CHACHA20_POLY1305 ciphers must be used in current version of
Chrome to avoid an 'obsolete cryptography' warning.
Prefer 128 bit AES over 192 and 256 bit AES considering attacks that
specifically affect the larger key sizes but do not affect AES 128.
PR-URL: https://github.com/iojs/io.js/pull/1660
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: Shigeki Ohtsu <ohtsu@iij.ad.jp>
Reviewed-By: Roman Reiss <me@silverwind.io>
In certain environments escape sequences could be splitted into
multiple chunks. For example, when user presses left arrow,
`\x1b[D` sequence could appear as two keypresses (`\x1b` + `[D`).
PR-URL: https://github.com/iojs/io.js/pull/1601
Fixes: https://github.com/iojs/io.js/issues/1403
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
The delay-load hook allows node.exe/iojs.exe to be renamed. See efadffe
for more background.
PR-URL: https://github.com/iojs/io.js/pull/1433
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Calling v8.setFlagsFromString with e.g a function as a flag argument
gave no exception or warning that the function call will fail.
There is now an exception if the function gets called with the wrong
flag type (string is required) or that a flag is expected.
Other APIs already provide exceptions if the argument has not the
expected type.
PR-URL: https://github.com/iojs/io.js/pull/1652
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
If `len(args)` is less than two, then
`install_path = dst_dir + node_prefix + '/'` would throw a `NameError`,
because `dst_dir` will not be defined yet. So we are assigning `''` as
the default value.
PR-URL: https://github.com/iojs/io.js/pull/1628
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Makes the ParseEncoding symbol visible to addons on Windows.
It was already visible on Unices.
PR-URL: https://github.com/iojs/io.js/pull/1596
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Apart from the fact that the implementation is not reliable,
GuessWordSize is not used anywhere in the codebase.
PR-URL: https://github.com/iojs/io.js/pull/1638
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
The `__attribute__((deprecated("warning")))` macro didn't exist until
gcc 4.5 and clang 2.9.
While io.js does not build with compilers that old, add-ons do. Let's
make src/node.h compatible with such compilers, it's a public header.
PR-URL: https://github.com/iojs/io.js/pull/1626
Refs: https://github.com/iojs/io.js/issues/1619
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
It doesn't make sense to call before/after callbacks in init to the
parent because they'll be made anyway from MakeCallback. If information
does need to be propagated then it should be done automatically. Will
deal with this if the issue arrises in the future.
PR-URL: https://github.com/iojs/io.js/pull/1614
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Setting flags using cryptic numeric object fields is confusing. Instead
use much simpler .enable()/.disable() calls on the async_wrap object.
PR-URL: https://github.com/iojs/io.js/pull/1614
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Allow the init callback to see the PROVIDER type easily by being able to
compare the flag with the list of providers on the exported async_wrap
object.
PR-URL: https://github.com/iojs/io.js/pull/1614
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Some calls to ReqWrap would get through the initial check and allow the
init callback to run, even though the callback had not been used on the
parent. Fix by explicitly checking if the parent has a queue.
Also change the name of the check, and internal field of AsyncHooks.
Other names were confusing.
PR-URL: https://github.com/iojs/io.js/pull/1614
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Commit ccb199a ("src: fix deprecation warnings") passes env()->isolate()
to the Buffer::New() call. It's somewhat inefficient because the callee
looks up the environment from the isolate. Just pass the env directly.
PR-URL: https://github.com/iojs/io.js/pull/1577
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
PR-URL: https://github.com/iojs/io.js/pull/1532
Notable Changes:
* crypto: significantly reduced memory usage for TLS (Fedor Indutny & Сковорода
Никита Андреевич) #1529
* net: socket.connect() now accepts a 'lookup' option for a custom DNS
resolution mechanism, defaults to dns.lookup() (Evan Lucas) #1505
* npm: Upgrade npm to 2.9.0. See the v2.8.4 and v2.9.0 release notes for
details. Notable items:
- Add support for default author field to make npm init -y work without
user-input (@othiym23) npm/npm/d8eee6cf9d
- Include local modules in npm outdated and npm update (@ArnaudRinquin)
npm/npm#7426
- The prefix used before the version number on npm version is now configurable
via tag-version-prefix (@kkragenbrink) npm/npm#8014
* os: os.tmpdir() is now cross-platform consistent and will no longer returns a
path with a trailling slash on any platform (Christian Tellnes) #747
* process:
- process.nextTick() performance has been improved by between 2-42% across the
benchmark suite, notable because this is heavily used across core (Brian White) #1548
- New process.geteuid(), process.seteuid(id), process.getegid() and
process.setegid(id) methods allow you to get and set effective UID and GID
of the process (Evan Lucas) #1536
* repl:
- REPL history can be persisted across sessions if the NODE_REPL_HISTORY_FILE
environment variable is set to a user accessible file,
NODE_REPL_HISTORY_SIZE can set the maximum history size and defaults to 1000
(Chris Dickinson) #1513
- The REPL can be placed in to one of three modes using the NODE_REPL_MODE
environment variable: sloppy, strict or magic (default); the new magic mode
will automatically run "strict mode only" statements in strict mode
(Chris Dickinson) #1513
* smalloc: the 'smalloc' module has been deprecated due to changes coming in V8
4.4 that will render it unusable
* util: add Promise, Map and Set inspection support (Christopher Monsanto) #1471
* V8: upgrade to 4.2.77.18, see the ChangeLog for full details. Notable items:
- Classes have moved out of staging; the class keyword is now usable in strict
mode without flags
- Object literal enhancements have moved out of staging; shorthand method and
property syntax is now usable ({ method() { }, property })
- Rest parameters (function(...args) {}) are implemented in staging behind the
--harmony-rest-parameters flag
- Computed property names ({['foo'+'bar']:'bam'}) are implemented in staging
behind the --harmony-computed-property-names flag
- Unicode escapes ('\u{xxxx}') are implemented in staging behind the
--harmony_unicode flag and the --harmony_unicode_regexps flag for use in
regular expressions
* Windows:
- Random process termination on Windows fixed (Fedor Indutny) #1512 / #1563
- The delay-load hook introduced to fix issues with process naming (iojs.exe /
node.exe) has been made opt-out for native add-ons. Native add-ons should
include 'win_delay_load_hook': 'false' in their binding.gyp to disable this
feature if they experience problems . (Bert Belder) #1433
* Governance:
- Rod Vagg (@rvagg) was added to the Technical Committee (TC)
- Jeremiah Senkpiel (@Fishrock123) was added to the Technical Committee (TC)
V8 4.2 introduces some minor C++ API changes that make it necessary for
many native add-ons to recompile in order to be usable in v2.0.0+
PR-URL: https://github.com/iojs/io.js/pull/1532
It's not supported by clang and commit e67542a ("build: disable -Og
when building with clang") is not sufficient because the configure
script no longer writes the 'clang' variable to common.gypi.
I could fix the configure script but I don't care enough actually do
so. A fixed configure script won't help anyway when the compiler is
overridden through the CXX environment variable at compile time.
PR-URL: https://github.com/iojs/io.js/pull/1611
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
The second step of augmenting the internal REPL with persistent
history was to re-open the history file with a 'w' handle. This
truncated the file. If a user did not enter a new line before
closing the REPL, their history would be deleted.
PR-URL: https://github.com/iojs/io.js/pull/1605
Reviewed-By: Roman Reiss <me@silverwind.io>