Commit Graph

1051 Commits (5a98fa4809457f843aae5447ce82b660c8b595f3)

Author SHA1 Message Date
Tom Hughes 78da9cb052 Add --max-stack-size flag.
v8 doesn't expose a command-line flag to set the stack size, so this
adds a new flag that node understands how to handle and uses v8's
ResourceConstraints API.
2010-10-20 15:57:13 -07:00
isaacs 5e14c8bec0 Add ~/.node_modules as well as ~/.node_libraries 2010-10-20 15:46:13 -07:00
isaacs b0adaff67e require looks in node_modules folders
for modules starting with the __dirname and moving up.

This makes it much easier to localize dependencies to a particular program.
2010-10-20 15:45:47 -07:00
isaacs 492fc0d752 Split out modulePaths and defaultPaths
This way, the "default" paths of ~/.node_libraries and {prefix}/lib/node are only checked *after* anything that the user has placed into the NODE_PATHS environ, or pushed onto require.paths.

This makes require.paths a much more effective write-target, albeit slightly less useful as a read-target.  However, given the existence of require.resolve(), this is less of an issue -- if you want to know what a module ID will map to, just ask that question and get an authoritative answer from the loading machinery.
2010-10-20 15:21:33 -07:00
isaacs 226eff5104 Add require.resolve.
Also, hack the repl so that it works as expected there, too.
2010-10-20 12:12:07 -07:00
Jorge Chamorro Bieling c735b4663a unbase64 skips over *any* illegal chars 2010-10-18 15:22:10 -07:00
Ryan Dahl cf1db4f304 base64 decode should handle whitespace 2010-10-18 11:34:35 -07:00
Tom Hughes f61b110cf6 Add signal handlers so we clean up before exiting.
Add SIGTERM and SIGINT signal handlers so that we run the exit handlers
before exiting when getting these signals. Fixes an issue where we
couldn't run vi after CTRL+C'ing node because the stdin fd was left
non-blocking.
2010-10-12 14:01:58 -07:00
Ryan Dahl 0fcb3bd3a9 Add .js to native script's filename 2010-10-12 11:54:45 -07:00
Ryan Dahl c4636a578c Dynamically load native scripts 2010-10-12 11:49:41 -07:00
Micheil Smith 83db91be41 Removed deprecated alias to lib/fs.js 2010-10-11 16:20:04 -07:00
Micheil Smith e38eb0c5a4 Soft migration of sys -> util, Removal of deprecated utils module. 2010-10-11 15:21:36 -07:00
Rasmus Andersson 50443f08e0 environ symbol fix for Mac OS X 2010-10-11 11:19:55 -07:00
Ryan Dahl cdd1d675a7 Remove old tcp module 2010-10-10 20:57:33 -07:00
Ryan Dahl 9d248f690a Fix return in Buffer::New 2010-10-10 19:24:33 -07:00
Ryan Dahl 0cf03ab800 Add char* constructor for Buffer 2010-10-10 19:08:51 -07:00
Ryan Dahl bc695475b9 Add Stream base class with stream.pipe 2010-10-10 17:27:03 -07:00
Ryan Dahl fe74283e1d Fix a few compiler warnings... 2010-10-09 16:04:38 -07:00
Ryan Dahl a6017660d8 More clang fixes 2010-10-09 15:10:45 -07:00
Ryan Dahl 5dd08c6c71 Ugly fix for clang 2010-10-09 14:21:33 -07:00
Ryan Dahl 783f5019b0 Add flag to disable colors in REPL 2010-10-09 12:46:06 -07:00
Ryan Dahl b5359e40be Warnings for new C++ buffer API 2010-10-09 12:15:16 -07:00
Ryan Dahl 54e844cf08 add require.cache 2010-10-07 09:58:08 -07:00
Joshaven Potter 3d4e4d8909 syntax fixes to pass jslint 2010-10-06 20:40:57 -07:00
TJ Holowaychuk 9481bc1009 Added -e, --eval 2010-10-06 19:09:22 -07:00
Ryan Dahl dbf0d6bb70 ClearWeak on ObjectWraps. I /think/ this is the correct semantics 2010-10-04 12:52:46 -07:00
isaacs e9b6b0b327 Report "weird" errors a little better.
There are a few kinds of errors that are very confusing.
1. Errors raised in nextTick
2. Errors emitted on the "error" event
3. RangeErrors that crash the program (or anything without a stack trace)

Long traces will make make these better, of course.  In the meantime, this
adds a few handy signposts (in the form of better error reporting and
comments on the otherwise inscrutable code printed to the terminal) that can
help new users find the cause, or at least, ask for help more effectively.
2010-10-02 06:44:28 -07:00
Ryan Dahl 5a4c40beea Drop reference to timer callback on clearTimeout
Reported here:
http://groups.google.com/group/nodejs-dev/browse_thread/thread/9e063d0938f99879

Would be good to test this somehow...
2010-10-01 11:16:51 -07:00
Ryan Dahl 5cc1428d5f Remove unused function 2010-09-30 12:20:33 -07:00
Ryan Dahl 1a2c1c8a96 Simplify: per-module cache thing 2010-09-30 12:18:58 -07:00
Ben Noordhuis 55c65cc2d5 Safe constructor for ObjectWrapped classes
New() methods should be invoked as constructors, not regular functions.
Corner cases like Script::New() may cause a SIGSEGV when the GC is run.

More details: http://groups.google.com/group/nodejs/browse_thread/thread/a7e5db68d4cd6356
2010-09-29 16:02:45 -07:00
Ryan Dahl 9911629de0 Fix style in node_crypto.cc 2010-09-28 19:17:09 -07:00
Ryan Dahl 163485c8aa Rename some SecureStream methods 2010-09-28 11:38:27 -07:00
isaacs dff1b5ad10 Don't try to run extension loaders unless they're actually functions 2010-09-22 10:13:25 -07:00
Tim-Smart 0f16af7ee4 Remove registerExtension, add .extensions. Tests.
Updated extensions tests
2010-09-20 09:56:43 -07:00
Ryan Dahl 354150f4e1 Tag release versions in 'process.version' 2010-09-19 17:22:18 -07:00
isaacs bb08f0c219 Remove require.async
This patch removes require.async from nodejs.

1. It complicated the code unnecessarily.
2. Everyone uses sync require anyway.
3. It's got a lot of weird edge cases when mixed with sync require.
4. It is many months behind the commonjs spec anyhow.
2010-09-19 16:52:39 -07:00
Ryan Dahl 27af64ef46 Forgot to include node_main.cc 2010-09-19 14:25:13 -07:00
Ryan Dahl 124fbedc2f Add node::Start()
first step towards building a libnode.a
2010-09-19 13:13:59 -07:00
Ryan Dahl 4962702e4a Revert requireNative changes: 4e6b9b0, d429033, 6abbfa0, bcad540
The REPL needs the full require(); add test for that behavior.
2010-09-19 11:22:15 -07:00
Ryan Dahl 776754c33f Remove process._byteLength 2010-09-17 01:06:44 -07:00
Ryan Dahl 9628e28aec Remove process.evalcx 2010-09-17 00:23:27 -07:00
Ryan Dahl 01b3418e2e Move IOWatcher and Timer to process.binding 2010-09-17 00:15:54 -07:00
Ryan Dahl 5a801d63d1 Finally remove process.unloop 2010-09-17 00:03:17 -07:00
Ryan Dahl f8ce848d9b Remove process.global 2010-09-17 00:01:27 -07:00
Ryan Dahl 31f8fa222e Add require('constants') 2010-09-16 23:22:58 -07:00
Ryan Dahl 6eca948ca2 Move constants out of process object 2010-09-16 23:16:07 -07:00
Ryan Dahl 42eb5a6898 Simplify REPL 2010-09-16 20:50:56 -07:00
Paul Querna 5a00d9d50f Use the Apple recommended way of detecting OSX Versions
to enable KQueue, rather than deciding based on the compiler version.
2010-09-16 17:32:30 -07:00
Paul Querna c8f9728de7 Move dns.isIP to net.isIP
Add tests and docs.
2010-09-16 17:27:10 -07:00