0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
Commit Graph

1754 Commits

Author SHA1 Message Date
isaacs
fb400b4868 Return after emitting error in tty.js 2012-05-01 15:51:29 -07:00
Yi, EungJun
4bd54dad33 path: add path.sep to get the path separator. 2012-05-01 15:19:37 +02:00
Nathan Rajlich
f4403f90f8 tty: emit "error" instead of throwing when getWindowSize() fails 2012-04-30 18:51:20 -07:00
Nathan Rajlich
f1f5de1c8d tty: throw an Error when getWindowSize() fails 2012-04-30 16:20:27 -07:00
Maciej Małecki
77c18d1e1b console: throw when no such label exists in console.timeEnd
Test included.
2012-04-29 22:27:45 +02:00
Bert Belder
c8a10e97c8 Merge branch 'v0.6'
Conflicts:
	deps/uv/include/uv-private/uv-unix.h
	deps/uv/include/uv-private/uv-win.h
	deps/uv/src/uv-common.c
	deps/uv/src/win/fs.c
	src/process_wrap.cc
2012-04-29 00:17:23 +02:00
Bert Belder
55e4d54927 Child process: support the gid and uid options 2012-04-27 22:13:00 +02:00
Nathan Rajlich
f405daa922 repl: make tab completion read up the prototype of "global"
For example, there's a global "toString()" function, so the REPL's
tab completion should pick that up.
2012-04-25 20:34:34 -07:00
Nathan Rajlich
e16021340d repl: use Object.getPrototypeOf on functions for tab complete() 2012-04-21 13:53:49 -07:00
Kyle Robinson Young
da56c72f59 readline: remove unused vars in _ttyWrite 2012-04-21 05:30:24 +02:00
Kyle Robinson Young
e67a0f80e0 readline: _normalWrite() doesn't take a key modifier arg 2012-04-18 23:36:46 +02:00
Kyle Robinson Young
57148f54e1 readline: change char to ch to avoid reserved word 2012-04-18 21:57:39 +02:00
Erik Dubbelboer
ecfe32e3a0 dns: add more error codes 2012-04-18 21:50:52 +02:00
Erik Dubbelboer
3d69bbfa87 net, http: add backlog parameter to .listen() 2012-04-18 21:40:25 +02:00
isaacs
33c76f19de net.js: lint 2012-04-18 12:24:41 -07:00
isaacs
ecca7525cc Merge remote-tracking branch 'ry/v0.6' into master
Conflicts:
	AUTHORS
	ChangeLog
	LICENSE
	Makefile
	deps/http_parser/test.c
	deps/npm/AUTHORS
	deps/npm/html/api/bin.html
	deps/npm/html/api/bugs.html
	deps/npm/html/api/commands.html
	deps/npm/html/api/config.html
	deps/npm/html/api/deprecate.html
	deps/npm/html/api/docs.html
	deps/npm/html/api/edit.html
	deps/npm/html/api/explore.html
	deps/npm/html/api/help-search.html
	deps/npm/html/api/init.html
	deps/npm/html/api/install.html
	deps/npm/html/api/link.html
	deps/npm/html/api/load.html
	deps/npm/html/api/ls.html
	deps/npm/html/api/npm.html
	deps/npm/html/api/outdated.html
	deps/npm/html/api/owner.html
	deps/npm/html/api/pack.html
	deps/npm/html/api/prefix.html
	deps/npm/html/api/prune.html
	deps/npm/html/api/publish.html
	deps/npm/html/api/rebuild.html
	deps/npm/html/api/restart.html
	deps/npm/html/api/root.html
	deps/npm/html/api/run-script.html
	deps/npm/html/api/search.html
	deps/npm/html/api/shrinkwrap.html
	deps/npm/html/api/start.html
	deps/npm/html/api/stop.html
	deps/npm/html/api/submodule.html
	deps/npm/html/api/tag.html
	deps/npm/html/api/test.html
	deps/npm/html/api/uninstall.html
	deps/npm/html/api/unpublish.html
	deps/npm/html/api/update.html
	deps/npm/html/api/version.html
	deps/npm/html/api/view.html
	deps/npm/html/api/whoami.html
	deps/npm/html/doc/README.html
	deps/npm/html/doc/adduser.html
	deps/npm/html/doc/bin.html
	deps/npm/html/doc/bugs.html
	deps/npm/html/doc/build.html
	deps/npm/html/doc/bundle.html
	deps/npm/html/doc/cache.html
	deps/npm/html/doc/changelog.html
	deps/npm/html/doc/coding-style.html
	deps/npm/html/doc/completion.html
	deps/npm/html/doc/config.html
	deps/npm/html/doc/deprecate.html
	deps/npm/html/doc/developers.html
	deps/npm/html/doc/disputes.html
	deps/npm/html/doc/docs.html
	deps/npm/html/doc/edit.html
	deps/npm/html/doc/explore.html
	deps/npm/html/doc/faq.html
	deps/npm/html/doc/folders.html
	deps/npm/html/doc/help-search.html
	deps/npm/html/doc/help.html
	deps/npm/html/doc/index.html
	deps/npm/html/doc/init.html
	deps/npm/html/doc/install.html
	deps/npm/html/doc/json.html
	deps/npm/html/doc/link.html
	deps/npm/html/doc/list.html
	deps/npm/html/doc/npm.html
	deps/npm/html/doc/outdated.html
	deps/npm/html/doc/owner.html
	deps/npm/html/doc/pack.html
	deps/npm/html/doc/prefix.html
	deps/npm/html/doc/prune.html
	deps/npm/html/doc/publish.html
	deps/npm/html/doc/rebuild.html
	deps/npm/html/doc/registry.html
	deps/npm/html/doc/removing-npm.html
	deps/npm/html/doc/restart.html
	deps/npm/html/doc/root.html
	deps/npm/html/doc/run-script.html
	deps/npm/html/doc/scripts.html
	deps/npm/html/doc/search.html
	deps/npm/html/doc/semver.html
	deps/npm/html/doc/shrinkwrap.html
	deps/npm/html/doc/star.html
	deps/npm/html/doc/start.html
	deps/npm/html/doc/stop.html
	deps/npm/html/doc/submodule.html
	deps/npm/html/doc/tag.html
	deps/npm/html/doc/test.html
	deps/npm/html/doc/uninstall.html
	deps/npm/html/doc/unpublish.html
	deps/npm/html/doc/update.html
	deps/npm/html/doc/version.html
	deps/npm/html/doc/view.html
	deps/npm/html/doc/whoami.html
	deps/npm/lib/npm.js
	deps/npm/man/man1/npm.1
	deps/npm/man/man3/npm.3
	deps/npm/node_modules/fstream-npm/fstream-npm.js
	deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/package.json
	deps/npm/node_modules/fstream-npm/package.json
	deps/npm/node_modules/node-gyp/LICENSE
	deps/npm/node_modules/node-gyp/lib/build.js
	deps/npm/node_modules/node-gyp/lib/install.js
	deps/npm/node_modules/node-gyp/node_modules/ansi/package.json
	deps/npm/node_modules/node-gyp/node_modules/glob/package.json
	deps/npm/node_modules/node-gyp/package.json
	deps/npm/package.json
	deps/uv/test/test-fs.c
	deps/v8/src/regexp-macro-assembler-tracer.cc
	deps/v8/src/version.cc
	src/node_version.h
	src/platform_sunos.cc
	test/simple/test-net-write-after-close.js
	wscript
2012-04-18 11:57:54 -07:00
isaacs
d8b33dc147 lint 2012-04-17 15:52:57 -07:00
isaacs
963459d736 Domain feature
This is a squashed commit of the main work done on the domains-wip branch.

The original commit messages are preserved for posterity:

* Implicitly add EventEmitters to active domain
* Implicitly add timers to active domain
* domain: add members, remove ctor cb
* Don't hijack bound callbacks for Domain error events
* Add dispose method
* Add domain.remove(ee) method
* A test of multiple domains in process at once
* Put the active domain on the process object
* Only intercept error arg if explicitly requested
* Typo
* Don't auto-add new domains to the current domain

    While an automatic parent/child relationship is sort of neat,
    and leads to some nice error-bubbling characteristics, it also
    results in keeping a reference to every EE and timer created,
    unless domains are explicitly disposed of.

* Explicitly adding one domain to another is still fine, of course.
* Don't allow circular domain->domain memberships
* Disposing of a domain removes it from its parent
* Domain disposal turns functions into no-ops
* More documentation of domains
* More thorough dispose() semantics
* An example using domains in an HTTP server
* Don't handle errors on a disposed domain
* Need to push, even if the same domain is entered multiple times
* Array.push is too slow for the EE Ctor
* lint domain
* domain: docs
* Also call abort and destroySoon to clean up event emitters
* domain: Wrap destroy methods in a try/catch
* Attach tick callbacks to active domain
* domain: Only implicitly bind timers, not explicitly
* domain: Don't fire timers when disposed.
* domain: Simplify naming so that MakeCallback works on Timers
* Add setInterval and nextTick to domain test
* domain: Make stack private
2012-04-17 13:14:55 -07:00
Nathan Rajlich
327286dbcd repl: update the repl for the new readline behavior
This fixes the failing REPL tests.
2012-04-17 11:53:50 -07:00
Nathan Rajlich
9c3559f0ad readline: re-add the Interface#close() method; rename "end" to "close"
The idea here is to reduce the number of times that `setRawMode()` is called
on the `input` stream, since it is expensive, and simply pause()/resume()
should not call it.

So now `setRawMode()` only gets called at the beginning of the Interface
instance, and then when `Interface#close()` is called.

Test case included.
2012-04-17 11:53:50 -07:00
ssuda
70005be4ff Fixing ClientRequest setTimeout EventEmitter Leak
This will fix #3068
2012-04-16 23:36:18 +02:00
fukayatsu
0f95a93a2c tls: remove duplicate line 2012-04-16 21:38:26 +02:00
ssuda
48d52d85c3 http, https: fix .setTimeout()
Fixes #3107.
2012-04-16 18:00:38 +02:00
Maciej Małecki
f065c87bcf events: remove misleading comment 2012-04-15 15:52:56 +02:00
Mustansir Golawala
7ee15457ed os: add cross platform EOL character 2012-04-14 23:17:38 +02:00
Ben Noordhuis
b7b7b29f50 dns: remove unused functions 2012-04-13 14:46:35 +02:00
Ben Noordhuis
16fca262be net: honor 'enable' flag in .setNoDelay()
Fixes #3096.
2012-04-12 19:15:32 +02:00
Andreas Madsen
5b43c63c88 child_process: emit error when .kill fails 2012-04-12 08:17:42 -07:00
isaacs
c75f71dd72 fs.WriteStream: Handle modifications to fs.open
If the fs.open method is modified via AOP-style extension, in between
the creation of an fs.WriteStream and the processing of its action
queue, then the test of whether or not the method === fs.open will fail,
because fs.open has been replaced.

The solution is to save a reference to fs.open on the stream itself when
the action is placed in the queue.

This fixes isaacs/node-graceful-fs#6.
2012-04-09 09:03:00 -07:00
isaacs
06ada03ed9 fs.WriteStream: Handle modifications to fs.open
If the fs.open method is modified via AOP-style extension, in between
the creation of an fs.WriteStream and the processing of its action
queue, then the test of whether or not the method === fs.open will fail,
because fs.open has been replaced.

The solution is to save a reference to fs.open on the stream itself when
the action is placed in the queue.

This fixes isaacs/node-graceful-fs#6.
2012-04-09 08:39:13 -07:00
isaacs
45b772d8cb fs.readFile: Emit 'close' if we don't expect a close later
This fixes a regression introduced by 40b7302
2012-04-07 16:53:18 -07:00
Nathan Rajlich
78eb174ea2 readline: use StringDecoder for decoding "normal" data
The fix from #3059 was not handling multi-byte utf8 data properly.
2012-04-06 16:13:40 -07:00
Nathan Rajlich
ca8dea83a9 repl: make the completer use newlines
Fixes the repl.complete() function when terminal is false, since it
is now explicitly looking for a '\n' char.
2012-04-06 16:13:40 -07:00
Nathan Friedly
e28f77cbad readline: buffer data to only emit 'line' on '\n'
In "terminal: false" mode.

(And fire it multiple times if multiple lines arrive at once.)

This is necessary because the Windows telnet client sends every single
keystroke as it's typed.

See: http://stackoverflow.com/questions/9962197/node-js-readline-not-waiting-for-a-full-line-on-socket-connections

Closes #3059.
2012-04-06 16:13:40 -07:00
isaacs
b9bfb1bc91 child_process: Emit err rather than throw for IPC write failure 2012-04-06 14:16:09 -07:00
Bert Belder
40b7302af8 fs.readFile: don't make the callback before the fd is closed
On Windows it is not possible to unlink() the read file in the callback.
This fixes #3051. A test is included.
2012-04-06 03:13:56 +02:00
Zachary Scott
d73b257d65 docs: grammar and spelling on lib/cluster.js 2012-04-06 01:44:03 +02:00
isaacs
01d46f3a20 Fix #3052 Handle errors properly in zlib 2012-04-02 13:48:10 -07:00
isaacs
2726c22f0b Revert "tty: add keypress event for backwards-compat"
In this case, backwards compatibility is not worth the API
inconsistency.  We can just document the change.

This reverts commit b521ff3b4f.
2012-03-30 17:37:35 -07:00
isaacs
90ce5b3d41 cluster: Rename 'death' back to 'exit' 2012-03-30 12:59:24 -07:00
Ben Noordhuis
1ab95a536a udp_wrap: use new slab allocator 2012-03-30 21:24:02 +02:00
Nathan Rajlich
304f1fcf86 tty: clarify that tty.setRawMode() has moved to process.stdin
Technically saying `tty.ReadStream#setRawMode()` is correct,
but since a typical use cannot instantiate `tty.ReadStream` themselves,
and 99% of the time the only instance is `process.stdin`,
then a little clarification seemed necessary.
2012-03-29 13:15:24 -07:00
Yosef Dinerstein
d7c96cf289 tls: reduce memory overhead, reuse buffer
Instead of allocating a new 64KB buffer each time when checking if there is
something to transform, continue to use the same buffer. Once the buffer is
exhausted, allocate a new buffer. This solves the problem of huge allocations
when small fragments of data are processed, but will also continue to work
well with big pieces of data.
2012-03-29 17:17:15 +02:00
ssuda
44eb279ef8 zlib: don't use C++ templates
Reduces the executable's size by a few kilobytes.
2012-03-29 14:22:37 +02:00
Shigeki Ohtsu
238e12af22 tty: show deprecated warn of tty.setRawMode() 2012-03-28 20:13:23 -07:00
Shigeki Ohtsu
b521ff3b4f tty: add keypress event for backwards-compat 2012-03-28 20:12:38 -07:00
Ben Noordhuis
b031671138 tty, readline: fix style errors 2012-03-29 01:36:46 +02:00
Ben Noordhuis
285d8c6589 buffer: align fast buffers on 8 byte boundary
Prevents alignment issues when people create a typed array from a buffer.
Unaligned loads or stores are less efficent and (on some architectures) unsafe.
2012-03-29 01:31:31 +02:00
Nathan Rajlich
48bbdde66b repl: don't write a newline on the readline 'end' event
In the case of the input stream *actually* having been closed, then we
can't write to a closed socket.

Fixes test/simple/test-repl.js
2012-03-28 08:42:40 -07:00
Nathan Rajlich
208b230744 repl: add a 'useColors' option to the repl
This should only be minimally used, since the `terminal` value will usually be
what you are expecting. This option is specifically for the case where `terminal`
is false, but you still want colors to be output (or vice-versa).
2012-03-27 18:00:59 -07:00