platform/upstream/nodejs.git
14 years agoDocs for require.resolve
isaacs [Wed, 20 Oct 2010 20:56:22 +0000 (13:56 -0700)]
Docs for require.resolve

14 years agoAdd some failing tests for path.join
Ryan Dahl [Wed, 20 Oct 2010 20:03:39 +0000 (13:03 -0700)]
Add some failing tests for path.join

14 years agoPrevents child_process.exec timeouts from throwing when the child was previously...
Aaron Heckmann [Tue, 19 Oct 2010 12:42:00 +0000 (08:42 -0400)]
Prevents child_process.exec timeouts from throwing when the child was previously killed.

14 years agoAdd require.resolve.
isaacs [Tue, 19 Oct 2010 01:17:33 +0000 (18:17 -0700)]
Add require.resolve.

Also, hack the repl so that it works as expected there, too.

14 years agoRemove old references to old 'stream' event
Ryan Dahl [Wed, 20 Oct 2010 18:10:40 +0000 (11:10 -0700)]
Remove old references to old 'stream' event

14 years agoAdded documentation of EventEmitter.once
Nikhil Marathe [Tue, 19 Oct 2010 03:36:26 +0000 (09:06 +0530)]
Added documentation of EventEmitter.once

14 years agouse bash instead of sh in http_simple_bench.sh
Ryan Dahl [Tue, 19 Oct 2010 00:48:49 +0000 (17:48 -0700)]
use bash instead of sh in http_simple_bench.sh

14 years agoUpgrade V8 to 2.5.0
Ryan Dahl [Tue, 19 Oct 2010 00:13:30 +0000 (17:13 -0700)]
Upgrade V8 to 2.5.0

14 years agonet listen should emit eaddrinuse error
Johan Euphrosine [Wed, 6 Oct 2010 17:18:08 +0000 (19:18 +0200)]
net listen should emit eaddrinuse error

14 years agoFix expect/continue keepalive
Mark Nottingham [Mon, 18 Oct 2010 05:14:29 +0000 (16:14 +1100)]
Fix expect/continue keepalive

14 years agounbase64 skips over *any* illegal chars
Jorge Chamorro Bieling [Mon, 18 Oct 2010 20:08:42 +0000 (22:08 +0200)]
unbase64 skips over *any* illegal chars

14 years agoFix race conditions in test-http-upgrade-client2
Ryan Dahl [Mon, 18 Oct 2010 22:05:18 +0000 (15:05 -0700)]
Fix race conditions in test-http-upgrade-client2

14 years agofix test-base64-bigfile for linux
Ryan Dahl [Mon, 18 Oct 2010 22:00:49 +0000 (15:00 -0700)]
fix test-base64-bigfile for linux

14 years agoFix test harness for Linux
Ryan Dahl [Mon, 18 Oct 2010 21:46:25 +0000 (14:46 -0700)]
Fix test harness for Linux

Mostly just upgraded tools/test.py to the latest one that's in V8.  But also
fixing the before and after hooks to preserve the test/tmp directory so that
running tests manually usually works.

14 years agonew api for defining repl commands
Sami Samhuri [Wed, 13 Oct 2010 14:51:53 +0000 (07:51 -0700)]
new api for defining repl commands

14 years ago./wscript: allow for cross-compiling of all three supported architectures
AJ ONeal [Wed, 13 Oct 2010 22:27:51 +0000 (16:27 -0600)]
./wscript: allow for cross-compiling of all three supported architectures

14 years agoA big base64 file encoding/decoding test
isaacs [Thu, 7 Oct 2010 23:25:30 +0000 (16:25 -0700)]
A big base64 file encoding/decoding test

Originally written to try to track down this bug report:
http://permalink.gmane.org/gmane.comp.lang.javascript.nodejs/13924

As it turns out, it's showing a completely different kind of failure.  When
the file is base64 encoded with the native program, then decoded with node,
it doesn't match the original.  Something's fishy.

14 years agobase64 decode should handle whitespace
Ryan Dahl [Mon, 18 Oct 2010 18:15:20 +0000 (11:15 -0700)]
base64 decode should handle whitespace

14 years agoInstall ev.h and eio.h
Ryan Dahl [Mon, 18 Oct 2010 05:57:40 +0000 (22:57 -0700)]
Install ev.h and eio.h

14 years agoAdd EventEmitter.prototype.once
Peteris Krumins [Tue, 12 Oct 2010 20:52:26 +0000 (23:52 +0300)]
Add EventEmitter.prototype.once

14 years agoAdd idle connection test
Ryan Dahl [Fri, 15 Oct 2010 17:05:22 +0000 (12:05 -0500)]
Add idle connection test

14 years agoAdd 'make bench' script
Ryan Dahl [Wed, 13 Oct 2010 23:20:24 +0000 (16:20 -0700)]
Add 'make bench' script

14 years agoImprove benchmark/http_simple.js
Ryan Dahl [Wed, 13 Oct 2010 21:16:49 +0000 (14:16 -0700)]
Improve benchmark/http_simple.js

14 years agoUpgrade http-parser with a fix for spaces in headers
Nathan Rajlich [Wed, 13 Oct 2010 09:45:37 +0000 (02:45 -0700)]
Upgrade http-parser with a fix for spaces in headers

14 years agoDon't flush net writeQueue on end() if its still connecting
Joshua Peek [Tue, 12 Oct 2010 04:19:44 +0000 (23:19 -0500)]
Don't flush net writeQueue on end() if its still connecting

14 years agoPreliminary pkg-config support.
Ben Noordhuis [Tue, 12 Oct 2010 21:13:44 +0000 (23:13 +0200)]
Preliminary pkg-config support.

14 years agoAllow people to set backlog. Need a better API.
Ryan Dahl [Wed, 13 Oct 2010 08:47:29 +0000 (01:47 -0700)]
Allow people to set backlog. Need a better API.

14 years agoAdd signal handlers so we clean up before exiting.
Tom Hughes [Tue, 12 Oct 2010 21:01:58 +0000 (14:01 -0700)]
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.

14 years agoAdd .js to native script's filename
Ryan Dahl [Tue, 12 Oct 2010 18:54:45 +0000 (11:54 -0700)]
Add .js to native script's filename

14 years agoDynamically load native scripts
Ryan Dahl [Tue, 12 Oct 2010 18:49:41 +0000 (11:49 -0700)]
Dynamically load native scripts

14 years agoDon't require events in fs.js
Ryan Dahl [Mon, 11 Oct 2010 23:40:28 +0000 (16:40 -0700)]
Don't require events in fs.js

14 years agofs.ReadStream and fs.WriteStream derive from stream.Stream
Ryan Dahl [Mon, 11 Oct 2010 23:39:40 +0000 (16:39 -0700)]
fs.ReadStream and fs.WriteStream derive from stream.Stream

14 years agoAdd destroy methods to HTTP messages
Ryan Dahl [Mon, 11 Oct 2010 23:36:12 +0000 (16:36 -0700)]
Add destroy methods to HTTP messages

needs tests (particularly for pipeline situations)

14 years agoMigrated from sys.p to console.dir
Micheil Smith [Mon, 11 Oct 2010 23:09:02 +0000 (10:09 +1100)]
Migrated from sys.p to console.dir

14 years agoRemoved deprecated methods from lib/path.js
Micheil Smith [Mon, 11 Oct 2010 23:06:44 +0000 (10:06 +1100)]
Removed deprecated methods from lib/path.js

14 years agoRemoved deprecated methods from lib/net.js
Micheil Smith [Mon, 11 Oct 2010 23:04:18 +0000 (10:04 +1100)]
Removed deprecated methods from lib/net.js

14 years agoRemoved deprecated methods from lib/http.js
Micheil Smith [Mon, 11 Oct 2010 23:03:28 +0000 (10:03 +1100)]
Removed deprecated methods from lib/http.js

14 years agoRemoved deprecated methods from lib/fs.js
Micheil Smith [Mon, 11 Oct 2010 23:03:02 +0000 (10:03 +1100)]
Removed deprecated methods from lib/fs.js

14 years agoRemoved deprecated alias to lib/fs.js
Micheil Smith [Mon, 11 Oct 2010 23:02:05 +0000 (10:02 +1100)]
Removed deprecated alias to lib/fs.js

14 years agoRemoved deprecated events.Promise
Micheil Smith [Mon, 11 Oct 2010 23:01:12 +0000 (10:01 +1100)]
Removed deprecated events.Promise

14 years agoEnable pipe test
Ryan Dahl [Mon, 11 Oct 2010 23:08:19 +0000 (16:08 -0700)]
Enable pipe test

14 years agoRemove sys in new tests
Ryan Dahl [Mon, 11 Oct 2010 23:07:18 +0000 (16:07 -0700)]
Remove sys in new tests

14 years agoFix test-http-buffer-sanity
Ryan Dahl [Mon, 11 Oct 2010 23:00:36 +0000 (16:00 -0700)]
Fix test-http-buffer-sanity

14 years agoSoft migration of sys -> util, Removal of deprecated utils module.
Micheil Smith [Mon, 11 Oct 2010 21:04:09 +0000 (08:04 +1100)]
Soft migration of sys -> util, Removal of deprecated utils module.

14 years agoAdd broken test passing a buffer through http
Ryan Dahl [Mon, 11 Oct 2010 21:54:32 +0000 (14:54 -0700)]
Add broken test passing a buffer through http

14 years agoenviron symbol fix for Mac OS X
Rasmus Andersson [Mon, 11 Oct 2010 15:19:11 +0000 (17:19 +0200)]
environ symbol fix for Mac OS X

14 years agoCloser to a working pipe
Ryan Dahl [Mon, 11 Oct 2010 08:22:38 +0000 (01:22 -0700)]
Closer to a working pipe

14 years agoNo long have tcp module
Ryan Dahl [Mon, 11 Oct 2010 08:22:24 +0000 (01:22 -0700)]
No long have tcp module

14 years agoStress test for http upload timeouts
Felix Geisendörfer [Mon, 11 Oct 2010 07:19:40 +0000 (09:19 +0200)]
Stress test for http upload timeouts

This was meant to find a bug in setTimeout, but there doesn't seem to be
one. So this test can no help to prevent future regressions.

14 years agoTCP clients should buffer writes before connection
Ryan Dahl [Mon, 11 Oct 2010 06:09:14 +0000 (23:09 -0700)]
TCP clients should buffer writes before connection

14 years agopipe-test fixes
Ryan Dahl [Mon, 11 Oct 2010 05:05:49 +0000 (22:05 -0700)]
pipe-test fixes

14 years agoRemove old tcp module
Ryan Dahl [Mon, 11 Oct 2010 03:57:33 +0000 (20:57 -0700)]
Remove old tcp module

14 years agoImprove pipe-test. Still not working
Ryan Dahl [Mon, 11 Oct 2010 03:18:47 +0000 (20:18 -0700)]
Improve pipe-test. Still not working

14 years agoclean up options.end code - wasn't working
Ryan Dahl [Mon, 11 Oct 2010 03:16:21 +0000 (20:16 -0700)]
clean up options.end code - wasn't working

14 years agoChanging http.js to use the same stream.Stream creation as net.js
Micheil Smith [Mon, 11 Oct 2010 02:38:57 +0000 (13:38 +1100)]
Changing http.js to use the same stream.Stream creation as net.js

14 years agoFix return in Buffer::New
Ryan Dahl [Mon, 11 Oct 2010 02:24:33 +0000 (19:24 -0700)]
Fix return in Buffer::New

14 years agoAdd char* constructor for Buffer
Ryan Dahl [Mon, 11 Oct 2010 02:08:51 +0000 (19:08 -0700)]
Add char* constructor for Buffer

14 years agoAdd Stream base class with stream.pipe
Ryan Dahl [Mon, 11 Oct 2010 00:21:36 +0000 (17:21 -0700)]
Add Stream base class with stream.pipe

14 years agoFix a few compiler warnings...
Ryan Dahl [Sat, 9 Oct 2010 23:04:38 +0000 (16:04 -0700)]
Fix a few compiler warnings...

14 years agoMore clang fixes
Ryan Dahl [Sat, 9 Oct 2010 22:10:45 +0000 (15:10 -0700)]
More clang fixes

14 years agoUgly fix for clang
Ryan Dahl [Sat, 9 Oct 2010 21:21:26 +0000 (14:21 -0700)]
Ugly fix for clang

14 years agoFix style
Ryan Dahl [Sat, 9 Oct 2010 19:48:22 +0000 (12:48 -0700)]
Fix style

14 years agoAdd flag to disable colors in REPL
Ryan Dahl [Sat, 9 Oct 2010 19:46:06 +0000 (12:46 -0700)]
Add flag to disable colors in REPL

14 years agoUse readline.columns in sys.inspect when possible
Ryan Dahl [Sat, 9 Oct 2010 19:40:15 +0000 (12:40 -0700)]
Use readline.columns in sys.inspect when possible

Though, this should probably be an option to sys.inspect and be set by REPL.

14 years agoCommas last in sys.inspect
Ryan Dahl [Sat, 9 Oct 2010 01:26:53 +0000 (18:26 -0700)]
Commas last in sys.inspect

Ugly? Yes. More readable by first time users? Yes.

14 years agoWarnings for new C++ buffer API
Ryan Dahl [Sat, 9 Oct 2010 19:15:14 +0000 (12:15 -0700)]
Warnings for new C++ buffer API

14 years agoadd $ to variable name character matching patterns in repl completer
Sean Coates [Sat, 9 Oct 2010 16:25:02 +0000 (12:25 -0400)]
add $ to variable name character matching patterns in repl completer

14 years agoAdd missing v8 file...
Ryan Dahl [Sat, 9 Oct 2010 07:56:37 +0000 (00:56 -0700)]
Add missing v8 file...

14 years agoAdd config.h for cygwin for libev and libeio
Ryan Dahl [Sat, 9 Oct 2010 07:55:51 +0000 (00:55 -0700)]
Add config.h for cygwin for libev and libeio

14 years agoexpose parsers freelist
Ryan Dahl [Thu, 7 Oct 2010 23:17:06 +0000 (16:17 -0700)]
expose parsers freelist

14 years agoadd require.cache
Ryan Dahl [Thu, 7 Oct 2010 16:58:08 +0000 (09:58 -0700)]
add require.cache

14 years agosyntax fixes to pass jslint
Joshaven Potter [Thu, 7 Oct 2010 03:05:23 +0000 (23:05 -0400)]
syntax fixes to pass jslint

14 years agoAdded -e, --eval
TJ Holowaychuk [Thu, 7 Oct 2010 02:05:01 +0000 (19:05 -0700)]
Added -e, --eval

14 years ago#define HAVE_FDATASYNC 0 for darwin; 10.5 is missing it
Ryan Dahl [Tue, 5 Oct 2010 06:22:53 +0000 (23:22 -0700)]
#define HAVE_FDATASYNC 0 for darwin; 10.5 is missing it

14 years agoUpgrade V8 to 2.4.8
Ryan Dahl [Tue, 5 Oct 2010 22:25:07 +0000 (15:25 -0700)]
Upgrade V8 to 2.4.8

14 years agoClearWeak on ObjectWraps. I /think/ this is the correct semantics
Ryan Dahl [Mon, 4 Oct 2010 19:52:46 +0000 (12:52 -0700)]
ClearWeak on ObjectWraps. I /think/ this is the correct semantics

14 years agoFix #325. Add test and check for zero-length file contents in fs.readFileSync
isaacs [Mon, 4 Oct 2010 19:22:59 +0000 (12:22 -0700)]
Fix #325. Add test and check for zero-length file contents in fs.readFileSync

14 years agolib/http.js - nested loop stepping on variables of outer loop
Ryan Dahl [Mon, 4 Oct 2010 17:50:35 +0000 (10:50 -0700)]
lib/http.js - nested loop stepping on variables of outer loop

Fixes #318.

14 years agolibev, libeio config.h files don't depend on arch
Ryan Dahl [Sat, 2 Oct 2010 22:07:54 +0000 (15:07 -0700)]
libev, libeio config.h files don't depend on arch

14 years agolibev libeio: added freebsd-x86 config headers
David Siegel [Sat, 25 Sep 2010 09:13:11 +0000 (11:13 +0200)]
libev libeio: added freebsd-x86 config headers

14 years agoSimpler libev and libeio config
Ryan Dahl [Fri, 1 Oct 2010 02:55:28 +0000 (19:55 -0700)]
Simpler libev and libeio config

14 years agoReport "weird" errors a little better.
isaacs [Sat, 2 Oct 2010 06:22:34 +0000 (23:22 -0700)]
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.

14 years agoAdd support for handling Expect: 100-continue
Mark Nottingham [Fri, 10 Sep 2010 01:56:35 +0000 (11:56 +1000)]
Add support for handling Expect: 100-continue

HTTP/1.1 requests, either with an event (check_continue) or automatically, if no event handler is present.

Add client-side expect/continue support, tests.

Expound upon client requirements for expect/continue.

14 years agofix encoding option on ReadStream, updated test
Marco Rogers [Mon, 27 Sep 2010 17:34:16 +0000 (13:34 -0400)]
fix encoding option on ReadStream, updated test

14 years agoUpgrade V8 to 2.4.7
Ryan Dahl [Fri, 1 Oct 2010 21:18:59 +0000 (14:18 -0700)]
Upgrade V8 to 2.4.7

14 years agoFix REPL crash on tabbing 'this.'
Ryan Dahl [Fri, 1 Oct 2010 18:31:02 +0000 (11:31 -0700)]
Fix REPL crash on tabbing 'this.'

Thanks to Tim Becker for pointing this out.

14 years agoDrop reference to timer callback on clearTimeout
Ryan Dahl [Fri, 1 Oct 2010 18:01:43 +0000 (11:01 -0700)]
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...

14 years agofs.ReadStream: Passing null for file position on all reads except the first read...
Evan Larkin [Mon, 27 Sep 2010 03:31:09 +0000 (22:31 -0500)]
fs.ReadStream: Passing null for file position on all reads except the first read of a range read.

14 years agoFix zero length buffer bug for http res.end()
Ryan Dahl [Fri, 1 Oct 2010 00:12:56 +0000 (17:12 -0700)]
Fix zero length buffer bug for http res.end()

Reported by Kadir Pekel <kadirpekel@gmail.com>

14 years agoConsume HTTP trailing headers
Mark Nottingham [Wed, 29 Sep 2010 09:38:48 +0000 (19:38 +1000)]
Consume HTTP trailing headers

14 years agoNo longer using the global variable "stat" in unwatchFile
Evan Larkin [Sun, 26 Sep 2010 16:36:40 +0000 (11:36 -0500)]
No longer using the global variable "stat" in unwatchFile

14 years agoRemove unused function
Ryan Dahl [Thu, 30 Sep 2010 19:20:33 +0000 (12:20 -0700)]
Remove unused function

14 years agoSimplify: per-module cache thing
Ryan Dahl [Thu, 30 Sep 2010 19:16:48 +0000 (12:16 -0700)]
Simplify: per-module cache thing

14 years agoAdd test for getting parse error from HTTP client
Ryan Dahl [Thu, 30 Sep 2010 18:45:27 +0000 (11:45 -0700)]
Add test for getting parse error from HTTP client

Made this test in response to this thread:
http://groups.google.com/group/nodejs/browse_thread/thread/f82835007a277de2/
But Node appears to be working correctly.

14 years agoMove the http client's initParser() into prototype
Ryan Dahl [Thu, 30 Sep 2010 18:41:50 +0000 (11:41 -0700)]
Move the http client's initParser() into prototype

14 years agowriteable -> writable
Ryan Dahl [Wed, 29 Sep 2010 23:11:00 +0000 (16:11 -0700)]
writeable -> writable

14 years agoSafe constructor for ObjectWrapped classes
Ben Noordhuis [Fri, 24 Sep 2010 15:02:08 +0000 (17:02 +0200)]
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

14 years agoFix style in node_crypto.cc
Ryan Dahl [Tue, 28 Sep 2010 18:42:47 +0000 (11:42 -0700)]
Fix style in node_crypto.cc

14 years agoRename some SecureStream methods
Ryan Dahl [Tue, 28 Sep 2010 18:38:27 +0000 (11:38 -0700)]
Rename some SecureStream methods

14 years agolazy load crypto binding
Ryan Dahl [Tue, 28 Sep 2010 18:14:24 +0000 (11:14 -0700)]
lazy load crypto binding