Commit Graph
406 Commits
Author SHA1 Message Date
Felix Geisendörfer 7069bee982 The return of absolute Module loading 2009-11-02 21:20:44 +01:00
Felix Geisendörfer 8fd472b9a1 The return of remote module loading 2009-11-01 15:39:49 +01:00
Ryan Dahl 9bd2717e74 require.paths aliased as process.path 2009-11-01 09:30:01 +01:00
Ryan Dahl f230e45183 Update deprecation errors. 2009-10-31 20:03:40 +01:00
Ryan Dahl 9a7321ebb0 Don't call process.exit() on missing module.
Just raise exception naturally.
2009-10-31 19:53:09 +01:00
Ryan Dahl f683867b98 module.name renamed to module.id for commonjs compat 2009-10-31 19:47:41 +01:00
Ryan Dahl 7a2e784ad7 Module refactor - almost CommonJS compatible now
API change summary:

  * require("/sys.js") becomes require("sys")

  * require("circle.js") becomes require("./circle")

  * process.path.join() becomes require("path").join()
2009-10-31 19:10:30 +01:00
Ryan Dahl ad0a4cefb8 Namespace EVERYTHING under process; introduce GLOBAL
http://groups.google.com/group/nodejs/browse_thread/thread/1034fd2ad2cd93e8
2009-10-29 23:36:41 +01:00
Felix Geisendörfer 659954d842 The return of Promise.cancel() with some additional tests & docs 2009-10-29 11:24:08 +01:00
Ryan Dahl 3d8b14e6f7 node.fs.* moved into "/posix.js"
use require("/posix.js") to access them.
2009-10-28 22:45:46 +01:00
Ryan Dahl ae7c9909be fix error from v8 upgrade 2009-10-28 21:35:49 +01:00
Ryan Dahl efe34f5023 Only allow a promise to fire once, remove promise.cancel()
promise.cancel() is due to return at some point.
2009-10-28 15:37:03 +01:00
Ryan Dahl a5df0f6a65 Prefix all source files with node_ 2009-10-27 11:46:58 +01:00
Ryan Dahl 2bac299aed Remove unused macro 2009-10-27 11:08:50 +01:00
Ryan Dahl 04e53cab90 Rename node.libraryPaths to require.paths
to be more inline with CommonJS.
2009-10-25 22:51:57 +01:00
Ryan Dahl cfe5876350 Add v8 patch to fix mac x64 build.
http://codereview.chromium.org/284012
2009-10-16 18:00:06 +02:00
Ryan Dahl b893859c34 Upgrade http parser, change node as needed.
The latest version of http-parser is a bit more stringent EOF semantics.
2009-10-15 19:18:18 +02:00
Ryan Dahl 3456a16f71 Accept string representations of signals in node.kill and child.kill 2009-10-15 15:45:04 +02:00
Brandon Beacher 334d56d2be Added external interface for signal handlers.
Also process.pid and node.kill().
2009-10-15 14:40:52 +02:00
Connor Dunn 2dbd0d3806 Add node.fs.sendfile() 2009-10-14 18:51:23 +02:00
Ryan Dahl a1e5089d9b Add connection.fd getter. 2009-10-14 17:07:50 +02:00
Timothy Caswell 8bf9a42c70 Cleanup node.fs.cat to follow the newer style to match the code of file.writeFile 2009-10-13 19:55:33 +02:00
Ryan Dahl 2b8ab7e24f utils.js links to sys.js instead of other way around 2009-10-13 19:55:28 +02:00
Felix Geisendörfer 0329468e73 Fix for confusing deprecation message 2009-10-12 22:23:17 +02:00
Ryan Dahl 12c2ea05ca Bugfix: 'data' event for stdio should emit a string
Was emitting a single element array where array[0] was the input.
2009-10-12 21:09:26 +02:00
Ryan Dahl d949074014 Add some code comments to net.cc 2009-10-12 16:46:18 +02:00
Felix Geisendörfer 0dbf2d7792 Implemented Promise.timeout() and Promise.cancel() 2009-10-12 16:17:42 +02:00
Ryan Dahl e7096fd769 ACTUALLY remove node_version.h from node.h 2009-10-09 17:49:29 +02:00
Ryan Dahl 0ae02c9f04 Internalize node_version.h.
With the more detailed node.version changing (every commit), having
node_version.h exposed to all modules required a complete recompile each
time a commit was made.

People can use the javascript interface to get the version.
2009-10-09 17:47:04 +02:00
Ryan Dahl 388145546d Add comments to node.cc 2009-10-09 17:44:59 +02:00
Ryan Dahl 6325878d43 Raise helpful error when include() is called. 2009-10-09 13:30:27 +02:00
Ryan Dahl e742d077e0 Enable debugging.
Use the --debug command line flag to enable.

It appears that d8 sucks. Luckily it can be rewritten rather easily with the
repl and tcp client libraries.

Node's CL option parsing is getting rather unwieldy - needs refactor.
2009-10-09 13:26:23 +02:00
Ryan Dahl 53ebe75930 Improve build for V8
Users following HEAD should 'make distclean' and reconfigure after this
update.
2009-10-08 23:20:14 +02:00
Ryan Dahl f623fd7658 Normalize HTTP headers.
"Content-Length" becomes "content-length".
2009-10-07 16:56:19 +02:00
Ryan Dahl b404996cf3 Fix --v8-options command line argument. 2009-10-07 16:01:03 +02:00
Ryan Dahl 1f31a7dbfe Upgrade v8 to 1.3.14 2009-10-07 11:53:45 +02:00
Ryan Dahl 1817d4b062 ev_unref() the signal handlers.
That means even if they are Attached(), libev will still exit if there is
nothing else to do.
2009-10-07 01:35:21 +02:00
Brandon Beacher f068251494 Added signal handler.
To be used internally. Needs an exposed interface.
2009-10-07 01:23:29 +02:00
Ryan Dahl 82465fc4b1 Do not use /bin/sh to create child processes.
Instead directly call execvp(). This change is needed for the
soon-to-be-added signal handlers because the /bin/sh parent process does not
pass all signals to it's children, particularly SIGUSR1 on Linux.

The parameters of createChildProcess had to be changed slightly.
utils.exec() also has a changed implementation. A bug involving quoted
arguments was knowingly introduced into utils.exec(). Will fix later.
2009-10-07 01:08:33 +02:00
Ryan Dahl 39c61367a7 Only arguments before -- should be passed to V8. 2009-10-06 16:28:52 +02:00
Ryan Dahl 2b994d9e37 Also accept 'utf-8' to specify utf8 encodings. 2009-10-06 10:45:18 +02:00
Ryan Dahl d67288b643 Add __module to reference current node.Module object. 2009-10-05 21:01:30 +02:00
Ryan Dahl 78f8b6771c Add require.async(). 2009-10-05 20:35:48 +02:00
Ryan Dahl d703813c27 Remove target argument from node.Module#newChild. 2009-10-05 20:35:05 +02:00
Ryan Dahl a0c464638c Remove old references to node.loadingModules 2009-10-05 20:29:59 +02:00
Ryan Dahl 8185e1fd25 Remove include() add node.mixin()
include() should not be used by libraries because it will pollute the global
namespace. To discourage this behavior and bring Node more in-line with
the current CommonJS module system, include() is removed.

Small scripts like unit tests often times do want to pollute the global
namespace for ease. To avoid the boiler plate code of

  var x = require("/x.js");
  var foo = x.foo;
  var bar = x.bar;

The function node.mixin() is stolen from jQuery's jQuery.extend. So that it
can be written:

  node.mixin(require("/x.js"));

Reference:
http://docs.jquery.com/Utilities/jQuery.extend
http://groups.google.com/group/nodejs/browse_thread/thread/f9ac83e5c11e7e87
2009-10-05 15:46:31 +02:00
Ryan Dahl bac16bd8ac Remove node.pc 2009-10-05 13:04:21 +02:00
Ryan Dahl e2b7902469 Don't use parseUri for HTTP server
The big parseUri RE was showing up often in profiles - this is simpler and
yields better performance by taking advantage of the C http parser.
2009-10-04 12:19:01 +02:00
Ryan Dahl 6f17ca51c3 Install wafadmin into $PREFIX/lib/node/wafadmin
This is in preparation for a special node_waf script for building external
modules.

Also change system library path to $PREFIX/lib/node/libraries
2009-10-03 19:09:00 +02:00
Ryan Dahl 602f9dbf3f SetClassName on internal classes. 2009-10-03 15:08:03 +02:00