In REPL, if we try to evaluate an empty line, we get `undefined`.
> process.version
'v2.3.4'
>
undefined
>
undefined
>
This patch prevents `undefined` from printing if the string is empty.
> process.version
'v2.3.5-pre'
>
>
>
PR-URL: https://github.com/nodejs/io.js/pull/2163
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
As it is, REPL doesn't honour the line continuation feature very well.
This patch
1. keeps track of the beginning of the string literals and if they
don't end or current line doesn't end with line continuation, then
error out.
2. monitors if the line continuation character is used without the
string literal and errors out if that happens.
PR-URL: https://github.com/nodejs/io.js/pull/2163
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
When an inherited property is used as a REPL keyword, the REPL crashes.
➜ Desktop iojs
> process.version
'v2.3.4'
> .toString
readline.js:913
stream[ESCAPE_DECODER].next(r[i]);
^
TypeError: Cannot read property 'call' of undefined
at REPLServer.parseREPLKeyword (repl.js:746:15)
at REPLServer.<anonymous> (repl.js:284:16)
at emitOne (events.js:77:13)
at REPLServer.emit (events.js:169:7)
at REPLServer.Interface._onLine (readline.js:210:10)
at REPLServer.Interface._line (readline.js:549:8)
at REPLServer.Interface._ttyWrite (readline.js:826:14)
at ReadStream.onkeypress (readline.js:105:10)
at emitTwo (events.js:87:13)
at ReadStream.emit (events.js:172:7)
➜ Desktop
This patch makes the internal `commands` object inherit from `null` so
that there will be no inherited properties.
> process.version
'v2.3.5-pre'
> .toString
Invalid REPL keyword
>
PR-URL: https://github.com/nodejs/io.js/pull/2163
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
When an invalid REPL keyword is used, we actually print `undefined` as
well in the console.
> process.version
'v2.3.4'
> .invalid_repl_command
Invalid REPL keyword
undefined
>
This patch prevents printing `undefined` in this case.
> process.version
'v2.3.5-pre'
> .invalid_repl_command
Invalid REPL keyword
>
PR-URL: https://github.com/nodejs/io.js/pull/2163
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
See: https://github.com/nodejs/io.js/issues/1798
When an Object is printed in REPL, the actual representation can be
overriden by defining `inspect` method on the objects. This patch
includes a note about the same in the REPL documentation.
PR-URL: https://github.com/nodejs/io.js/pull/2142
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
For consistency with the worker 'exit', 'online', 'disconnect', and
'listening' events which are emitted on worker and cluster, also emit
'message' on cluster.
Reviewed-by: Sam Roberts <vieuxtech@gmail.com>
Reviewed-by: Christian Tellnes <christian@tellnes.no>
Reviewed-by: Stephen Belanger <admin@stephenbelanger.com>
PR-URL: https://github.com/nodejs/io.js/pull/861
RAND_screen() causes stability issues in invoking openssl-cli s_client
on win2008r2 in CI. Disable to use it by adding -no_rand_screen
options to all tls tests that use common.opensslCli.
Fixes: https://github.com/nodejs/io.js/issues/2150
PR-URL: https://github.com/nodejs/io.js/pull/2209
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Joao Reis <reis@janeasystems.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
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>
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>
When Object.prototype.toString is used to determine the type, we don't
have to explicitly check for other types. This patch removes the
redundant checks like that.
PR-URL: https://github.com/nodejs/io.js/pull/2179
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
This patch uses `return` statement to skip the test instead of using
`process.exit` call.
PR-URL: https://github.com/nodejs/io.js/pull/2109
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
This patch makes the skip messages consistent so that the TAP plugin
in CI can parse the messages properly. The format will be
1..0 # Skipped: [Actual reason why the test is skipped]
PR-URL: https://github.com/nodejs/io.js/pull/2109
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Changes to core modules do not take effect unless recompiled. Tip new
contributors about this when describing how to run tests in
contribution guide.
Removed `jslint` from first test command example, as jslint is included
when running `make test`.
Fixed wrong path of example stream2-transform test.
PR-URL: https://github.com/nodejs/io.js/pull/2051
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
These members were collaborators on the old joyent/node repo prior to
convergence of the Node.js and io.js projects under the Node
Foundation. This updates our list to represent that they are now also
part of the TSC (Technical Steering Committee), which was previously
known as the io.js TC.
PR-URL: https://github.com/nodejs/io.js/pull/2085
Reviewed-By: Mikeal Rogers <mikeal.rogers@gmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
Membership changes also previously reviewed by many more TSC & former
TC members in https://github.com/nodejs/io.js/pull/1710
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>
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>
This test was failing because the spawned process was terminated before
anything could be done, by calling child.stdin.end. With this change,
the child's stdin is no longer closed. When the stdin is not a tty,
io.js waits for the whole input before starting, so the child must be
run with --interactive to process the command sent by the parent. The
child is killed explicitly by the parent before it exits.
This test was failing silently because the asserts were not called if
nothing was received from the child. This fix moves assertOutputLines to
always run on exit.
Fixes: https://github.com/nodejs/io.js/issues/2177
Refs: https://github.com/nodejs/io.js/issues/2094
PR-URL: https://github.com/nodejs/io.js/pull/2186
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: Alexis Campailla <alexis@janeasystems.com>
Defaults to /usr/local otherwise, which isn't helpful for node-gyp,
nor standard assumptions about how header directories should be
structured.
PR-URL: https://github.com/nodejs/io.js/pull/2082
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
The path module's `join, normalize, isAbsolute, relative and resolve`
functions return/use the current directory if they are passed zero
length strings.
> process.version
'v2.3.4-pre'
> path.win32.join('')
'.'
> path.posix.join('')
'.'
> path.win32.normalize('')
'.'
> path.posix.normalize('')
'.'
> path.win32.isAbsolute('')
false
> path.posix.isAbsolute('')
false
> path.win32.relative('', '')
''
> path.posix.relative('', '')
''
> path.win32relative('.', '')
''
> path.posix.relative('.', '')
''
> path.posix.resolve('')
'/home/thefourtheye/Desktop'
> path.win32.resolve('')
'\\home\\thefourtheye\\Desktop'
Since empty paths are not valid in any of the operating systems people
normally use, this behaviour might be a surprise to the users. This
commit introduces "Notes" about this, wherever applicable in `path`'s
documentation.
The tests makes sure that the behaviour is intact between
commits.
PR-URL: https://github.com/nodejs/io.js/pull/2106
Reviewed-By: Rich Trott <rtrott@gmail.com>
Fixes the arguments comments for execFileSync and other related minor
inconsistencies in commented arguments in the same file.
PR-URL: https://github.com/nodejs/io.js/pull/2161
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
A persistent failure on OS X 10.11 uncovered a inproperly cleaned up
temp directory in this test. This changes the mkdirSync call to clean up
properly in case it throws.
PR-URL: https://github.com/nodejs/io.js/pull/2164
Reviewed-By: Evan Lucas <evanlucas@me.com>
Re-use `assertPath()` when asserting path argument types in `join()`
as throughout the rest of the `path` module.
This also ensures the same error message generated for posix as for
win32.
PR-URL: https://github.com/nodejs/io.js/pull/2159
Reviewed-By: Roman Reiss <me@silverwind.io>
`emitKeys` is a generator which emits `keypress` events in an infinite
loop. But if `keypress` event handler throws, the error stops the loop,
leaving generator in a broken state. So this patch restarts the generator
when an error occures.
PR-URL: https://github.com/nodejs/io.js/pull/2107
Reviewed-By: Christopher Monsanto <chris@monsan.to>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
- This makes v8 add .trace_function_info to the serialized form of
snapshots from v8::HeapSnapshot::Serialize
- .trace_funciton_info combined with .trace_node in snapshots tells the
JS location that allocated a specific object
PR-URL: https://github.com/nodejs/io.js/pull/2135
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
When the listener was truthy but NOT a function, fs.watchFile would
throw an error through the EventEmitter. This caused a problem because
it would only be thrown after the listener was started, which left the
listener on.
There should be no backwards compatability issues because the error was
always thrown, just in a different manner.
Also adds tests for this and other basic functionality.
PR-URL: https://github.com/nodejs/io.js/pull/2093
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Adding a single rule to be called from Jenkins.
Jenkins jobs typically call:
python ./configure
make -j $(getconf _NPROCESSORS_ONLN)
make test-ci
After this change, we can have Jenkins call:
make run-ci -j $(getconf _NPROCESSORS_ONLN)
This allows us to customize how we call configure
for different repos or branches (e.g. joyent\node).
PR-URL: https://github.com/nodejs/io.js/pull/2134
Reviewed-By: Ryan Graham <r.m.graham@gmail.com>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
configure was getting called twice.
We also erroneously introduced support for VS2010,
and were picking 2010 before other versions.
PR-URL: https://github.com/nodejs/io.js/pull/2131
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
If the proxy objects don't have a valid `hasOwnPropertyNames` trap,
REPL crashes with a `TypeError`, as per the bug report
https://github.com/nodejs/io.js/issues/2119
> var proxy = Proxy.create({ fix: function() { return {}; } });
undefined
> proxy.<tab>
TypeError: Proxy handler #<Object> has no 'getOwnPropertyNames' trap
at Function.getOwnPropertyNames (native)
at repl.js:644:40
at REPLServer.defaultEval (repl.js:169:5)
at bound (domain.js:254:14)
at REPLServer.runBound [as eval] (domain.js:267:12)
at REPLServer.complete (repl.js:639:14)
at REPLServer.complete [as completer] (repl.js:207:10)
at REPLServer.Interface._tabComplete (readline.js:377:8)
at REPLServer.Interface._ttyWrite (readline.js:845:14)
at ReadStream.onkeypress (readline.js:105:10)
This patch traps the error thrown and suppresses it.
PR-URL: https://github.com/nodejs/io.js/pull/2120
Fixes: https://github.com/nodejs/io.js/issues/2119
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
On windows, there's no need to continue with the msbuild process
(signing, whatnot) when we only want to clean the project.
PR-URL: https://github.com/nodejs/io.js/pull/2127
Reviewed-By: Alexis Campailla <alexis@janeasystems.com>
Verify that passing a non-number will throw and that the argument is
returned on success.
PR-URL: https://github.com/nodejs/io.js/pull/2121
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>