Commit Graph

228 Commits

Author SHA1 Message Date
Ryan Dahl
d408de87fc Remove module.js - put code into src/node.js 2010-08-06 12:34:02 -07:00
Tj Holowaychuk
e8795cea30 Added console.trace() 2010-08-06 12:15:04 -07:00
Tj Holowaychuk
a8e1e8d057 Added console.{time,timeEnd}() 2010-08-06 12:11:04 -07:00
Tj Holowaychuk
e15221a8de console formatter appends extra arguments
This makes the console methods more "browser-like",
for example:

  console.log("foo", "bar", "baz");
  // foo bar baz

but still works with formatting

  console.log("hey %s", "tj", "whats up");

  // hey tj whats up
2010-08-06 12:10:08 -07:00
Felix Geisendörfer
ffbbc465d3 Support inspecting objects with console.log
If the first parameter passed into console.log() is not a string, all
parameters will be printed as formated by sys.inspect. This change
also affects console.info and console.warn.
2010-08-05 10:23:17 -07:00
Ryan Dahl
adec544fdd Revert "Expose the V8 debug object process.debug"
This reverts commit d9fbb8a580.
2010-08-04 10:38:19 -07:00
Ryan Dahl
d9fbb8a580 Expose the V8 debug object process.debug
Add one duplicate test from V8, just to make sure it works.
2010-08-02 00:46:09 -07:00
Brian
71009ad3fe Allow signals to be used with process.on in addition to process.addListener. 2010-08-01 20:23:03 -07:00
Ryan Dahl
5459e5c606 Globalize the Buffer object 2010-07-27 10:58:45 -07:00
Dmitry Baranovskiy
a585c5bbb3 Fixed format, so it wouldn’t blow up if %d argument is null or undefined + ensure that numbers will be numbers 2010-07-25 20:14:12 -07:00
Marco Rogers
1662c37c40 Fix console formatter to recognize json properly 2010-07-15 23:36:35 -07:00
Ryan Dahl
6bf294d71a JSON is %j not %f 2010-07-13 10:16:33 -07:00
Jerome Etienne
8e9f59a452 Support of console.dir + console.assert 2010-07-07 16:48:59 +02:00
Ryan Dahl
8a52fb7aeb Revert "Fix 'uncaughtException' for top level exceptions"
This reverts commit 8f8dcf8ed6.
2010-07-01 11:10:22 -07:00
Ryan Dahl
8f8dcf8ed6 Fix 'uncaughtException' for top level exceptions
Done by not evaluating the code in the first tick.

This breaks one test in test-error-reporting.js but I believe this to be a
V8 error and I have reported it in
http://code.google.com/p/v8/issues/detail?id=764
2010-06-30 15:04:40 -07:00
Ryan Dahl
6b430a95c9 console.log: if not string, coerce into one 2010-06-29 09:53:20 -07:00
Ryan Dahl
b69c6a03b1 If not string, console.log should just print it without trying to format 2010-06-28 21:20:21 -07:00
Ryan Dahl
c9e12204a2 Stub out console.log format strings, info, warn, error 2010-06-28 20:47:35 -07:00
Ryan Dahl
ba792ea202 :%s/sys.puts/console.log/g
and there was much rejoicing
2010-06-23 20:05:29 -07:00
Ryan Dahl
6056d2ea2c node without arguments starts the REPL 2010-06-07 16:15:41 -07:00
Ryan Dahl
f73b6e2190 Fix opposite logic, which coincidentially works 2010-05-20 22:11:26 -07:00
Ryan Dahl
cbd2c3945b Throwing in a callback should kill the process
There is a difference between errors which happen to a socket - like
receiving EPIPE - an exceptional situation but ultimately okay and the
situation where code throws in a callback - which is not okay.

Fixes test/simple/test-http-exceptions.js

TODO: explain this in docs.
2010-05-20 15:23:36 -07:00
Jonas Pfenniger
4274e6b7d0 FIX: signal-unregister bug
We now restore the default signal behavior when all listeners are
removed for a given signal.

Re-enabled test-signal-unregister
2010-05-14 19:05:19 -07:00
Jonas Pfenniger
50148022d1 Thinner SignalWatcher, only using callback
Since it is only used internally, we don't need the complexity of
EventEmitter. The new SignalWatcher's design was copied from
IdleWatcher.
2010-05-14 18:57:17 -07:00
Herbert Vojčík
039d13b0c3 DRY binding('stdio') 2010-04-28 16:08:36 -07:00
Ryan Dahl
6d85802100 basicRequest -> module.requireNative 2010-04-28 15:28:21 -07:00
Herbert Vojčík
7a72885ede process.evalcx has a deprecation message. 2010-04-28 14:40:11 -07:00
Herbert Vojčík
7e4c1285dc Minor stylistic changes. 2010-04-28 14:39:41 -07:00
Tim Caswell
8f79169aef Remove node.* deprecation messages. 2010-04-28 09:47:50 -07:00
Ryan Dahl
e7a1fa1293 fs.FileWriteStream -> fs.WriteStream, fs.FileReadStream -> fs.ReadStream 2010-04-27 18:52:16 -07:00
Ryan Dahl
5aea12b4c4 stdout should be writable only 2010-04-27 18:45:10 -07:00
Felix Geisendörfer
c143cba590 Get rid of coupling for stdin 2010-04-27 18:02:30 -07:00
Felix Geisendörfer
76f98c27de Get rid of coupling for stdout 2010-04-27 17:27:34 -07:00
Ryan Dahl
6abdf051d3 Unhandled 'error' events kill program
By default 'error' throws. addListener to prevent this.
2010-04-22 17:22:06 -07:00
Ryan Dahl
d70474dc10 SIGPIPE on stdout should kill the process by default 2010-04-22 14:25:13 -07:00
isaacs
cfd459abde Move the module loading framework into lib/module.js. Minimal changes otherwise. 2010-04-21 12:05:01 -07:00
isaacs
e0061a511d refactor path module to lib/path.js 2010-04-21 11:38:51 -07:00
isaacs
7ff53f4c6a Refactor events module to lib/events.js 2010-04-21 11:38:46 -07:00
Michaeljohn Clement
ac9d9f4e9f better function test in addEventListener 2010-04-20 12:32:18 -07:00
Herbert Vojcik
c2a06725d6 Script class with eval-function-family in binding('evals') plus tests. 2010-04-18 15:01:36 -04:00
Ryan Dahl
4e7e2f8724 Change nextTick implementation for the better
Use a prepare and idle watcher to execute the nextTick callback more
quickly. Test provided by Matt Ranney.
2010-04-13 15:43:46 -07:00
Ryan Dahl
b98cd6753b process.mixin: deprecation -> removed 2010-04-13 13:45:31 -07:00
Tim Caswell
62d9852c3d Replace slow and broken for..in loops with faster for loops over the keys. 2010-04-12 10:34:35 -07:00
Herbert Vojcik
06b9c8bf1f Fix of normalizing paths of form ./../the/rest 2010-04-09 08:01:36 -07:00
Ryan Dahl
218d7e9f2d Clean up NODE_DEBUG detection
It wasn't detecting if NODE_DEBUG=0
2010-03-23 20:56:51 -07:00
Ryan Dahl
903977d5e8 Merge branch 'master' into net2
Conflicts:
	test/simple/test-event-emitter-modify-in-emit.js
2010-03-19 21:48:39 -07:00
Herbert Vojcik
9e8afe9133 DRY loading native module 2010-03-18 22:23:13 -07:00
Carson McDonald
e5cbe73a82 Better EventEmitter modify-in-emit
Changed ReallyEmit so that it clones the Array of listeners before
processing the emit. Added better tests to make sure that modifying
listeners inside event handlers doesn't cause later listeners to be skipped
or added.
2010-03-18 14:08:20 -07:00
Scott Taylor
39f0ef9d4a Remove duplicate shebang filtering 2010-03-18 07:56:54 -07:00
Ryan Dahl
1332cafb7c s/Socket/Stream/g 2010-03-17 16:31:24 -07:00