Compare commits

...

2774 Commits

Author SHA1 Message Date
isaacs
2134aa3d5c 2012.06.29, Version 0.8.1 (stable)
* V8: upgrade to v3.11.10.12

* npm: upgrade to v1.1.33
  - Support for parallel use of the cache folder
  - Retry on registry timeouts or network failures (Trent Mick)
  - Reduce 'engines' failures to a warning
  - Use new zsh completion if aviailable (Jeremy Cantrell)

* Fix #3577 Un-break require('sys')

* util: speed up formatting of large arrays/objects (Ben Noordhuis)

* windows: make fs.realpath(Sync) work with UNC paths (Bert Belder)

* build: fix --shared-v8 option (Ben Noordhuis)

* doc: `detached` is a boolean (Andreas Madsen)

* build: use proper python interpreter (Ben Noordhuis)

* build: expand ~ in `./configure --prefix=~/a/b/c` (Ben Noordhuis)

* build: handle CC env var with spaces (Gabriel de Perthuis)

* build: fix V8 build when compiling with gcc 4.5 (Ben Noordhuis)

* build: fix --shared-v8 option (Ben Noordhuis)

* windows msi: Fix icon issue which caused huge file size (Bert Belder)

* unix: assume that dlopen() may clobber dlerror() (Ben Noordhuis)

* sunos: fix memory corruption bugs (Ben Noordhuis)

* windows: better (f)utimes and (f)stat (Bert Belder)
2012-06-29 02:11:19 -07:00
isaacs
3644b0bc96 uv: upgrade to 5b8a112 2012-06-28 19:11:30 -07:00
isaacs
c721604d25 npm: Upgrade to 1.1.33
Support for parallel use of the cache folder
Retry on registry timeouts or network failures
Reduce 'engines' failures to a warning
Use new zsh completion if aviailable
2012-06-28 19:08:32 -07:00
isaacs
f2a9ed4873 Fix #3577 Un-break require('sys') 2012-06-28 10:14:03 -07:00
Bert Belder
3ea2a618ad uv: upgrade to 4a88b3b 2012-06-28 16:17:56 +02:00
isaacs
37bdd36d70 blog: Show 0.8.0 even after 0.8.1 ships
The 0.(even).0 releases typically have benchmarks and other interesting
stuff, since that's a milestone.
2012-06-27 23:32:50 -07:00
Ben Noordhuis
6531f187d8 util: speed up formatting of large arrays/objects
Don't .indexOf() into the keys array. V8 is smart but not so smart that it
knows how to turn the linear scan into a O(1) lookup.

Fixes #3562.
2012-06-28 03:51:42 +02:00
Ben Noordhuis
be3afd0bec doc: remove references to deprecated fs api
The string-based versions of fs.read() and fs.write() have been deprecated
since before v0.2.0.
2012-06-28 03:50:48 +02:00
Ben Noordhuis
d5f13f6c08 build: use proper python interpreter
Make configure start gyp with the same python interpreter that is used to
run configure itself.

Fixes an issue where configure fails with a SyntaxError because the user
has multiple python binaries on his $PATH and the default one is too old.
2012-06-28 01:07:45 +02:00
Gabriel
9e72b7b65c build: handle CC env var with spaces
For example:

    CC='ccache gcc' ./configure
2012-06-27 19:52:01 +02:00
Bert Belder
0cdeb8ed96 windows: make fs.realpath(Sync) work with UNC paths
Closes #3542
2012-06-27 01:59:25 +02:00
Ben Noordhuis
f00c8bcef8 build: fix --shared-v8 option 2012-06-27 00:35:16 +02:00
isaacs
21aa0df8b2 realpath: No sync cb() calling allowed. 2012-06-26 15:20:26 -07:00
Ben Noordhuis
1e50282ae8 deps: upgrade libuv to 4d42af2 2012-06-26 23:38:35 +02:00
Tim Oxley
69f594d22c Added % difference for perf benchmarks in 0.8 post 2012-06-26 10:54:20 -07:00
Bert Belder
10448487e5 configure: don't fail if compiler_version() doesn't work
This fixes the Windows build.
2012-06-26 19:23:24 +02:00
Andreas Madsen
401ff10295 doc: detached is a boolean 2012-06-26 17:30:07 +02:00
Ben Noordhuis
06c82c5069 build: expand ~ in ./configure --prefix=~/a/b/c 2012-06-26 16:35:14 +02:00
Ben Noordhuis
07e5877144 build: disable strict aliasing in v8 with gcc 4.5.x
The gcc 4.5.x have various bugs that make V8 crash in various and interesting
ways when -fstrict-aliasing is in effect.
2012-06-26 03:01:46 +02:00
Bert Belder
f60def5e9a v8: reapply floating patches 2012-06-26 02:03:49 +02:00
Bert Belder
74872b0dc9 v8: upgrade to version 3.11.10.12 2012-06-26 02:03:24 +02:00
Andreas Madsen
3d51646c4b doc: replace references to cluster.autoFork 2012-06-25 23:17:18 +02:00
Bert Belder
41a4b734d3 windows: remove 256x256 version of the icon
Nobody needs that anyway, it's just eating up space.
2012-06-25 18:40:48 +02:00
Bert Belder
3f932c52b0 windows msi: don't use .exe file as icon
This makes the installer nice and small again.
2012-06-25 18:40:12 +02:00
koichik
d7825b3c1d docs: add punycode to TOC
Refs #3301.
2012-06-25 09:07:57 -07:00
isaacs
7823474022 blog post for v0.8.0 2012-06-25 07:59:14 -07:00
isaacs
b07b391304 Now working on 0.8.1 2012-06-25 07:58:03 -07:00
isaacs
5feea97b53 Merge branch 'v0.8.0-release' into v0.8 2012-06-25 07:57:45 -07:00
isaacs
8b8a7a7f9b 2012.06.25, Version 0.8.0 (stable)
* V8: upgrade to v3.11.10.10

* npm: Upgrade to 1.1.32

* Deprecate iowatcher (Ben Noordhuis)

* windows: update icon (Bert Belder)

* http: Hush 'MUST NOT have a body' warnings to debug() (isaacs)

* Move blog.nodejs.org content into repository (isaacs)

* Fix #3503: stdin: resume() on pipe(dest) (isaacs)

* crypto: fix error reporting in SetKey() (Fedor Indutny)

* Add --no-deprecation and --trace-deprecation command-line flags
* (isaacs)

* fs: fix fs.watchFile() (Ben Noordhuis)

* fs: Fix fs.readfile() on pipes (isaacs)

* Rename GYP variable node_use_system_openssl to be consistent (Ryan
* Dahl)
2012-06-25 07:37:20 -07:00
isaacs
9a7158de18 Hotfix for #3528 Add strdup in uv_cpu_info 2012-06-25 07:37:19 -07:00
Mathias Bynens
839bf025a8 docs: Switch to the asynchronous Google Analytics snippet
The old snippet needlessly uses `document.write`. Let’s use the
optimized version of the most recent, asynchronous GA snippet:
http://mathiasbynens.be/notes/async-analytics-snippet
2012-06-23 11:54:51 -07:00
isaacs
38250f6403 npm: Upgrade to 1.1.32 2012-06-22 15:14:12 -07:00
Bert Belder
1b114162ab uv: upgrade to 0387c23 2012-06-22 20:53:04 +02:00
isaacs
2603cc564d blog: add RSS link tag for discovery 2012-06-22 09:04:14 -07:00
isaacs
d34fea59e1 blog: Generate RSS feeds 2012-06-22 08:49:20 -07:00
isaacs
91835966eb npm: Upgrade to 1.1.31 2012-06-22 07:45:21 -07:00
isaacs
5565366a33 uv: Upgrade to 171e2f71b9 2012-06-22 07:44:40 -07:00
Bert Belder
a1b274108f windows msi: use .url files for documentation and website shortcuts 2012-06-22 15:24:23 +02:00
Bert Belder
399731e3a0 windows msi: add npm dir to user PATH only
The NPM folder is personal to the user. It shouldn't be added to the
system-wide path.
2012-06-22 15:24:22 +02:00
Bert Belder
2dccebd4b8 windows msi: set icon for add/remove programs dialog 2012-06-22 15:24:21 +02:00
Bert Belder
3bab12197f windows: fix/improve nodejsvars.bat
- Fix: it didn't work for the x86 version of node
- Also add NPM to path
- Also print node version
- Don't change dir to home dir if not started from the start menu
2012-06-22 15:24:21 +02:00
isaacs
de89bbb00c blog: Show category in post metadata 2012-06-21 19:45:11 -07:00
isaacs
441e792849 stdin.pipe: Replace forgotten opts member 2012-06-21 19:36:17 -07:00
isaacs
6014a62b3e blog: Missing title tag 2012-06-21 19:20:09 -07:00
isaacs
ff2a1b86c3 blog: Minor tweaks to style and some data conversion cleanup 2012-06-21 19:15:03 -07:00
Joe Shaw
38250f9aef authors: update email address
Closes #3507.
2012-06-22 02:09:45 +02:00
isaacs
9df5fda777 Merge branch 'blog' 2012-06-21 16:19:56 -07:00
isaacs
8f1a38d916 Generate static HTML blog content out of markdown 2012-06-21 16:18:17 -07:00
isaacs
ddf52bd347 Initial blog source
Exported from WP and cleaned up a bit.
2012-06-21 16:18:17 -07:00
isaacs
c6f7fd7e47 Merge branch 'stdin-resume-pipe' 2012-06-21 16:18:00 -07:00
isaacs
5ec056633f Fix #3503: stdin: resume() on pipe(dest) 2012-06-21 16:16:30 -07:00
Fedor Indutny
af52bc4fe6 crypto: fix error reporting in SetKey() 2012-06-21 16:06:06 -07:00
isaacs
fce7c958ed test: add deprecation fixture 2012-06-21 14:47:25 -07:00
isaacs
8988af58f4 Externalize node::no_deprecation 2012-06-21 13:55:40 -07:00
isaacs
48c3d20041 Apply --no-deprecation to C++ warnings as well 2012-06-21 12:29:33 -07:00
isaacs
5b39929d47 Add --no-deprecation and --trace-deprecation flags 2012-06-21 12:05:33 -07:00
isaacs
260695afd0 http: Hush 'MUST NOT have a body' warnings to debug() 2012-06-21 12:05:33 -07:00
Bert Belder
6e5217d320 Fix bug in io benchmark 2012-06-21 20:52:38 +02:00
Ben Noordhuis
1bf704a571 iowatcher: add deprecation warning 2012-06-21 17:55:05 +02:00
Ben Noordhuis
8708bb0280 doc: update fs.watchFile() docs 2012-06-21 15:03:49 +02:00
Ben Noordhuis
ef1ffcb717 fs: make fs.watchFile() interval default to 5007 2012-06-21 15:03:21 +02:00
Ben Noordhuis
f0ce98441f fs: make fs.watchFile() work on windows 2012-06-21 03:05:18 +02:00
Ben Noordhuis
d98a8578d6 test: add another fs.watchFile() test 2012-06-21 02:50:13 +02:00
Ben Noordhuis
09150b0616 node: replace NODE_STAT_STRUCT with uv_statbuf_t 2012-06-21 02:42:28 +02:00
Bert Belder
ae7a3cddae uv: upgrade to da59427 2012-06-21 02:39:13 +02:00
Karl Skomski
57d53a47e8 Use parent SlowBuffer, if any, when Buffer is sliced
Closes #3416
Closes #3477
2012-06-21 01:46:04 +02:00
Fedor Indutny
81a889fd88 v8: fix postmortem debugging tools build 2012-06-21 00:35:52 +02:00
Bert Belder
6b8ae8e66d v8: reapply floating patches 2012-06-21 00:35:46 +02:00
Bert Belder
6b26583e84 v8: upgrade to v3.11.10.10 2012-06-21 00:33:44 +02:00
Ryan Dahl
fe464a2fea Rename GYP variable node_use_system_openssl to be consistent 2012-06-20 22:38:30 +02:00
isaacs
1d3d02c70d Fix fs.readfile('/dev/stdin')
There is no need for fs.readFile() to be using pread rather than read.
The default semantics of read() are such that subsequent reads are where
we want them anyway.
2012-06-20 10:28:44 -07:00
Bert Belder
7887e68ff7 uv: upgrade to 6e8eb332 2012-06-20 04:23:32 +02:00
isaacs
e4017402ef Now working on 0.8.0 2012-06-19 17:03:12 -07:00
isaacs
fbc2ad5815 Merge branch 'v0.7.12-release' 2012-06-19 17:01:11 -07:00
Bert Belder
26b11915b1 test-domain: fix the test to work on Windows
On Windows, full pathnames are stored in the Error object when
a file i/o error happens. This is not the case on Unix. Before
this fix the test would break because of these full paths.
2012-06-20 01:07:57 +02:00
Bert Belder
7a4dfb6aa8 test-cluster-worker-kill: use SIGKILL instead of SIGHUP
In this test sending SIGKILL has the same effect as sending SIGHUP,
but SIGKILL has the advantage that it works on Windows too.
2012-06-20 00:56:33 +02:00
Bert Belder
3795d77113 windows: listen(pipe_name) is not supported when running cluster
- Added a note to the cluster module documentation.
- Disabled test-cluster-http-pipe.
2012-06-20 00:53:01 +02:00
Bert Belder
41d5fefc10 windows: update icon 2012-06-19 23:51:38 +02:00
isaacs
a72120190a 2012.06.19, Version 0.7.12 (unstable)
* npm: Upgrade to 1.1.30
  - Improved 'npm init'
  - Fix the 'cb never called' error from 'oudated' and 'update'
  - Add --save-bundle|-B config
  - Fix isaacs/npm#2465: Make npm script and windows shims cygwin-aware
  - Fix isaacs/npm#2452 Use --save(-dev|-optional) in npm rm
  - `logstream` option to replace removed `logfd` (Rod Vagg)
  - Read default descriptions from README.md files

* Shims to support deprecated ev_* and eio_* methods (Ben Noordhuis)

* #3118 net.Socket: Delay pause/resume until after connect (isaacs)

* #3465 Add ./configure --no-ifaddrs flag (isaacs)

* child_process: add .stdin stream to forks (Fedor Indutny)

* build: fix `make install DESTDIR=/path` (Ben Noordhuis)

* tls: fix off-by-one error in renegotiation check (Ben Noordhuis)

* crypto: Fix diffie-hellman key generation UTF-8 errors (Fedor Indutny)

* node: change the constructor name of process from EventEmitter to process (Andreas Madsen)

* net: Prevent property access throws during close (Reid Burke)

* querystring: improved speed and code cleanup (Felix Böhm)

* sunos: fix assertion errors breaking fs.watch() (Fedor Indutny)

* unix: stat: detect sub-second changes (Ben Noordhuis)

* add stat() based file watcher (Ben Noordhuis)
2012-06-19 14:07:49 -07:00
isaacs
f105f2f2fd trivial: Doc typo and lint fix 2012-06-19 14:07:48 -07:00
isaacs
252f034b30 email-footer: Label Windows x64 installer properly 2012-06-19 14:07:48 -07:00
Ben Noordhuis
067be2b3fe node: fix namespacing issue in ev-emul.h
Always use C linkage, prevent accidental name mangling.
2012-06-19 23:04:59 +02:00
Bert Belder
3f687dbddf uv: upgrade to b496c122 2012-06-19 21:12:48 +02:00
Bert Belder
5e1d844f3d uv: upgrade to 67090653 2012-06-19 20:48:02 +02:00
isaacs
6ba1c625cd npm: Upgrade to 1.1.30 2012-06-19 09:53:26 -07:00
verwaest@chromium.org
8a6ef65c2c Fixing bugs in promotion of elements transitions (r1175). - Fixed invalid memory access when reading enum-cache from descriptor array with elements transitions but 0 real descriptors. - Fixed infinite recursion in the intrusive map iterator when visiting elements transitions. - Properly cached non-fastmode elements transitions.
Review URL: https://chromiumcodereview.appspot.com/10565030

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@11841 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-19 17:56:52 +02:00
jkummerow@chromium.org
7282ce9014 Remove unused-but-set variable from objects.cc.
This fixes compilation with newer GCCs.

R=erik.corry@gmail.com

Review URL: https://chromiumcodereview.appspot.com/10568006

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@11838 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-19 17:56:51 +02:00
erik.corry@gmail.com
f94b85db83 Revert part of 11727 as it sometimes tanked V8 benchmark (raytrace) performance for reasons that are not obvious. Now we make objects into fast-case objects when they are made prototypes for other objects, but we do not mark objects that are already fast case with a bit that helps keep them in fast case. Review URL: https://chromiumcodereview.appspot.com/10556004
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@11831 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-19 17:56:50 +02:00
danno@chromium.org
bf682afb98 MIPS: Fix packed-element.js test on ARM with no snap
Port r11826 (5be3568a)

BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/10559002
Patch from Akos Palfi <palfia@homejinni.com>.

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@11840 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-19 17:56:49 +02:00
Ben Noordhuis
8966480c0e Revert "build: fix make install DESTDIR=/path"
This reverts commit f80513974e.

The reverted commit made DESTDIR behave more like we want it to but it was
pointed out in #3489 that it makes life a lot harder for distro package
maintainers.

Those guys and gals already have a hard enough time as it is, let's not make
their jobs even more hellish.
2012-06-19 17:50:34 +02:00
Ben Noordhuis
7de6eba061 node: preemptively unbreak windows build
No one has complained about it so far but I'm sure MSVC doesn't like things
like __attribute__((unused)). Include the libev and libeio shims only on
non-Windows platforms.
2012-06-19 13:51:00 +02:00
isaacs
edb62dd902 npm: Upgrade to 1.1.29 2012-06-18 18:08:48 -07:00
isaacs
10fa526fa0 Update npm's license
Adds the Gubblebum Blocky copyright statement
2012-06-18 18:08:45 -07:00
isaacs
5cfe0b86d5 eio-emul: Cast eio_custom method to void(*)(eio_req*) 2012-06-18 17:48:16 -07:00
Ben Noordhuis
1b22f5376b build: install eio-emul.h 2012-06-19 02:15:29 +02:00
Ben Noordhuis
f405517de1 build: install ev-emul.h 2012-06-19 02:15:29 +02:00
isaacs
1df222f179 Fix breakage introduced in de65ba7 2012-06-18 16:04:36 -07:00
isaacs
de65ba7aba net.Socket: Delay pause/resume until after connect
Fix #3118
2012-06-18 15:17:20 -07:00
Trent Mick
196207c228 node: remove unused flags and files
Drop vestigial `process.installPrefix`, `node --vars`, NODE_CFLAGS and
NODE_PREFIX.

Also removed unused node_config.h.in (replaced with config.gypi a while back).
2012-06-18 23:56:42 +02:00
isaacs
0ef6cfd39b Fix #3465 Add ./configure --no-ifaddrs flag
For Old Solaris.
2012-06-18 14:52:12 -07:00
isaacs
d0111aa0c4 uv: Upgrade to 382f2a26 2012-06-18 14:51:41 -07:00
Fedor Indutny
0a89e8b838 child_process: add .stdin stream to forks
Remove test as it doesn't make any sense after the latest stdio API
changes.
2012-06-19 01:46:28 +04:00
Fedor Indutny
057b80611f uv: upgrade to 61a6e06e 2012-06-19 01:03:11 +04:00
Bert Belder
30ab1f567d test-eio-limit: bump the number of allowed background tasks to 200
This makes the test pass on Windows.
2012-06-18 15:58:43 +02:00
Bert Belder
1b7d23e81e Fix test-cluster-message so it passes on Windows
The test was relying on a particular order of events that cannot be
guaranteed.

Also fixes some typos.
2012-06-18 15:36:26 +02:00
Ben Noordhuis
f80513974e build: fix make install DESTDIR=/path
Install to $DESTDIR, not $DESTDIR/$PREFIX.

Example: if DESTDIR=/opt/node, install to /opt/node, not /opt/node/usr/local.
2012-06-18 15:13:39 +02:00
Ben Noordhuis
ff552ddbaa tls: fix off-by-one error in renegotiation check
Make CLIENT_RENEG_LIMIT inclusive instead of exclusive, i.e. a limit of 2
means the peer can renegotiate twice, not just once.

Update pummel/test-tls-ci-reneg-attack accordingly and make it less timing
sensitive (and run faster) while we're at it.
2012-06-18 04:31:40 +02:00
Fedor Indutny
ae5b0e1fc1 crypto: add padding to diffie-hellman key
DH_size returns number of bytes in a prime number, DH_compute_key returns number
of bytes in a remainder of exponent, which may have less bytes than a prime
number. Therefore add 0-padding to the allocated buffer.

Fixes #3372
2012-06-18 00:59:31 +04:00
Andreas Madsen
6d70a4ae16 node: change the constructor name of process from EventEmitter to process 2012-06-17 13:14:11 -07:00
Maciej Małecki
3db2e034c4 events: cache domain module locally
It's faster than calling `require` every time we create an
`EventEmitter`.
2012-06-17 13:07:20 -07:00
Reid Burke
71a2a2caa6 net: Prevent property access throws during close
Fix #3455.

The remoteAddress and remotePort properties are
dynamically retrieved from _getpeername().

While _getpeername() checks if the _handle is
null, it is also possible for the tcp_wrapped
_handle.getpeername() to return null on error.

Such a condition happens when the remote closes
and one of these properties is accessed before
_handle is set to null.
2012-06-17 13:00:00 -07:00
isaacs
b0b707cb6e npm: Upgrade to 1.1.27
- severely enhanced 'npm init'
- upgraded node-gyp
2012-06-17 12:04:35 -07:00
isaacs
d614d161c7 test: Don't reuse common.PORT in test-child-process-fork-net
This fixes #3447
2012-06-16 16:26:22 -07:00
isaacs
41421ff9da Make listenFD just DTRT after warning 2012-06-16 16:26:16 -07:00
Bert Belder
55ef9ef680 Revert "Check if a stream has a valid fd before read_start"
uv_stream_t.fd is a private field which exists only on unix.
This reverts commit 8d5c1201f2.
2012-06-16 20:14:21 +02:00
isaacs
a90bc78534 Revert "DNS: Support NAPTR queries"
This reverts commit 91bf18fcc5.
2012-06-16 11:02:49 -07:00
ssuda
91bf18fcc5 DNS: Support NAPTR queries
Adding support for NAPTR records
fixes #3170
2012-06-16 10:56:49 -07:00
Felix Böhm
3a5798b097 querystring: improved speed and code cleanup 2012-06-16 10:43:17 -07:00
isaacs
e74a733024 Fix #3448 Use listen callback in test-regress-GH-1697 2012-06-16 10:19:34 -07:00
Charlie McConnell
8a068ce849 s/exit/close/ in test-child-process-stdout-flush, fixes #3449 2012-06-16 09:43:04 -07:00
isaacs
bc18bf4ec0 Add test-stdin-pause-resume-sync
This is the last bit needed to Close #3346
2012-06-16 09:05:28 -07:00
Karl Skomski
8d5c1201f2 Check if a stream has a valid fd before read_start
Closes #3118
2012-06-16 09:00:20 -07:00
isaacs
bdd57f0756 Makefile: Refuse to build release from unclean repo
Root cause of an error during the 0.7.11 release
2012-06-16 08:51:33 -07:00
Charlie McConnell
145612c2f5 test: skip test-http-full-response on ab errors
If we get errors from ab or apr, skip the test and move on.

Fix #3451
2012-06-16 08:38:47 -07:00
isaacs
c49f3b5df6 email footer: Change Windows msi paths for x86 and x64 2012-06-15 12:50:37 -07:00
isaacs
2b15cf57dd Now working on 0.7.12 2012-06-15 12:47:08 -07:00
isaacs
de2eb600b3 Merge branch 'v0.7.11-release' 2012-06-15 12:46:55 -07:00
isaacs
1f93aa5d5d 2012.06.15, Version 0.7.11 (unstable)
* V8: Upgrade to v3.11.10

* npm: Upgrade to 1.1.26

* doc: Improve cross-linking in API docs markdown (Ben Kelly)

* Fix #3425: removeAllListeners should delete array (Reid Burke)

* cluster: don't silently drop messages when the write queue gets big (Bert Belder)

* Add Buffer.concat method (isaacs)

* windows: make symlinks tolerant to forward slashes (Bert Belder)

* build: Add node.d and node.1 to installer (isaacs)

* cluster: rename worker.unqiueID to worker.id (Andreas Madsen)

* Windows: Enable ETW events on Windows for existing DTrace probes. (Igor Zinkovsky)

* test: bundle node-weak in test/gc so that it doesn't need to be downloaded (Nathan Rajlich)

* Make many tests pass on Windows (Bert Belder)

* Fix #3388 Support listening on file descriptors (isaacs)

* Fix #3407 Add os.tmpDir() (isaacs)

* Unbreak the snapshotted build on Windows (Bert Belder)

* Clean up child_process.kill throws (Bert Belder)

* crypto: make cipher/decipher accept buffer args (Ben Noordhuis)
2012-06-15 12:10:43 -07:00
isaacs
911b0fddd3 Upgrade npm to 1.1.26 2012-06-15 10:00:30 -07:00
Andreas Madsen
1e0ce5d1bd domain: the EventEmitter constructor is now always called in nodecore 2012-06-15 09:49:05 -07:00
Ben Kelly
c6185c8484 doc: Improve cross-linking in API docs markdown
Cross-link EventEmitter references in API docs to events.html

Fix broken cross-reference links with wrong anchor names in API docs.
2012-06-15 09:44:37 -07:00
isaacs
a111390c56 zlib: use Buffer.concat() 2012-06-15 09:44:37 -07:00
Bert Belder
8ccb3cbdba test-domain-implicit-fs: make it pass on windows
The error message is slightly different on windows. However there was no
need to verify the exact error message - there are assert()s that check
all the properties of the error object.
2012-06-15 18:34:27 +02:00
isaacs
283d735e2b doc: Include zlib constants 2012-06-14 22:17:39 -07:00
isaacs
e72addcf8e event: Document the mutability of listeners() 2012-06-14 17:26:51 -07:00
Nathan Rajlich
032fc42e64 readline: don't cache the "keypress" listeners
it's not safe to since `removeAllListeners()` will detach the returned
Array from the stream instance if that's ever called by the user.
2012-06-14 17:26:50 -07:00
Reid Burke
c9a1b5d162 Fix #3425: removeAllListeners should delete array
When removeAllListeners is called, the listeners array
is deleted to maintain compatibility with v0.6.

Reverts "events: don't delete the listeners array"

This reverts commit 78dc13fbf9.

Conflicts:

	test/simple/test-event-emitter-remove-all-listeners.js
2012-06-14 17:26:50 -07:00
Bert Belder
13400e3e58 windows: make symlinks tolerant to forward slashes
Closes #3440
2012-06-15 01:37:24 +02:00
isaacs
412c1ab5bc Fix test-fs-realpath on Windows
Also, in the process, fix a bug in fs.realpath on Windows.

If the user has permission to create symlinks, then use symlinks.  If
not, then skip over all the tests that cannot be run using Junctions
instead.
2012-06-14 16:15:12 -07:00
danno@chromium.org
00247d53db Fix Kraken regression due to optimistic monomorphic element transitions
R=jkummerow@chromium.org

Review URL: https://chromiumcodereview.appspot.com/10539141

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@11807 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-15 00:40:35 +02:00
mstarzinger@chromium.org
c231321cd3 Fix assertion for map code cache of shared maps.
R=danno@chromium.org
TEST=mjsunit/compare-known-objects-slow

Review URL: https://chromiumcodereview.appspot.com/10548046

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@11815 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-15 00:35:37 +02:00
Bert Belder
7f896889ba uv: upgrade to b1649b6f 2012-06-14 21:23:37 +02:00
isaacs
a0a5c4c5af doc: update v8-options in man page 2012-06-14 10:39:05 -07:00
isaacs
8bec3febd8 build: Add node.d and node.1 to installer 2012-06-14 10:39:05 -07:00
isaacs
f70fa3bae6 v8: Replace 'echo -n' with 'echo' in build commands 2012-06-14 10:11:55 -07:00
Bert Belder
58b8b3fa07 uv: upgrade to 5d5688f2 2012-06-14 18:36:49 +02:00
Bert Belder
ca003f4f3e license2rtf: collapse whitespace 2012-06-14 18:36:49 +02:00
Andreas Madsen
c2c08196d8 cluster: rename worker.unqiueID to worker.id 2012-06-14 09:32:56 -07:00
isaacs
dd85a8c183 Update message test for new v8 behavior 2012-06-14 08:37:44 -07:00
Bert Belder
34b0b6a613 test-bad-unicode: update to reflect V8 3.11 behavior 2012-06-14 16:06:53 +02:00
Igor Zinkovsky
39d2337859 Windows: don't fire GC ETW events without ETW consumers 2012-06-14 15:26:47 +02:00
Nathan Rajlich
05fe70b582 test: use the debug build of node-weak when necessary 2012-06-13 17:58:28 -07:00
Nathan Rajlich
c752f6c013 test: add a .gitignore file to ignore weak's compiled "build" dir 2012-06-13 17:58:28 -07:00
Bert Belder
511e328727 LICENSE: add node-weak 2012-06-14 02:52:57 +02:00
Bert Belder
4a1698c6ba LICENSE: punctuation fixes 2012-06-14 02:52:55 +02:00
yangguo@chromium.org
54b74b8e85 Remove faster ticks for debug mode.
This solves the problem that code runs very slow when the debugger is enabled.

BUG=v8:2179
TEST=

Review URL: https://chromiumcodereview.appspot.com/10544135

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@11802 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-14 02:16:27 +02:00
Bert Belder
2701a6bd48 Unbreak the snapshotted build on Windows
The v8 team apparently decided that all build products should go
into ./build/«type», and updated their common.gypi file to do so.
Unfortunately v8's common.gypi is only used for some targets. All
the other targets would still look in the old place to find their
their dependencies, which effectively broke the build.

In the long run it would be good for node to send all build
output to ./build too, on all platforms.
2012-06-14 01:51:13 +02:00
Fedor Indutny
fac6c69456 v8: fix postmortem debugging tools build 2012-06-14 01:37:15 +02:00
Bert Belder
ac64c9e546 v8: reapply floating patches
Note that 26f754d9 ('fix error handling in SendConnectMessage') is no
longer necessary; it was properly fixed upstream in V8 r11609.
2012-06-14 01:37:14 +02:00
mstarzinger@chromium.org
48893af7bb Fix performance regression caused by r11202.
R=erik.corry@gmail.com
BUG=v8:2156,v8:2034
TEST=mjsunit/regress/regress-2156,mjsunit/regress/regress-2034

Review URL: https://chromiumcodereview.appspot.com/10539131

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@11800 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-14 01:37:14 +02:00
Bert Belder
50464cd4f4 v8: upgrade to v3.11.10 2012-06-14 01:37:13 +02:00
Bert Belder
09be360a0f Inherited FDs should not accidentally be inherited by child processes
This makes test-child-process-detached pass on Windows.
2012-06-14 01:28:51 +02:00
Bert Belder
37d75ba241 uv: upgrade to 4d7f1e18 2012-06-14 01:27:31 +02:00
Bert Belder
029e01bb80 vcbuild.bat: add duplicate arg-ok label to work around cmd.exe bug 2012-06-14 00:56:43 +02:00
Nathan Rajlich
6a8b5b36b4 test: bundle node-weak in test/gc so that it doesn't need to be downloaded 2012-06-14 00:56:35 +02:00
Igor Zinkovsky
35a1421e96 Windows: Enable ETW events.
This commit enables ETW events to be fired on Windows for existing
DTrace probes.  ETW instrumentation is enabled by default.  It
is possible to build node.exe without ETW instrumentation by
using --without-etw option with configure script.
2012-06-13 15:36:08 -07:00
Bert Belder
74c8041fb6 test-child-process-spawn-loop: make it pass on Windows.
It wasn't waiting for the child process' stderr to close, so not an
assertion was made *before* all the data that the child process sent
was received by node.
2012-06-13 22:12:30 +02:00
isaacs
e733dc3bc3 Fix #3388 Support listening on file descriptors
This implements server.listen({ fd: <filedescriptor> }).  The fd should
refer to an underlying resource that is already bound and listening, and
causes the new server to also accept connections on it.

Not supported on Windows.  Raises ENOTSUP.
2012-06-13 12:24:45 -07:00
Bert Belder
0187b657ae Move resource files to src/res.
tools/msvs/res is not an appropriate place.
2012-06-13 17:40:50 +02:00
isaacs
a11bf99ce0 Fix #3407 os.tmpDir() 2012-06-12 19:08:47 -07:00
Bert Belder
0dba4ad0f9 tests: make all message tests pass on Windows 2012-06-13 03:02:53 +02:00
Bert Belder
5209dad907 test-net-timeout: make it pass on Windows
The test didn't take into account that some time might pass before
libuv makes close callbacks. This is now fixed.
2012-06-13 02:49:33 +02:00
Bert Belder
e4f4c63370 uv: upgrade to 9f44b0e3 2012-06-13 01:35:51 +02:00
Bert Belder
b866a96cfa test-child-process-kill: make it pass on windows
The test would fail if the child process writes anything to the stdout.
This doesn't happen on unix, since `cat` is spawned. However, on Windows
`cmd` is started, which *does* write stuff to it's stdout. This
meanlingless assert is now removed.
2012-06-12 23:30:57 +02:00
Bert Belder
10f85fadfe Fix child_process.kill oddities
* When the process is already dead, but the `exit` signal wasn't raised
  yet, the ESRCH error should be ignored.

* When an invalid signal is specified, kill() should throw.

* Like process.kill(), child_process.kill() now preserves a `0` signal
  which can be used to check the liveliness of the child process.

* process.kill() and child_process.kill() will now return true if the
  signal was actually delivered, and false otherwise.

* When an `exec`-ed process is automatically killed because a time or
  buffer limit is exceeded, and the kill() fails, this error should be
  reported through the `exec` callback.

Fixes: #3409
2012-06-12 23:30:56 +02:00
Bert Belder
b53b8b8ae7 test-exec: make it work on Windows 2012-06-12 23:30:54 +02:00
Ben Noordhuis
8963a5228d doc: update crypto cipher/decipher docs 2012-06-12 22:02:35 +02:00
Ben Noordhuis
900196e135 crypto: make cipher/decipher accept buffer args 2012-06-12 21:50:05 +02:00
Bert Belder
a55faeac18 uv: upgrade to b7e150ee 2012-06-12 19:54:56 +02:00
Bert Belder
cbeeea62cf Revert "uv: upgrade to b7e150ee"
Upgrade wasn't done correctly.
This reverts commit b615077bab.
2012-06-12 19:52:38 +02:00
Bert Belder
b615077bab uv: upgrade to b7e150ee 2012-06-12 17:06:54 +02:00
Ben Noordhuis
0385b17ce0 fs: fix infinite loop in fs.readFileSync()
Fix an infinite loop in the case where the file got truncated by a concurrent
writer while fs.readFileSync() was busy reading in the file.
2012-06-12 16:31:49 +02:00
Ben Noordhuis
408bfece51 fs: fix infinite loop in fs.readFile()
Fix an infinite loop in the case where the file got truncated by a concurrent
writer while fs.readFile() was busy reading in the file.
2012-06-12 16:31:44 +02:00
Shigeki Ohtsu
e3a2dd1b13 fs: fix fs.readFileSync to work on real empty file 2012-06-12 15:02:39 +02:00
Shigeki Ohtsu
4eb2804db9 fs: fix typo in fs.readFile of lying size=0 stat 2012-06-12 15:02:39 +02:00
Bert Belder
517cea3636 test-net-connect-econnrefused: don't take forever to complete 2012-06-12 02:22:30 +02:00
Bert Belder
b27a4cbe2a test-module-loading: convert backslashes to forward slashes
This makes the test pass on Windows.
2012-06-12 02:04:44 +02:00
Bert Belder
094f742657 test-http-get-pipeline-problem: don't fail if there are stray files in the temp dir 2012-06-12 01:56:48 +02:00
Bert Belder
00ba1cbce1 test-net-write-slow: increase the socket timeout period
In Windows the callbacks arrive in slightly different order. A bunch
of write operations complete immediately, and after that there is a
gap of a few hundred ms. This causes the timeout timer to fire, which
is not really warranted; the first few write operations just finished a
little quicker than expected.
2012-06-12 01:43:45 +02:00
isaacs
6ce013dd4b fix fs.readFile with lying size=0 stat results 2012-06-11 15:54:28 -07:00
isaacs
d53cdc5378 Add Buffer.concat method
We write out this loop a lot of places throughout node.
It clearly needs to be an API method.
2012-06-11 15:51:23 -07:00
Bert Belder
cfa28690db cluster: don't silently drop messages when the write queue gets big 2012-06-11 23:46:17 +02:00
Bert Belder
2301eb69b1 v8: force inlining of v8::internal::DescriptorArray methods 2012-06-11 21:24:29 +02:00
yangguo@chromium.org
33be3016fb Force inlining CopyChars and String::Get.
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/10332054

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@11527 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-11 21:24:27 +02:00
Charlie McConnell
2eb181d28c child_process: fix test implementation for options.detached 2012-06-11 10:27:51 -07:00
isaacs
25e8ea17e1 Do not gitignore npm's node_modules 2012-06-11 09:54:39 -07:00
isaacs
1358632e67 Remove auto-unref
cc: @AvianFlu @AndreasMadsen
2012-06-11 09:07:42 -07:00
isaacs
e9aa57e8bd Now working on 0.7.11 2012-06-11 08:58:33 -07:00
isaacs
4f235ef87f Merge branch 'v0.7.10-release' 2012-06-11 08:57:32 -07:00
isaacs
8d9766a9df 2012.06.11, Version 0.7.10 (unstable)
* Roll V8 back to 3.9.24.31

* build: x64 target should always pass -m64 (Robert Mustacchi)

* add NODE_EXTERN to node::Start (Joel Brandt)

* repl: Warn about running npm commands (isaacs)

* slab_allocator: fix crash in dtor if V8 is dead (Ben Noordhuis)

* slab_allocator: fix leak of Persistent handles (Shigeki Ohtsu)

* windows/msi: add node.js prompt to startmenu (Jeroen Janssen)

* windows/msi: fix adding node to PATH (Jeroen Janssen)

* windows/msi: add start menu links when installing (Jeroen Janssen)

* windows: don't install x64 version into the 'program files (x86)' folder (Matt Gollob)

* domain: Fix #3379 domain.intercept no longer passes error arg to cb (Marc Harter)

* fs: make callbacks run in global context (Ben Noordhuis)

* fs: enable fs.realpath on windows (isaacs)

* child_process: expose UV_PROCESS_DETACHED as options.detached (Charlie McConnell)

* child_process: new stdio API for .spawn() method (Fedor Indutny)

* child_process: spawn().ref() and spawn().unref() (Fedor Indutny)

* Upgrade npm to 1.1.25
- Enable npm link on windows
- Properly remove sh-shim on Windows
- Abstract out registry client and logger
2012-06-11 08:19:55 -07:00
isaacs
76f6a4abb4 Remove dep symlinks from tarball 2012-06-11 08:19:55 -07:00
Bert Belder
5432a1d985 process_wrap: set duplex flags when creating a pipe 2012-06-11 08:13:36 -07:00
isaacs
54a4f99c4e lint 2012-06-11 08:13:36 -07:00
isaacs
13198357e9 Upgrade npm to 1.1.25 2012-06-11 08:13:36 -07:00
Nuno Job
284816ee9f test: add test for bad unicode sequences
This was a regression in 0.7.9.
2012-06-09 20:30:16 +02:00
isaacs
65242abc3b Fix fs.realpath tests so that they actually run 2012-06-09 09:43:47 -07:00
isaacs
131a67e7ef Fix #3394 fs.realpath: Properly cache symlink targets 2012-06-09 09:43:47 -07:00
isaacs
424bca15c8 Fix fs.realpath to work on Windows
1. Make the isRoot check valid
2. Don't cache results based on dev/ino, since those are alwasy 0 on
windows.
2012-06-09 09:43:46 -07:00
isaacs
6332a4cf00 Expose posix realpath on windows as well 2012-06-09 09:43:46 -07:00
Andreas Madsen
60b45dcbb6 domain: document and test dispose event 2012-06-09 18:15:38 +02:00
Andreas Madsen
535e109a3a domain: run now return callback result
both domain.bind and domain.intercept act this way
2012-06-09 18:15:38 +02:00
Andreas Madsen
77cfbd9f2d domain: dry decorate using util._extend 2012-06-09 18:15:38 +02:00
Ben Noordhuis
26f754d9dd v8: debug: fix error handling in SendConnectMessage()
The old error handling code checked if the return value of Socket::Send() != 0,
which is wrong because Socket::Send() can write less bytes than requested or
return -1 on error.
2012-06-09 08:10:03 -07:00
isaacs
c08357c32f v8: Floating patches 2012-06-09 08:09:58 -07:00
isaacs
940a6863ea Roll V8 back to 3.9.24.31 2012-06-09 08:09:42 -07:00
Marc Harter
569acea0ee Fix #3379 prevent domain.intercept passing 1st arg to cb 2012-06-08 23:32:13 -07:00
Charlie McConnell
4b021a3541 child_process: expose UV_PROCESS_DETACHED as options.detached 2012-06-08 22:57:22 -07:00
Bert Belder
5046f8501c Revert "Unbreak the Windows build"
It is not needed for v8 3.10, and actually breaks the build.
This reverts commit bd33fea732.
2012-06-08 20:46:34 +02:00
Robert Mustacchi
f62441367f x64 target should always pass -m64 2012-06-07 17:54:56 -07:00
isaacs
0435f9b28c v8: Don't use 'echo -n' in configure script 2012-06-07 17:54:22 -07:00
Bert Belder
bd33fea732 Unbreak the Windows build
The v8 team apparently decided that all build products should go
into ./build/«type», and updated their common.gypi file to do so.
Unfortunately v8's common.gypi is only used for some targets. All
the other targets would still look in the old place to find their
their dependencies, which effectively broke the build.

In the long run it would be good for node to send all build
output to ./build too, on all platforms.

Conflicts:

	deps/v8/build/common.gypi
2012-06-07 17:54:22 -07:00
Ben Noordhuis
1fb9cfcdb1 v8: debug: fix error handling in SendConnectMessage()
The old error handling code checked if the return value of Socket::Send() != 0,
which is wrong because Socket::Send() can write less bytes than requested or
return -1 on error.
2012-06-07 17:54:21 -07:00
isaacs
43ff46becf v8: Floating patches 2012-06-07 17:54:21 -07:00
isaacs
46b09e4190 Roll V8 back to 3.10.8.13 2012-06-07 17:54:21 -07:00
Fedor Indutny
3116522e7c child_process: spawn().ref() and spawn().unref() 2012-06-07 23:20:56 +04:00
isaacs
c45522df4c build: Prevent duplication of doc/api folder 2012-06-06 15:02:23 -07:00
Ben Noordhuis
463d6bac8b fs: make callbacks run in global context
Callbacks that were passed to the binding layer ran in the context of the
(internal) binding object. Make sure they run in the global context.

Before:

  fs.symlink('a', 'b', function() {
    console.log(this); // prints "{ oncomplete: [Function] }"
  });

After:

  fs.symlink('a', 'b', function() {
    console.log(this); // prints "{ <global object> }"
  });
2012-06-06 21:49:39 +02:00
Ben Noordhuis
c381662cac fs: make fs.symlink() with no callback async
Fix a bug where fs.symlink('foo', 'bar') executed symlink(2) synchronously.
2012-06-06 21:08:38 +02:00
Joel Brandt
b9c5eee7d9 add NODE_EXTERN to node::Start 2012-06-06 05:31:09 +02:00
Ben Noordhuis
5f41140535 deps: upgrade libuv to 649ad50 2012-06-06 05:31:08 +02:00
isaacs
28e851c169 Warn about running npm in the repl 2012-06-05 12:35:49 -07:00
Nathan Rajlich
c69d7f1a6c test: make the node-weak install build agaist this repo
This prevents node-gyp from attempting to download dev header files from
nodejs.org. Instead, the files in this repo will be used to build the module.
2012-06-05 10:25:39 -07:00
Ben Noordhuis
0a2076b26a deps: upgrade libuv to c8c9fe1 2012-06-05 16:48:17 +02:00
Ben Noordhuis
27061cc9f4 udp_wrap, stream_wrap: lazy init slab allocator
Create slab allocator when binding is initialized.

Add an AtExit handler to destroy the slab before the VM shuts down, it can't be
disposed when V8 is dead and Valgrind will complain about memory leaks.
2012-06-05 16:48:17 +02:00
Ben Noordhuis
cc0e7efb37 slab_allocator: fix crash in dtor if V8 is dead
Don't try to dispose the persistent handles if the VM is already dead, it
triggers an assertion inside V8.
2012-06-05 16:27:57 +02:00
Shigeki Ohtsu
208d1715a7 slab_allocator: fix leak of Persistent handles 2012-06-05 15:45:08 +02:00
isaacs
b9e40fbaac Upgrade npm to 1.1.24 2012-06-04 17:32:59 -07:00
isaacs
cc36cc5999 build: Don't clobber symlinked npm 2012-06-04 17:32:59 -07:00
Bert Belder
4f6882e898 windows/msi: minor installer tweaks 2012-06-04 21:39:58 +02:00
Jeroen Janssen
01432403af windows/msi: add node.js prompt to startmenu 2012-06-04 21:39:51 +02:00
isaacs
04e484c484 v8: Don't use 'echo -n' in configure script 2012-06-04 11:10:31 -07:00
Ben Noordhuis
f0a561fe67 net: rename flag FLAG_SHUTDOWNQUED 2012-06-04 15:02:09 +02:00
Jeroen Janssen
7161ecd31b windows/msi: fix adding node to PATH
Closes #3366
2012-06-04 14:16:39 +02:00
Bert Belder
0699f5bfb4 Improve child process stdio documentation 2012-06-04 14:12:59 +02:00
Jeroen Janssen
943448772e windows/msi: add start menu links when installing 2012-06-03 00:45:39 +02:00
Jeroen Janssen
e2126e05e7 windows/msi: cleanup WiX project files
The current WiX project files do some manual processing and generation
which WiX supports doing out of the box. This patch will use the
HeatDirectory task to generate the npm.wxs file and use the auto GUID
generation. I also changed the msi filename generation to include the
version number to match the currently used name for released msi files.

Closes #3360
2012-06-02 18:39:41 +02:00
Bert Belder
3b6a00b664 Unbreak the Windows build
The v8 team apparently decided that all build products should go
into ./build/«type», and updated their common.gypi file to do so.
Unfortunately v8's common.gypi is only used for some targets. All
the other targets would still look in the old place to find their
their dependencies, which effectively broke the build.

In the long run it would be good for node to send all build
output to ./build too, on all platforms.
2012-06-02 16:06:00 +02:00
isaacs
e0f5d8e86d test: v8 stack trace messages changed slightly 2012-06-01 22:31:05 -07:00
Ben Noordhuis
eabf3c8d0f v8: debug: fix error handling in SendConnectMessage()
The old error handling code checked if the return value of Socket::Send() != 0,
which is wrong because Socket::Send() can write less bytes than requested or
return -1 on error.
2012-06-01 22:31:04 -07:00
isaacs
7946ad2634 v8: Floating patches 2012-06-01 22:31:04 -07:00
isaacs
cbdf3393a2 Upgrade v8 to 3.11.7 2012-06-01 22:31:04 -07:00
Fedor Indutny
0262b6d2a5 child_process: new stdio API for .spawn() method 2012-06-02 12:12:48 +07:00
Simon Sturmer
9a998d5e24 http: don't lowercase http req header until later
Don't lowercase the request header until we're in the _addHeaderLine method,
makes it easier to intercept the raw request headers.
2012-06-02 03:07:43 +02:00
Matt Gollob
9fe39ede9f windows: don't install x64 version into the 'program files (x86)' folder
* Update nodemsi.sln and .wixproj to include support for x64 platform
  - Add ProgramFilesFolderId to the DefineConstants property for each
    configuration/platform's property group with the appropriate value
    (ProgramFilesFolder for x86 builds, ProgramFiles64Folder for x64
    builds)

* Update product.wxs:
  - update the Id value for the "Program Files" Directory element to
    use a preprocessor constant.
  - remove hard-coded platform from the Package element.  MSI platform
    will be automatically detected based on MSBuild's Platform property.
    (This was already supported in the Wix MSBuild targets, we just
    weren't taking advantage of it.)

*  Update vcbuild.bat to set MSBuild's Platform property appropriately,
   defaulting to x86 if not explicitly supplied by the user. Note that
   creating an x64 build requires that vcbuild.bat be run from a VS
   64-bit command prompt.

Closes #3312
Closes #3356
2012-06-02 02:18:09 +02:00
Bert Belder
8a52a16847 windows: add icon to node.exe
The icon could definitely be nicer, patches welcome.
Credits to Nathan Rajlich for putting together this one.
2012-06-02 02:01:57 +02:00
Fedor Indutny
af98fc9d5f child_process: new stdio API for .spawn() method 2012-06-01 20:52:13 +04:00
Bert Belder
30a0e58d63 uv: upgrade to 87dbffbd 2012-06-01 20:19:42 +04:00
Ben Noordhuis
b337577cf1 test: update pummel/test-exec
ChildProcess.prototype._internal is called ChildProcess.prototype._handle now.
2012-05-31 01:46:56 +02:00
isaacs
dc8b488bbe Now working on 0.7.10 2012-05-29 10:08:24 -07:00
isaacs
a9e40281e7 Merge branch 'v0.7.9-release' 2012-05-29 10:07:44 -07:00
Fedor Indutny
761e0c460a deps: upgrade libuv to 7556590 2012-05-29 18:26:40 +04:00
Ben Noordhuis
fa9aa1c961 net: fix 'close' event emit order
The server 'close' event was emitted before the last client 'close' event. Not
exactly fatal but potentially confusing.

Before this commit the order looked something like [client, server, client],
now it looks like [client, client, server].

See #3340 for more details.
2012-05-29 13:05:51 +02:00
isaacs
782277f11a 2012.05.28, Version 0.7.9 (unstable)
* Upgrade V8 to 3.11.1

* Upgrade npm to 1.1.23

* uv: rework reference counting scheme (Ben Noordhuis)

* uv: add interface for joining external event loops (Bert Belder)

* repl, readline: Handle Ctrl+Z and SIGCONT better (Nathan Rajlich)

* fs: 64bit offsets for fs calls (Igor Zinkovsky)

* fs: add sync open flags 'rs' and 'rs+' (Kevin Bowman)

* windows: enable creating directory junctions with fs.symlink (Igor Zinkovsky, Bert Belder)

* windows: fix fs.lstat to properly detect symlinks. (Igor Zinkovsky)

* Fix #3270 Escape url.parse delims (isaacs)

* http: make http.get() accept a URL (Adam Malcontenti-Wilson)

* Cleanup vm module memory leakage (Marcel Laverdet)

* Optimize writing strings with Socket.write (Bert Belder)

* add support for CESU-8 and UTF-16LE encodings (koichik)

* path: add path.sep to get the path separator. (Yi, EungJun)

* net, http: add backlog parameter to .listen() (Erik Dubbelboer)

* debugger: support mirroring Date objects (Fedor Indutny)

* addon: add AtExit() function (Ben Noordhuis)

* net: signal localAddress bind failure in connect (Brian Schroeder)

* util: handle non-string return value in .inspect() (Alex Kocharin)
2012-05-28 20:03:03 -07:00
isaacs
8a411bae66 Revert "tests: kill process group on failure"
This reverts commit 0cebfc8ddb.
2012-05-28 20:02:49 -07:00
isaacs
719376730d upgrade npm to 1.1.23
This also upgrades node-gyp to 0.4.3
2012-05-28 20:02:39 -07:00
Ben Noordhuis
0bd410a66a deps: cherry-pick libuv commit 4690204
libuv cannot be upgraded right now (API change in upstream libuv) but this
commit fixes a segmentation fault on SunOS systems, hence the cherry-pick.
2012-05-28 22:10:38 +00:00
Shigeki Ohtsu
f721d02c8a http: fix duplicated variable declaration 2012-05-28 23:26:02 +02:00
Maciej Małecki
c96df0e37a stream: don't call cleanup twice on end and close 2012-05-28 01:35:36 +02:00
Ben Noordhuis
0fd2834539 deps: upgrade libuv to 2ec0986 2012-05-28 00:32:16 +02:00
Andreas Madsen
1f3e4a76f9 fs: no end emit after createReadStream.pause()
In case a fd option is given to fs.createReadStream a read will instantly
happen. But in the edge case where fd point to an empty file and .pause()
was executed instantly, the end event would emit since no async wait was
between fs.createReadStream and the file read there emits end.
2012-05-27 20:00:19 +02:00
Jeroen Janssen
82bcdbb8aa doc: add npm search to appendix
Fixes #3327.
2012-05-26 19:41:37 +09:00
Jeroen Janssen
1fc2c3823c doc: updated JavaScript casing where relevant
Fixes #3326.
2012-05-26 19:34:13 +09:00
Ben Noordhuis
578f69bcf4 deps: upgrade libuv to 28766dc 2012-05-25 14:02:35 +02:00
isaacs
24de89bd0e Upgrade uv to 604802a 2012-05-24 14:26:32 -07:00
Igor Zinkovsky
b4ed3c1969 remove NODE_USE_64BIT_UV_FS_API 2012-05-24 11:49:51 -07:00
Jeroen Janssen
66e12dbd69 doc: update possible values for process.platform 2012-05-24 18:55:08 +02:00
Ben Noordhuis
078763a94c test: update addons .gitignore 2012-05-24 14:07:09 +02:00
Igor Zinkovsky
39e25528eb windows: enable creating directory junctions with fs.symlink 2012-05-24 01:15:15 -07:00
Mathias Bynens
a2fcc47772 doc: add punycode.js documentation 2012-05-23 04:04:12 +02:00
Jeroen Janssen
f079c0bd9f doc: process get/setuid and get/setgid are POSIX only
Fixes #3302
2012-05-23 04:01:45 +02:00
Ben Noordhuis
1358bac6d1 deps: upgrade libuv to 5b9c451 2012-05-23 04:01:19 +02:00
Igor Zinkovsky
dff467d982 update uv to 2df831723fad25d2d97b824b2e52c65082af2723 2012-05-22 16:49:19 -07:00
Igor Zinkovsky
6e435da7f9 remove race from test-child-process-fork-exec-argv test 2012-05-22 13:59:40 -07:00
Ben Noordhuis
0888cdd412 test: fix bad comment 2012-05-22 16:14:30 +02:00
Ben Noordhuis
989ae81c71 test: fix simple/test-process-active-wraps
Said test relies a great deal on internals and implementation details (I should
know, I wrote it). Patch it up to work with libuv's new refcounting scheme.
2012-05-22 16:14:30 +02:00
Ben Noordhuis
039fac633e deps: upgrade libuv to a478847
The event loop's reference counting scheme in this version of libuv has changed.
Update the libuv bindings to reflect that fact.
2012-05-22 16:14:24 +02:00
Nathan Rajlich
a608f65b24 repl: preserve the cursor when redisplaying the prompt on SIGCONT
Otherwise the cursor position was being reset to 0, even when there was
already part of a line, which was strange.

Part of #3295.
2012-05-21 21:09:46 -03:00
Nathan Rajlich
3f69c71157 readline: explicitly disable and re-enable "raw mode" on Ctrl+Z
Fixes #3295.
2012-05-21 21:09:46 -03:00
Nathan Rajlich
2b9967fbcc readline: move the "setRawMode" logic into a private function 2012-05-21 21:09:46 -03:00
Oleg Efimov
45de259b43 Make UNWRAP macro generic. 2012-05-21 23:29:06 +02:00
Andreas Madsen
81a4edcf6a cluster: remove NODE_UNIQUE_ID from env on startup
In case a worker would spawn a new subprocess with process.env, NODE_UNIQUE_ID
would have been a part of the env. Making the new subprocess believe it is a
worker, this would result in some confusion if the subprocess where to listen to
a port, since the server handle request would then be relayed to the worker.

This patch removes the NODE_UNIQUE_ID flag from process.env on startup so any
subprocess spawned by a worker is a normal process with no cluster stuff.
2012-05-21 23:27:44 +02:00
Oleg Efimov
968b49ba0a Check for tabs in source line in DisplayExceptionLine
Fix for joyent/node#3280
2012-05-21 18:30:16 +02:00
Ben Noordhuis
ca642b020d test: add http 'data after timeout' test
See #3234. TDB if this is or is not the desired behavior.
2012-05-21 00:31:28 +02:00
isaacs
75670d3f63 test: wait for 'close' event for stdout
At the 'exit' event, it is sometimes not done writing to stdout.
2012-05-20 09:40:10 -03:00
isaacs
d0c010e39b test: root can connect to chmod'd pipes 2012-05-20 09:24:47 -03:00
isaacs
b48f7f7eac test: Solaris is not as granular with rename fs watch events 2012-05-20 00:17:18 -03:00
Andreas Madsen
a039bad299 fs.watch should not require a listener arguments
Since fs.watch returns an event emitter where the change event is exactly
the same as the listener callback, the argument should be required
2012-05-19 18:58:28 -03:00
Ben Noordhuis
18b94ea838 doc: improve fs.open() docs 2012-05-17 06:18:25 +02:00
Kevin Bowman
ccc4e547ea doc: document fs 'rs+' open mode 2012-05-17 06:05:33 +02:00
isaacs
1a2255ab44 Faster fs.readFile and fs.readFileSync 2012-05-16 20:04:44 -07:00
isaacs
ee6c11876a benchmark for fs.readfile 2012-05-16 20:04:44 -07:00
isaacs
a3753b496e Revert "Fix #3242 Actually deprecate 'binary' buffer encoding"
This reverts commit 5979f096d1.

Related:
- #3279
- #3278
2012-05-16 16:32:37 -07:00
isaacs
9fc7283a40 Fix #3270 Escape url.parse delims
Rather than omitting them.
2012-05-16 15:41:28 -07:00
isaacs
c393853b4e build: Set strict_aliasing on SunOS always
A build failure was introduced on c9676c9147
in SmartOS systems.  This makes it build properly.
2012-05-16 14:49:51 -07:00
isaacs
564172510d Revert "test: stack overflow output"
This reverts commit f8519e10b8.

Recent update to V8 fixes the problem where it incorrectly reports the
line number as 0 for thrown RangeErrors.
2012-05-16 14:44:15 -07:00
isaacs
3b95d88bf2 v8: s/echo -n/echo/. Not all sh's are bash. 2012-05-16 14:22:57 -07:00
isaacs
2cca7488bf Patches floating on V8 2012-05-16 14:22:57 -07:00
isaacs
3f3f958c14 Upgrade V8 to 3.11.1 2012-05-16 14:22:33 -07:00
Adam Malcontenti-Wilson
4099d1eeba http: make http.get() accept a URL
http.get() now accepts either a URL (as a string) or an options object.
2012-05-16 16:43:18 +02:00
Ben Noordhuis
05b81f333c doc: clarify stream 'close' event 2012-05-16 16:08:18 +02:00
isaacs
1665b4a2a3 lint 2012-05-15 18:04:43 -07:00
Kevin Bowman
dfcdd5b8aa fs: add sync open flags 'rs' and 'rs+' 2012-05-16 00:14:46 +02:00
isaacs
643f00d3f9 Merge branch 'master' into v0.6-merge
Conflicts:
	src/node.cc
2012-05-15 14:21:22 -07:00
isaacs
faa4d9ff5f Re-apply http fixes from v0.6 branch properly 2012-05-15 14:19:46 -07:00
Sadique Ali
c9676c9147 build: improve c compiler detection 2012-05-15 22:51:17 +02:00
Ben Noordhuis
9ae6d8fee3 http: fix client request.end() EPIPE race
request.end() would sometimes try to write a zero-length buffer to the socket.
Don't do that, it triggers an unnecessary EPIPE when the other end has closed
the connection.

Fixes #3257.
2012-05-15 22:05:36 +02:00
isaacs
f8519e10b8 test: stack overflow output 2012-05-15 13:03:56 -07:00
isaacs
9611354f08 lint 2012-05-15 13:03:43 -07:00
Ben Noordhuis
e813e3491e node: make _getActiveHandles() return user objects
Before this commit, process._getActiveHandles() returned a list of internal
handles. Now, it returns the user objects that handles are attached to.

For example, a tcp_wrap handle will now return its parent net.Socket object.

It works for all handle types except timers because timer handles are shared
across multiple user objects.
2012-05-15 21:01:36 +02:00
Ben Noordhuis
88d7a10128 test: verify that connect reqs are cleaned up 2012-05-15 21:00:27 +02:00
Ben Noordhuis
5f0406534c process: add _getActiveHandles(), _getActiveRequests()
* process._getActiveHandles() returns a list containing all active handles
  (timers, sockets, etc.) that have not been unref'd.

* process._getActiveRequests() returns a list of active requests (in-flight
  actions like connecting to a remote host, writing data to a socket, etc.).
2012-05-15 21:00:27 +02:00
Ben Noordhuis
636add246c req_wrap: share process_symbol, domain_symbol
Share persistent strings process_symbol and domain_symbol across compilation
units. Avoids redefinition errors when src/node.cc includes src/req_wrap.h.
2012-05-15 20:59:43 +02:00
isaacs
5164ae3838 Merge remote-tracking branch 'ry/v0.6' into v0.6-merge
Conflicts:
	ChangeLog
	deps/uv/include/uv-private/uv-unix.h
	deps/uv/src/unix/core.c
	deps/uv/src/unix/sunos.c
	deps/v8/src/runtime.cc
	doc/api/crypto.markdown
	lib/http.js
	src/node_version.h
	test/gc/test-http-client-timeout.js
	wscript
2012-05-15 11:37:34 -07:00
isaacs
01103d077b Guard against emitting 'end' twice on http responses
Conflicts:

	lib/http.js
2012-05-15 11:29:32 -07:00
isaacs
a98e845516 Break up huge function in ClientRequest.onSocket
Conflicts:

	lib/http.js
2012-05-15 11:26:47 -07:00
isaacs
f19f980724 Now working on 0.6.19 2012-05-15 10:21:57 -07:00
isaacs
2498d15dde Merge branch 'v0.6.18-release' into v0.6 2012-05-15 10:21:40 -07:00
Ben Noordhuis
a3908f47f1 child_process: hook up handle wrap to owning object 2012-05-15 16:59:01 +02:00
Ben Noordhuis
4ec77e2e28 child_process: rename field _internal to _handle
Consistent with how other classes that are built around HandleWraps call it.
2012-05-15 16:59:01 +02:00
Ben Noordhuis
f66f793c07 net: hook up handle wrap to owning object 2012-05-15 16:59:00 +02:00
Ben Noordhuis
25aea2a072 fs: hook up handle wrap to owning object 2012-05-15 16:56:49 +02:00
Ben Noordhuis
d2eaabd0df dgram: hook up handle wrap to owning object 2012-05-15 16:56:48 +02:00
isaacs
4bc1d395de 2012.05.15 Version 0.6.18 (stable)
* windows: skip GetFileAttributes call when opening a file (Bert Belder)

* crypto: add PKCS12/PFX support (Sambasiva Suda)

* #3240: child_process: delete NODE_CHANNEL_FD from env in spawn (Ben Noordhuis)

* windows: add test for path.normalize with UNC paths (Bert Belder)

* windows: make path.normalize convert all slashes to backslashes (Bert Belder)

* fs: Automatically close FSWatcher on error (Bert Belder)

* #3258: fs.ReadStream.pause() emits duplicate data event (koichik)

* pipe_wrap: don't assert() on pipe accept errors (Ben Noordhuis)

* Better exception output for module load and process.nextTick (Felix Geisendörfer)

* zlib: fix error reporting (Ben Noordhuis)

* http: Don't destroy on timeout (isaacs)

* #3231: http: Don't try to emit error on a null'ed req object (isaacs)

* #3236: http: Refactor ClientRequest.onSocket (isaacs)
2012-05-14 17:30:00 -07:00
isaacs
8068f9bf38 Escape leading # signs in 'make email.md' 2012-05-14 17:29:47 -07:00
isaacs
14a5b45c06 Guard against emitting 'end' twice on http responses 2012-05-14 17:22:45 -07:00
isaacs
ea4b1c1c0c Upgrade libuv to bc4126b 2012-05-14 12:01:38 -07:00
Ben Noordhuis
9b42d7daaf test: add https + .pfx client/server test 2012-05-14 17:34:33 +02:00
ssuda
fb7348ae06 crypto: add PKCS12/PFX support
Fixes #2845.
2012-05-14 17:12:59 +02:00
Andreas Madsen
dceebbfa31 child_process: allow sending a net Socket and Server object using child.send
child_process.fork() support sending native hander object, this patch add support for sending
net.Server and net.Socket object by converting the object to a native handle object and back
to a useful object again.

Note when sending a Socket there was emitted by a net Server object, the server.connections
property becomes null, because it is no longer possible to known when it is destroyed.
2012-05-14 07:47:52 -07:00
Andreas Madsen
49f16c4575 doc: move child.send details from child_process.fork to child.send 2012-05-14 07:47:52 -07:00
rsolomo
d40415912f net: make isIP() return 0 on empty input 2012-05-14 16:09:04 +02:00
Ben Noordhuis
bd907174e8 node: delete NODE_CHANNEL_FD from env
Prevents accidental inheritance by child processes. If the child process is a
node process, it would try to set up a channel with the parent and consequently
never quit because the channel kept the event loop alive.

Fixes #3240.
2012-05-14 07:19:11 +02:00
Bert Belder
a475e62a3e Windows: add test for path.normalize with UNC paths 2012-05-13 03:29:44 +02:00
Bert Belder
d91004a73d Windows: make path.normalize convert all slashes to backslashes
Closes #3066
2012-05-13 03:18:09 +02:00
Bert Belder
d8351a2ef4 Automatically close FSWatcher on error
Closes #3250
2012-05-13 03:16:19 +02:00
koichik
5f9ffa17b1 fs: fix ReadStream.pause() emits duplicate data event
Fixes #3258.
2012-05-12 10:24:46 +09:00
Nathan Rajlich
38542f76a9 buffer: make SlowBuffer inherit from Buffer
This frees us from manually having to copy over functions to SlowBuffer's
prototype (which has bitten us multiple times in the past).

As an added bonus, the `inspect()` function is now shared between Buffer
and SlowBuffer, removing some duplicate code.

Closes #3228.
2012-05-11 17:27:40 -07:00
isaacs
9239088e87 500 is a magic number for the GC for some reason 2012-05-11 15:01:38 -07:00
isaacs
07d8a4650e Break up huge function in ClientRequest.onSocket 2012-05-11 15:01:38 -07:00
Ben Noordhuis
884499d37e build: fix cross-compiling
Take arch cflags in account when building libuv.
2012-05-11 19:01:30 +02:00
isaacs
a811a4a130 Fix #3058 querystring: Fix incorrect handling of empty keys 2012-05-11 08:49:03 -07:00
Shigeki Ohtsu
cc8cfb145a doc: fix typo in buffer documentation
Fixes #3253.
2012-05-11 20:00:53 +09:00
Ben Noordhuis
12fc9fa8a7 test: add failing dgram refcount test
Idle UDP sockets (reading nor writing) should not keep the event loop alive.
This will get fixed in v0.8 one way or the other.
2012-05-11 04:39:23 +02:00
Ben Noordhuis
68f63fe9ec child_process: make copy of options arg
Make a copy of the options object that the user passes in, we modify it.
2012-05-10 16:54:19 +02:00
Ben Noordhuis
928d28a7b3 util: make _extend() more robust
Add a better 'is object?' check, the old one let values like true slip through.
2012-05-10 16:49:37 +02:00
vegorov@chromium.org
52f0c37d09 Runtime_NotifyDeoptimized should search for function activation in all thread stacks.
R=fschneider@chromium.org
BUG=v8:1763

Review URL: http://codereview.chromium.org/8240004

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@9588 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-05-10 01:05:10 +02:00
isaacs
07be9fc3a6 Merge remote-tracking branch 'ry/v0.6' into v0.6-merge
Conflicts:
	Makefile
	lib/zlib.js
	src/node.cc
	src/node.js
2012-05-09 15:12:13 -07:00
Philip Tellis
493beb23f2 doc: fs.ReadableStream does not have a destroySoon method 2012-05-09 23:32:50 +02:00
Ben Noordhuis
3883f22ad1 pipe_wrap: don't assert() on pipe accept errors
Pass errors to the onconnection callback.
2012-05-09 23:30:48 +02:00
Felix Geisendörfer
bf9d8e9214 Fix exception output for module load exceptions
So instead of:

node.js:201
        throw e; // process.nextTick error, or 'error' event on first tick
              ^

You will now see:

path/to/foo.js:1
throw new Error('bar');
      ^

This is a sub-set of isaacs patch here:

https://github.com/joyent/node/issues/3235

The difference is that this patch purely adresses the exception output,
but does not try to make any behavior changes / improvements.
2012-05-09 11:54:43 -07:00
Felix Geisendörfer
814033365b Fix process.nextTick throw call sites
This patch now reports the proper throw call site for exceptions
triggered within process.nextTick. So instead of this:

node.js:201
        throw e; // process.nextTick error, or 'error' event on first tick
              ^

You will now see:

mydir/myscript.js:15
  throw new Error('My Error');
          ^

From my testing this patch causes no performance regressions, but does
greatly simplify processing the nextTickQueue.
2012-05-09 11:54:43 -07:00
isaacs
5979f096d1 Fix #3242 Actually deprecate 'binary' buffer encoding 2012-05-09 10:08:54 -07:00
Alex Kocharin
e85927119c util: handle non-string return value in .inspect() 2012-05-09 16:44:44 +02:00
Ben Noordhuis
7d2e68fdbd stream_wrap: fix compilation errors 2012-05-09 06:06:42 +02:00
Bert Belder
b673d0670f Net.js: fix UCS2 write crash due to inconsistent naming 2012-05-09 04:58:26 +02:00
Ben Noordhuis
ee437c0557 zlib: fix error reporting
This commit is a back-port of the changes on the master branch.

Fixes #3230.
2012-05-09 04:44:04 +02:00
Bert Belder
4624cf1214 stream_wrap.cc: fix typo 2012-05-09 04:34:41 +02:00
Bert Belder
27ddd14e9f net.js: make Socket.bytesWritten work again
Earlier string write optimizations broke it.
2012-05-09 04:00:07 +02:00
Bert Belder
726ebad9bc StreamWrap::WriteBuffer: remove superfluous arguments 2012-05-09 04:00:02 +02:00
Bert Belder
0e57aafbb1 Optimize writing strings with Socket.write 2012-05-09 03:56:19 +02:00
Bert Belder
4ddafbd563 Benchmark: add /unicode/nnn bench to http_simple.js 2012-05-09 03:56:09 +02:00
Bert Belder
7f68f256cf Benchmark: clean up http_simple.js 2012-05-09 03:56:07 +02:00
Bert Belder
bb675baaa9 net.js: don't pretend that everything is okay when unwrapping fails
In case of an UNWRAP failure, the binding returns -1, which is truthy.
2012-05-09 03:56:06 +02:00
yangguo@chromium.org
29b2fdb0c5 Force inlining CopyChars and String::Get.
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/10332054

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@11527 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-05-09 03:56:04 +02:00
Ben Noordhuis
78e831a31c Don't use _snprintf() on Windows, it's not safe.
_snprintf() doesn't zero-terminate the buffer on overflow. Use the hand-rolled
version that lives in src/node_internals.h.
2012-05-08 16:02:14 +02:00
isaacs
8c758e127c Don't destroy on timeout 2012-05-07 14:19:16 -07:00
isaacs
b4fbf6d275 Fix #3231. Don't try to emit error on a null'ed req object 2012-05-07 14:17:17 -07:00
Ben Noordhuis
e02af94947 test: add failing HTTP client timeout test
See #3231.
2012-05-07 22:53:32 +02:00
Kevin Gadd
1eb9fc5f33 docs: add warning to vm module docs
Add a clear warning about known issues with the module and a pointer to the
GitHub issues list for the module. Describe some of the biggest known issues
with the module.
2012-05-07 21:39:08 +02:00
James Koval
34f05a3195 docs: update var names in readline docs to be consistent
Closes #3201.
2012-05-06 11:23:09 -07:00
isaacs
33a9ac6087 Upgrade npm to 1.1.21
Somehow this got downgraded in the last v0.6 merge.  Very strange.
2012-05-05 22:33:12 -07:00
isaacs
1858d1c340 Document http.STATUS_CODES
This is an incredibly useful thing to know about, and it
will likely never change.  I can't remember why we
didn't ever document it, and people keep suggesting we
do so.
2012-05-05 19:27:42 -07:00
isaacs
3d84c3db25 More cluster event consistency
Regarding discussion in #3198.  Passing the worker as an argument
to an event emitted on the worker is redundant, and an unnecessary
break in consistency vs the events on the ChildProcess objects.

It was removed from 'exit', but 'listening' and others were
overlooked.  This corrects that oversight.
2012-05-05 15:20:10 -07:00
isaacs
1930772693 Move test-fs-largefile into pummel
It's too slow.
2012-05-05 15:05:14 -07:00
Javier Hernández
792d9a921d build: print error message if no compiler found
Make the configure script warn the user about the lack of an acceptable
C compiler on the system.
2012-05-05 16:31:27 +02:00
koichik
9f3c639a9c doc: fix setEncoding()
Fixes #3209.
2012-05-05 23:10:36 +09:00
koichik
40c4beeb57 string_decoder: added support for UTF-16LE
Fixes #3223.
2012-05-05 22:47:24 +09:00
Mark Cavage
5871c81181 Add HTTP Status codes from RFC 6585
See: http://tools.ietf.org/html/rfc6585
2012-05-04 21:51:24 -07:00
koichik
ceb51ddaa1 string_decoder: add support for CESU-8
Fixes #3217.
2012-05-05 12:24:01 +09:00
isaacs
eaf607e88b test: No need for weak in 'make test' 2012-05-04 18:30:38 -07:00
isaacs
8cd2b0e778 test: No need for weak in 'make test' 2012-05-04 18:29:56 -07:00
J. Lee Coltrane
a62dd44b20 cluster: worker exit event to match child_process
test: fixes due to new cluster api.

- changed worker `death` to `exit`.
- corrected argument type expected by worker `exit` handler.

test: more tests of cluster.worker death

cluster: fixed arguments on worker 'exit' event

worker 'exit' event now emits arguments consistent with the
corresponding event in child_process module.
2012-05-04 17:28:21 -07:00
isaacs
c1bf810108 Merge branch 'v0.6-merge' 2012-05-04 17:24:30 -07:00
isaacs
cd8f82c007 Fix incorrect merge choices 2012-05-04 17:24:21 -07:00
Brian Schroeder
436a9b69f3 net: signal localAddress bind failure in connect 2012-05-05 01:30:32 +02:00
Marcel Laverdet
c33d3174b8 node: un-revert 9a6012e
The crashes in debug mode after adding Locker are *not* caused by
Locker. Locker is merely exposing issues that already existed. Some of
these issues have since been fixed in 70635753.

This reverts commit 407181538b.
This reapplies commit 9a6012edd9.

Conflicts:
	src/node.cc
2012-05-05 00:56:17 +02:00
isaacs
01d146c29f Merge remote-tracking branch 'ry/v0.6' into v0.6-merge
Conflicts:
	ChangeLog
	Makefile
	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/man/man1/npm.1
	deps/npm/man/man3/npm.3
	deps/npm/package.json
	doc/api/url.markdown
	lib/http.js
	src/node_version.h
	test/simple/test-fs-sync-fd-leak.js
2012-05-04 15:12:47 -07:00
isaacs
1de43149bb http: Clean up parser usage
Move parsers.free(parser) to a single function, which also
nulls all of the various references we hang on them.

Also, move the parser.on* methods out of the closure, so that
there's one shared definition of each, instead of re-defining
for each parser in a spot where they can close over references
to other request-specific objects.

Conflicts:

	lib/http.js
2012-05-04 14:58:30 -07:00
isaacs
a9fc63f7a1 Clean up gc tests
This fixes the additional issues brought up in #3179.
2012-05-04 14:31:13 -07:00
isaacs
0abe42a0f4 http: .once() usage in setTimeout 2012-05-04 14:31:08 -07:00
isaacs
e63c7821d5 Tests for memory leaks
Conflicts:

	Makefile
2012-05-04 14:30:54 -07:00
isaacs
e4dd8dc28e http leak: Null links from parser to req/res 2012-05-04 14:27:47 -07:00
vvo
5eac8d6739 Fix #3179 HTTP memory leak using ClientRequest. 2012-05-04 14:27:41 -07:00
isaacs
2f93eb6102 http client: Destroy on timeout 2012-05-04 14:27:35 -07:00
isaacs
0a414f4caa http: Remove socket ondata/onend in parser cleanup 2012-05-04 14:27:30 -07:00
isaacs
9164fa6aaa Null references to request object on socket errors.
Regarding #3199 and #3179 and issues seen in production.
Hopefully this fixes them.
2012-05-04 14:27:24 -07:00
isaacs
992e3464b8 Now working on 0.6.18 2012-05-04 13:34:33 -07:00
isaacs
fbe143d9cb Merge branch 'v0.6.17-release' into v0.6 2012-05-04 13:34:08 -07:00
isaacs
4ced23deaf 2012.05.04 Version 0.6.17 (stable)
* Upgrade npm to 1.1.21

* uv: Add support for EROFS errors (Ben Noordhuis, Maciej Małecki)

* uv: Add support for EIO and ENOSPC errors (Fedor Indutny)

* windows: Add support for EXDEV errors (Bert Belder)

* http: Fix client memory leaks (isaacs, Vincent Voyer)

* fs: fix file descriptor leak in sync functions (Ben Noordhuis)

* fs: fix ReadStream / WriteStream double close bug (Ben Noordhuis)
2012-05-04 13:12:52 -07:00
isaacs
711ecdd54f test: Run weak install with --unsafe-perm
This way it doesn't die when running as root.
2012-05-04 12:52:59 -07:00
isaacs
aaf0453b7c Upgrade npm to 1.1.21 2012-05-04 12:52:55 -07:00
isaacs
719cd461d3 Upgrade uv to 936795a2c 2012-05-04 11:00:39 -07:00
isaacs
ab60efb535 Update Authors 2012-05-04 10:57:33 -07:00
isaacs
d1effbb338 Merge branch 'http-memleak' into v0.6 2012-05-04 10:54:24 -07:00
isaacs
2fc528ce00 http: Clean up parser usage
Move parsers.free(parser) to a single function, which also
nulls all of the various references we hang on them.

Also, move the parser.on* methods out of the closure, so that
there's one shared definition of each, instead of re-defining
for each parser in a spot where they can close over references
to other request-specific objects.
2012-05-04 10:40:50 -07:00
isaacs
62c12d2161 Clean up gc tests
This fixes the additional issues brought up in #3179.
2012-05-04 10:40:38 -07:00
ANDO Takahiro
ebd0f98e2b doc: fix callback argument of child_process.exec, execFile
Fixes #3196.
2012-05-04 19:15:30 +09:00
isaacs
e3ceee2dce http: .once() usage in setTimeout 2012-05-03 10:39:16 -07:00
isaacs
91120e0429 Tests for memory leaks 2012-05-03 10:36:17 -07:00
isaacs
b7e8e35c0e http leak: Null links from parser to req/res 2012-05-03 10:20:45 -07:00
koichik
ebbd4039bc buffer: add UTF-16LE encoding name. 2012-05-03 23:56:17 +09:00
vvo
75f2365558 Fix #3179 HTTP memory leak using ClientRequest. 2012-05-03 07:45:46 -07:00
Ben Noordhuis
e4a8d2617b addon: add AtExit() function
Lets native addons register exit hooks that run after the event loop has quit
but before the VM is killed.

Fixes #3147.
2012-05-03 16:11:42 +02:00
Igor Zinkovsky
6f82b9f482 64bit offsets for fs calls 2012-05-02 22:39:23 -07:00
Ben Noordhuis
df2c5fa81d fs: fix file descriptor leak in sync functions
Fixes #3202. This is a back-port of commit 4e290e4.
2012-05-03 02:49:36 +02:00
Ben Noordhuis
4e290e48b2 fs: fix file descriptor leak in sync functions
Fixes #3202.
2012-05-03 01:08:46 +02:00
Ben Noordhuis
47d6a94656 fs: fix ReadStream / WriteStream double close bug
* Calling fs.ReadStream.destroy() or fs.WriteStream.destroy() twice would close
  the file descriptor twice. That's bad because the file descriptor may have
  been repurposed in the mean time.

* A bad value check in fs.ReadStream.prototype.destroy() would prevent a stream
  created with fs.createReadStream({fd:0}) from getting closed.
2012-05-03 01:01:46 +02:00
Ben Noordhuis
6b426a2edd Revert "v8: fix "pure virtual method called" runtime error"
It makes mksnapshot die with a segmentation fault on sunos with gcc 4.5.2.

This reverts commit c21c51a6fc.
2012-05-02 22:53:45 +00:00
isaacs
c9be1d5ffd http client: Destroy on timeout 2012-05-02 12:13:54 -07:00
Ben Noordhuis
880219645e tcp, udp: share sockaddr-to-object function
Share AddressToJS() function between tcp_wrap.cc and udp_wrap.cc.
2012-05-02 18:03:25 +02:00
Fedor Indutny
c3898f3c1f debugger: support mirroring Date objects
* fixes #3203
2012-05-02 15:48:23 +07:00
Yoshihiro Kikuchi
ee2291eb0d test: add a child domain explicitly 2012-05-02 02:51:28 +02:00
isaacs
fb400b4868 Return after emitting error in tty.js 2012-05-01 15:51:29 -07:00
isaacs
bce68134b6 http: Remove socket ondata/onend in parser cleanup 2012-05-01 15:25:59 -07:00
isaacs
bfe9cdb7f2 Null references to request object on socket errors.
Regarding #3199 and #3179 and issues seen in production.
Hopefully this fixes them.
2012-05-01 14:26:18 -07:00
Nathan Rajlich
b894521bd2 process: ensure that "exit" doesn't get emitted twice on a natural exit
Fixes "test/simple/test-process-exit.js".
2012-05-01 14:09:31 -07:00
isaacs
acf19500ee Now working on 0.6.17 2012-05-01 13:31:26 -07:00
Fedor Indutny
9f9c333cbc vm: accept only object as arg of .createContext()
Converting strings and others to objects is very slow and essentially
wrong.
2012-05-02 01:59:59 +07:00
Yi, EungJun
4bd54dad33 path: add path.sep to get the path separator. 2012-05-01 15:19:37 +02:00
Kyle Robinson Young
6ba3e68bd2 doc: correct return value of string-based fs.readSync
Closes #2330
2012-05-01 15:19:36 +02:00
Ben Noordhuis
b45a10818e udp: slightly optimize address family property 2012-05-01 15:19:30 +02:00
Ben Noordhuis
e747daf604 udp: make variable names consistent 2012-05-01 14:52:00 +02:00
Shigeki Ohtsu
94f1feeb59 udp: make getsockname() return address family name 2012-05-01 14:50:17 +02:00
Nathan Rajlich
f4403f90f8 tty: emit "error" instead of throwing when getWindowSize() fails 2012-04-30 18:51:20 -07:00
Garen Torikian
6cacb9a21e doc: add Cloud9 links to docs 2012-05-01 02:25:08 +02:00
Kyle Robinson Young
e02d5c9d41 doc: add args to console methods 2012-05-01 02:25:08 +02:00
Kyle Robinson Young
c9e6d3696c doc: typo fixes 2012-05-01 02:25:08 +02:00
Nathan Rajlich
f1f5de1c8d tty: throw an Error when getWindowSize() fails 2012-04-30 16:20:27 -07:00
Michael Thomas
4e4860579e test: rebuild keys without asking for password 2012-05-01 01:08:31 +02:00
Ben Noordhuis
75c6255d16 deps: remove libuv sanity check
Remove reference count check. Unbreaks test suite. This needs to be addressed.
2012-05-01 00:55:46 +02:00
Ben Noordhuis
89e311b1ae deps: back-port openssl patch
Check for potentially exploitable overflows in asn1_d2i_read_bio
BUF_mem_grow and BUF_mem_grow_clean. Refuse attempts to shrink buffer
in CRYPTO_realloc_clean.

Taken from OpenSSL CVS. Addresses CVE-2012-2110.
2012-05-01 00:40:38 +02:00
isaacs
518d28c23a Merge branch 'v0.6.16-release' into v0.6 2012-04-30 13:15:40 -07:00
isaacs
a1d193963d 2012.04.30 Version 0.6.16 (stable)
* Upgrade V8 to 3.6.6.25

* Upgrade npm to 1.1.19

* Windows: add mappings for UV_ENOENT (Bert Belder)

* linux: add IN_MOVE_SELF to inotify event mask (Ben Noordhuis)

* unix: call pipe handle connection cb on accept() error (Ben Noordhuis)

* unix: handle EWOULDBLOCK (Ben Noordhuis)

* map EWOULDBLOCK to UV_EAGAIN (Ben Noordhuis)

* Map ENOMEM to UV_ENOMEM (isaacs)

* Child process: support the `gid` and `uid` options (Bert Belder)

* test: cluster: add worker death event test (Ben Noordhuis)

* typo in node_http_parser (isaacs)

* http_parser: Eat CRLF between requests, even on connection:close. (Ben Noordhuis)

* don't check return value of unsetenv (Ben Noordhuis)
2012-04-30 13:09:50 -07:00
isaacs
e5ef103b05 Fix #3194 correct url documentation 2012-04-30 13:09:31 -07:00
isaacs
35bcb1d6a9 Indentation fix 2012-04-30 13:09:31 -07:00
isaacs
1ac05cc5ad Upgrade npm to 1.1.18 2012-04-30 13:09:31 -07:00
Nathan Rajlich
248f552ab4 process: ensure that the "exit" event always has "code" given
Upon "normal" exiting of Node (i.e. the event loop completes naturally),
the "code" parameter was not being passed to the "exit" event listeners.

Be consistent. Tests included.
2012-04-30 10:42:13 -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
3bcbd14bb1 process_wrap: don't use uv_spawn2
It was a temporary thing for the 0.6 branch only.
2012-04-29 00:24:51 +02:00
Bert Belder
d2dd9d108d uv: upgrade to e2cae340a6 2012-04-29 00:22:01 +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
ssuda
db844b152a process: don't use strdup()
file and cwd can be directly used from Utf8Value.

Conflicts:

	src/process_wrap.cc
2012-04-28 23:51:41 +02:00
Bert Belder
3546383cf0 process_wrap: avoid leaking memory when throwing due to invalid arguments 2012-04-28 23:36:47 +02:00
Andreas Madsen
ab072ee416 doc: document the address object in the cluster listening event 2012-04-28 16:42:55 +02:00
Ben Noordhuis
12a90e98bf bench: add continuous stress test
Useful in tracking down or at least demonstrating memory leaks.
2012-04-27 23:11:32 +02:00
Bert Belder
55e4d54927 Child process: support the gid and uid options 2012-04-27 22:13:00 +02:00
Bert Belder
51e66ec410 Windows: turn off /Gm
Otherwise multicode compile doesn't work.
2012-04-27 22:06:12 +02:00
Bert Belder
0b75eee364 uv: upgrade to d41cc9118d 2012-04-27 22:00:44 +02:00
Bert Belder
e221cd4a53 uv: upgrade to aea5db5da1 2012-04-27 21:28:56 +02:00
Ben Noordhuis
4e84dfa683 bench: run GC and dump stats if --expose-gc is set 2012-04-27 20:38:58 +02:00
Marcel Laverdet
70635753a3 Cleanup vm module memory leakage
There are some paths here that led to dangling contexts. By being
smarter with handle management we can get rid of all the cleanup code
and fix those issues.
2012-04-27 10:32:40 -07:00
isaacs
76de7c0c26 Add customary 'fork me on github' banner to website 2012-04-27 07:58:38 -07: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
98b4596a46 process: lint 2012-04-25 20:10:50 -07:00
Ben Noordhuis
5648d95c4a Remove unused local variable. 2012-04-25 04:10:31 -07:00
Kyle Robinson Young
df6c12cdcc doc: update string_decoder stability index to 3
Ref #3140
2012-04-25 01:13:08 +02:00
Nathan Rajlich
6292df659f process: comment for consistency 2012-04-24 11:31:26 -07:00
Nathan Rajlich
ef3a874f41 process: set _print_eval even when --eval is not passed
This is for scripts being fed from stdin:

  $ echo "{ foo: 'bar' }" | node -p
2012-04-24 11:31:02 -07:00
Nathan Rajlich
0b5235e68c process: make --eval and reading scripts from stdin act the same
Reusing the same logic for both places for the behavior is consistent.

For example:

  $ ./node -p -e "'Hello World'"
  Hello World

  $ echo "'Hello World'" | ./node -p
  Hello World
2012-04-24 11:30:14 -07:00
Kyle Robinson Young
d9bad09ede doc: util: add args to format and methods error, puts, print 2012-04-24 05:25:09 +02:00
Ben Noordhuis
48cdbffd24 v8: posix: try to send() whole buffer
Retry the send() syscall after a partial write.
2012-04-24 04:11:29 +02:00
Ben Noordhuis
ebfb8a5613 v8: posix: handle EINTR in socket functions
The socket functions did not handle EINTR (syscall interrupted by signal) which
tripped up the debug agent.
2012-04-24 04:11:22 +02:00
Ben Noordhuis
4359e8154d v8: debug: fix error handling in SendConnectMessage()
The old error handling code checked if the return value of Socket::Send() != 0,
which is wrong because Socket::Send() can write less bytes than requested or
return -1 on error.
2012-04-24 04:11:11 +02:00
Kyle Robinson Young
491c8d92b8 doc: add deprecated function http.createClient()
Appears in a lot of old code and core tests. Documented to show it
is deprecated.

Closes #1613.
2012-04-23 16:30:28 +02:00
Ben Noordhuis
a64acd8baa test: cluster: add worker death event test 2012-04-23 15:58:48 +02:00
Malte-Thorben Bruns
ea50ebd36d build: support make install "DESTDIR=/path" 2012-04-23 01:52:26 +02:00
Nathan Rajlich
e16021340d repl: use Object.getPrototypeOf on functions for tab complete() 2012-04-21 13:53:49 -07:00
isaacs
c0a9985da7 domain: Document explicit binding, and d.run() 2012-04-21 10:32:03 -07:00
Kyle Robinson Young
525253d50e doc: add args for rl.write and rl.prompt 2012-04-21 05:31:47 +02:00
Kyle Robinson Young
da56c72f59 readline: remove unused vars in _ttyWrite 2012-04-21 05:30:24 +02:00
isaacs
27dfb1d4c0 doc: typo in child_process documentation 2012-04-20 07:46:42 -07:00
isaacs
77c1cc0482 doc: typo in cluster documentation 2012-04-20 07:43:19 -07:00
Kyle Robinson Young
d91ef153e7 doc: add string_decoder doc 2012-04-20 16:17:41 +02:00
Brian White
642945cc00 docs: Remove duplicate socket.write() description 2012-04-20 16:16:17 +02:00
Ben Noordhuis
c21c51a6fc v8: fix "pure virtual method called" runtime error
Fixes #2912.
2012-04-20 01:29:02 +02:00
Kyle Robinson Young
e67a0f80e0 readline: _normalWrite() doesn't take a key modifier arg 2012-04-18 23:36:46 +02:00
isaacs
c9a231db0e typo in node_http_parser 2012-04-18 13:01:33 -07:00
Kyle Robinson Young
57148f54e1 readline: change char to ch to avoid reserved word 2012-04-18 21:57:39 +02:00
Ben Noordhuis
c56d1559fc test: use the new net.listen(backlog=x) API 2012-04-18 21:55:36 +02:00
Erik Dubbelboer
12f77440ef doc: improve dns module docs 2012-04-18 21:51:16 +02:00
Erik Dubbelboer
ecfe32e3a0 dns: add more error codes 2012-04-18 21:50:52 +02:00
isaacs
605927fbd9 Fix test/ jslint failures (by not linting tests)
In practice, it's not important to lint tests.  We lint src/
and lib/, which is where we're more prone to make mistakes that
affect real-world situations in subtle ways, and where more
changes are made that ought to be kept in a consistent style.

Tests are a mess anyways, and no one cares.
2012-04-18 12:44:28 -07:00
Erik Dubbelboer
3d69bbfa87 net, http: add backlog parameter to .listen() 2012-04-18 21:40:25 +02:00
isaacs
b12b2b83fc Merge remote-tracking branch 'ry/v0.6' 2012-04-18 12:25:32 -07:00
isaacs
33c76f19de net.js: lint 2012-04-18 12:24:41 -07:00
Dane Springmeyer
e5b787e84d deps: fix v8 build error
Pull in build error fix from http://code.google.com/p/v8/source/detail?r=9505
Missed in 5d69bbfbd.
2012-04-18 21:15:09 +02: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
0fcb124602 Now working on 0.7.9 2012-04-18 11:17:29 -07:00
isaacs
889cbf9ada Merge branch 'v0.7.8-release' 2012-04-18 11:17:15 -07:00
isaacs
c2b47097c0 2012.04.18, Version 0.7.8, (unstable)
* Upgrade V8 to 3.9.24.9

* Upgrade OpenSSL to 1.0.0f

* Upgrade npm to 1.1.18

* Show licenses in Binary installers

* Domains (isaacs)

* readline: rename "end" to "close" (Nathan Rajlich)

* tcp: make getsockname() return address family as string (Shigeki Ohtsu)

* http, https: fix .setTimeout() (ssuda)

* os: add cross platform EOL character (Mustansir Golawala)

* typed arrays: unexport SizeOfArrayElementForType() (Aaron Jacobs)

* net: honor 'enable' flag in .setNoDelay() (Ben Noordhuis)

* child_process: emit error when .kill fails (Andreas Madsen)

* gyp: fix 'argument list too long' build error (Ben Noordhuis)

* fs.WriteStream: Handle modifications to fs.open (isaacs)

* repl, readline: Handle newlines better (Nathan Rajlich, Nathan Friedly)

* build: target OSX 10.5 when building on darwin (Nathan Rajlich)

* Fix #3052 Handle errors properly in zlib (isaacs)

* build: add support for DTrace and postmortem (Dave Pacheco)

* core: add reusable Slab allocator (Ben Noordhuis)
2012-04-18 09:37:18 -07:00
isaacs
7b3fb22290 typo in node_http_parser 2012-04-18 09:36:45 -07:00
isaacs
6bb9868271 Reapply patches floating on V8 2012-04-18 09:36:44 -07:00
isaacs
6ed5ef5fe0 Upgrade V8 to 3.9.24.9 2012-04-18 09:36:44 -07:00
isaacs
c8bbd13ea8 Upgrade npm to 1.1.17 2012-04-18 09:36:40 -07:00
Josh W
d2860a6c7d doc: make readline example filter shorter 2012-04-18 15:21:56 +02:00
Josh W
20143b359c doc: add some headers to make it more legible 2012-04-18 15:21:51 +02:00
isaacs
d8b33dc147 lint 2012-04-17 15:52:57 -07:00
isaacs
37fd953378 uv: Cherry-pick joyent/libuv@3c41597 2012-04-17 15:45:48 -07:00
isaacs
079b81358b test: Minor change to message/undefined_reference_in_new_context 2012-04-17 15:30:22 -07:00
Dave Pacheco
8559a4ae0f Fix 64-bit SmartOS build 2012-04-17 14:34:12 -07:00
isaacs
8673a4aa25 Merge branch 'domains3' 2012-04-17 13:36:29 -07:00
isaacs
d4ed2e61f7 Add Todo comments about domain-ifying crypto 2012-04-17 13:14:55 -07:00
isaacs
45c1d4f96f Add switches to http_simple bench to use domains 2012-04-17 13:14:55 -07:00
isaacs
10ce3d129d Domain hooks in ReqWrap<T> and MakeCallback 2012-04-17 13:14:55 -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
isaacs
a26bee8fa1 MakeCallback: Consistent symbol usage 2012-04-17 13:14:54 -07:00
isaacs
db45b2ca02 MakeCallback: Use in node_signal_watcher 2012-04-17 12:00:58 -07:00
isaacs
e1dd570585 MakeCallback: Use in node_io_watcher 2012-04-17 12:00:58 -07:00
isaacs
35c0cd219d MakeCallback: Use in node_crypto 2012-04-17 12:00:58 -07:00
isaacs
91701c2db1 MakeCallback: Use in node_file.cc 2012-04-17 12:00:58 -07:00
isaacs
88f94fa28c MakeCallback: abort() if not a function 2012-04-17 12:00:58 -07:00
isaacs
ac1aaddc00 MakeCallback: Return the callback return value 2012-04-17 11:56:33 -07:00
isaacs
7407be896e MakeCallback: Accept Function or Symbol argument 2012-04-17 11:56:32 -07:00
isaacs
80a55e9c83 Report errors thrown from uncaughtException handers 2012-04-17 11:56:32 -07:00
Nathan Rajlich
e621250116 test: lowercase setRawMode() test case filename 2012-04-17 11:53:50 -07:00
Nathan Rajlich
e28eb6de30 doc: update the readline docs for the "close" event behavior 2012-04-17 11:53:50 -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
c5d35aca33 test: check for multiple "emit" calls in repl-end-emits-exit.js 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
Nathan Rajlich
86bd9b6e70 doc: change in to input in the readline docs
Also compacting some long lines.
2012-04-17 11:53:49 -07:00
Kyle Robinson Young
718aa505c4 doc: add require.extensions to globals
Closes #3028
2012-04-17 17:10:42 +02:00
Kyle Robinson Young
7cd1690f3d doc: add cache argument to fs.realpath() 2012-04-17 14:17:41 +02:00
domenic
5bc07cc90b doc: note that stream.pause is advisory 2012-04-17 14:14:09 +02:00
ssuda
70005be4ff Fixing ClientRequest setTimeout EventEmitter Leak
This will fix #3068
2012-04-16 23:36:18 +02:00
Zachary Scott
540a441259 docs: fix broken links in zlib docs 2012-04-16 23:06:52 +02:00
Zachary Scott
b4626afb61 docs: url.format uses host for hostname and port, not auth
Fixes #3062.
2012-04-16 22:28:02 +02:00
Zachary Scott
59e6b14395 docs: url.host doesn't include auth
Fixes #3062.
2012-04-16 22:27:54 +02:00
fukayatsu
0f95a93a2c tls: remove duplicate line 2012-04-16 21:38:26 +02:00
Shigeki Ohtsu
0d13142332 tcp: make getsockname() return address family as string 2012-04-16 18:00:47 +02:00
Ben Noordhuis
21d2683976 test: don't make request until server is listening
Preemptively fixes simple/test-https-timeout on platforms where binding to an
interface is not an instantaneous action.
2012-04-16 18:00:47 +02:00
ssuda
48d52d85c3 http, https: fix .setTimeout()
Fixes #3107.
2012-04-16 18:00:38 +02:00
lrn@chromium.org
5d69bbfbdb Fix bug in x64 RegExp detecting start of string.
Also add missing MIPS case in regexp tracer.

Fixes issues v8:1748 and v8:1746

BUG=v8:1748, v8:1746
TEST=mjsunit/regress/regress-1748.js

Review URL: http://codereview.chromium.org/8116001

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@9504 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-04-16 17:40:17 +02:00
Dave Pacheco
0f74729758 disable omit-frame-pointer on solaris systems 2012-04-16 17:28:45 +02:00
isaacs
0c0f13eda4 Patches floating on v8 2012-04-16 17:28:33 +02:00
Bert Belder
69ca83f755 Upgrade V8 to 3.6.6.25 2012-04-16 17:27:16 +02:00
Kyle Robinson Young
0a83b78ba8 docs: more explicit argument names in fs 2012-04-16 16:31:02 +02:00
Ben Noordhuis
3f4261276e node: don't check return value of unsetenv()
It returns void on some platforms, notably FreeBSD.
2012-04-16 14:16:48 +02:00
Maciej Małecki
f065c87bcf events: remove misleading comment 2012-04-15 15:52:56 +02:00
Ben Noordhuis
c945eae942 deps: fix -DOPENSSL_NO_SOCK on sunos
The OPENSSL_NO_SOCK macro in OpenSSL missed a couple of networking functions
that called other functions that OPENSSL_NO_SOCK *had* filtered out. None of
the functions (filtered or not) were actually used but it was enough to trip
up the Solaris linker.
2012-04-14 22:05:17 +00:00
Mustansir Golawala
7ee15457ed os: add cross platform EOL character 2012-04-14 23:17:38 +02:00
Ben Noordhuis
d03b80bc12 deps: upgrade http_parser to joyent/http-parser@da91852 2012-04-14 23:12:36 +02:00
isaacs
93cefab1a3 Set errno in fake-failing child-process kill test 2012-04-13 16:53:51 -07:00
Ben Noordhuis
b7b7b29f50 dns: remove unused functions 2012-04-13 14:46:35 +02:00
Zachary Scott
46acb09ed8 docs: rewrite "addons" docs to use node-gyp
Closes #3100.
Closes #3101.
2012-04-12 18:32:01 -07:00
Aaron Jacobs
1444801374 typed arrays: unexport SizeOfArrayElementForType()
It isn't used anywhere else, so made it an implementation detail in
v8_typed_array.cc.
2012-04-12 23:48:49 +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
04271a5e93 gyp: Apply 'argument too long' fix in another place
For some reason, aa5961a445 caused
'make test' to rebuild the entire project every time.  Applying
the fix to the other place where gyp chops up the argument list
makes it behave properly.
2012-04-11 18:26:52 -07:00
Bert Belder
1c88c3b3b5 Disable OpenSSL UI 2012-04-12 01:34:05 +02:00
Ben Noordhuis
916b5d1fff test: merge tls-ext-key-usage into tls-securepair-client 2012-04-12 01:34:05 +02:00
Ben Noordhuis
6cbed959e6 test: fix openssl tests
Don't assume that the libcrypto and libssl that we're linked against is the same
version as the openssl command line tool. This is important because the tool has
a bug in all pre-1.0.0 versions that makes it unusable for these tests.
2012-04-12 01:34:05 +02:00
Ben Noordhuis
2639566c6e build: configure openssl
* compile with -DOPENSSL_NO_SOCK and -DOPENSSL_NO_DGRAM, we don't need it
* compile with -DOPENSSL_NO_GOST and -DOPENSSL_NO_HW_PADLOCK, works around the
  brain dead linker on solaris and maybe others
* compile with -DTERMIOS, OS X doesn't have <termio.h>
* compile with -D__EXTENSIONS__ on solaris, makes siginfo_t available
* compile without -ansi on linux, it hides a number of POSIX declarations
  (sigaction, NI_MAXHOST, etc.)
2012-04-12 01:34:05 +02:00
Ben Noordhuis
3694b6914a deps: reapply 0a34755 to bundled openssl 2012-04-12 01:34:05 +02:00
Ben Noordhuis
0f9d201183 deps: reapply 0110c90 to bundled openssl 2012-04-12 01:34:05 +02:00
Ben Noordhuis
30e7fb7307 deps: upgrade openssl to 1.0.0f 2012-04-12 01:34:05 +02:00
Ben Noordhuis
aa5961a445 gyp: fix 'argument list too long' build error 2012-04-12 01:34:04 +02:00
Ben Noordhuis
e9dcfd4bd2 Revert "deps: upgrade libuv to 3c41597"
This reverts commit 0db4dc0024.

This commit makes a lot of tests fail due to reference counting errors. It's
not worth it to debug because the reference counting scheme is due to change
soon anyway.
2012-04-12 00:59:38 +02:00
Bert Belder
3ec84a11f8 Slab allocator: don't attempt to shrink a non-buffer 2012-04-11 22:02:12 +02:00
Nathan Rajlich
9b7a6c5238 configure: output a newline at the end of config.gypi 2012-04-11 11:16:47 -07:00
Nathan Rajlich
fdeeabba78 configure: don't use "with" for Python 2.5 and older 2012-04-11 11:16:11 -07:00
isaacs
e0660740d9 Fix #3089 Build changelog.html for website 2012-04-10 18:35:01 -07:00
isaacs
3ba9519faf Makefile: minor nit 2012-04-10 18:34:57 -07:00
isaacs
8b82abb953 Fix #3089 Build changelog.html for website 2012-04-10 18:31:12 -07:00
isaacs
d0365fd21f Makefile: minor nit 2012-04-10 18:22:42 -07:00
Nathan Rajlich
7b71fd0c68 build: add comment explaining MACOSX_DEPLOYMENT_TARGET. 2012-04-10 14:39:29 -07:00
Nathan Rajlich
70a5b53e03 Re-apply "build: target OSX 10.5 when building on darwin"
This reverts commit 93eca95aec.

Fixes #3072 (once again).
2012-04-10 14:38:47 -07:00
Ben Noordhuis
0db4dc0024 deps: upgrade libuv to 3c41597 2012-04-10 23:32:47 +02:00
isaacs
e8067cb685 Now working on v0.6.16 2012-04-09 10:34:54 -07:00
isaacs
163d3cdf14 Merge branch 'v0.6.15-release' into v0.6 2012-04-09 10:34:32 -07:00
isaacs
f160a45b25 2012.04.09 Version 0.6.15 (stable)
* Update npm to 1.1.16

* Show licenses in binary installers.

* unix: add uv_fs_read64, uv_fs_write64 and uv_fs_ftruncate64 (Ben Noordhuis)

* add 64bit offset fs functions (Igor Zinkovsky)

* windows: don't report ENOTSOCK when attempting to bind an udp handle twice (Bert Belder)

* windows: backport pipe-connect-to-file fixes from master (Bert Belder)

* windows: never call fs event callbacks after closing the watcher (Bert Belder)

* fs.readFile: don't make the callback before the fd is closed (Bert Belder)

* windows: use 64bit offsets for uv_fs apis (Igor Zinkovsky)

* Fix #2061: segmentation fault on OS X due to stat size mismatch (Ben Noordhuis)
2012-04-09 09:03:00 -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
93eca95aec Revert "build: target OSX 10.5 when building on darwin"
This reverts commit b6d6a54f80,
which fixed #3072, so we'll have to figure out another way
to make that work.
2012-04-08 22:31:28 -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
isaacs
08e2e570a7 Make rules for release blog post and email message 2012-04-07 16:37:44 -07:00
isaacs
57d722011a website: Add October Sky JS and Node.js Hispano 2012-04-07 16:29:37 -07:00
isaacs
e81a5e9c9c Remove stray comment from LICENSE file 2012-04-07 16:20:42 -07:00
Bert Belder
ba055115e0 Windows: installer shows license agreement dialog 2012-04-06 16:15:55 -07:00
Bert Belder
1330419446 Windows: add build step that generates license.rtf from LICENSE 2012-04-06 16:15:51 -07:00
Ryan Dahl
c9f17305e6 Mac installer shows license
ref #3056
2012-04-06 16:15:43 -07:00
Ryan Dahl
cf75619bc3 Include text of licenses in LICENSE file
For easy inclusion in binary distributions. ref #3056
2012-04-06 16:15:33 -07:00
Ryan Dahl
331cd7c251 Fix links to libev and libeio licenses 2012-04-06 16:15:24 -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
8652c11031 test: make the ArrayStream in repl tests write a '\n'
This is more correct.
Fixes them from failing with the updated readline behavior.
2012-04-06 16:13:40 -07:00
Nathan Rajlich
8752ceef13 test: make repl-autolibs check that the callback was invoked 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 Rajlich
aab7cb7dfe test: fix failing test-repl.js 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
37ac5e52bf Update npm to 1.1.16 2012-04-06 14:42:19 -07:00
isaacs
b9bfb1bc91 child_process: Emit err rather than throw for IPC write failure 2012-04-06 14:16:09 -07:00
Igor Zinkovsky
0b57fee3f8 enable test-fs-largefile.js test 2012-04-05 18:18:48 -07:00
Bert Belder
1042a8d887 Please the compiler 2012-04-06 03:14:07 +02: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
Igor Zinkovsky
f178f2ae3f upgrade libuv to d68b3d960b6d95bfc16027cecca2f3fa48bcc36f 2012-04-05 17:10:39 -07:00
Zachary Scott
d73b257d65 docs: grammar and spelling on lib/cluster.js 2012-04-06 01:44:03 +02:00
Nathan Rajlich
b6d6a54f80 build: target OSX 10.5 when building on darwin 2012-04-05 16:30:33 -07:00
Igor Zinkovsky
052aaa4c4d windows: use 64bit offsets for uv_fs apis 2012-04-05 16:03:11 -07:00
Bert Belder
3e8857271b Windows: installer shows license agreement dialog 2012-04-04 18:14:30 +02:00
Bert Belder
2728dcc95b Windows: add build step that generates license.rtf from LICENSE 2012-04-04 18:14:21 +02:00
Bert Belder
930fabe43f Disable V8 postmortem debugging on Windows
It is not supported by V8.
2012-04-03 03:07:47 +02:00
Ryan Dahl
30994aad30 Mac installer shows license
ref #3056
2012-04-02 16:49:03 -07:00
Ryan Dahl
55e971e33d Include text of licenses in LICENSE file
For easy inclusion in binary distributions. ref #3056
2012-04-02 16:49:03 -07:00
Ben Noordhuis
92c0c6953a build: define _DARWIN_USE_64_BIT_INODE=1 on OS X
Fixes a segmentation fault on some OS X systems due to sizeof(struct stat)
mismatches.

Fixes #2061.
2012-04-02 23:53:05 +02:00
Ben Noordhuis
ffee873941 build: define _DARWIN_USE_64_BIT_INODE=1 on OS X
Fixes a segmentation fault on some OS X systems due to sizeof(struct stat)
mismatches.

Fixes #2061.
2012-04-02 23:44:38 +02:00
Ryan Dahl
08109367e8 Fix links to libev and libeio licenses 2012-04-02 14:39:46 -07:00
isaacs
01d46f3a20 Fix #3052 Handle errors properly in zlib 2012-04-02 13:48:10 -07:00
Dave Pacheco
cc15299c32 build: add support for DTrace and postmortem
* fixes #2110
* includes V8 postmortem metadata in Solaris builds
* adds GYP support for DTrace probes and ustack helper
* ustack helper derives constants dynamically from libv8_base.a
* build with DTrace support by default on SunOS
2012-04-01 00:14:36 +00:00
Ben Noordhuis
7bdeed2039 zlib: fix uninitialized variable compiler warning 2012-03-31 23:50:02 +00:00
Nathan Rajlich
0965d2d9f6 js2c: fix to support files other than ones ending with 2 char extensions
Previously this was basically hard-coded for *.js files, but now we
need to include the 'config.gypi' file in there as well.
2012-04-01 01:44:54 +02:00
Ben Noordhuis
a4a04f932e node: provide snprintf implementation on windows
_snprintf() doesn't zero-terminate the buffer on overflow.
2012-04-01 01:17:25 +02:00
Ben Noordhuis
dee8c51547 node: don't check return value of unsetenv()
It returns void on some platforms, notably FreeBSD.
2012-03-31 23:23:48 +02:00
Ben Noordhuis
bc834c395b Alias _snprintf to snprintf, fix Windows build. 2012-03-31 22:37:51 +02:00
isaacs
1e577f347b website: Consistency in the industry logos 2012-03-30 18:21:50 -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
Ben Noordhuis
c26a0b5aab doc: fix grammar error in cluster docs 2012-03-30 22:54:13 +02:00
isaacs
90ce5b3d41 cluster: Rename 'death' back to 'exit' 2012-03-30 12:59:24 -07:00
Bert Belder
407181538b Revert "Re-add top-level v8::Locker"
The locker makes node crash in debug mode sometimes.
For example, test/simple/test-repl.js triggers it.

This reverts commit 9a6012edd9.

Conflicts:

	src/node.cc
2012-03-30 21:50:15 +02:00
Ben Noordhuis
7c02b5a58d udp_wrap: simplify AddressToJS() function 2012-03-30 21:24:02 +02:00
Ben Noordhuis
1ab95a536a udp_wrap: use new slab allocator 2012-03-30 21:24:02 +02:00
Ben Noordhuis
1e13a2d242 stream_wrap: use new slab allocator 2012-03-30 21:24:02 +02:00
Ben Noordhuis
08032efed0 core: add reusable slab allocator 2012-03-30 21:24:02 +02:00
Ben Noordhuis
a58659cd4a core: add ROUND_UP() macro 2012-03-30 21:24:01 +02:00
Ben Noordhuis
9d1fde7519 typed arrays: root JS objects in HandleScope with Local<> 2012-03-30 21:24:01 +02:00
Ben Noordhuis
036d907df7 tcp: root JS objects in HandleScope with Local<> 2012-03-30 21:24:01 +02:00
Ben Noordhuis
3005965266 stat_watcher: root JS objects in HandleScope with Local<> 2012-03-30 21:24:01 +02:00
Ben Noordhuis
1a49df5fa9 http: root JS objects in HandleScope with Local<> 2012-03-30 21:24:01 +02:00
Ben Noordhuis
9eacf93928 crypto: root JS objects in HandleScope with Local<> 2012-03-30 21:24:01 +02:00
Ben Noordhuis
f86359cc3f udp: root JS objects in HandleScope with Local<> 2012-03-30 21:24:01 +02:00
Ben Noordhuis
32b2964eed udp: remove slab allocator 2012-03-30 21:24:01 +02:00
isaacs
8d3278b962 Now working on 0.7.8 2012-03-30 11:54:39 -07:00
isaacs
69ae75c66c Merge branch 'v0.7.7-release' 2012-03-30 11:54:08 -07:00
Igor Zinkovsky
6aa7f6f732 upgrade libuv to ab8c3b85c1 2012-03-30 10:25:07 -07:00
Ben Noordhuis
17524432ff Fix Engrish in error messages. 2012-03-30 16:07:05 +02:00
Ben Noordhuis
db0a1dc7d9 node: remove unused function 2012-03-30 14:52:39 +02:00
Ben Noordhuis
8c97ad4c30 node: fix signedness compiler warnings 2012-03-30 14:52:38 +02:00
Ben Noordhuis
6986d9316c crypto: fix signedness compiler warnings 2012-03-30 14:52:38 +02:00
Ben Noordhuis
b82b4f2993 buffer: fix signedness compiler warnings 2012-03-30 14:52:38 +02:00
Ben Noordhuis
0f0557d78d stream_wrap: fix signedness compiler warnings 2012-03-30 14:52:38 +02:00
isaacs
5cda2542fd 2012.03.30, Version 0.7.7 (unstable)
* Upgrade V8 to 3.9.24.7

* Upgrade npm to 1.1.15

* Handle Emoji characters properly (Erik Corry, Bert Belder)

* readline: migrate ansi/vt100 logic from tty to readline (Nathan Rajlich)

* readline: Fix multiline handling (Alex Kocharin)

* add a -i/--interactive flag to force the REPL (Nathan Rajlich)

* debugger: add breakOnException command (Fedor Indutny)

* cluster: kill workers when master dies (Andreas Madsen)

* cluster: add graceful disconnect support (Andreas Madsen)

* child_process: Separate 'close' event from 'exit' (Charlie McConnell)

* typed arrays: add Uint8ClampedArray (Mikael Bourges-Sevenier)

* buffer: Fix byte alignment issues (Ben Noordhuis, Erik Lundin)

* tls: fix CryptoStream.setKeepAlive() (Shigeki Ohtsu)

* Expose http parse error codes (Felix Geisendörfer)

* events: don't delete the listeners array (Ben Noordhuis, Nathan Rajlich)

* process: add process.config to view node's ./configure settings (Nathan Rajlich)

* process: process.execArgv to see node's arguments (Micheil Smith)

* process: fix process.title setter (Ben Noordhuis)

* timers: handle negative or non-numeric timeout values (Ben Noordhuis)
2012-03-29 20:20:23 -07:00
isaacs
9a70d99980 Upgrade npm to 1.1.15 2012-03-29 20:20:23 -07:00
isaacs
7abbda8ba2 Make rules for release blog post and email message 2012-03-29 16:04:48 -07:00
isaacs
6ebe9e0c1d Upgrade V8 to 3.9.24.7 2012-03-29 16:04:48 -07: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
isaacs
6aa755070a More logging in simple/test-eio-race
Travis-CI is failing on this test repeatedly, but other Linux systems
seem to be fine with it.  Alter the logging so it's more clear which
part is timing out.
2012-03-29 08:41:51 -07:00
Ben Noordhuis
11770bf5e2 test: move pummel/test-tls-fragmentation to benchmark/
Said test takes over 90 seconds on my Core 2 Duo which is too long, even for
the pummel tests.
2012-03-29 17:25:37 +02: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
Ben Noordhuis
daa6b95b08 test: move simple/test-crypto-dh to pummel/
The test is too slow / CPU intensive for the main test harness.
2012-03-29 17:12:26 +02:00
Ben Noordhuis
5e7cb68be9 test: remove simple/test-module-load-list
Said test adds little value and only serves to annoy me when moving around
modules. It was broken anyway: it passed inside the test runner and failed
when run from the command line thanks to the environment sniffing it did.
2012-03-29 17:11:37 +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
26b6da134f doc: change stability index of tty and readline to Unstable 2012-03-28 20:13:28 -07: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
isaacs
af90faf198 Patches floating on V8 2012-03-28 19:54:01 -07:00
isaacs
4b64542fe0 Upgrade V8 to 3.9.24.6 2012-03-28 19:51:38 -07:00
isaacs
8a15147bc5 Reapply "debug: Wait 50ms before running the main module"
This reapplies commit c781f17742
This reverts commit 00224771e3
2012-03-28 19:41:29 -07:00
isaacs
cda3b6ff52 Upgrade npm to 1.1.14 2012-03-28 19:36:44 -07:00
Ben Noordhuis
b031671138 tty, readline: fix style errors 2012-03-29 01:36:46 +02:00
Erik Lundin
973bbecf1a typed arrays: prevent unaligned typed array views on top of buffers 2012-03-29 01:36:45 +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
Mikael Bourges-Sevenier
67fc1dafd0 typed arrays: add Uint8ClampedArray 2012-03-28 22:57:15 +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
mstarzinger@chromium.org
eb1ff03418 v8: Fix missing initialization of mark-compact flags.
R=svenpanne@chromium.org

Review URL: https://chromiumcodereview.appspot.com/9662056

Cherry-pick of https://v8.googlecode.com/svn/branches/bleeding_edge@11006
2012-03-28 13:04:56 +02: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
Nathan Rajlich
a33d1c959a repl: add test case verifying the repl options usage 2012-03-27 17:49:10 -07:00
Nathan Rajlich
b187e96ec9 repl: add a 'writer' option to the repl
Previously this was a module-level setting, meaning that all REPL instances
had to share the same writer function. Turning it into one of the options
allows individual REPL instances to use their own writer function.
2012-03-27 17:39:14 -07:00
Nathan Rajlich
228ddddc1c repl: ensure that 'repl.ignoreUndefined' is a boolean 2012-03-27 17:35:33 -07:00
Nathan Rajlich
e7065eaa93 repl: ensure that 'repl.useGlobal' is a boolean 2012-03-27 17:34:55 -07:00
Nathan Rajlich
f41901cdf6 repl: make ^D emit an 'end' event on the readline instance
Also emit 'exit' on the repl when 'end' is emitted on the readline.

Fixes `node debug test/fixtures/breakpoints.js` when ^D is pressed.
2012-03-27 13:54:49 -07:00
Fedor Indutny
00224771e3 Revert "debug: Wait 50ms before running the main module"
This reverts commit c781f17742.
2012-03-28 01:40:45 +07:00
Fedor Indutny
5e8c2b0768 debugger: use v8 api to wait for a connection
Use v8::Debug::EnableAgent(_, _, true) to wait for incoming
debugger-client connection before emitting any break (or other) events.

This commit should fix test/simple/test-debugger-repl faults.
2012-03-28 01:37:54 +07:00
Nathan Rajlich
698e795a5f repl: fix 'terminal' mode autodetection on global repls
Fixes test/simple/test-force-repl.js
2012-03-26 19:06:58 -07:00
Nathan Rajlich
aad12d0b26 readline: migrate ansi/vt100 logic from tty to readline
The overall goal here is to make readline more interoperable with other node
Streams like say a net.Socket instance, in "terminal" mode.

See #2922 for all the details.
Closes #2922.
2012-03-26 15:21:25 -07:00
Alex Kocharin
ab518ae50e readline: fix for terminals that insert newlines automatically
Fixes #2985.
2012-03-26 09:21:55 -07:00
Shigeki Ohtsu
e7792e5d46 test: add test of tls.createServer(honorCipherOrder=true) 2012-03-26 05:03:51 -07:00
Zachary Scott
0dd8e0167d doc: document fs.createReadStream() encodings
Fixes #2700.
2012-03-26 00:25:45 +02:00
Andreas Madsen
83aae35b8e doc: fix markup in cluster docs 2012-03-26 00:20:17 +02:00
isaacs
066789a6e3 Fix #3001 website update 'latest' links on publish 2012-03-24 01:39:39 -07:00
isaacs
a7dce47854 Now working on v0.6.15 2012-03-23 11:17:08 -07:00
isaacs
dbd0e2b386 Merge branch 'v0.6.14-release' into v0.6 2012-03-23 11:16:31 -07:00
Shigeki Ohtsu
4515987058 doc: fix default dgram multicast ttl to 1 2012-03-23 17:24:10 +01:00
Shigeki Ohtsu
75face6139 doc: fix TLS cipher names 2012-03-23 17:11:13 +01:00
Shigeki Ohtsu
8727e5f2be test: add test of cleartextStream.getCipher() in tls 2012-03-23 17:09:50 +01:00
Shigeki Ohtsu
2cf5f040a5 doc: add cleartextStream.getCipher() in tls 2012-03-23 17:09:50 +01:00
isaacs
e513ffef75 2012.03.22 Version 0.6.14 (stable)
* net: don't crash when queued write fails (Igor Zinkovsky)

* sunos: fix EMFILE on process.memoryUsage() (Bryan Cantrill)

* crypto: fix compile-time error with openssl 0.9.7e (Ben Noordhuis)

* unix: ignore ECONNABORTED errors from accept() (Ben Noordhuis)

* Add UV_ENOSPC and mappings to it (Bert Belder)

* http-parser: Fix response body is not read (koichik)

* Upgrade npm to 1.1.12
  - upgrade node-gyp to 0.3.7
  - work around AV-locked directories on Windows
  - Fix isaacs/npm#2293 Don't try to 'uninstall' /
  - Exclude symbolic links from packages.
  - Fix isaacs/npm#2275 Spurious 'unresolvable cycle' error.
  - Exclude/include dot files as if they were normal files
2012-03-23 08:01:22 -07:00
isaacs
d497bf845b doc: Remove extraneous index.html's from hyperlinks 2012-03-22 17:31:23 -07:00
isaacs
76f31faa3b Remove hard-coded version number from docs 2012-03-22 17:31:15 -07:00
Igor Zinkovsky
0dcc43316f don't crash when queued write fails 2012-03-22 17:09:22 -07:00
ssuda
249c3c165a Avoiding unnecessary ToString() calls
String::Utf8Value and String::AsciiValue constructors take Handle<Value>
So no need to convert to Handle<String>
2012-03-23 01:02:59 +01:00
isaacs
d227084339 Upgrade libuv to 8409a67 2012-03-22 16:44:04 -07:00
isaacs
a7cd76bb3b Remove unused fast-list module from npm 2012-03-22 16:43:28 -07:00
isaacs
67f1778065 Upgrade npm to 1.1.12 2012-03-22 16:38:58 -07:00
Shigeki Ohtsu
e1199fa335 tls: fix CryptoStream.setKeepAlive() 2012-03-23 00:20:46 +01:00
Bryan Cantrill
d1255914df sunos: fix EMFILE on process.memoryUsage() 2012-03-22 16:18:11 -07:00
Lal Jérémy
ef046bf4f6 test: generate 1024-bit keys, pacify openssl 1.0.1 2012-03-22 23:35:22 +01:00
Ben Noordhuis
ea44d3031d crypto: fix compile-time error with openssl <= 0.9.7e 2012-03-22 15:52:12 +01:00
Nathan Rajlich
feaa8a41c7 cmd: add a -i / --interactive flag to force the REPL
This is the only way to spawn a node child process in REPL mode, and will
also be needed to be able to use the REPL in MinTTY.
2012-03-21 00:05:25 -07:00
isaacs
d2389f8fab debug repl tests: Add visibility, remove test that times out
The 'Can't backtrace now' message takes over 10 seconds to return.
That's too much time to have to wait for a test, and when it times
out, it was causing an orphaned node process.

This cleans up the node process, and also removes the test that's
timing out, so that the case is hit less often.

Todo: Make the backtrace message come back faster.
2012-03-20 19:48:07 -07:00
isaacs
c781f17742 debug: Wait 50ms before running the main module 2012-03-20 19:46:36 -07:00
isaacs
81cd3a3cd6 lint readline.js - single-quotes preferred 2012-03-20 19:42:34 -07:00
Erik Lundin
4b1d492561 test: merge typed arrays tests
Merge simple/test-typed-arrays-typenames into simple/test-typed-arrays.
2012-03-21 01:59:40 +01:00
Erik Lundin
f2ebf2469b test: fix simple/test-typed-arrays
* It incorrectly uses assert(a, b) instead of assert.equal(a, b), meaning all
  relevant assertions will pass regardless of whether they're supposed to when
  a == true.

* It makes the assumption that elements in typed arrays for numerical types
  spanning more than one byte, like Uint32Array, are stored little-endian first
  on all machines.

* It contains assorted mistakes like assert(Int32Array, typeof v4) (that one
  only passes thanks to point 1).
2012-03-21 01:59:33 +01:00
Johannes Wüller
7817f48322 fixed booleans being treated as strings, resulting in missing node-waf and npm 2012-03-20 17:46:08 -07:00
Alex Kocharin
06a058d731 readline: row-agnostic multiline readline implementation
Fixes #2959.
2012-03-20 15:37:06 -07:00
Nathan Rajlich
8517089b3e Revert "readline: add multiline support"
This reverts commit 443071db57.

Patch was overly compilicated and made some incorrect assumptions about the
position of the cursor being at the bottom of the screen. @rlidwka and I are
working on getting a proper implementation written.
2012-03-20 15:37:06 -07:00
ssuda
253ec6a63d process: don't use strdup()
file and cwd can be directly used from Utf8Value.
2012-03-20 17:59:21 +01:00
Alex Kocharin
415bff26fe repl: fix space autocompletion bug
Tapping <SP> + <TAB> would exit the REPL.
2012-03-20 12:27:59 +01:00
Felix Geisendörfer
18240193ba Expose http parse error codes
Currently http parse errors do not expose the error details available
from http_parser. This patch exposes the error code as `err.code`.
2012-03-19 19:00:16 -07:00
Shigeki Ohtsu
891f9defeb No need to have NativeModule.require('fs') in Module._findPath() 2012-03-19 18:58:58 -07:00
isaacs
dce8682827 cluster: English language fixing 2012-03-19 14:28:39 -07:00
Andreas Madsen
94d337eb0f cluster: kill workers when master dies
This patch will kill the worker once it has lost its connection with the parent.
However if the worker are doing a suicide, other measures will be used.
2012-03-19 14:22:36 -07:00
Andreas Madsen
d927fbc9ab cluster: add graceful disconnect support
This patch add a worker.disconnect() method there will stop the worker from accepting
new connections and then stop the IPC. This allow the worker to die graceful.
When the IPC has been disconnected a 'disconnect' event will emit.

The patch also add a cluster.disconnect() method, this will call worker.disconnect() on
all connected workers. When the workers are disconneted it will then close all server
handlers. This allow the cluster itself to self terminate in a graceful way.
2012-03-19 13:29:01 -07:00
Andreas Madsen
ab32e9e043 child_process: emit 'channel closed' error instead of throwing 2012-03-19 11:55:41 -07:00
isaacs
89653cb32f Upgrade npm to 1.1.10 2012-03-19 09:59:57 -07:00
Fedor Indutny
7418905aef debugger: breakOnException
Do not break automatically on exception, fixes #2926
2012-03-19 22:21:29 +06:00
Fedor Indutny
b6cb6ce0d3 debugger: remove 'repl' command from builtinLibs
* It was displaying useless warning
2012-03-19 22:21:28 +06:00
Fedor Indutny
f61d4b7a87 debugger: exit process on repl exit
* When entering repl - clone 'SIGINT' listeners array (instead of using
existing), as it will be spliced in .removeAllListeners() call later.
2012-03-19 22:21:28 +06:00
Ben Noordhuis
d8c4ecea0b test: fix race in simple/test-cluster-master-error
Said test checks that the workers shut down when the master errors but it failed
intermittently. Insert a small delay before doing the 'is dead?' check to give
the workers a chance to shut down.
2012-03-19 17:12:52 +01:00
Your Name
fb47a337ba test: changed instances of == to === 2012-03-19 14:24:46 +01:00
Nathan Rajlich
70e68893fe build: make --openssl-use-sys a boolean option
Before you had to enter a truthy value like: --openssl-use-sys=1
2012-03-17 12:57:24 -07:00
isaacs
815169383e Fix include logic was replacing https include with http 2012-03-17 11:11:07 -07:00
isaacs
7bee98bae2 Ignore 'making a build' artifacts 2012-03-17 11:11:03 -07:00
isaacs
851b3970e7 Fix include logic was replacing https include with http 2012-03-17 11:07:35 -07:00
isaacs
d980620010 Ignore 'making a build' artifacts 2012-03-17 11:07:35 -07:00
koichik
03077db45d test: HTTP responses with no content-length
Refs: #2952.
2012-03-18 00:50:47 +09:00
Ben Noordhuis
44527e6023 deps: upgrade http_parser to joyent/http-parser@b47c44d 2012-03-17 16:22:39 +01:00
Alex Xu
5abcdc9671 build: fix configure with spaces in CC 2012-03-16 16:01:53 -07:00
isaacs
76a771b749 doc: Remove extraneous index.html's from hyperlinks 2012-03-16 08:19:26 -07:00
isaacs
46376888cd Remove hard-coded version number from docs 2012-03-16 08:13:41 -07:00
isaacs
ec735cbce0 Merge remote-tracking branch 'ry/v0.6' into merge-v0.6
Conflicts:
	ChangeLog
	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/man/man1/npm.1
	deps/npm/man/man3/npm.3
	deps/npm/node_modules/node-gyp/README.md
	deps/npm/node_modules/node-gyp/lib/build.js
	deps/npm/node_modules/node-gyp/lib/configure.js
	deps/npm/node_modules/node-gyp/lib/install.js
	deps/npm/node_modules/node-gyp/lib/node-gyp.js
	deps/npm/node_modules/node-gyp/node_modules/ansi/package.json
	deps/npm/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/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
	doc/about/index.html
	doc/api/path.markdown
	doc/community/index.html
	doc/index.html
	doc/logos/index.html
	src/node_version.h
2012-03-16 08:06:54 -07:00
Shigeki Ohtsu
534264d209 doc: Add condition to emit close event of net.Server 2012-03-16 16:01:18 +01:00
Rod Vagg
90b785c09a doc: fix # links from (and within) api/fs 2012-03-16 15:51:33 +01:00
Rod Vagg
6628a3b6ea doc: fix # links from (and within) api/fs 2012-03-16 15:42:26 +01:00
isaacs
0fb4fb4797 Document ChildProcess exit/close event difference 2012-03-15 17:23:39 -07:00
Nathan Rajlich
7cb0f5f84a install: update install.js to use process.config
Now that the node_prefix is available from within node, we can use it :)
2012-03-15 17:15:49 -07:00
Nathan Rajlich
11d8823791 process: add process.config
This is the JS representation of the `config.gypi` file that was used when
compiling node. With this information, you can tell whether the current node
binary has shared or static dependencies, or any other configuration options
that may have been used.
2012-03-15 17:15:18 -07:00
Nathan Rajlich
95fd517431 node.gyp: include the config.gypi file in the js2c inputs list 2012-03-15 17:12:45 -07:00
Nathan Rajlich
bea2e15864 js2c: fix to support files other than ones ending with 2 char extensions
Previously this was basically hard-coded for *.js files, but now we
need to include the 'config.gypi' file in there as well.
2012-03-15 17:12:37 -07:00
Charlie McConnell
c7b8073afc child_process: Separate 'close' event from 'exit'
Currently, a child process does not emit the 'exit' event until 'close' events
have been received on all three of the child's stdio streams.  This change makes
the child object emit 'exit' when the child exits, and a new 'close' event when
all stdio streams are closed.
2012-03-15 17:07:11 -07:00
Nathan Rajlich
928ea564d1 events: don't delete the listeners array in removeListener() 2012-03-15 17:01:29 -07:00
Ben Noordhuis
761a82bc9a test: make .removeAllListeners() test more exhaustive
Also test removal of multiple listeners, it's a separate code path.
2012-03-16 00:25:42 +01:00
Ben Noordhuis
78dc13fbf9 events: don't delete the listeners array
The documentation implies that .removeAllListeners() leaves the listeners array
untouched. Make it so.
2012-03-16 00:20:10 +01:00
Ben Noordhuis
f9aa01de32 test: don't let debugger listen on common.PORT
simple/test-debugger-repl has a tendency to fail and leave behind a stray
process that listens on common.PORT, making later tests fail with EADDRINUSE.
2012-03-16 00:20:10 +01:00
Nathan Rajlich
dc752327bb vcbuild: run the 'configure' script in vcbuild.bat
So that a 'config.gypi' file gets generated, which is
required for the `process.config` object (see #2928).
2012-03-15 16:12:19 -07:00
Ben Noordhuis
1a97998644 process: fix process.title setter
Commit 19fd530 broke the argv initialization logic that's used on linux and
freebsd to update the process name (as displayed in tools like `top`).

Fixes test/simple/test-setproctitle.js.
2012-03-15 23:10:32 +01:00
isaacs
702b46c80d Fix invalid timer test
Previously, setTimeout(fn, 0) would create a new Timer() object,
which has a close() method (and is a bit slower).  The recent
change to more closely emulate browser setTimeout behavior dodges
this path, so this assertion is no longer valid.
2012-03-15 14:53:17 -07:00
Ben Noordhuis
7fc835afe3 timers: handle negative or non-numeric timeout values
Follows browser behaviour by scheduling the callback on the next tick.

Fixes #593.
2012-03-15 13:56:30 -07:00
Maciej Małecki
9a35656210 test: test if forks are spawned with parent's process.execArgv 2012-03-15 13:48:06 -07:00
Maciej Małecki
0113f5a72d test: test process.execArgv 2012-03-15 13:48:05 -07:00
Micheil Smith
19fd5301bf Expose original argv as process.execArgv for cluster and child_process.fork() 2012-03-15 13:47:43 -07:00
Matt Ezell
96e3be3aa3 Added trailing backslash to npm path
Fix #2377: $PATH issues reported for MSI installer
2012-03-15 13:28:01 -07:00
isaacs
b9bd2d3eb9 Now working on v0.6.14 2012-03-15 10:33:33 -07:00
isaacs
9726a259bf Merge branch 'v0.6.13-release' into v0.6 2012-03-15 10:32:58 -07:00
isaacs
9f7f86b534 2012.03.15 Version 0.6.13 (stable)
* Windows: Many libuv test fixes (Bert Belder)

* Windows: avoid uv_guess_handle crash in when fd < 0 (Bert Belder)

* Map EBUSY and ENOTEMPTY errors (Bert Belder)

* Windows: include syscall in fs errors (Bert Belder)

* Fix fs.watch ENOSYS on Linux kernel version mismatch (Ben Noordhuis)

* Update npm to 1.1.9
  - upgrade node-gyp to 0.3.5 (Nathan Rajlich)
  - Fix isaacs/npm#2249 Add cache-max and cache-min configs
  - Properly redirect across https/http registry requests
  - log config usage if undefined key in set function (Kris Windham)
  - Add support for os/cpu fields in package.json (Adam Blackburn)
  - Automatically node-gyp packages containing a binding.gyp
  - Fix failures unpacking in UNC shares
  - Never create un-listable directories
  - Handle cases where an optionalDependency fails to build
2012-03-15 08:45:35 -07:00
isaacs
06bf0707f7 makefile: Fix 'make doc' 2012-03-15 08:22:36 -07:00
isaacs
571a51989e Upgrade libuv to 66a959c4052 2012-03-15 08:18:37 -07:00
isaacs
f631c1d73b Update npm to 1.1.9 2012-03-14 16:44:36 -07:00
isaacs
ad5a108dfd Update uv to 5d21056 2012-03-14 16:44:36 -07:00
Artur Adib
c834ef409e Doc highlight fix 2012-03-14 16:44:36 -07:00
Rod Vagg
c12a1dc5d8 path.exists*() as 2nd level head not 3rd 2012-03-14 16:20:40 -07:00
Shigeki Ohtsu
d2fba2bf35 test: Fix path to require hello-world module 2012-03-14 11:00:52 -07:00
Nathan Rajlich
35043ad8ac process: use NODE_STRINGIFY macro to set process.versions.uv 2012-03-14 01:40:29 +01:00
isaacs
bda08bfa04 Now working on 0.7.7 2012-03-13 14:03:51 -07:00
isaacs
73c874698b Merge branch 'v0.7.6-release' 2012-03-13 14:03:07 -07:00
isaacs
f06abda6f5 2012.03.13, Version 0.7.6 (unstable)
* Upgrade v8 to 3.9.17

* Upgrade npm to 1.1.8
  - Add support for os/cpu fields in package.json (Adam Blackburn)
  - Automatically node-gyp packages containing a binding.gyp
  - Fix failures unpacking in UNC shares
  - Never create un-listable directories
  - Handle cases where an optionalDependency fails to build

* events: newListener emit correct fn when using 'once' (Roly Fentanes)

* url: Ignore empty port component (Łukasz Walukiewicz)

* module: replace 'children' array (isaacs)

* tls: parse multiple values of a key in ssl certificate (Sambasiva Suda)

* cluster: support passing of named pipes (Ben Noordhuis)

* Windows: include syscall in fs errors (Bert Belder)

* http: #2888 Emit end event only once (Igor Zinkovsky)

* readline: add multiline support (Rlidwka)

* process: add `process.hrtime()` (Nathan Rajlich)

* net, http, https: add localAddress option (Dmitry Nizovtsev)

* addon improvements (Nathan Rajlich)

* build improvements (Ben Noordhuis, Sadique Ali, T.C. Hollingsworth, Nathan Rajlich)

* add support for "SEARCH" request methods (Nathan Rajlich)

* expose the zlib and http_parser version in process.versions (Nathan Rajlich)
2012-03-13 13:02:38 -07:00
isaacs
10dc129a4b Update npm to 1.1.8 2012-03-13 13:02:02 -07:00
Nathan Rajlich
884a209ccf docs: document the repl "exit" event 2012-03-13 19:58:54 +01:00
Nathan Rajlich
f9da776b33 process: listen for the "exit" even on the main repl 2012-03-13 19:58:53 +01:00
Nathan Rajlich
f214758dd1 repl: better SIGINT handling behavior
Before:

☮ ~ (master)  node
> asdf
(^C again to quit)
> sdcasd☮ ~ (master) 

Now:

☮ ~/node (repl)  ./node
> asfs
> sda
>
(^C again to quit)
> scdsdc
> sdcsdc
>
(^C again to quit)
> sdc
>
(^C again to quit)
>
☮ ~/node (repl) 

^ note that each new line above is a ctrl+c sequence
2012-03-13 19:58:52 +01:00
Nathan Rajlich
6b5a34cdf3 repl: remove redundant check of rli.rine.length
It get's set to '' 1 line above, so we know that that's always 0.
2012-03-13 19:58:52 +01:00
Nathan Rajlich
b7ddd30181 repl: make sure the REPL always flushes with a newline 2012-03-13 19:58:51 +01:00
Nathan Rajlich
659d449460 repl: make REPLServer emit an "exit" event
This can happen when "SIGINT" is processed by the readline interface,
or when the user types ".exit" into the REPL.
2012-03-13 19:58:50 +01:00
Nathan Rajlich
4f63f9f327 repl: make REPLServer inherit from EventEmitter
This is because it should emit an "exit" event when "SIGINT" is received
from the readline interface, or when ".exit" is typed by the user.
2012-03-13 19:58:50 +01:00
Nathan Rajlich
109b16d488 repl: use path.resolve() for the module.filename
Windows was seeing: "C:\\path\\to\\cwd/repl"
2012-03-13 19:58:49 +01:00
isaacs
8b79a31333 shebang should make file executable as well 2012-03-13 10:00:59 -07:00
Trent Mick
1cdadb1e3b issue #2697: have 'make install' set npm shebang to use its node 2012-03-13 09:35:42 -07:00
Artur Adib
1cecfee634 Doc highlight fix 2012-03-13 09:30:32 -07:00
isaacs
943c396b86 Fix merge conflict in doc/api/readline.markdown 2012-03-13 09:16:48 -07:00
Christian Ress
c15e6905c4 Added destroy method to Zlib object in zlib.js module 2012-03-13 08:24:09 -07:00
isaacs
4e85257c6e Patches floating on V8 2012-03-12 21:50:31 -07:00
isaacs
e4fc2cbfd3 Upgrade v8 to 3.9.17 2012-03-12 21:46:36 -07:00
isaacs
bcb0cc0b18 Upgrade npm to 1.1.6
* Fix #472 Adds support for os/cpu fields in package.json (Adam Blackburn)
* Don't use existing pkg if explicit
* Install missing deps, even if they are in bundleDependencies
* bundle node-gyp
* Automatically node-gyp build stuff with a bindings.gyp
* Fix #2230 Unpack in place. No folder renaming malarky
* Never create un-listable directories
* Fix cases where an optionalDependency fails to build
* Always ignore .wafpickle-7 files
* fix shrinkwrap test
* Fix: bundleDependencies being re-installed unnecessarily
2012-03-12 21:34:07 -07:00
Nathan Rajlich
9701f1c4b2 process: expose the zlib version in use in process.versions 2012-03-12 23:29:20 +01:00
Ben Noordhuis
531eba18a6 zlib: fix include of zlib.h
Including <zlib.h> may lead to false positives when the user specifies a bad
path in `./configure --shared-zlib --shared-zlib-includes=/path/to/zlib`. If
a zlib.h exists somewhere on the system include path (common on UNIX systems),
the compiler will include that instead, possibly leading to header mismatch
errors that are hard to debug.
2012-03-12 23:22:48 +01:00
Łukasz Walukiewicz
677c2c112c Ignore an empty port component when parsing URLs. 2012-03-12 12:46:56 -07:00
isaacs
a10cfba766 module: remove 'exited', replace 'children' array 2012-03-12 10:27:11 -07:00
Yoshihiro Kikuchi
c450ac343f docs: fix using legacy api in the buffer doc 2012-03-12 15:04:53 +01:00
Nao Iizuka
f8ce384446 docs: correct the description of assert.ok() 2012-03-12 02:27:55 +01:00
Ben Noordhuis
4472f7bbc3 http: use HTTP_METHOD_MAP macro 2012-03-12 02:23:34 +01:00
Ben Noordhuis
79cbe1fdbb deps: upgrade http_parser to 8bec3ea 2012-03-12 02:20:52 +01:00
Ben Noordhuis
407ecc6b5f docs: console.dir() prints to stdout, not stderr 2012-03-12 01:37:34 +01:00
ssuda
9b672bcaa2 tls: parsing multiple values of a key in ssl certificate
Fixes #2864.
2012-03-10 23:43:16 +09:00
Nathan Rajlich
36761b2055 process: expose the http_parser version in process.versions 2012-03-10 00:22:42 +01:00
Ben Noordhuis
ff4a9d381d core: use proper #include directives 2012-03-10 00:14:14 +01:00
Ben Noordhuis
8c02f9b7c8 buffer: throw from constructor if length > kMaxLength
Throw, don't abort. `new Buffer(0x3fffffff + 1)` used to bring down the process
with the following error message:

  FATAL ERROR: v8::Object::SetIndexedPropertiesToExternalArrayData() length
  exceeds max acceptable value

Fixes #2280.
2012-03-09 23:57:03 +01:00
Ben Noordhuis
2589d55611 core: add ThrowError(), ThrowTypeError(), ThrowRangeError() 2012-03-09 23:31:03 +01:00
Ben Noordhuis
296b7a580b cluster: support passing of named pipes
Fixes triggered assertion:

  Assertion failed: (0 && "bad address family"), function GetPeerName,
  file ../src/tcp_wrap.cc, line 237.

Fixes #2870.
2012-03-09 09:42:13 -08:00
Ben Noordhuis
9d72a742e3 uv: upgrade 8c78cb4 2012-03-09 09:42:12 -08:00
Igor Zinkovsky
0c68604823 add jslint to vcbuild.bat 2012-03-08 11:39:39 -08:00
Bert Belder
31ad1d29c7 Merge branch 'v0.6' 2012-03-08 03:14:48 +01:00
Bert Belder
3733a85d8d Windows: include syscall in fs errors 2012-03-08 02:57:44 +01:00
Bert Belder
daaccc7cb7 uv: upgrade to 1ac71a31 2012-03-08 02:57:37 +01:00
Igor Zinkovsky
5ad0140f48 Emit end event only once
fixes #2888

Previously a pair of end events would be emitted if a response was
paused/resumed, and the underlying socket was closed while the
response was paused
2012-03-07 13:37:39 -08:00
Yoshihiro Kikuchi
f82ef0f7c3 http: remove ClientRequest.prototype.pause()
ClientRequest.prototype.pause() is not needed. ClientRequest is a writable
stream and deferring to OutgoingMessage.prototype.pause() is broken, the method
does not exist.
2012-03-07 20:17:36 +01:00
Shea Levy
024451c65c fork: don't clear environment by default
- Set options.env to process.env instead of {} by default.
- Shallow clone the passed options.env in case the user passed process.env directly.
2012-03-07 17:25:59 +01:00
Colton Baker
c84b3c4b73 readline: ignore stray escape sequence
Fixes #2876.
2012-03-07 15:05:34 +01:00
Bert Belder
408f450286 client latency benchmark: don't require('request') 2012-03-07 04:52:29 +01:00
isaacs
150053b3fa Typo in http_server_lag.js script
Thanks, @mscdex
2012-03-06 19:31:16 -08:00
isaacs
fb53986a80 Bash script for running http-simple benchmarks 2012-03-06 18:19:17 -08:00
isaacs
17da4242b0 A server with configurable lag for testing 2012-03-06 18:19:17 -08:00
isaacs
d5fca08da4 A benchmark script for measuring client latency 2012-03-06 18:19:17 -08:00
ssuda
b72d43cbf9 dgram: fix when we call .close() inside 'listening' 2012-03-06 22:20:23 +01:00
Ming Liu
b6023905ff docs: correct repl eval callback signature 2012-03-06 20:46:27 +01:00
Nathan Rajlich
07c886f944 process: add process.hrtime()
This commit adds a high-resolution timer function.
2012-03-06 20:43:55 +01:00
Ben Noordhuis
544e5ee1fb bench: add http_simple_auto benchmark
Starts a server and benchmarks it with ab.
2012-03-06 18:11:53 +01:00
Rlidwka
443071db57 readline: add multiline support 2012-03-06 13:37:42 +01:00
Dmitry Nizovtsev
1e9bcf26ce net, http, https: add localAddress option
Binds to a local address before making the outgoing connection.
2012-03-06 13:35:49 +01:00
Igor Zinkovsky
9ea5a4c468 fix simple/test-process-argv-0 on windows 2012-03-05 16:51:04 -08:00
Shigeki Ohtsu
59c3923672 process: show detailed error message in process.dlopen() 2012-03-06 01:34:39 +01:00
Nathan Rajlich
39ce94276a addon: use absolute paths for the node include dirs
This fixes running gyp_addon from across filesystems on Windows.

This is essentially a gyp bug where it's not relativizing properly
across filesystems. See TooTallNate/node-gyp#15 for the gory details.
2012-03-05 22:53:16 +01:00
Nathan Rajlich
1520c7bf5b addon: add module_root_dir gyp variable
For native modules to use in their gyp files.

It gives the absolute path to the root of the module directory, i.e. where your
main binding.gyp file is located.

This seems helpful for some modules where the build system is more advanced and
using absolute paths is a requirement.
2012-03-05 22:39:12 +01:00
Igor Zinkovsky
e10bd5177f disable simple/test-signal-handler on Windows 2012-03-05 13:20:13 -08:00
isaacs
33f9074a62 Mention marked, and add license to doc generator 2012-03-05 10:59:14 -08:00
isaacs
8258bd467a doc: 'filename' arg not guaranteed ever. 2012-03-05 10:28:47 -08:00
Ben Noordhuis
5ebc05f560 build: disable -fvisibility=hidden if gcc < 4.0.0 2012-03-05 17:03:27 +01:00
Ben Noordhuis
5062741bd7 build: make CC command in -fstrict-aliasing check configurable 2012-03-05 17:03:15 +01:00
Sadique Ali
707863c1fb build: make CC command in host check configurable 2012-03-05 16:56:52 +01:00
Ben Noordhuis
c97b4f1971 build: remove unnecessary link flags from node.gyp 2012-03-05 16:41:51 +01:00
Ben Noordhuis
e0796b6f1f uv: upgrade to a93dc7e 2012-03-05 15:38:43 +01:00
isaacs
959a19e118 lint 2012-03-03 23:48:57 -08:00
isaacs
1d5b6f26fe Merge remote-tracking branch 'ry/v0.6' into v0.6-merge
Conflicts:
	ChangeLog
	Makefile
	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/install.js
	deps/npm/lib/ls.js
	deps/npm/man/man1/npm.1
	deps/npm/man/man1/shrinkwrap.1
	deps/npm/man/man3/npm.3
	deps/npm/man/man3/shrinkwrap.3
	deps/npm/node_modules/request/main.js
	deps/npm/node_modules/request/package.json
	deps/npm/package.json
	deps/uv/src/unix/core.c
	deps/v8/src/conversions-inl.h
	deps/v8/src/elements.cc
	deps/v8/src/version.cc
	doc/about/index.html
	doc/api/assert.markdown
	doc/api/child_process.markdown
	doc/api/cluster.markdown
	doc/api/crypto.markdown
	doc/api/debugger.markdown
	doc/api/dgram.markdown
	doc/api/dns.markdown
	doc/api/documentation.markdown
	doc/api/events.markdown
	doc/api/fs.markdown
	doc/api/globals.markdown
	doc/api/http.markdown
	doc/api/https.markdown
	doc/api/modules.markdown
	doc/api/net.markdown
	doc/api/os.markdown
	doc/api/path.markdown
	doc/api/process.markdown
	doc/api/querystring.markdown
	doc/api/readline.markdown
	doc/api/stdio.markdown
	doc/api/stream.markdown
	doc/api/timers.markdown
	doc/api/tls.markdown
	doc/api/tty.markdown
	doc/api/url.markdown
	doc/api/util.markdown
	doc/api/vm.markdown
	doc/api/zlib.markdown
	doc/api_assets/style.css
	doc/community/index.html
	doc/index.html
	doc/logos/index.html
	doc/template.html
	src/node_version.h
	tools/doc/html.js
	tools/gyp/test/mac/app-bundle/empty.c
2012-03-03 23:38:52 -08:00
isaacs
5ca5ec33cc doc: css consistency on anchor links 2012-03-03 22:58:47 -08:00
isaacs
f1742c93d7 doc: Don't prune Stability indicators 2012-03-03 22:58:29 -08:00
isaacs
a42b4ad44e doc: Typo'd some stability indicators. 2012-03-03 22:12:43 -08:00
isaacs
1d59a73fef doc: Change 'file_system' module to 'fs' as it should be 2012-03-03 17:14:06 -08:00
isaacs
cf6e4d82e7 Use shorter url for /docs/latest/api 2012-03-03 17:08:46 -08:00
isaacs
2e487379ad doc: Stability and Caveats for fs.watch/watchFile 2012-03-03 17:04:02 -08:00
isaacs
f70be203e4 doc: indentation and structure in fs.markdown 2012-03-03 17:04:02 -08:00
isaacs
c368e46e7f doc: Document JSON docs 2012-03-03 17:03:59 -08:00
isaacs
3dfa98c991 doc: Add link to JSON version of doc 2012-03-03 17:03:56 -08:00
isaacs
2d44dcc8be doc: Add stability indicators to documentation 2012-03-03 17:03:52 -08:00
isaacs
4053c01b53 First arg to fs.fchown is an int, not a string
Bug introduced by 26bfb6bea4

Fix isaacs/npm#2225
2012-03-03 14:40:29 -08:00
Igor Zinkovsky
61be6844aa disable fs.watchFile tests on windows 2012-03-03 14:35:21 -08:00
ssuda
578ba76e6c util: fix util.format() formatting of %% 2012-03-03 18:22:34 +01:00
Shigeki Ohtsu
d6f0ecc622 build: fix gcc version check 2012-03-03 18:07:39 +01:00
Shigeki Ohtsu
b6595c4d60 build: remove unused import from configure script 2012-03-03 18:07:22 +01:00
Jimb Esser
78db18739a tls: proxy set(Timeout|NoDelay|KeepAlive) methods
- fix crash calling ClientRequest::setKeepAlive if the underlying request is
  HTTPS.
- fix discarding of callback parameter when calling ClientRequest::setTimeout on
  HTTPS requests.
- fix discarding of noDelay parameter when calling ClientRequest::setNoDelay on
  HTTPS requests.
2012-03-03 00:28:43 +01:00
isaacs
2f256af412 Now working on v0.6.13 2012-03-02 13:09:09 -08:00
isaacs
353bfbaf93 Merge branch 'v0.6.12-release' into v0.6 2012-03-02 13:09:00 -08:00
isaacs
48a2d34cfe 2012.03.02 Version 0.6.12 (stable)
* Upgrade V8 to 3.6.6.24

* dtrace ustack helper improvements (Dave Pacheco)

* API Documentation refactor (isaacs)

* #2827 net: fix race write() before and after connect() (koichik)

* #2554 #2567 throw if fs args for 'start' or 'end' are strings (AJ ONeal)

* punycode: Update to v1.0.0 (Mathias Bynens)

* Make a fat binary for the OS X pkg (isaacs)

* Fix hang on accessing process.stdin (isaacs)

* repl: make tab completion work on non-objects (Nathan Rajlich)

* Fix fs.watch on OS X (Ben Noordhuis)

* Fix #2515 nested setTimeouts cause premature process exit (Ben Noordhuis)

* windows: fix time conversion in stat (Igor Zinkovsky)

* windows: fs: handle EOF in read (Brandon Philips)

* windows: avoid IOCP short-circuit on non-ifs lsps (Igor Zinkovsky)

* Upgrade npm to 1.1.4 (isaacs)
  - windows fixes
  - Bundle nested bundleDependencies properly
  - install: support --save with url install targets
  - shrinkwrap: behave properly with url-installed modules
  - support installing uncompressed tars or single file modules from urls etc.
  - don't run make clean on rebuild
  - support HTTPS-over-HTTP proxy tunneling
2012-03-02 12:36:45 -08:00
isaacs
ef5b0f4c8e css: Fix fonts on api index page navigation 2012-03-02 12:36:45 -08:00
Dave Pacheco
b47ba2c431 disable omit-frame-pointer on solaris systems 2012-03-02 11:26:06 -08:00
isaacs
2d6a076ab3 Patches floating on v8 2012-03-02 11:26:05 -08:00
isaacs
c0c4e008aa Upgrade V8 to 3.6.6.24 2012-03-02 11:26:05 -08:00
isaacs
1bf3a14353 Upgrade npm to 1.1.4 (minor bugfix) 2012-03-02 09:48:25 -08:00
isaacs
054127112c Upgrade npm to 1.1.3
* Update request to support HTTPS-over-HTTP proxy tunneling
* Throw on undefined envs in config settings
* Update which to 1.0.5
* Fix windows UNC busyloop in findPrefix
* Bundle nested bundleDependencies properly
* Alias adduser to add-user
* Doc updates  (Christian Howe, Henrik Hodne, Andrew Lunny)
* ignore logfd/outfd streams in makeEnv() (Rod Vagg)
* shrinkwrap: Behave properly with url-installed deps
* install: Support --save with url install targets
* Support installing naked tars or single-file modules from urls etc.
* init: Don't add engines section
* Don't run make clean on rebuild
* Added missing unicode replacement (atomizer)
2012-03-02 09:31:46 -08:00
Dave Pacheco
edea94c332 dtrace ustack helper improvements
Fixes #2852
2012-03-02 09:29:18 -08:00
Ben Noordhuis
30b29d8f87 build: disable -fstrict-aliasing if gcc < 4.6.0
A compiler bug in older versions of gcc makes it do unsafe optimizations at -O1
and higher. This manifested itself with (at least) gcc 4.5.2 on SmartOS because
it made V8 hang in a busy loop.

See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45883
2012-03-02 09:26:35 -08:00
isaacs
d8c5ba2185 Change test fixture from symlink to regular file
The only test using this is test/simple/test-fs-chmod.js, and it was
treating a.js and a1.js as two separate files, resulting in a race
condition.  (Interestingly enough, it was *not* using the symlink file to
test lchmod, which uses a different temp file.)
2012-03-02 09:17:09 -08:00
Ben Noordhuis
0613af0a20 build: remove --shared-cares configure switch
c-ares is a) bundled with libuv now, and b) contains out-of-tree patches. It no
longer makes sense to link against a shared library.

Fixes #2117.
2012-03-02 16:24:37 +01:00
Igor Zinkovsky
5e803219d8 update libuv to 702f905f73 2012-03-01 14:40:04 -08:00
Igor Zinkovsky
9be20afeb5 update libuv to 6bbccf1fe0 2012-03-01 14:12:19 -08:00
Igor Zinkovsky
67b10f816c fix test-net-pipe-connect-errors for windows 2012-03-01 14:09:10 -08:00
Ben Noordhuis
3aa2fd3b2c uv: upgrade to b3fe183 2012-03-01 17:02:20 +01:00
Vincent Ollivier
8cdbf014bd test: fix typo in test-child-process-stdout-flush 2012-03-01 16:52:46 +01:00
isaacs
a63ce6ea94 Merge branch 'json-api-v0.6' into v0.6 2012-02-29 16:05:18 -08:00
isaacs
4ca3fd0a01 Handle miscs better 2012-02-29 16:04:56 -08:00
isaacs
86d077da00 Debugger should be a misc, not 'concept' 2012-02-29 16:04:55 -08:00
isaacs
17db291b5c 'Events' is a module, not an event named 's' 2012-02-29 16:04:55 -08:00
isaacs
7bfa5cf284 s/streams/stream/ 2012-02-29 16:04:55 -08:00
isaacs
674416fbc9 s/buffers/buffer/ 2012-02-29 16:04:55 -08:00
isaacs
b34feeeb86 doc refactor: zlib 2012-02-29 16:04:55 -08:00
isaacs
169b0820f0 doc refactor: vm 2012-02-29 16:04:55 -08:00
isaacs
3c195d04f3 doc refactor: util 2012-02-29 16:04:54 -08:00
isaacs
c417de409d doc refactor: url 2012-02-29 16:04:54 -08:00
isaacs
c2f6405a0f doc refactor: tty 2012-02-29 16:04:54 -08:00
isaacs
c0446edcc2 doc refactor: tls 2012-02-29 16:04:54 -08:00
isaacs
4ed05da2be doc refactor: timers 2012-02-29 16:04:54 -08:00
isaacs
8d1e5d3ae1 doc refactor: synopsis 2012-02-29 16:04:54 -08:00
isaacs
774c289ba8 doc refactor: streams 2012-02-29 16:04:53 -08:00
isaacs
8e22004cb5 doc refactor: stdio 2012-02-29 16:04:53 -08:00
isaacs
d39297251f doc refactor: repl 2012-02-29 16:04:53 -08:00
isaacs
3b6c1d74c7 doc refactor: readline 2012-02-29 16:04:53 -08:00
isaacs
798f8a0dc1 doc refactor: querystring 2012-02-29 16:04:53 -08:00
isaacs
e083720d54 doc refactor: process 2012-02-29 16:04:53 -08:00
isaacs
3ce782b7f2 doc refactor: path 2012-02-29 16:04:52 -08:00
isaacs
8a121fa0e7 doc refactor: os 2012-02-29 16:04:52 -08:00
isaacs
e8ad5b9c1c doc refactor: net 2012-02-29 16:04:52 -08:00
isaacs
e88a1ba74a doc refactor: modules 2012-02-29 16:04:52 -08:00
isaacs
c205d3b53a doc refactor: https 2012-02-29 16:04:52 -08:00
isaacs
4f24b20fcb doc refactor: http 2012-02-29 16:04:52 -08:00
isaacs
a62ec4437b doc refactor: globals 2012-02-29 16:04:51 -08:00
isaacs
2a6ff3f56b doc refactor: fs 2012-02-29 16:04:51 -08:00
isaacs
14d4fbb002 doc refactor: events 2012-02-29 16:04:51 -08:00
isaacs
cacb28c92c doc refactor: dns 2012-02-29 16:04:51 -08:00
isaacs
db8c55e77c doc refactor: dgram 2012-02-29 16:04:51 -08:00
isaacs
f775c5cea4 doc refactor: debugger 2012-02-29 16:04:50 -08:00
isaacs
032b877f31 doc refactor: crypto 2012-02-29 16:04:50 -08:00
isaacs
6738d82e38 doc refactor: cluster 2012-02-29 15:24:27 -08:00
isaacs
03d6aa07ea doc refactor: buffers 2012-02-29 15:23:04 -08:00
isaacs
d383954ffe doc refactor: assert 2012-02-29 15:23:00 -08:00
isaacs
5d4e3d2d0c doc refactor: appendix_1 2012-02-29 15:22:56 -08:00
isaacs
df5be65415 doc refactor: addons 2012-02-29 15:22:53 -08:00
isaacs
d71f9944cc Add 'about these docs' section 2012-02-29 15:22:48 -08:00
isaacs
f28d482cd4 s/child_processes/child_process/
Conflicts:

	doc/api/child_process.markdown
2012-02-29 15:20:53 -08:00
isaacs
5824881e4a Remove empty sections 2012-02-29 15:20:13 -08:00
isaacs
1a181315eb Increase contrast of links, decrease contrast of bullets 2012-02-29 15:20:06 -08:00
isaacs
63629614cb Update styles to reflect changed api doc html structure 2012-02-29 15:19:59 -08:00
isaacs
8cd13eb74e Update template to use new token style
Conflicts:

	doc/template.html
2012-02-29 15:19:47 -08:00
isaacs
ffcdcc7ff0 Use new doc generation tool
Conflicts:

	Makefile
2012-02-29 15:18:51 -08:00
isaacs
4051c2843b docs: Move images out of the dist tarball
This puts all images in doc/images/ and references them via
http://nodejs.org/images/.

Any complaints about copyright usage etc. can thus be node/joyent's
problem, rather than the problem of a downstream distribution channel.

Conflicts:

	Makefile
2012-02-29 15:17:55 -08:00
isaacs
217bb47b02 New documentation generation tool 2012-02-29 15:15:25 -08:00
Ben Noordhuis
bab59f33e7 uv: upgrade to 0459097 2012-02-29 16:16:13 +01:00
Ben Noordhuis
ebb79cdaba Revert "test-fs-watch: Add faster failure, and link to #2813"
This reverts commit 9a6f936c8a.
2012-02-29 14:26:04 +01:00
Blake Miner
7343f8e776 tls: add honorCipherOrder option to tls.createServer()
Documented how to mitigate BEAST attacks.
2012-02-29 02:16:08 +01:00
Joshua Holbrook
56cfcea4b4 child_process: remove dummy "setsid" option setting 2012-02-29 02:10:56 +01:00
Joshua Holbrook
4065b241e8 child_process: remove dummy "setsid" option setting 2012-02-29 02:06:20 +01:00
Ben Noordhuis
af7960b295 uv: upgrade to 2f886c8 2012-02-28 18:11:48 +01:00
Shigeki Ohtsu
18acdff8d3 build: fix the help output of vcbuild.bat 2012-02-28 17:27:52 +01:00
koichik
cd5d2473a4 net: fix race write() before and after connect()
Fixes #2827.
2012-02-28 19:57:13 +09:00
koichik
63431796f4 net: fix race write() before and after connect()
Fixes #2827.
2012-02-28 19:27:27 +09:00
isaacs
44daa9836b Wrap NodeScript binding class in JavaScript layer
This makes it easy to prevent errors where Script methods
are called on non-script objects, resulting in Assertion failures.
2012-02-27 17:28:42 -08:00
isaacs
29463cb60c Update argv0 test to verify correct behavior 2012-02-27 16:41:30 -08:00
isaacs
692bcbe559 Revert "docs: split TOC into two parts: overview and API"
This reverts commit cd4cb8e795.
2012-02-27 15:53:20 -08:00
AJ ONeal
493a6bb19a [ISSUE #2554 #2567] throw if fs args for 'start' or 'end' are strings 2012-02-27 14:18:51 -08:00
AJ ONeal
7f58d207f3 [ISSUE #2554 #2567] throw if fs args for 'start' or 'end' are strings 2012-02-27 14:17:09 -08:00
Nathan Rajlich
ba0892ba91 build: build addons into the "build" dir instead of "out"
This matches the old node-waf system. Having two different dirs for this stuff
is dumb.
2012-02-27 14:04:46 -08:00
Mathias Bynens
483edbdf1a punycode: Update to v1.0.0 2012-02-27 14:03:18 -08:00
Mathias Bynens
cacd651ec6 punycode: Update to v1.0.0 2012-02-27 14:00:18 -08:00
isaacs
50cfeef65e Remove -Wall from v8 build 2012-02-27 13:55:23 -08:00
isaacs
412cebec9e v8: Remove OutputDirectory from build/common.gypi 2012-02-27 13:43:58 -08:00
isaacs
2e24ded6d2 Upgrade v8 to 3.9.11 2012-02-27 13:43:31 -08:00
Igor Zinkovsky
70a393ea9a update libuv to 9a5c1bad90 2012-02-27 13:16:06 -08:00
isaacs
4f8d7328a4 Fix #2822 Only remove logo images, not logo html 2012-02-27 13:08:54 -08:00
isaacs
fde26002f1 v8: Remove OutputDirectory from build/common.gypi 2012-02-27 12:11:10 -08:00
isaacs
f4641bd4de Update v8 to 3.9.9 2012-02-27 12:11:09 -08:00
Shigeki Ohtsu
82ad1f87fa Fix #2830 for the old gcc bug on SmartOS 2012-02-27 12:02:25 -08:00
isaacs
0e7dad3f6e Merge branch 'json-api-docs' 2012-02-27 12:00:27 -08:00
isaacs
7af2d6b985 Handle miscs better 2012-02-27 11:44:36 -08:00
isaacs
909ea3008e Debugger should be a misc, not 'concept' 2012-02-27 11:44:30 -08:00
isaacs
5571c1aaa4 'Events' is a module, not an event named 's' 2012-02-27 11:37:26 -08:00
isaacs
f9df88c6da s/streams/stream/ 2012-02-27 11:18:10 -08:00
isaacs
f9e464f95a s/buffers/buffer/ 2012-02-27 11:14:38 -08:00
isaacs
9fe92590b2 doc refactor: zlib 2012-02-27 11:14:38 -08:00
isaacs
f4720d8dbd doc refactor: vm 2012-02-27 11:14:38 -08:00
isaacs
8e6086b403 doc refactor: util 2012-02-27 11:14:37 -08:00
isaacs
a54b70a355 doc refactor: url 2012-02-27 11:14:37 -08:00
isaacs
cf4700aff4 doc refactor: tty 2012-02-27 11:14:37 -08:00
isaacs
c9b35b9923 doc refactor: tls 2012-02-27 11:14:37 -08:00
isaacs
c4d6c7f829 doc refactor: timers 2012-02-27 11:14:37 -08:00
isaacs
f0694e1e0c doc refactor: synopsis 2012-02-27 11:14:36 -08:00
isaacs
03968739c5 doc refactor: streams 2012-02-27 11:14:36 -08:00
isaacs
94c6bcfdad doc refactor: stdio 2012-02-27 11:14:36 -08:00
isaacs
dfdf09d43d doc refactor: repl 2012-02-27 11:14:36 -08:00
isaacs
728386bfb2 doc refactor: readline 2012-02-27 11:14:35 -08:00
isaacs
628bc835ae doc refactor: querystring 2012-02-27 11:14:35 -08:00
isaacs
a52254d0d7 doc refactor: process 2012-02-27 11:14:35 -08:00
isaacs
aef61ee367 doc refactor: path 2012-02-27 11:14:35 -08:00
isaacs
0e752246d3 doc refactor: os 2012-02-27 11:14:35 -08:00
isaacs
2fd5cb3d2e doc refactor: net 2012-02-27 11:14:34 -08:00
isaacs
0cf7156f08 doc refactor: modules 2012-02-27 11:14:34 -08:00
isaacs
2806c6ce28 doc refactor: https 2012-02-27 11:14:34 -08:00
isaacs
02e288b640 doc refactor: http 2012-02-27 11:14:34 -08:00
isaacs
af7314e190 doc refactor: globals 2012-02-27 11:14:34 -08:00
isaacs
40190b7c92 doc refactor: fs 2012-02-27 11:14:33 -08:00
isaacs
ec02e82760 doc refactor: events 2012-02-27 11:14:33 -08:00
isaacs
2f148845e8 doc refactor: dns 2012-02-27 11:14:33 -08:00
isaacs
9a0495a4b0 doc refactor: dgram 2012-02-27 11:14:33 -08:00
isaacs
dd1b3b6dfd doc refactor: debugger 2012-02-27 11:14:33 -08:00
isaacs
ab294ad93d doc refactor: crypto 2012-02-27 11:14:32 -08:00
isaacs
6e51db1268 doc refactor: cluster 2012-02-27 11:14:32 -08:00
isaacs
60aa852a03 doc refactor: buffers 2012-02-27 11:14:32 -08:00
isaacs
97ee38707b doc refactor: assert 2012-02-27 11:14:32 -08:00
isaacs
44559a3211 doc refactor: appendix_1 2012-02-27 11:14:32 -08:00
isaacs
24a2706a3b doc refactor: addons 2012-02-27 11:14:31 -08:00
isaacs
11d27367cd Add 'about these docs' section 2012-02-27 11:14:31 -08:00
isaacs
bd880e7f3f s/child_processes/child_process/ 2012-02-27 11:14:24 -08:00
isaacs
3bec62b012 Remove empty sections 2012-02-27 11:14:16 -08:00
isaacs
3d5f7594b5 Increase contrast of links, decrease contrast of bullets 2012-02-27 11:01:53 -08:00
isaacs
ac5e7072c9 Update styles to reflect changed api doc html structure 2012-02-27 11:01:33 -08:00
isaacs
7aee49d967 Update template to use new token style 2012-02-27 10:59:51 -08:00
isaacs
7d6d5e263e Use new doc generation tool 2012-02-27 10:59:35 -08:00
isaacs
964d03bc3f New documentation generation tool 2012-02-27 10:59:01 -08:00
tedsuo
cd4cb8e795 docs: split TOC into two parts: overview and API
Fixes #2090.
Fixes #2336.
2012-02-27 17:36:20 +09:00
Ben Noordhuis
90fd70d284 docs: fix http.ClientRequest.write() documentation
'an array of integers' == very, very deprecated
2012-02-27 04:00:22 +01:00
Nathan Rajlich
aa35564ca1 Use NODE_MODULE in the hello-world addon example.
Fixes Windows throwing "unknown error" when trying to require the .node file.
2012-02-27 02:44:33 +01:00
Nathan Rajlich
3f1f2d1497 addon: write gyp generated files to the 'out' dir 2012-02-27 02:40:09 +01:00
T.C. Hollingsworth
d03b8487c6 build: support shared zlib 2012-02-27 02:31:23 +01:00
Nathan Rajlich
3c68c85f18 build: use -pthreads (not -pthread) on Solaris 2012-02-27 02:28:06 +01:00
T.C. Hollingsworth
2d7b43f466 build: use else instead of node_shared_v8==false 2012-02-26 00:32:36 +01:00
koichik
ae762b620e docs: add ciphers option to https.request() 2012-02-25 23:17:05 +09:00
koichik
2f5e084147 docs: remove duplicate option of tls.connect() 2012-02-25 23:07:30 +09:00
Roly Fentanes
db8940dae2 newListener emits correct fn when using once
Fixes #2826.
2012-02-25 15:37:38 +09:00
isaacs
ca0986fbd1 Update npm to 1.1.2 2012-02-24 18:52:17 -08:00
isaacs
d4d45a1757 Update npm to 1.1.2 2012-02-24 18:51:22 -08:00
Maciej Małecki
27a937bcf8 Revert "startup: use path.resolve instead of path.join(cwd, ...)"
This reverts commit b0c1541227.

Reverted commit introduced a regression causing `process.argv[0]` to be
invalid in node processes spawned from `PATH` (without explicit path to
executable file - for example when using global node installation).

Instead of finding a correct path to the executable, `process.cwd()`
would be prepended to `process.argv[0]`.
2012-02-23 20:23:26 -08:00
Maciej Małecki
b73ec84ce1 test: test for process.argv[0] correctness
joyent/node@b0c1541227 introduced a
regression causing `process.argv[0]` to be invalid in node processes
spawned from `PATH` (without explicit path to executable file - for
example when using global node installation).

Instead of finding a correct path to the executable, `process.cwd()`
would be prepended to `process.argv[0]`.
2012-02-23 20:23:24 -08:00
Nathan Rajlich
a84adad078 Default node_shared_v8 to false.
Fixes #2818.
2012-02-23 14:52:39 -08:00
isaacs
59ecf2ccf7 Revert "Revert "build: support shared V8 properly""
This reverts commit a9130222bd.
2012-02-23 14:52:18 -08:00
isaacs
f492baa61d Now working on 0.7.6 2012-02-23 14:41:36 -08:00
isaacs
c5cbc3db47 Merge branch 'v0.7.5-release' 2012-02-23 14:39:58 -08:00
isaacs
d384b8b0d2 2012.02.23, Version 0.7.5 (unstable)
* startup speed improvements (Maciej Małecki)

* crypto: add function getDiffieHellman() (Tomasz Buchert)

* buffer: support decoding of URL-safe base64 (Ben Noordhuis)

* Make QueryString.parse() even faster (Brian White)

* url: decode url entities in auth section (Ben Noordhuis)

* http: support PURGE request method (Ben Noordhuis)

* http: Generate Date headers on responses (Mark Nottingham)

* Fix #2762: Add callback to close function. (Mikeal Rogers)

* dgram: fix out-of-bound memory read (Ben Noordhuis)

* repl: add automatic loading of built-in libs (Brandon Benvie)

* repl: remove double calls where possible (Fedor Indutny)

* Readline improvements. Related: #2737 #2756 (Colton Baker)

* build: disable -fomit-frame-pointer on solaris (Dave Pacheco)

* build: arch detection improvements (Nathan Rajlich)

* build: Make a fat binary for the OS X `make pkg`. (Nathan Rajlich)

* jslint src/ and lib/ on 'make test' (isaacs)
2012-02-23 14:12:39 -08:00
isaacs
a9130222bd Revert "build: support shared V8 properly"
This reverts commit 3d1b670640.

Breaks build on windows.
https://gist.github.com/1895279
2012-02-23 14:12:14 -08:00
Shigeki Ohtsu
c1fcb1db99 build: change default BUILDTYPE of vcbuild.bat
From Debug to Release.
2012-02-23 14:11:26 +01:00
Shigeki Ohtsu
491ec171ec build: change default BUILDTYPE of gyp to Release 2012-02-23 14:11:26 +01:00
Shigeki Ohtsu
58e5d69250 build: fix the case where config.gypi doesn't exist 2012-02-23 14:11:26 +01:00
Shigeki Ohtsu
680d75af34 build: make default_configuration consistent with BUILDTYPE 2012-02-23 14:11:26 +01:00
Ben Noordhuis
b92a919500 Remove unused variables. 2012-02-23 04:11:07 -08:00
isaacs
1b5048b288 doc: refer to modules doc rather than src/node.js 2012-02-23 00:18:17 -08:00
isaacs
d3b8372615 lint, missed in QS speed merge 2012-02-22 20:58:24 -08:00
isaacs
73806b56e5 Add new authors 2012-02-22 20:58:24 -08:00
isaacs
9a6f936c8a test-fs-watch: Add faster failure, and link to #2813 2012-02-22 20:57:55 -08:00
isaacs
92cb684e78 Change test fixture from symlink to regular file
The only test using this is test/simple/test-fs-chmod.js, and it was
treating a.js and a1.js as two separate files, resulting in a race
condition.  (Interestingly enough, it was *not* using the symlink file to
test lchmod, which uses a different temp file.)
2012-02-22 20:57:43 -08:00
Ben Noordhuis
3502e45b6c dgram: defer send error to next tick 2012-02-23 02:07:39 +01:00
Ben Noordhuis
defa637378 dgram: fix out-of-bound memory read 2012-02-23 02:07:39 +01:00
Colton Baker
fd61bfc731 readline: ^Z (SIGSTP) handling
Bugfix and update.

- Fixed bug where Node's REPL wouldn't continue when returning from ^Z
  (SIGTSTP)
- Removed old readline callback

Readline API update with docs.

- ^Z (SIGTSTP) is now bypassed on Windows systems.
- SIGCONT is now bypassed on Windows systems.
- Docs updated to reflect above.
2012-02-22 16:07:23 -08:00
Colton Baker
ac9fa2b846 Removed rl.on('close', ...) callback 2012-02-22 16:05:55 -08:00
isaacs
e004721b48 Make a fat binary for the OS X pkg 2012-02-22 15:58:02 -08:00
Nathan Rajlich
e60b18bbdf Make a fat binary for the OS X make pkg. 2012-02-22 14:27:08 -08:00
Cam Pedersen
7f94b5ccca docs: remove duplicate socket.write 2012-02-22 22:20:57 +01:00
Igor Zinkovsky
35c1f682c1 update libuv to c0e7044862 2012-02-22 12:04:39 -08:00
T.C. Hollingsworth
3d1b670640 build: support shared V8 properly
-don't pull in bundled v8 as a dependency when node_shared_v8==true
-use node_shared_v8_includes for v8.h and v8-debug.h
2012-02-22 15:20:23 +01:00
Myles Byrne
21374c3903 build: remove unused makefile target 2012-02-22 14:25:56 +01:00
isaacs
634b4de2c8 Pause process.stdin in stdin getter
Otherwise, it'll be ref'ed, and keep the process hanging.
2012-02-21 15:31:50 -08:00
isaacs
27d8b059fa Pause process.stdin in stdin getter
Otherwise, it'll be ref'ed, and keep the process hanging.
2012-02-21 15:26:35 -08:00
Brian White
5e3ca98155 Make QueryString.parse() even faster 2012-02-21 12:17:26 -08:00
isaacs
186960fefb Add Håvard Stranden to AUTHORS file 2012-02-21 12:04:09 -08:00
isaacs
3817b12fec Add Håvard Stranden to AUTHORS file 2012-02-21 12:03:15 -08:00
isaacs
bae4018b30 Run jslint after tests, not before 2012-02-21 12:02:57 -08:00
Fedor Indutny
c6019b8b4e docs: remove server.pause
This functionality was removed when libuv landed in node. It is useless
and can be easily implemented in user-land.
2012-02-21 20:52:40 +06:00
Fedor Indutny
080ffb8b2c docs: remove server.pause
This functionality was removed when libuv landed in node. It is useless
and can be easily implemented in user-land.
2012-02-21 20:50:01 +06:00
Ben Noordhuis
b9127eb0a5 buffer: support decoding of URL-safe base64 2012-02-21 15:33:14 +01:00
Andreas Madsen
feff9bbb67 docs: remove setSecure() from net module docs
socket.setSecure() was removed in v0.3 and there are no deprecated warning in
code it should be removed from the documentation in 0.7
2012-02-21 15:18:16 +01:00
Tomasz Buchert
c6a04ce78f crypto: add function getDiffieHellman()
Returns a well known, predefined RFC group.
2012-02-21 14:07:25 +01:00
Nathan Rajlich
19133cac02 build: better host_arch() definition in configure
On one of my OS X Lion machines, it always reports i386, even though 64-bit
is supported. This lookup better matches how WAF determines the host arch,
which was correctly getting 64-bit even on this screwy machine.
2012-02-20 22:14:23 +01:00
Maciej Małecki
da908364a8 tls http https: don't pollute user's options object 2012-02-20 21:58:00 +01:00
Maciej Małecki
c6c6f98f1c util: add util._extend for extending objects
There were 2 duplicates with such functionality in `cluster` and
`child_process` modules which were replaced by this function.
2012-02-20 21:58:00 +01:00
Andreas Madsen
3f4062309e core: ignore too many arguments, don't assert 2012-02-20 21:55:35 +01:00
Ben Noordhuis
f116e17a23 test: update HTTP basic auth test
Verify that URL-encoded entities are properly encoded into the Authorization
header.
2012-02-20 17:24:14 +01:00
Ben Noordhuis
86f4846c21 url: decode url entities in auth section
Fixes #2736.
2012-02-20 17:11:21 +01:00
Fedor Indutny
0cebfc8ddb tests: kill process group on failure
Test suite is often leaving `stray` processes on failure. They are
harmless, but may cause future test runs fail because those `stray`
processes are occupying `common.PORT` or due to some other reasons.

Killing whole process group on test suite failure should help in such
cases.
2012-02-20 22:07:19 +06:00
Ben Noordhuis
de5e3f6a6f http: support PURGE request method 2012-02-20 16:12:48 +01:00
Ben Noordhuis
f0c5165f81 http_parser: upgrade to 62110ef 2012-02-20 16:12:33 +01:00
Maciej Małecki
b0c1541227 startup: use path.resolve instead of path.join(cwd, ...) 2012-02-20 16:04:44 +01:00
Maciej Małecki
1109c8fc4e startup: move EventEmitter closer to the lookup
This makes startup faster by ~0.2 ms on my computer.
2012-02-20 16:04:44 +01:00
Maciej Małecki
c3a9733ac1 startup: use .hasOwnProperty instead of in
Benchmarks show that `.hasOwnProperty` is faster than `in` in V8. It
makes startup ~0.5 ms faster on my computer.
2012-02-20 16:04:44 +01:00
Brandon Benvie
b72277183f repl: add automatic loading of built-in libs 2012-02-20 13:56:27 +01:00
Luke Gallagher
8d3c46daa8 util: fix typo in lib/util.js 2012-02-20 13:42:27 +01:00
Ben Noordhuis
999757983c test: don't let debugger listen on common.PORT
simple/test-debugger-repl-utf8 has a tendency to fail and leave behind a stray
process that listens on common.PORT, making later tests fail with EADDRINUSE.
2012-02-20 13:31:00 +01:00
Ben Noordhuis
7f4aba91d3 test: include common.js in all tests 2012-02-20 13:29:11 +01:00
Nathan Rajlich
028043dd02 build: map i686 to ia32 2012-02-20 11:49:57 +01:00
Nathan Rajlich
546870edd8 build: use proper -arch for target_arch on OS X 2012-02-20 11:49:32 +01:00
Nathan Rajlich
af4a96ce6e build: test uname -m first, then uname -p
Prevent false i386 on 64-bit OS X.
2012-02-20 11:49:25 +01:00
Ben Noordhuis
4af673e161 gyp: update to r1214 2012-02-20 11:47:03 +01:00
koichik
7ae0d473a6 test: fix test-tls-over-http-tunnel with v0.7 2012-02-19 11:46:58 -08:00
Mikeal Rogers
d530ee62cd Issue #2762. Add callback to close function. 2012-02-18 17:46:28 -08:00
isaacs
96338432e2 jslint src/ and lib/ on 'make test' 2012-02-18 16:04:10 -08:00
isaacs
0cdf85e28d Lint all the JavaScripts. 2012-02-18 15:34:57 -08:00
Ben Noordhuis
96a137a18a docs: update man page 2012-02-18 22:36:34 +01:00
isaacs
31721da4b1 Merge remote-tracking branch 'ry/v0.6' into v0.6-merge
Conflicts:
	AUTHORS
	ChangeLog
	Makefile
	doc/about/index.html
	doc/api/tls.markdown
	doc/community/index.html
	doc/index.html
	doc/logos/index.html
	doc/template.html
	lib/http.js
	lib/tls.js
	src/node_version.h
	src/platform_win32.cc
	test/simple/test-tls-connect-given-socket.js
2012-02-18 09:46:58 -08:00
Paul Vorbach
c1f474010e docs: fix quotation style in the webserver example
Replace " by '
2012-02-18 02:05:12 +01:00
Nathan Rajlich
0787287021 build: remove 'config.mk' during make distclean 2012-02-18 00:34:19 +01:00
Dave Pacheco
7864bb9eb8 build: disable -fomit-frame-pointer on solaris
This "optimization" cripples debuggability and has dubious performance value,
so we want to disable it at least on SmartOS.
2012-02-18 00:30:00 +01:00
Ben Noordhuis
23c4278e06 docs: fix tls markdown 2012-02-17 23:58:42 +01:00
isaacs
dfed2cef75 Merge branch 'v0.6.11-release' into v0.6 2012-02-17 13:35:52 -08:00
isaacs
f73f07e126 Now working on 0.6.12 2012-02-17 13:33:58 -08:00
isaacs
1eb1fe3225 2012.02.17 Version 0.6.11 (stable)
* http: allow multiple WebSocket RFC6455 headers (Einar Otto Stangvik)

* http: allow multiple WWW-Authenticate headers (Ben Noordhuis)

* windows: support unicode argv and environment variables (Bert Belder)

* tls: mitigate session renegotiation attacks (Ben Noordhuis)

* tcp, pipe: don't assert on uv_accept() errors (Ben Noordhuis)

* tls: Allow establishing secure connection on the existing socket (koichik)

* dgram: handle close of dgram socket before DNS lookup completes (Seth Fitzsimmons)

* windows: Support half-duplex pipes (Igor Zinkovsky)

* build: disable omit-frame-pointer on solaris systems (Dave Pacheco)

* debugger: fix --debug-brk (Ben Noordhuis)

* net: fix large file downloads failing (koichik)

* fs: fix ReadStream failure to read from existing fd (Christopher Jeffrey)

* net: destroy socket on DNS error (Stefan Rusu)

* dtrace: add missing translator (Dave Pacheco)

* unix: don't flush tty on switch to raw mode (Ben Noordhuis)

* windows: reset brightness when reverting to default text color (Bert Belder)

* npm: update to 1.1.1
  - Update which, fstream, mkdirp, request, and rimraf
  - Fix #2123 Set path properly for lifecycle scripts on windows
  - Mark the root as seen, so we don't recurse into it. Fixes #1838. (Martin Cooper)
2012-02-17 12:39:45 -08:00
isaacs
a2851b6234 Revert "cluster: propagate bind errors"
This reverts commit 30e462e919.
2012-02-17 12:39:45 -08:00
isaacs
4672872ddd Fix #2770 Compile the OS X pkg as ia32 2012-02-17 12:39:45 -08:00
Maciej Małecki
977e211421 debugger: rename process.debug_port to process.debugPort
We should comply to to camelCase naming convention.
2012-02-18 00:45:56 +06:00
Fedor Indutny
ae5e23310e repl: remove double calls where possible
Repl is doing double evaluation of code: wrapped in parens and without
them. That's needed to allow users typing multiline chunks of code by
handling syntax errors on repl side. However if function declaration is
wrapped in parens (`(function a() {})`) calling it will be impossible,
so we're evaluating functions twice. That works fine for declaration,
but if entered code chunk returns function - it should not be called
twice.

fix #2773
2012-02-18 00:30:52 +06:00
Shannen Saez
9764bea97d docs: remove unused javascript includes 2012-02-17 16:13:48 +01:00
Shannen Saez
4ed7b035bd docs: add lang="en" and remove redundant types 2012-02-17 16:13:42 +01:00
Nathan Rajlich
a118f21728 repl: make tab completion work on non-objects 2012-02-17 15:51:33 +01:00
isaacs
7a1a62ec6e Upgrade uv to 86ebe48660e 2012-02-16 15:32:15 -08:00
Ben Noordhuis
30e462e919 cluster: propagate bind errors
This commit fixes a bug where the cluster module failed to propagate EADDRINUSE
errors.

When a worker starts a (net, http) server, it requests the listen socket from
its master who then creates and binds the socket.

Now, OS X and Windows don't always signal EADDRINUSE from bind() but instead
defer the error until a later syscall. libuv mimics this behaviour to provide
consistent behaviour across platforms but that means the worker could end up
with a socket that is not actually bound to the requested addresss.

That's why the worker now checks if the socket is bound, raising EADDRINUSE if
that's not the case.

Fixes #2721.
2012-02-16 23:47:17 +01:00
einaros
83fd1c1de5 Add WebSocket RFC6455 multiheader fields to the http parser. 2012-02-16 14:12:38 -08:00
Ben Noordhuis
2c07712860 http: allow multiple WWW-Authenticate headers 2012-02-16 14:11:49 -08:00
Bert Belder
8f2694bb53 Make win32 ansi api usage explicit
Use widechar versions in a couple of places.
Don't use C-style cast in C++ code.
2012-02-16 22:19:48 +01:00
Bert Belder
d52f5020ce Windows: another attempt to support unicode argv 2012-02-16 20:58:45 +01:00
Bert Belder
9364699be1 Revert "Windows: support non-ansi command line arguments"
CommandLineToArgvW doesn't behave exactly the same as the crt, which makes it useless.
This reverts commit ef032cbe85.
2012-02-16 20:19:33 +01:00
Ben Noordhuis
3415427dbf tls: mitigate session renegotiation attacks
The TLS protocol allows (and sometimes requires) clients to renegotiate the
session. However, renegotiation requires a disproportional amount of server-side
resources, particularly CPU time, which makes it a potential vector for
denial-of-service attacks.

To mitigate this issue, we keep track of and limit the number of renegotiation
requests over time, emitting an error if the threshold is exceeded.
2012-02-16 18:15:21 +01:00
koichik
ef50bd2e54 docs: removed unnecessary STARTTLS section 2012-02-17 02:10:59 +09:00
Colton Baker
ce485791db Readline proposal and bugfixes. Related: #2737 #2756
- Removed extra newline from .question(); Users can input a
  newline if it they require it.
- Removed .close() due to it only emulating closing, causing a bug where
  readline is left open to trigger events such as .on('line', ...').
- Removed ._attemptClose()
- .pause() now triggers event .on('pause', ...)
- .resume() now triggers event .on('resume', ...)
- CTRL-C (SIGINT) in readline will now default to .pause() if no SIGINT event
  is present.
- CTRL-D (delete right) will also default to .pause() if there is nothing to
  delete (signaling the end of the file).
- Added new event `SIGTSTP`
- Added new event `SIGCONT`
- Added `resume` to `write` to resume the stream if paused.
- Docs updated.
- Updated repl.js
2012-02-16 12:12:03 +06:00
Maciej Małecki
3bc3af0276 process: remove old notices about removed methods
These methods were removed a long time ago. Keeping these notices here
makes no sense anymore.

Also, removing this part of code slightly speeds up the startup.
2012-02-15 19:45:33 -08:00
Bert Belder
d91bc7cb09 Windows: get rid of process._cwdForDrive() 2012-02-16 00:10:51 +01:00
Bert Belder
077f9d7293 Windows: use unicode environment 2012-02-16 00:10:33 +01:00
Nathan Rajlich
71e975669c Default to static linking CRT on Windows. 2012-02-15 13:32:46 -08:00
Mark Nottingham
1e425e3fa7 Generate Date headers on responses when not already present. 2012-02-15 12:35:34 -08:00
isaacs
d653732157 Merge branch 'v0.7.4-release' 2012-02-15 11:37:48 -08:00
isaacs
6a2cb6c506 Now working on 0.7.5 2012-02-15 11:37:34 -08:00
Ben Noordhuis
6141386f7e http: allow multiple WWW-Authenticate headers 2012-02-15 17:04:10 +01:00
Ben Noordhuis
0685707bc6 tcp, pipe: don't assert on uv_accept() errors
It's possible for a new connection to be closed in the window between the
accept() syscall and the call to uv_accept(). Deal with it and move on, don't
assert.
2012-02-15 16:45:14 +01:00
isaacs
de21de920c 2012.02.14, Version 0.7.4 (unstable)
* Upgrade V8 to 3.9.5

* Upgrade npm to 1.1.1

* build: Detect host_arch better (Karl Skomski)

* debugger: export `debug_port` to `process` (Fedor Indutny)

* api docs: CSS bug fixes (isaacs)

* build: use -fPIC for native addons on UNIX (Nathan Rajlich)

* Re-add top-level v8::Locker (Marcel Laverdet)

* Move images out of the dist tarballs (isaacs)

* libuv: Remove uv_export and uv_import (Ben Noordhuis)

* build: Support x64 build on Windows (Igor Zinkovsky)
2012-02-14 14:34:43 -08:00
isaacs
0a4f5e8473 robots.txt 2012-02-14 14:34:43 -08:00
Igor Zinkovsky
14b20ffc30 add tls-over-http-tunnel test 2012-02-14 11:53:23 -08:00
koichik
b19b8836c3 tls: Allow establishing secure connection on the existing socket 2012-02-14 11:53:05 -08:00
Seth Fitzsimmons
1ce14eca44 dgram: handle close of dgram socket before DNS lookup completes 2012-02-14 14:10:21 +01:00
isaacs
9a0d90793e doc: Wrap API doc content in div#apicontent 2012-02-13 15:27:41 -08:00
isaacs
df236e75a2 css: Restrict li fix to #apicontent only. 2012-02-13 15:27:32 -08:00
isaacs
a7af84f988 docs: Move images out of the dist tarball
This puts all images in doc/images/ and references them via
http://nodejs.org/images/.

Any complaints about copyright usage etc. can thus be node/joyent's
problem, rather than the problem of a downstream distribution channel.
2012-02-13 15:27:06 -08:00
Fedor Indutny
e7e4f2f3aa Fix linker error on some gcc version on osx
* See: http://codereview.chromium.org/9382033/
2012-02-14 02:36:08 +06:00
Bert Belder
ef032cbe85 Windows: support non-ansi command line arguments 2012-02-13 20:55:29 +01:00
isaacs
3a915b02e8 Upgrade uv to 1d942e2a 2012-02-13 11:10:12 -08:00
isaacs
5041bc1b6c Patches floating on V8
Only SConstruct and build/common.gypi at this point.  All
others are accepted upstream, which greatly simplifies things.
2012-02-13 10:11:28 -08:00
isaacs
68a0c56a7d Upgrade V8 to 3.9.5 2012-02-13 10:05:16 -08:00
Karl Skomski
09ccbef3bb build: detect host_arch better 2012-02-13 17:43:30 +01:00
Bert Belder
2e6ad62047 Add libuv test that was omitted in last libuv upgrade 2012-02-12 21:07:31 +01:00
Bert Belder
c3f176222a Fix vcbuild.bat, print error when an unrecognized option is encountered 2012-02-12 21:04:03 +01:00
Fedor Indutny
3f43b1c039 debugger: export debug_port to process
`process.debug_port` is useful for changing debugger port in runtime,
before starting it (via SIGUSR1).

Using `--port=` argument for debugger repl, tests will run debugger
server on a `common.PORT` (as it usually does for any other servers).

`process._debugEnd()` stops debugger and its server.

* debugger: implemented process._debugEnd(), `node debug --port=5858 app.js`
* test: start debugger repl on common.PORT
* fixes #2613
* fixes #2614
2012-02-12 22:27:12 +06:00
Ben Noordhuis
8a6576f764 Merge remote-tracking branch 'origin/v0.6'
Conflicts:
	common.gypi
2012-02-12 16:12:26 +01:00
Ben Noordhuis
a27320e00f uv: upgrade to 4e1f2b1 2012-02-12 16:12:04 +01:00
koichik
2f759a7090 test: fix timing sensitivity in test-net-write-slow 2012-02-12 02:05:30 +09:00
Ben Noordhuis
d3f6b094c7 docs: update net.Server.address() documentation 2012-02-11 14:24:15 +01:00
isaacs
e9adb7fbbc apidoc css: Footer li's should be sans-serif 2012-02-10 20:55:21 -08:00
isaacs
830d0fe95a Fix #2690 css: Set font size in apidoc LIs to match Ps 2012-02-10 19:38:34 -08:00
Igor Zinkovsky
c7771bc2ec set readable/writable for pipes 2012-02-10 11:28:43 -08:00
Igor Zinkovsky
c9f58cc595 upgrade uv to f9be43a564 2012-02-10 11:27:12 -08:00
Ben Noordhuis
a8f357629d docs: clarify http 'data' callback
Fixes #2733.
2012-02-10 18:51:33 +01:00
Ben Noordhuis
38eec57aef docs: document tls/crypto ciphers option
Hitherto undocumented option that lets the user select the list of ciphers to
use or exclude in a SSL/TLS session.
2012-02-09 17:16:46 +01:00
Nathan Rajlich
d4ccdeaf00 build: use -fPIC for native addons on UNIX
No -fPIC on 32 bits Linux but do enable for the other UNIX flavors.
2012-02-09 14:34:30 +01:00
Ben Noordhuis
cacd3ae004 test: add cluster 'bind twice' test
This test starts two clustered HTTP servers on the same port. It expects the
first cluster to succeed and the second cluster to fail with EADDRINUSE.
2012-02-09 06:32:33 +01:00
isaacs
163900dc68 npm: update to 1.1.1 2012-02-08 12:36:20 -08:00
Andreas Madsen
9da830e895 child_process: stop .disconnect() call if channel is diconnected 2012-02-08 11:42:38 -08:00
Dave Pacheco
e5ed6b91f4 disable omit-frame-pointer on solaris systems 2012-02-08 10:16:19 -08:00
isaacs
02c1cb54aa Makefile: Don't use ** in globs
Many shells don't have GLOBSTAR turned on by default.  This is
why uv and v8 so often don't get cleaned out properly.
2012-02-08 09:59:53 -08:00
Marcel Laverdet
9a6012edd9 Re-add top-level v8::Locker
11d1eca9 added a v8 locker to ease development of 3rd party threading
extensions but it created a condition which would cause node to exit
uncleanly while in debug mode; it was reverted in 7543c38d.

The problem here is that the Locker was being disposed after V8 was torn
down. Adding some scoping fixes that.
2012-02-08 14:40:33 +01:00
isaacs
e612143a89 Now working on 0.7.4 2012-02-07 16:44:57 -08:00
isaacs
99059aad8d 2012.02.07, Version 0.7.3 (unstable)
* Upgrade V8 to 3.9.2

* Revert support for isolates. (Ben Noordhuis)

* cluster: Cleanup docs, event handling, and process.disconnect (Andreas Madsen)

* gyp_addon: link with node.lib on Windows (Nathan Rajlich)

* http: fix case where http-parser is freed twice (koichik)

* Windows: disable RTTI and exceptions (Bert Belder)
2012-02-07 15:42:33 -08:00
isaacs
349cab0b48 Check the version before building tarball
I keep forgetting to do this.  It's such a stupid thing.
2012-02-07 15:41:21 -08:00
Ben Noordhuis
81d18398a8 test: add --debug-brk regression test 2012-02-07 23:42:38 +01:00
Ben Noordhuis
09c296b44d debugger: fix --debug-brk
Commit 840229a forgot to update the debugger special case in lib/module.js

Fixes #2710.
2012-02-07 23:16:40 +01:00
Igor Zinkovsky
0a347559bf enable x64 windows build
use "vcbuild x64" to do x64 build of node.exe
2012-02-07 13:32:53 -08:00
isaacs
986785c9d2 Fix merge-conflicts in HTML
Thanks, @AndreasMadsen
2012-02-06 23:01:17 -08:00
isaacs
116835561d Merge remote-tracking branch 'ry/v0.6'
Conflicts:
	ChangeLog
	deps/v8/src/version.cc
	deps/v8/tools/gyp/v8.gyp
	doc/about/index.html
	doc/community/index.html
	doc/index.html
	doc/logos/index.html
	doc/template.html
	lib/path.js
	lib/querystring.js
	src/node_version.h
2012-02-06 15:43:21 -08:00
isaacs
e5db01ee29 v8: Remove OutputDirectory from build/common.gypi 2012-02-06 15:22:52 -08:00
isaacs
8be699494e Upgrade V8 to 3.9.2 2012-02-06 15:21:49 -08:00
Andreas Madsen
23514fc946 [doc] cluster: remove part about autoFork since this do not exist 2012-02-06 14:54:11 -08:00
Andreas Madsen
1595a6e885 cluster: use process.disconnect method
After adding a .disconect method and connected flag in child_process
we should no longer use the process._channel object.
2012-02-06 14:54:11 -08:00
Andreas Madsen
a20872045a cluster: simplify process event handling
This simplify the internalMessage and exit event handling
And simply relay message and error event to the worker object
Note that the error event was not relayed before
2012-02-06 14:54:11 -08:00
Nathan Rajlich
5e1471c806 gyp_addon: link with node.lib on Windows
Closes GH-2685
2012-02-06 19:02:45 +01:00
koichik
c2dc673eb5 http: fix http-parser is freed twice
after response to CONNECT/Upgrade request.

Fixes #2704.
2012-02-07 02:29:28 +09:00
Ben Noordhuis
832efb1e01 test: remove deprecated isolates test 2012-02-06 17:47:09 +01:00
Bert Belder
2e2df04b35 Windows: disable RTTI and exceptions 2012-02-06 15:59:08 +01:00
Ben Noordhuis
74a8215a86 Revert support for isolates.
It was decided that the performance benefits that isolates offer (faster spin-up
times for worker processes, faster inter-worker communication, possibly a lower
memory footprint) are not actual bottlenecks for most people and do not outweigh
the potential stability issues and intrusive changes to the code base that
first-class support for isolates requires.

Hence, this commit backs out all isolates-related changes.

Good bye, isolates. We hardly knew ye.
2012-02-06 15:44:42 +01:00
Ben Noordhuis
7543c38dca Revert "Add explicit v8 locker"
This reverts commit 11d1eca9f3.

It sporadically (but reproducibly) triggers an assert inside V8:

  Fatal error in /path/to/node/deps/v8/src/isolate.cc, line 1857
  CHECK(CurrentPerIsolateThreadData()->isolate_ == this) failed

Needs further investigation.
2012-02-05 23:36:38 +01:00
koichik
a2cd31cbf1 doc: add the note about 'data' event
Refs #2691.
2012-02-05 19:11:54 +09:00
koichik
0f0af55a0a net: fix large file downloads failing
Fixes #2678.
2012-02-05 17:41:49 +09:00
Marcel Laverdet
11d1eca9f3 Add explicit v8 locker
v8 requires a lock of each thread using the vm, but if none is
explicitly is created it will implicitly create one for you. This
creates issues when trying to build modules which use v8's
multi-threading features because there's no lock to unlock.
2012-02-04 22:19:56 +01:00
Christopher Jeffrey
f64989e63b fs: fix ReadStream fails to read from existing fd
A ReadStream constructed from an existing file descriptor failed to start
reading automatically. Avoids a userspace call to ReadStream.prototype._read().
2012-02-04 22:14:58 +01:00
Stefan Rusu
07a983a602 test: add tcp and https DNS error tests
net-dns-error: specifc test for the net DNS issue.
http-dns-error: now it works for HTTPS as well.
2012-02-04 00:41:24 +01:00
Stefan Rusu
4671e54495 net: destroy socket on DNS error
The socket was never destroyed on DNS errors. This broke some clients, including
lib/https.js.
2012-02-04 00:40:53 +01:00
Bert Belder
68db20656e Rename some occurrences of process_1 back to process 2012-02-03 15:38:08 +01:00
Dave Pacheco
9fb088e3ab dtrace: add missing translator
Add missing translator for node_dtrace_http_*_request_t types.

Fixes #2667.
2012-02-03 14:07:32 +00:00
isaacs
74a2528bd7 Now working on v0.6.11 2012-02-02 17:19:28 -08:00
isaacs
051908e023 2012.02.02, Version 0.6.10 (stable)
* Update V8 to 3.6.6.20

* Add npm msysgit bash shim to msi installer (isaacs)

* buffers: fix intermittent out of bounds error (Ben Noordhuis)

* buffers: honor length argument in base64 decoder (Ben Noordhuis)

* windows: Fix path.exists regression (Bert Belder)

* Make QueryString.parse run faster (Philip Tellis)

* http: avoid freeing http-parser objects too early (koichik)

* timers: add v0.4 compatibility hack (Ben Noordhuis)

* Proper EPERM error code support (Igor Zinkovsky, Brandon Philips)

* dgram: Implement udp multicast methods on windows (Bert Belder)
2012-02-02 16:56:42 -08:00
isaacs
5937d02aed msi: npm bash shim fixes 2012-02-02 16:56:42 -08:00
isaacs
71527e3a55 Patches floating on v8 2012-02-02 15:38:28 -08:00
isaacs
465f57c56f Upgrade v8 to 3.6.6.20 2012-02-02 15:38:28 -08:00
isaacs
30fd2f7bb2 Add npm msysgit bash shim to msi installer 2012-02-02 14:57:12 -08:00
Ben Noordhuis
7e40c7ddc9 buffers: fix intermittent out of bounds error
The base64 decoder would intermittently throw an out-of-bounds exception when
the buffer in `buf.write('', 'base64')` was a zero-sized buffer located at the
end of the slab.

Fixes #2657.
2012-02-02 19:14:06 +01:00
Ben Noordhuis
f101f7c9ba buffers: honor length argument in base64 decoder
Honor the length argument in `buf.write(s, 0, buf.length, 'base64')`. Before
this commit, the length argument was ignored. The decoder would keep writing
until it hit the end of the buffer. Since most buffers in Node are slices of
a parent buffer (the slab), this bug would overwrite the content of adjacent
buffers.

The bug is trivially demonstrated with the following test case:

    var assert = require('assert');
    var a = Buffer(3);
    var b = Buffer('xxx');
    a.write('aaaaaaaa', 'base64');
    assert.equal(b.toString(), 'xxx');

This commit coincidentally also fixes a bug where Buffer._charsWritten was not
updated for zero length buffers.
2012-02-02 19:13:56 +01:00
Bert Belder
67cd05472e uv: upgrade to 267e75d 2012-02-02 17:42:08 +01:00
Bert Belder
e5ea6ad0f0 _makeLong shouldn't turn the empty string into \\?\C:\ 2012-02-02 17:14:03 +01:00
Bert Belder
a661830569 Run path.exists paths through _makeLong 2012-02-02 17:14:01 +01:00
Philip Tellis
5166758927 Make QueryString.parse run faster
Use decodeURIComponent when appropriate, and only fall back to
querystring.decode if it throws, or if the character is a '+'.

Fix #2248
2012-02-01 16:04:01 -08:00
Ben Noordhuis
3deceaf6e7 Revert "Process symlinked shared library as .node"
This reverts commit 7e0bf7d57d.

It's possible to make GYP generate an XCode project that produces a .node file,
hence this commit is no longer needed.
2012-02-01 22:49:56 +01:00
Ben Noordhuis
a9723df1b7 Revert "Process symlinked shared library as .node"
This reverts commit 7e0bf7d57d.

It's possible to make GYP generate an XCode project that produces a .node file,
hence this commit is no longer needed.
2012-02-01 22:28:23 +01:00
isaacs
ec79acb3a6 working on 0.7.3 now 2012-02-01 13:05:04 -08:00
isaacs
a3efcd2006 2012.02.01, Version 0.7.2 (unstable)
* Update V8 to 3.8.9

* Support for sharing streams across Isolates (Igor Zinkovsky)

* #2636 - Fix case where http_parsers are freed too early (koichik)

* url: Support for IPv6 addresses in URLs (Łukasz Walukiewicz)

* child_process: Add disconnect() method to child processes (Andreas Madsen)

* fs: add O_EXCL support, exclusive open file (Ben Noordhuis)

* fs: more specific error messages (Tj Holowaychuk)

* tty: emit 'unknown' key event if key sequence not found (Dan VerWeire, Nathan Rajlich)

* build: compile release build too if BUILDTYPE=Debug (Ben Noordhuis)

* module: fix --debug-brk on symlinked scripts (Fedor Indutny)

* zlib: fix `Failed to set dictionary` issue (Fedor Indutny)

* waf: predict target arch for OS X (Fedor Indutny)
2012-02-01 11:37:12 -08:00
isaacs
05471f5c2a Update v8 to 3.8.9 2012-01-31 18:35:04 -08:00
isaacs
bd21038078 Merge remote-tracking branch 'ry/master' into merge-v0.6 2012-01-31 18:22:10 -08:00
isaacs
18d179c2d8 Merge remote-tracking branch 'ry/v0.6' into master
Conflicts:
	ChangeLog
	deps/uv/src/unix/udp.c
	deps/uv/src/win/fs.c
	deps/uv/src/win/udp.c
	deps/uv/test/test-fs.c
	doc/index.html
	doc/logos/index.html
	doc/template.html
	src/node_version.h
2012-01-31 18:18:00 -08:00
Paddy Byers
7e0bf7d57d Process symlinked shared library as .node 2012-01-31 17:50:16 -08:00
Paddy Byers
840229a825 Tidy _resolveFilename 2012-01-31 17:50:11 -08:00
Igor Zinkovsky
db3c4efd1d support for sharing streams accross isolates 2012-01-31 17:45:50 -08:00
Dan VerWeire
35b3d15194 test: dgram-{broadcast,multicast}-multi-process : prevent false failures
* check exit code of child processes
* wait 1000 ms to exit the child process
* prefix log messages with [PARENT] or [CHILD] to help debugging
* kill all child processes before exiting

Conflicts:

	test/simple/test-dgram-multicast-multi-process.js
2012-01-31 17:37:38 -08:00
Andreas Madsen
33b7fc250f child_process: do not disconnect on exit emit
When using isolate the .fork would break because it had
no .disconnect method. This remove the exit handler there
would call .disconnect since it was not required.
It also change .disconnect to throw if the channel is closed,
this was not possible before because .disconnect would be called
twice.
2012-01-31 17:22:21 -08:00
Bert Belder
fa490f6497 uv: upgrade to 3eb94e9 2012-01-31 17:41:46 +01:00
Bert Belder
0ad2a9a2e0 Small test-dgram-multicast-multi-process fixes
Somehow windows doesn't want to bind to 224.0.0.1. Let's test with a multicast
address that has no special meaning.
2012-01-31 16:46:14 +01:00
Ben Noordhuis
03c4aa6aef build: don't set -mmacosx-version-min
It sets __MAC_OS_X_VERSION_MIN_REQUIRED__, which is what we use for feature
detection.
2012-01-31 15:12:12 +01:00
Andreas Madsen
42ea068a1a Test for ChildProcess.disconnect() 2012-01-31 14:47:12 +01:00
Ben Noordhuis
279e7e7341 fs: add O_EXCL support, exclusive open file 2012-01-31 14:29:32 +01:00
Ben Noordhuis
88b919ea56 fs, test: add file open mode tests 2012-01-31 14:29:27 +01:00
Łukasz Walukiewicz
a94ffdaec5 url: Support for IPv6 addresses in URLs.
Fixes #1138, #2610.
2012-01-31 16:58:41 +09:00
Tj Holowaychuk
26bfb6bea4 more specific fs error messages 2012-01-30 22:11:19 -08:00
Igor Zinkovsky
ff40253566 upgrade uv to 812e410772 2012-01-30 15:57:08 -08:00
Roman Shtylman
e97b961815 add node::SetMethod and node::SetPrototypeMethod
defines cannot be used if the callback is a templated and has
multiple template arguments. The comma separating the arguments
breaks the preprocessor argument handling. Using a templated function
is clearer and more idiomatic in c++.
2012-01-30 20:22:38 +01:00
Andreas Madsen
836344c90e Add disconnect method to forked child processes
This disconnect method allows the child to exit gracefully.
This also adds a disconnect event and connect property.
2012-01-30 16:35:27 +01:00
koichik
3fd13c6426 http: fix free http-parser too early
when the status code is 100 (Continue).

Fixes #2636.
2012-01-31 00:16:01 +09:00
Ben Noordhuis
b221fe9b29 timers: add v0.4 compatibility hack
If a timer callback throws and the user's uncaughtException handler ignores the
exception, other timers that expire on the current tick should still run.

If #2582 goes through, this hack should be removed.

Fixes #2631.
2012-01-30 14:12:23 +01:00
Brandon Benvie
52bd0f93bb core: make .deprecate() warn only once 2012-01-30 14:10:18 +01:00
Brandon Benvie
5403a8ce4c core: add NativeModule.prototype.deprecate
Formalize and cleanup handling of deprecated core methods.
2012-01-30 00:27:07 +01:00
Brandon Benvie
e3c0c86b28 Change removed process methods to be non-enumerable. 2012-01-29 22:17:31 +01:00
Dan VerWeire
e4afb2f724 tty: emit 'unknown' key event if key sequence not found
Add key.code and key.sequence -mad props go out to @TooTallNate
2012-01-28 17:01:04 +01:00
isaacs
ca4b91a1d0 Correct spelling of Ben Noordhuis 2012-01-27 17:08:02 -08:00
isaacs
5756d7916a Now working on 0.6.10 2012-01-27 16:54:40 -08:00
isaacs
f19e20d33f 2012.01.27, Version 0.6.9 (stable)
* dgram: Bring back missing functionality for Unix (Dan VerWeire, Roman Shtylman, Ben Noordnuis)
  - Note: Windows UDP support not yet complete.

* http: Fix parser memory leak (koichik)

* zlib: Fix #2365 crashes on invalid input (Nicolas LaCasse)

* module: fix --debug-brk on symlinked scripts (Fedor Indutny)

* Documentation Restyling (Matthew Fitzsimmons)

* Update npm to 1.1.0-3 (isaacs)

* Windows: fix regression in stat() calls to C:\ (Bert Belder)
2012-01-27 16:32:19 -08:00
Ben Noordhuis
4b6164ab49 uv: upgrade to 332b72e 2012-01-28 01:30:46 +01:00
Ben Noordhuis
22e23473ea uv: upgrade to 16124bb 2012-01-28 00:17:01 +01:00
isaacs
38651521a8 stdout ending test message correction 2012-01-27 13:42:49 -08:00
Ben Noordhuis
14b7c4327f uv: upgrade to 3de0411 2012-01-27 22:32:02 +01:00
Ben Noordhuis
8a413b076e uv: upgrade to 3f1bad2 2012-01-27 22:18:17 +01:00
isaacs
f98999cc16 Properly update npm to 1.1.0-3
Thanks @mscdex for spotting this.
2012-01-27 13:12:07 -08:00
Fedor Indutny
85a86b5fd6 waf: predict target arch for OSX 2012-01-27 20:37:30 +06:00
isaacs
ff0f0aeb40 Fix #2507 Raise errors less agressively when destroying stdio streams
Also, if an error is already provided, then raise the provided
error, rather than throwing it with a less helpful 'stdout cannot
be closed' message.

This is important for properly handling EPIPEs.
2012-01-26 17:55:44 -08:00
Dan VerWeire
a0119af0e4 test: handle unhandled dgram scenarios
- watch for the death of child processes and fail the test if they all die
	- use setTimeout to fail the test if responses are not received and processed in 5000ms
2012-01-26 16:33:56 -08:00
isaacs
5c0f039c9c Update npm to 1.1.0-3 2012-01-26 15:59:26 -08:00
Ben Noordhuis
352febe251 uv: upgrade to 9c76d0d 2012-01-27 00:56:32 +01:00
Ben Noordhuis
f89beaf3ac build: compile release build too if BUILDTYPE=Debug
It's backwards compatible with the old waf build system. If you want to compile
just the debug build, run `make -C out BUILDTYPE=Debug` instead.

Fixes #2615.
2012-01-26 23:49:57 +01:00
Fedor Indutny
c80abfa0e4 zlib: fix Failed to set dictionary issue 2012-01-25 23:35:35 +06:00
Fedor Indutny
ccf7b41a69 module: fix --debug-brk on symlinked scripts
* fixes #1519
2012-01-24 19:07:38 +01:00
Fedor Indutny
27c85727ed module: fix --debug-brk on symlinked scripts
* fixes #1519
2012-01-24 23:13:37 +06:00
Ben Noordhuis
e806ad39d0 net, tls, http: remove socket.ondrain
Replace the ondrain hack with a regular 'drain' listener. Speeds up the
bytes/1024 http benchmark by about 1.2%.
2012-01-24 15:57:50 +01:00
isaacs
5988872ff1 Merge branch 'v0.7.1-release' 2012-01-24 00:11:59 -08:00
koichik
a6f3451e25 http: fix test-http-should-keepalive.js is fail
3df7c90 was removed when conflict was resolved.
2012-01-24 13:57:20 +09:00
isaacs
77f2cb66d1 Now working on 0.7.2 2012-01-23 17:27:08 -08:00
isaacs
a74354735a 2012.01.23, Version 0.7.1 (unstable)
* Update V8 to 3.8.8

* Install node-waf by default (Fedor Indutny)

* crypto: Add ability to turn off PKCS padding (Ingmar Runge)

* v8: implement VirtualMemory class on SunOS (Ben Noordhuis)

* Add cluster.setupMaster (Andreas Madsen)

* move `path.exists*` to `fs.exists*` (Maciej Małecki)

* typed arrays: set class name (Ben Noordhuis)

* libuv bug fixes (Igor Zinkovsky, Ben Noordhuis, Dan VerWeire)
2012-01-23 17:26:20 -08:00
isaacs
40879f33cd Upgrade V8 to 3.8.8 2012-01-23 17:16:27 -08:00
isaacs
b1b16d117e udp: 'interface' is reserved word on windows. 2012-01-23 15:44:53 -08:00
Ben Noordhuis
2775c0e97e dgram: bring back setTTL() 2012-01-24 00:11:45 +01:00
Ben Noordhuis
46e86aa803 dgram: bring back setMulticastLoopback() 2012-01-24 00:11:45 +01:00
Ben Noordhuis
986e612557 uv: upgrade to b88bc43 2012-01-24 00:11:44 +01:00
Ben Noordhuis
57ddf5f50a test: fix typos in error messages 2012-01-24 00:11:44 +01:00
Ben Noordhuis
aef62a03ee test: join multicast group *after* binding 2012-01-24 00:11:44 +01:00
Ben Noordhuis
9037decb28 test: remove erroneous dropMembership() call
The socket is not part of any multicast group. Bug wasn't visible until 6999fb3.
2012-01-24 00:11:21 +01:00
Ben Noordhuis
6999fb3d1e dgram: make addMembership() and dropMembership() conform to v0.4 API
- throw on error, don't return an error code
2012-01-24 00:05:34 +01:00
Ben Noordhuis
fc6a9673c8 dgram: make setBroadcast() conform to v0.4 API
- don't return a value
2012-01-24 00:05:34 +01:00
Ben Noordhuis
ed111975a0 dgram: make setMulticastTTL() conform to v0.4 API
- throw if the ttl argument is not a number
- return the ttl argument (not particulary useful but it's what v0.4 did)

Note that the 0 < ttl < 256 check has *not* been reinstated. On Linux, -1 is a
valid argument to setsockopt(IPPROTO_IP, IP_TTL).
2012-01-24 00:05:34 +01:00
isaacs
f33a35e293 doc: trademark link must be absolute 2012-01-23 13:53:11 -08:00
isaacs
7b93eb0000 doc: Remove default border around logo for MSIE 2012-01-23 13:50:31 -08:00
isaacs
6768d2fc93 doc: Pixel-nudging 2012-01-23 13:11:33 -08:00
isaacs
5c0d11b12a doc: Add images to makefile 2012-01-23 13:11:33 -08:00
isaacs
5d7577c71a doctool: correct improperly nested ul/li handling 2012-01-23 13:11:33 -08:00
isaacs
4fd315192a Add images to doc_assets 2012-01-23 13:11:32 -08:00
Matthew Fitzsimmons
831c8199f6 Nodejs.org design refresh. 2012-01-23 13:11:32 -08:00
Fedor Indutny
667aae596c Merge branch 'v0.6'
Conflicts:
	ChangeLog
	doc/template.html
	lib/cluster.js
	lib/http.js
	lib/tls.js
	src/node.h
	src/node_version.h
	test/simple/test-cluster-kill-workers.js
2012-01-24 00:30:28 +06:00
Ben Noordhuis
2433eeb385 uv: upgrade to 1cca230 2012-01-23 13:35:36 +01:00
Igor Zinkovsky
6c0c00a205 fix windows build 2012-01-23 01:35:11 -08:00
Igor Zinkovsky
f5e742b264 upgrade libuv to edbabe6f83 2012-01-23 01:34:05 -08:00
Maciej Małecki
ff512634ac version: bump NODE_PATCH_VERSION
Patch version hasn't been bumped correctly in
72cbb7492c.
2012-01-22 23:10:32 +01:00
Ben Noordhuis
9edb984274 crypto: silence unused variable warning
`retry` is not used if SSL_PRINT_DEBUG is not defined.
2012-01-22 18:20:03 +01:00
koichik
827180097c test: fix test/simple/test-net-server-max-connections.js is racey
Fixes #1333.
2012-01-22 23:23:04 +09:00
koichik
93298afc4e test: for #2109 2012-01-22 17:35:28 +09:00
Brandon Benvie
f9014438c7 util: use getOwnPropertyDescripter
Change formatProperty in util.js to use Object.getOwnPropertyDescriptor
instead of __lookup[GS]etter__.

Use the cached value from the descriptor to reduce number of property
lookups from 3 to 1.

Fallback to standard lookup if the descriptor is empty. This doesn't
ever happen with normal JS objects (this function is called only when
the key exists) but apparently does with Node's custom ENV interface.

Fixes: #2109.
2012-01-22 17:29:40 +09:00
koichik
3df7c90c30 http: keep-alive should default with HTTP/1.1 server
As RFC 2616 says we should, assume that servers will provide a persistent
connection by default.

> A significant difference between HTTP/1.1 and earlier versions of
> HTTP is that persistent connections are the default behavior of any
> HTTP connection. That is, unless otherwise indicated, the client
> SHOULD assume that the server will maintain a persistent connection,
> even after error responses from the server.

> HTTP/1.1 applications that do not support persistent connections MUST
> include the "close" connection option in every message.

Fixes #2436.
2012-01-22 14:55:41 +09:00
Igor Zinkovsky
6d00c089e3 only ref non-default isolate loops 2012-01-21 14:44:48 -08:00
Maciej Małecki
e10ed097cb path fs: move path.exists* to fs.exists*
`path.exists*` functions show a deprecation warning and call functions
from `fs`. They should be removed later.

test: fix references to `path.exists*` in tests

test fs: add test for `fs.exists` and `fs.existsSync`

doc: reflect moving `path.exists*` to `fs`
2012-01-21 14:37:14 +01:00
Ben Noordhuis
56e34c2f81 http: fix deprecation warning module ID
Mea culpa, I told @mmalecki wrong
2012-01-21 14:34:33 +01:00
Dan VerWeire
f2b1f57f74 dgram: reintroduce setMulticastTTL()
Removed during the early stages of node 0.5 refactoring to libuv.
2012-01-21 03:26:09 +01:00
Dan VerWeire
f749338e1e dgram: reintroduce setBroadcast()
Removed during the early stages of node 0.5 refactoring to libuv.
2012-01-21 03:26:04 +01:00
Roman Shtylman
a38fd6056c dgram: reintroduce addMembership() and dropMembership()
Removed during the early stages of node 0.5 refactoring to libuv.
2012-01-21 03:21:51 +01:00
Ben Noordhuis
08ab306afd uv: upgrade to 497b1ec 2012-01-21 03:14:15 +01:00
Igor Zinkovsky
de78922b12 ref isolate loop 2012-01-20 18:03:05 -08:00
koichik
35fe3eb5c7 http: reduce creating http-parser instances
Fixes #2577.
2012-01-20 16:24:01 -08:00
Nicolas LaCasse
40c93486e8 Fix #2365 zlib crashing on invalid input
Fix zlib crashes on error due to improper use of removeListener
in the error handler
2012-01-20 13:12:32 -08:00
Andreas Madsen
f9a47debfc Add cluster.setupMaster
Fixes #2470
2012-01-20 13:09:56 -08:00
isaacs
f25ec0782e Add missing ChangeLog item re: fs.stat improvement
This was a very significant improvement that should have been called out
explicitly.

I added 'review all libuv changes' to my build checklist.  It won't
happen again.  Sorry, @igorzi.
2012-01-20 10:17:48 -08:00
Ben Noordhuis
6b5853794d build: disable NDEBUG in release builds for now
assert() sanity checks are a good thing.
2012-01-20 16:00:27 +01:00
Ben Noordhuis
4e5247772d fs, handle_wrap: use Loop(), not uv_default_loop()
Using the default loop will fail in unexpected and interesting ways when
isolates are used.
2012-01-20 15:57:50 +01:00
Shigeki Ohtsu
2156e5eca1 fs: don't assert on uv_fs_*() errors
Pass errors to the JS callbacks, don't assert in C++ land.

Fixes among other things the case where Node aborts because uv_fs_futimes()
returns ENOSYS.
2012-01-20 14:46:07 +01:00
isaacs
ec1d1ee61f Now working on 0.6.9 2012-01-19 21:15:12 -08:00
isaacs
d18cebaf8a 2012.01.19, Version 0.6.8 (stable)
* Update V8 to 3.6.6.19

* Numeric key hash collision fix for V8 (Erik Corry, Fedor Indutny)

* Add missing TTY key translations for F1-F5 on Windows (Brandon Benvie)

* path.extname bugfix with . and .. paths (Bert Belder)

* cluster: don't always kill the master on uncaughtException (Ben
* Noordhuis)

* Update npm to 1.1.0-2 (isaacs)

* typed arrays: set class name (Ben Noordhuis)

* zlib binding cleanup (isaacs, Bert Belder)

* dgram: use slab memory allocator (Michael Bernstein)

* fix segfault #2473
2012-01-19 18:29:43 -08:00
isaacs
4afc46d7bc Upgrade V8 to 3.6.6.19 2012-01-19 18:29:11 -08:00
Ben Noordhuis
0f33768059 v8: link against libsocket and libnsl on sunos
The V8 debugger requires BSD socket support. Solaris-like systems obviously
support that but you need to link against the right libraries, it's not part of
libc.
2012-01-19 23:09:00 +00:00
Ben Noordhuis
90587b1ccb v8: implement VirtualMemory class on SunOS
Unbreaks build on SunOS. Re-applies 4908e5bf7a.
2012-01-19 22:46:20 +00:00
Fedor Indutny
4fdec07bd8 Land number collision fix for v8 3.6 by Erik Corry
Update with fixes from: http://codereview.chromium.org/9190001/
2012-01-19 21:55:48 +06:00
Artur Adib
e282c0a081 docs: document common add-on design patterns 2012-01-19 16:31:36 +01:00
Ingmar Runge
0ca30187cf Crypto: adding ability to turn off automatic PKCS padding 2012-01-18 21:20:25 +01:00
Brandon Benvie
f7b612550a Add missing TTY key translations for F1-F5 on Windows 2012-01-18 16:00:55 +01:00
Bert Belder
d489a01f81 Make path.extname do the right thing when the last path component is . or ..
Closes GH-2526
2012-01-18 15:21:58 +01:00
Ben Noordhuis
ad42a82df5 build: remove node_debug from config.gypi 2012-01-18 02:00:43 +01:00
Ben Noordhuis
d44ce97909 cluster: don't always kill the master on uncaughtException
uncaughtException handlers installed by the user override the default one that
the cluster module installs, the one that kills off the master process.

Fixes #2556.
2012-01-18 00:45:02 +01:00
Dan Williams
091ab850aa docs: replace expresso with mocha in appendix 1 2012-01-17 23:30:58 +01:00
Dan Williams
29ce743385 docs: fix syntax error on cluster api docs 2012-01-17 23:29:16 +01:00
Ben Noordhuis
e493b29598 build: respect --debug configure switch 2012-01-17 23:03:21 +01:00
Andreas Madsen
4a38795b6f Add failing test case: parent on('exit')
Fixes #2564
2012-01-17 11:43:21 -08:00
Ryan Dahl
54ad2f6cbb Link to Marak's module rap in community page 2012-01-17 11:34:16 -08:00
Bert Belder
892056bf97 tests: fix more lint issues 2012-01-17 20:16:49 +01:00
Andreas Madsen
4865063924 Tests: fix jslint issues 2012-01-17 19:45:09 +01:00
Andreas Madsen
70884875c9 Allow calling fork() without args or options
Closes GH-2424
2012-01-17 19:07:57 +01:00
Andreas Madsen
ca6ededbd1 child_process: add errno property to exceptions
In case of a write failure when using fork() an error would be thrown. The
thrown exception was missing the `errno` property.
2012-01-17 18:37:02 +01:00
Fedor Indutny
1695332941 Land number collision fix for v8 3.6 by Erik Corry
- If V8 snapshots are enabled then the hash is only randomized at build time.

---
backport @10366, @10367 and @10402 to 3.6

Add seed to hash of numeric keyed properties.

Minor cleanups of numeric seeded hashing patch.

Split NumberDictionary into a randomly seeded and an unseeded version.
We don't want to randomize the stub cache.

Review URL: http://codereview.chromium.org/9190001/
2012-01-17 22:22:52 +06:00
koichik
534df2f8d2 tls: fix double 'error' events on HTTPS Requests
Fixes #2549.
2012-01-17 17:09:27 +01:00
Ben Noordhuis
549443a7cc typed arrays: set class name
Make obj.toString and Object.prototype.toString work correctly for typed arrays.
2012-01-17 16:20:39 +01:00
Ryan Dahl
21dd53f9d3 Makefile: Don't force user to run ./configure first 2012-01-16 23:28:29 -08:00
Fedor Indutny
6e76a7cb45 installer: install node-waf
* added --without-waf flag for configure script
2012-01-16 21:56:05 -08:00
Ryan Dahl
72cbb7492c Now working on v0.7.1-pre 2012-01-16 19:46:36 -08:00
Ryan Dahl
9cc55dca6f Bump version to v0.7.0 2012-01-16 19:00:41 -08:00
Ryan Dahl
716f5bc66b Add make dist-upload 2012-01-16 18:52:36 -08:00
Ryan Dahl
317ba9fb64 Fix 'make dist' 2012-01-16 18:40:29 -08:00
Igor Zinkovsky
2c1025706b upgrade libuv to 52511b9ddc 2012-01-16 17:24:53 -08:00
Igor Zinkovsky
ab18d72b35 fix windows build 2012-01-16 16:46:23 -08:00
Ryan Dahl
ca2a047b8e Merge remote branch 'origin/v0.6'
Conflicts:
	deps/uv/src/win/util.c
	src/udp_wrap.cc
2012-01-16 15:20:26 -08:00
Ryan Dahl
7584225873 Upgrade libuv to joyent/libuv@f5bd21f 2012-01-16 15:15:34 -08:00
isaacs
25410096b4 Update npm to 1.1.0-2 2012-01-16 15:06:16 -08:00
Igor Zinkovsky
95844451b6 fix windows build 2012-01-16 14:44:49 -08:00
Ryan Dahl
60040a4f36 Upgrade V8 to 3.8.6 2012-01-16 14:37:57 -08:00
Ryan Dahl
1afd0b52fe Revert "gyp: install node-gyp"
No.

This reverts commit 3d1476a316.
2012-01-16 14:07:35 -08:00
Fedor Indutny
3d1476a316 gyp: install node-gyp
* fixes #2480
2012-01-17 02:44:26 +06:00
Maciej Małecki
d5047f5fe6 http: use util._deprecationWarning for deprecation warning 2012-01-16 19:45:14 +01:00
Fedor Indutny
f0c629a36b uv: upgrade to e7758e1 2012-01-16 20:18:37 +06:00
Fedor Indutny
03e689fae4 Revert "util: always display a warning for module in debug mode"
This reverts commit df62005ece.
2012-01-16 19:33:16 +06:00
Maciej Małecki
df62005ece util: always display a warning for module in debug mode 2012-01-16 19:19:56 +06:00
Fedor Indutny
23de33968f querystring: fix maxKeys = 0 is ignored 2012-01-16 16:36:24 +06:00
Fedor Indutny
f1678bfc65 http: do not accept headers if limit is exceeded
* fix limiting when parser was reused
* fix maxHeadersCount = 0 is ignored ( credit to @koichik )
* add test-http-max-headers-count.js ( credit to @koichik )
2012-01-16 16:36:23 +06:00
Ben Noordhuis
03cb903e7e isolates: remove references to uv_thread_self()
uv_thread_self() is difficult to implement on Windows in a way where the return
value is valid across threads. It's already been removed from upstream libuv.
2012-01-16 01:41:29 +01:00
Fedor Indutny
8a98c2f1d8 http, querystring: added limits to prevent DoS 2012-01-16 02:45:05 +06:00
Ben Noordhuis
93465d3051 build: support --dest-cpu configure switch again 2012-01-15 16:50:58 +01:00
Fedor Indutny
220288725f test-eio-limit: add missing copyright headers 2012-01-14 23:51:53 +06:00
Fedor Indutny
e03b42d1bb Add failing test-eio-limit.js 2012-01-14 23:48:56 +06:00
Ben Noordhuis
f0c1376e07 net: make .write() throw on bad input
Passing a non-buffer or non-string argument to Socket.prototype.write triggered
an assert:

  Assertion failed: (Buffer::HasInstance(args[0])), function Write,
  file ../src/stream_wrap.cc, line 289.

Fixes #2532.
2012-01-14 02:13:24 +01:00
Guillermo Rauch
766f609838 website: Add "Api Docs" button next to "Download"
* Added Docs button and `button` class.
* Refactored download button style into `.button`
* Applied color overrides for download/docs buttons.
* Pointed docs link to latest available docs.
2012-01-12 14:24:40 -08:00
mrb
bd9fa2e841 dgram: use slab memory allocator
Change udp memory allocation scheme from uv_buf_init to slab allocation. Takes
slab allocation scheme from stream_wrap.
2012-01-12 17:34:15 +01:00
Nathan Rajlich
f2ba4cef2a build: remove the old -DPLATFORM="mac" define
To prevent redefinition warnings.
2012-01-12 15:11:02 +01:00
Nathan Rajlich
9ff86a2848 build: set process.platform to "darwin" on OS X
This is consistent with the old waf build system, and doesn't break old scripts
that are expecting the value to be "darwin".

Fixes #2518.
2012-01-12 15:10:11 +01:00
Ben Noordhuis
465e22e62f docs: clarify filename argument of vm.* functions 2012-01-12 14:44:41 +01:00
koichik
7dffbaf2ce http: Upgrade/CONNECT request should detach its socket earlier
With Upgrade or CONNECT request, http.ClientRequest emits 'close' event
after its socket is closed. However, after receiving a response, the socket
is not under management by the request.

http.ClientRequest should detach the socket before 'upgrade'/'connect'
event is emitted to pass the socket to a user. After that, it should
emit 'close' event immediately without waiting for closing of the socket.

Fixes #2510.
2012-01-12 14:17:19 +09:00
Igor Zinkovsky
247d0da188 update libuv to 855764406e
fixes #2521
2012-01-11 19:35:03 -08:00
Fedor Indutny
71ae175319 zlib: reset() method for deflate/inflate streams
* ammended test-zlib-dictionary to cover reusing streams
2012-01-12 03:19:19 +06:00
Fedor Indutny
89556f5a2f zlib: C++ style fixes for dictionary 2012-01-12 03:11:31 +06:00
Fedor Indutny
9e6957b0a5 Merge branch 'v0.6'
Conflicts:
	src/handle_wrap.cc
	src/node_zlib.cc
	src/process_wrap.cc
2012-01-12 02:17:44 +06:00
Fedor Indutny
07701e7cc8 zlib: C++ style fixes 2012-01-12 01:43:49 +06:00
Mathias Bynens
8abb73ef58 punycode: Update to v0.3.0 2012-01-11 10:42:39 +01:00
Maciej Małecki
b073989e17 makefile: ignore lib/punycode.js while linting
`punycode` is a third party code which generates a lot of lint errors.
Upstream was contacted in order to fix it in bestiejs/punycode.js#6, but
request was denied.

Therefore, it's reasonable to exclude this file from linting process.

Ref #2456.
2012-01-11 10:42:33 +01:00
Andreas Madsen
c8108aad83 child_process: fix typo in internal message event name 2012-01-11 09:59:50 +01:00
isaacs
8cca30f31b zlib binding cleanup
* Add assert to prevent parallel writes
* Embed request object instead of using new/delete
* Remove unnecessary WorkReqWrap in favor of uv_work_t
* Use container_of instead of req->data

Along with 2d8af39acc and
0ad2717fd8, this should Fix #2504.
2012-01-10 16:42:52 -08:00
Ryan Dahl
290bc0c067 Use .jpg instead of .bmp for .msi
smaller.
2012-01-10 14:26:22 -08:00
Maciej Małecki
4d49469d0d child_process: fix typo in internal message event name 2012-01-10 23:16:07 +01:00
Ryan Dahl
e1b829d2a5 Add broken test-isolates3.js 2012-01-10 12:04:19 -08:00
Ben Noordhuis
0ad2717fd8 Make sure that zlib contexts are not garbage collected when busy 2012-01-10 21:01:19 +01:00
Bert Belder
2d8af39acc Fix memory leak in node_zlib 2012-01-10 21:01:18 +01:00
Ryan Dahl
d4ee61ffc7 Add failing test-isolates2.js 2012-01-10 11:48:02 -08:00
Ryan Dahl
e6a30bd107 Fix #2473
Tested in production.

See also http://code.google.com/p/v8/issues/detail?id=1889
2012-01-10 10:49:38 -08:00
Fedor Indutny
4cbcdb4b2c test: make debugger-repl tests work with isolates 2012-01-10 16:48:45 +01:00
Ben Noordhuis
7cee968c21 isolates: add process-global list of isolates 2012-01-10 16:46:41 +01:00
Fedor Indutny
6b2091b58a debug threads 2012-01-10 02:28:49 +01:00
Fedor Indutny
99679c6430 IsolateDebugger C++ 2012-01-10 02:28:42 +01:00
Fedor Indutny
44e7033279 fixed debugger segfaults 2012-01-10 02:19:14 +01:00
Fedor Indutny
a5f74b4da7 added isolates support 2012-01-10 02:19:14 +01:00
Ben Noordhuis
97e4b3a7bf isolates: drain message queue completely 2012-01-10 02:09:08 +01:00
Andreas Madsen
787f62de8c Improve test-child-process-silent 2012-01-09 13:04:13 -08:00
Ryan Dahl
b28e700ebd require('sys') now throws
To be removed in v0.9
2012-01-09 12:59:28 -08:00
Ben Noordhuis
b07acb3808 child_process: fix segfault after failed spawn
The process handle is uninitialized when uv_spawn() fails so don't export the
handle to JS land when that happens. Attempts to close the uninitialized handle
resulted in segmentation faults and memory corruption.

Fixes #2481.
2012-01-09 20:54:37 +01:00
Ben Noordhuis
d5d043f2d7 handle_wrap: guard against uninitialized handle or double close 2012-01-09 20:54:37 +01:00
Ryan Dahl
8b28d599a7 Merge remote branch 'origin/v0.6'
Conflicts:
	Makefile
	configure
	src/node_version.h
2012-01-09 11:20:22 -08:00
Ben Noordhuis
cc5cea35b0 uv: upgrade to 803f5a0 2012-01-09 15:46:30 +01:00
Ryunosuke SATO
22d7fe1206 events: fix checking max listeners with 1
Fixes #2490.
2012-01-09 04:02:01 +01:00
koichik
08a91acd76 http: better support for CONNECT method.
Introduces 'connect' event on both client (http.ClientRequest) and
server (http.Server).

Refs: #2259, #2474.
Fixes #1576.
2012-01-09 03:51:06 +01:00
koichik
c1a63a9e90 tls: Allow establishing secure connection on the existing socket
This is necessary to use SSL over HTTP tunnels.

Refs #2259, #2474.
Fixes #2489.
2012-01-09 02:31:46 +01:00
koichik
70033bd960 net: make connect() accept options
This makes API even with tls.connect().
Refs #1983.

See also:
http://groups.google.com/group/nodejs-dev/msg/3b6dbcc4a9a82d99

Fixes #2487.
2012-01-09 02:18:39 +01:00
Ben Noordhuis
9a79bb694e Avoid unnecessary buffer to string conversion.
Speeds up the benchmark below by about 680% (0.5s versus 3.4s on my Core 2 Duo).

    var crypto = require('crypto');
    var hash = crypto.createHash('sha1');
    var data = new Buffer(1024);
    for (var i = 0; i < 128 * 1024; ++i) hash.update(data);

Fixes #2494.
2012-01-09 00:50:26 +01:00
Ben Noordhuis
472a72d27f build: honour the PYTHON environment variable
Overrides the path to the python binary. Defaults to `python`.
2012-01-08 21:25:04 +01:00
Maciej Małecki
0321adbcf4 tls doc: update docs to reflect API change
Refs #1983.
2012-01-08 11:13:36 +01:00
Maciej Małecki
39484f49ef test tls: make tests use new tls.connect API
Refs #1983.
2012-01-08 11:13:28 +01:00
Maciej Małecki
df0edf5fe6 https: make https use new tls.connect API
Refs #1983.
2012-01-08 11:13:18 +01:00
Maciej Małecki
4b4d059791 tls: make tls.connect accept port and host in options
Previous API used form:

    tls.connect(443, "google.com", options, ...)

now it's replaced with:

    tls.connect({port: 443, host: "google.com", ...}, ...)

It simplifies argument parsing in `tls.connect` and makes the API
consistent with other parts.

Fixes #1983.
2012-01-08 11:12:56 +01:00
koichik
9ef3c6238b docs: fix ChangeLog 2012-01-07 07:51:51 +01:00
koichik
57653added docs: small changes. 2012-01-07 06:44:35 +01:00
isaacs
ff4096f958 Now working on v0.6.8 2012-01-06 17:36:39 -08:00
isaacs
d5a189acef 2012.01.06, Version 0.6.7 (stable)
* V8 hash collision fix (Breaks MIPS) (Bert Belder, Erik Corry)

* Upgrade V8 to 3.6.6.15

* Upgrade npm to 1.1.0-beta-10 (isaacs)

* many doc updates (Ben Noordhuis, Jeremy Martin, koichik, Dave Irvine,
  Seong-Rak Choi, Shannen, Adam Malcontenti-Wilson, koichik)

* Fix segfault in node_http_parser.cc

* dgram, timers: fix memory leaks (Ben Noordhuis, Yoshihiro Kukuchi)

* repl: fix repl.start not passing the `ignoreUndefined` arg (Damon Oehlman)

* #1980: Socket.pause null reference when called on a closed Stream (koichik)

* #2263: XMLHttpRequest piped in a writable file stream hang (koichik)

* #2069: http resource leak (koichik)

* buffer.readInt global pollution fix (Phil Sung)

* timers: fix performance regression (Ben Noordhuis)

* #2308, #2246: node swallows openssl error on request (koichik)

* #2114: timers: remove _idleTimeout from item in .unenroll() (James Hartig)

* #2379: debugger: Request backtrace w/o refs (Fedor Indutny)

* simple DTrace ustack helper (Dave Pacheco)

* crypto: rewrite HexDecode without snprintf (Roman Shtylman)

* crypto: don't ignore DH init errors (Ben Noordhuis)
2012-01-06 16:31:03 -08:00
isaacs
d84a6ba3d1 Remove snapshot from Mac binary build 2012-01-06 16:31:03 -08:00
Ryan Dahl
bca88b2dc1 support nosnapshot in vcbuild.bat 2012-01-06 16:26:16 -08:00
Ryan Dahl
8e5674fb5c Upgrade V8 to 3.8.5 2012-01-06 13:03:06 -08:00
Ryan Dahl
be67fa7e09 Revert "crypto: add SecureContext.clearOptions() method"
API addition needs to go in master. Also openssl-0.9.8k doesn't have
SSL_CTX_clear_options().

This reverts commit 6f8839d2ac.
2012-01-06 12:01:58 -08:00
Ryan Dahl
8bd80f4911 fix test-sys for hash randomization
broken in 4a899c9274
2012-01-06 10:22:24 -08:00
Bert Belder
4a899c9274 Land hash collision fix for V8 3.6 by Erik Corry.
- If V8 snapshots are enabled then the hash is only randomized at build time.
- Breaks MIPS

---
Backport hash collision workaround to 3.6.
This is made up of 9956, 10351, 10338 and 10330.
This change bakes the string hash key into the snapshot, so
it is determined at build time for shapshot configs.
Review URL: http://codereview.chromium.org/9124004
2012-01-06 17:02:01 +01:00
koichik
dd9593ccc4 http: fix ServerResponse does not emit 'close'
Refs #2453.
2012-01-06 15:45:21 +09:00
Ben Noordhuis
42281124d4 child_process: add isolates support
Passing an options object with {thread:true} to .fork() or .spawn() will run the
target script in a thread instead of a separate process.
2012-01-06 00:47:14 +01:00
Ben Noordhuis
1e73e4c62f isolates: remove global isolates list
No longer necessary, each isolate now waits until its subordinate isolates have
exited.
2012-01-06 00:45:27 +01:00
Ben Noordhuis
dadc30318f isolates: implement message passing
Parent and child isolates can now pass arbitrary binary messages between each
other. The messages are sent and received through a thread-safe queue that
wakes up the event loop of the receiving thread.
2012-01-06 00:42:55 +01:00
Ben Noordhuis
075acfa2d6 uv: upgrade to 56a31f0 2012-01-06 00:00:40 +01:00
Emerson Macedo
aa67b1f375 fs: add appendFile() and appendFileSync() functions 2012-01-05 21:39:57 +01:00
Mikael Bourges-Sevenier
5b05429bf0 typed arrays: add Buffer -> TypedArray constructor
- create a typed array from a node::Buffer object
- update TypedArray::set() to spec
- add TypedArray::get() method
2012-01-05 20:56:41 +01:00
isaacs
78dbb4b5b1 npm@1.1.0-beta-10 2012-01-05 11:22:49 -08:00
Shigeki Ohtsu
55c21970fd build: compile without -fvisibility=hidden
Fixes symbol lookup errors when loading an addon module on Linux.
2012-01-05 16:50:55 +01:00
Shigeki Ohtsu
a993d22c0f build: set product_prefix to empty for Linux 2012-01-05 16:50:44 +01:00
Ben Noordhuis
760928bfad docs: mention that python 2.6 or 2.7 is required 2012-01-05 16:44:22 +01:00
koichik
baebd30eee http: use self insted of this 2012-01-05 17:43:00 +09:00
Andreas Madsen
e2f1e50c60 typos
fixes #2465
2012-01-05 00:31:49 -08:00
Andreas Madsen
5f08c3cfa1 cluster improvements: Worker class and isolate internal messages
Fixes #2388
2012-01-04 18:30:19 -08:00
Ryan Dahl
3452477dcb Update address in CLA 2012-01-04 11:20:50 -08:00
Ben Noordhuis
e21643d618 build: fix npm-cli.js install 2012-01-04 16:36:08 +01:00
Ryan Dahl
f3da6c6c04 Potential fix for #2438
- Save StringPtr if the header hasn't been completely received yet after one
  packet.
- Add one to num_fields and num_values. They were actually one less than the
  number of fields and values.
- Remove always_inline makes debugging difficult, and has negligible
  performance benefits.
2012-01-03 17:43:39 -08:00
Ryan Dahl
2cde498319 Add another test to test-http-parser-bad-ref.js demoing #2438 2012-01-03 17:15:25 -08:00
Ryan Dahl
557fc396b4 Upgrade V8 to 3.8.4 2012-01-03 11:46:53 -08:00
Ben Noordhuis
c123ac05dc Merge remote-tracking branch 'origin/v0.6'
Conflicts:
	src/udp_wrap.cc
2012-01-02 12:29:39 +01:00
Ben Noordhuis
6f8839d2ac crypto: add SecureContext.clearOptions() method
SecureContext.setOptions() is backed by SSL_CTX_set_options() which, contrary to
what the name suggests, is additive: it doesn't set options, it adds them to the
already active options.

Hence the need for SecureContext.clearOptions(), which lets you unset active
options.
2012-01-02 12:02:07 +01:00
Ben Noordhuis
884f689efe test: add #2293 regression test
Creating a file event watcher with fs.watch({persistent:false}) should not block
the event loop.
2012-01-02 10:48:35 +01:00
Ben Noordhuis
41f2725639 uv: upgrade to 38fc6ad 2012-01-02 10:43:10 +01:00
Ben Noordhuis
c2fb062f60 docs: fix typo on community page 2012-01-01 23:39:29 +01:00
isaacs
8e57398b20 Fix #2034 repl message for .clear when useGlobal=true 2011-12-31 03:20:41 +01:00
Ben Noordhuis
539598b11f test: don't create temp files in fixtures dir 2011-12-31 03:17:19 +01:00
Ben Noordhuis
8b2abed03d bench: add /echo endpoint to http_simple
Copies the POST request data verbatim into the response body.
2011-12-30 02:03:10 +01:00
Ryan Dahl
432a2e4d39 Add test for #2438
Unfortunately valgrind must be used to see the bad read. It would be nice if
we could improve this test to cause a segfault.
2011-12-29 13:37:03 -08:00
Ryan Dahl
4b3824b682 Merge remote branch 'origin/isolates2' 2011-12-29 11:57:40 -08:00
Ben Noordhuis
c24276f008 net: defer net.Server 'close' event to next tick 2011-12-29 19:30:07 +01:00
Ben Noordhuis
3f5bb15f35 dgram: fix memory leak in error path 2011-12-29 14:57:53 +01:00
Damon Oehlman
744ed46970 repl: fix repl.start not passing the ignoreUndefined arg to the REPLServer constructor 2011-12-29 14:46:04 +01:00
Jeremy Martin
8c3a757ffc docs: tiny typo in http.markdown 2011-12-29 14:35:52 +01:00
Ben Noordhuis
0c3b357985 Merge branch 'isolates2' 2011-12-29 01:56:58 +01:00
Ben Noordhuis
add4cfcf5f Merge branch 'v0.6'
Conflicts:
	src/platform_win32.cc
2011-12-29 01:56:44 +01:00
Ben Noordhuis
fa43f04f6a Include ngx-queue.h, fix Windows build. 2011-12-29 01:56:11 +01:00
Ben Noordhuis
25ca13ec1a uv: upgrade to 85f6b79 2011-12-29 01:56:11 +01:00
Ben Noordhuis
cdb5864fc3 Make msbuild run in parallel. 2011-12-29 01:56:11 +01:00
Ryan Dahl
4428b70cba Add isolate version of test-child-process-fork 2011-12-29 01:56:11 +01:00
Ryan Dahl
649dbbbd83 Add process.features.isolates 2011-12-29 01:56:11 +01:00
Ryan Dahl
5fc0c27d5c move isolate V8 functions out of node.cc 2011-12-29 01:56:11 +01:00
Ryan Dahl
20ba454ef9 Add node::Loop() and don't inc node_isolate.h in *.cc
node::Loop() replaces the NODE_LOOP macro. This avoids hitting
v8::Isolate::GetCurrent() for each loop lookup when HAVE_ISOLATE==0
2011-12-29 01:56:11 +01:00
Ben Noordhuis
dd0188ec08 uv: upgrade to d6a06b8 2011-12-29 01:56:11 +01:00
Ryan Dahl
40c98a977b Add shared-buffer isolate addon test 2011-12-29 01:56:11 +01:00
Ryan Dahl
f168f7d702 Remove node_isolate.h from node.h 2011-12-29 01:56:10 +01:00
Ryan Dahl
2c560c5405 Change isolate test to demo EIO bug 2011-12-29 01:56:10 +01:00
Ryan Dahl
a0f3eb015a node_file.cc should use NODE_LOOP() 2011-12-29 01:56:10 +01:00
Ryan Dahl
268476549e Join all threads at end of main thread
Require reorganizing the isolates somewhat.

Add a very simple test.
2011-12-29 01:56:10 +01:00
Ryan Dahl
4d02e77f44 Move prog_start_time init after isolate assigned 2011-12-29 01:56:10 +01:00
Ryan Dahl
4f46ee4400 Add link-list of all isolates 2011-12-29 01:56:10 +01:00
Ryan Dahl
863f17f68c Move uv loop initialization into isolate 2011-12-29 01:56:10 +01:00
Ryan Dahl
45bb10cc32 move thread_id to node_isolate.cc 2011-12-29 01:56:10 +01:00
Ben Noordhuis
6eeb59abf6 isolates: replace SLIST with ngx_queue_t 2011-12-29 01:56:10 +01:00
Ben Noordhuis
809fdf26fb isolates: add process.tid property, pass args to isolate 2011-12-29 01:56:10 +01:00
Ben Noordhuis
ca19e792c6 isolates: have node::Isolate manage the v8::Context 2011-12-29 01:56:10 +01:00
Ben Noordhuis
ea97d6ed5f isolates: rename node::Isolate member isolate_ to v8_isolate_ 2011-12-29 01:56:10 +01:00
Ben Noordhuis
5866f1a9aa Separate per-process and per-thread init logic. 2011-12-29 01:56:10 +01:00
Ben Noordhuis
2df81c57f6 Remove per-process globals from per-thread context. 2011-12-29 01:56:10 +01:00
Ryan Dahl
828bf50a0e isolates have globals stored in struct globals 2011-12-29 01:56:09 +01:00
Ben Noordhuis
eb6e60432b isolates: add _newIsolate() and _joinIsolate() to process object 2011-12-29 01:56:09 +01:00
Ben Noordhuis
09dc577931 build: move internals to separate header file 2011-12-29 01:56:09 +01:00
Ben Noordhuis
b3d4938e3e build: add --without-isolates configure switch 2011-12-29 01:56:09 +01:00
Ben Noordhuis
66116924ed isolates: add atexit() functionality for isolates 2011-12-29 01:56:09 +01:00
Ben Noordhuis
356992fe4d isolates: isolate-ify the main loop 2011-12-29 01:56:09 +01:00
Ben Noordhuis
e9f8e28426 uv: upgrade to f5c2a4a 2011-12-29 01:56:09 +01:00
Ben Noordhuis
bc7bae1d6b Merge remote-tracking branch 'origin/v0.6'
Conflicts:
	src/platform_win32.cc
2011-12-29 01:49:10 +01:00
Ben Noordhuis
5427311ae6 uv: upgrade to 0db56ea 2011-12-29 01:43:24 +01:00
Ben Noordhuis
9143b43e98 Include ngx-queue.h, fix Windows build. 2011-12-29 00:59:06 +01:00
Ben Noordhuis
2afd20b542 uv: upgrade to 85f6b79 2011-12-29 00:18:23 +01:00
Ben Noordhuis
59faab4330 Make msbuild run in parallel. 2011-12-28 23:56:53 +01:00
Ryan Dahl
b7c05e1b75 Upgrade V8 to 3.8.3 2011-12-28 14:13:50 -08:00
Ryan Dahl
448c5e07ca Revert "Add HandleScope to http-parser binding"
This commit did not actually fix the production crashes.

This reverts commit 73cf8e82e7.
2011-12-28 14:08:19 -08:00
Andreas Madsen
d483acc5d9 test: remove internet test from test/simple/ 2011-12-28 17:22:29 +01:00
koichik
b037c16f55 test: fix test-sys.js fails if the time zone is not CET
Fixes #2423.
2011-12-28 15:18:11 +09:00
koichik
a848a3efbf net: fix Socket.pause null reference when called on a closed Stream
Fixes #1980.
2011-12-28 15:13:57 +09:00
Ryan Dahl
b319699132 Add isolate version of test-child-process-fork 2011-12-27 18:11:32 -08:00
Ryan Dahl
036e59394a Add process.features.isolates 2011-12-27 13:06:25 -08:00
Ryan Dahl
533a455274 move isolate V8 functions out of node.cc 2011-12-27 12:54:25 -08:00
Ryan Dahl
9d792f3183 Add node::Loop() and don't inc node_isolate.h in *.cc
node::Loop() replaces the NODE_LOOP macro. This avoids hitting
v8::Isolate::GetCurrent() for each loop lookup when HAVE_ISOLATE==0
2011-12-27 12:54:25 -08:00
Ben Noordhuis
c481f97a9c uv: upgrade to d6a06b8 2011-12-27 12:54:24 -08:00
Ryan Dahl
02f24f54ba Add shared-buffer isolate addon test 2011-12-27 12:54:24 -08:00
Ryan Dahl
87bb848268 Remove node_isolate.h from node.h 2011-12-27 12:54:23 -08:00
Ryan Dahl
8c476371f5 Change isolate test to demo EIO bug 2011-12-27 12:54:23 -08:00
Ryan Dahl
a8506c41c6 node_file.cc should use NODE_LOOP() 2011-12-27 12:54:23 -08:00
Ryan Dahl
41062e71a7 Join all threads at end of main thread
Require reorganizing the isolates somewhat.

Add a very simple test.
2011-12-27 12:54:23 -08:00
Ryan Dahl
2d8c1fe1ed Move prog_start_time init after isolate assigned 2011-12-27 12:54:23 -08:00
Ryan Dahl
1a433b9637 Add link-list of all isolates 2011-12-27 12:54:23 -08:00
Ryan Dahl
78a25696f1 Move uv loop initialization into isolate 2011-12-27 12:54:23 -08:00
Ryan Dahl
39a492799d move thread_id to node_isolate.cc 2011-12-27 12:54:22 -08:00
Ben Noordhuis
469cb1b7b7 isolates: replace SLIST with ngx_queue_t 2011-12-27 12:54:22 -08:00
Ben Noordhuis
d329fc7b09 isolates: add process.tid property, pass args to isolate 2011-12-27 12:54:22 -08:00
Ben Noordhuis
3063ba0800 isolates: have node::Isolate manage the v8::Context 2011-12-27 12:54:22 -08:00
Ben Noordhuis
9d71e74491 isolates: rename node::Isolate member isolate_ to v8_isolate_ 2011-12-27 12:54:22 -08:00
Ben Noordhuis
3aadd4fe76 Separate per-process and per-thread init logic. 2011-12-27 12:54:22 -08:00
Ben Noordhuis
8a538ce372 Remove per-process globals from per-thread context. 2011-12-27 12:54:22 -08:00
Ryan Dahl
9caeceef6d isolates have globals stored in struct globals 2011-12-27 12:54:21 -08:00
Ben Noordhuis
edbec3f8f3 isolates: add _newIsolate() and _joinIsolate() to process object 2011-12-27 12:54:21 -08:00
Ben Noordhuis
a778a25cab build: move internals to separate header file 2011-12-27 12:54:21 -08:00
Ben Noordhuis
39e2c469db build: add --without-isolates configure switch 2011-12-27 12:54:20 -08:00
Ben Noordhuis
2a7a2ca986 isolates: add atexit() functionality for isolates 2011-12-27 12:54:20 -08:00
Ben Noordhuis
c3346f6760 isolates: isolate-ify the main loop 2011-12-27 12:54:20 -08:00
Ben Noordhuis
0d5a6b2d9d uv: upgrade to f5c2a4a 2011-12-27 12:54:19 -08:00
koichik
e1c043f43a docs: fix docs to not suggest variable leaks
Fixes #2106.
2011-12-27 17:43:58 +09:00
koichik
a337ac7584 http: fix XMLHttpRequest piped in a writable file stream hangs next request
Fixes #2263.
2011-12-27 17:42:37 +09:00
koichik
b962ff35dd tls: fix test-https-client-reject fails
Fixes #2417.
2011-12-27 17:33:23 +09:00
Ben Noordhuis
70e6f3f115 docs: document http.Server.close() semantics 2011-12-26 23:30:25 +01:00
koichik
e6b6075024 http: Avoid 'data'/'end' events after pause()
Fixes #1040.
2011-12-26 16:14:47 +01:00
koichik
7aa5924dc6 http: fix resource leak
Fixes #2069
2011-12-26 08:05:35 +01:00
Ben Noordhuis
0de6ec5f08 win: fix mismatched new[]/delete 2011-12-26 03:27:28 +01:00
Ben Noordhuis
ed5bad754c bench: fix use of fd after close 2011-12-26 03:23:34 +01:00
Ryan Dahl
48a9a2d355 Add deprecation message for http.Client 2011-12-23 17:42:27 -08:00
Ryan Dahl
c2d9e62f16 Merge remote branch 'origin/v0.6'
Conflicts:
	deps/v8/src/version.cc
2011-12-23 15:58:11 -08:00
Ryan Dahl
e4731f8168 Upgrade V8 to 3.8.2.1 2011-12-23 15:57:10 -08:00
Ryan Dahl
d85c85aac1 Change 'real example' in addon doc 2011-12-23 15:10:22 -08:00
Ryan Dahl
624f70e88f GYP: rename options.gypi to config.gypi
Sounds more familiar to unix users used to config.h
2011-12-23 14:25:17 -08:00
Bert Belder
c6347dcfb4 Add another nextTick benchmark
It tests how many iterations the event loop can make per second.
2011-12-23 03:09:36 +01:00
Phil Sung
cf2513e1aa buffer: don't pollute global namespace in buffer.readInt* 2011-12-22 23:26:43 +01:00
Ben Noordhuis
b261e37a34 test: ensure callback is executed 2011-12-22 17:28:23 +01:00
Ju-yeong Park
5976d58796 net: raise exception when the socket is closed 2011-12-22 17:25:14 +01:00
Dave Irvine
045bfe0da5 docs: document 'encoding' arg of hash.update() 2011-12-22 16:57:07 +01:00
Ben Noordhuis
d8c178bc16 timers: fix performance regression
Fix a 5-7% performance regression in the http_simple benchmark that was
introduced by the following commits:

  348d8cd timers: remove _idleTimeout from item in .unenroll()
  f2f3028 timers: fix memory leak in setTimeout
  098fef6 timers: remember extra setTimeout() arguments when timeout==0

Fix suggested by Bert Belder.
2011-12-22 14:42:25 +01:00
Seong-Rak Choi
892ba87866 docs: fix javascript error on document page
`highlight()` is called twice. It causes following javascript error.
> Uncaught Found <pre> element with class="sh_sourcecode",
> but no such language exists

Fixes #2393.
2011-12-22 17:32:21 +09:00
Shannen
ef659192a1 docs: use "Level 1" HTML5 features
Since we're using an HTML doctype we might as well use "Level 1" HTML5 features.
See more: http://mathiasbynens.be/notes/html5-levels#level-1

Fixes #2386.
2011-12-22 17:30:41 +09:00
Ryan Dahl
6ac22bfb04 Add gitignore file for addon tests 2011-12-21 14:18:56 -08:00
Ryan Dahl
60a9e1e40f Upgrade GYP to r1115 2011-12-21 12:39:36 -08:00
Ryan Dahl
6029127cea Upgrade V8 to 3.6.6.15 2011-12-21 12:38:07 -08:00
Ryan Dahl
f7f8af8420 Merge remote branch 'origin/v0.6'
Conflicts:
	Makefile
	lib/_debugger.js
2011-12-21 12:17:23 -08:00
Ryan Dahl
73cf8e82e7 Add HandleScope to http-parser binding
Fixes production crashes. We were not able to reproduce in the test suite.
2011-12-21 12:01:41 -08:00
Ryan Dahl
4eaf4ce26a Upgrade V8 to 3.8.2 2011-12-21 10:54:24 -08:00
koichik
07c27e040e tls: Fix node swallows openssl error on request
Fixes #2308.
Fixes #2246.
2011-12-21 19:48:15 +01:00
Ben Noordhuis
a82f5389d9 deps: fix openssl build on x86_64 2011-12-21 18:35:50 +01:00
Ben Noordhuis
b24c515dbf uv: upgrade to 10de090 2011-12-21 16:59:53 +01:00
Ben Noordhuis
7a7f1062bf tls: remove duplicate assignment 2011-12-21 15:01:07 +01:00
Ryan Dahl
18b92201be Support addons with gyp
Initial pass.
2011-12-20 22:03:35 -08:00
Ryan Dahl
7edfb02984 Remove visibility=hidden options from common.gypi
Not necessary and preventing addon loading.
2011-12-20 22:02:50 -08:00
Ryan Dahl
6c5f1f58f3 Remove unnecessary stuff from node.gyp 2011-12-20 20:26:13 -08:00
Bert Belder
f4e34f1b76 Remove unnecessary statement 2011-12-20 17:15:22 +00:00
Ryan Dahl
b603578b53 Fix 'make install'
Broken in 45605c because configure does not spit out proper JavaScript.
Needed to change single quotes to double.
2011-12-19 18:06:21 -08:00
James Hartig
348d8cd04a timers: remove _idleTimeout from item in .unenroll()
Stops .active() from reactivating the timer.

Fixes #2114.
2011-12-20 00:57:15 +01:00
Ben Noordhuis
aac717da8d Add missing return statement in _debugPause() binding. 2011-12-20 00:34:19 +01:00
jbergstroem
45605c9b39 gyp: switch json for pprint when generating config 2011-12-20 00:10:57 +01:00
jbergstroem
f9994114ab build: remove unused cmakelist 2011-12-20 00:10:49 +01:00
Maciej Małecki
5c7532e5b3 assert: test RegExp's properties when checking for equality
Previous code ignored the fact that `/a/ != /a/g`.

Test case included.
2011-12-20 00:10:49 +01:00
Pedro Teixeira
a805012d6f assert: .deepEqual() support for RegExp objects 2011-12-20 00:10:38 +01:00
Ben Noordhuis
213b8af2f6 gyp: include opensslconf.h on x64
Good news, it means we don't have to compile with OPENSSL_NO_ASM=1 after all.
2011-12-19 23:24:29 +01:00
Ben Noordhuis
15d0fa6dc1 gyp: compile openssl with OPENSSL_NO_ASM=1
Fixes linker error "undefined reference to `OPENSSL_ia32_cpuid'". This is
sub-optimal and needs to be revisited, the plain C implementations are often
much slower.
2011-12-19 22:55:11 +01:00
Ryan Dahl
c65a91c96f GYP: don't build V8 twice 2011-12-19 13:41:04 -08:00
Fedor Indutny
d87f551f36 debugger: Request backtrace w/o refs, see #1745
Fixes #2379
2011-12-19 13:30:43 -08:00
Fedor Indutny
802c4c6a61 debugger: document pause and setBreakpoint(line)
Fixes #2381
2011-12-19 13:29:21 -08:00
Andreas Madsen
3966e4e7a5 Remove debug console.log and optimize object copy
Fixes #2380
2011-12-19 13:25:19 -08:00
Ryan Dahl
21e7292ea0 Upgrade V8 to 3.8.1 2011-12-19 13:06:37 -08:00
Andreas Madsen
07b1997388 Add env argument to cluster.fork
Fixes 2378
2011-12-19 12:34:59 -08:00
Fedor Indutny
80858761a8 break on exception
Fixes #2304
2011-12-19 11:09:40 -08:00
Fedor Indutny
a239ea0d40 use inlineRefs, as it's already impl 2011-12-19 11:09:16 -08:00
Fedor Indutny
b00b2f08bf pass noRefs as arguments 2011-12-19 11:09:16 -08:00
Fedor Indutny
b0388ccad0 pause command 2011-12-19 11:09:16 -08:00
Fedor Indutny
07ad11916f allow setBreakpoint(line) 2011-12-19 11:09:16 -08:00
Fedor Indutny
c07edd90f5 preserve cursor pos
* configurable via .prompt()'s preserveCursor argument (false by default)
2011-12-19 11:09:16 -08:00
Fedor Indutny
d9377f5eb0 request backtrace w/o refs, see #1745 2011-12-19 11:09:16 -08:00
Nathan Rajlich
855f46677c test: Add test case for MODULE_NOT_FOUND. 2011-12-19 23:47:07 +09:00
Nathan Rajlich
ec11525d33 docs: Add docs for MODULE_NOT_FOUND error. 2011-12-19 23:47:02 +09:00
Nathan Rajlich
3f987cd925 module: Set the error.code to 'MODULE_NOT_FOUND' when a bad path is given to require.
Fixes #2358.
2011-12-19 23:46:41 +09:00
Ryan Dahl
926365c9f8 add links to package manager on download page 2011-12-18 22:54:15 -08:00
Ryan Dahl
bb8f73419c Fix make targets so they detect changes
Broken in 10d92b3
2011-12-18 15:12:25 -08:00
Avi Flax
ee0a7b928b util: output Dates with Date.toString not Date.toUTCString 2011-12-18 23:07:47 +01:00
Ben Noordhuis
4b455bafd0 module: improve process.dlopen() error messages
On Windows, that is. On Unices, we don't have a good way to translate dlopen()
and dlsym() errors (yet).
2011-12-18 22:35:09 +01:00
Ben Noordhuis
f322bbe729 uv: upgrade to feb267e 2011-12-18 22:35:08 +01:00
Felix Geisendörfer
ec51bfc995 Use common.PORT to avoid conflicts 2011-12-18 16:00:55 +01:00
Yoshihiro Kikuchi
f2f30286bf timers: fix memory leak in setTimeout
Closing handle is leaked when setTimeout called with arguments which are
1. a callback
2. zero delay
(i.e. setTimeout(function(){}, 0); )
2011-12-18 01:50:01 +01:00
Ben Noordhuis
6df7bdd954 child_process: make .send() throw if message is undefined
JSON.stringify(undefined) returns "undefined" but JSON.parse() doesn't know how
to parse that.
2011-12-18 01:29:07 +01:00
Andreas Madsen
b084322f52 Add silent option to child_process.fork
Fixes #2354.
2011-12-17 12:53:44 -08:00
Ryan Dahl
10d92b3dcd saner targets 2011-12-17 03:23:17 -08:00
Adam Malcontenti-Wilson
c4d2244a09 docs: Make logo a link back to homepage
Fixes #2332.
2011-12-17 19:10:08 +09:00
Fedor Indutny
a9f2c4aa30 --without-npm option
Fixes #2353.
2011-12-17 00:39:04 -08:00
isaacs
d75de86e6d add 'make test-npm' 2011-12-16 18:05:17 -08:00
isaacs
90fb81ad54 npm 1.1.0-beta-7 2011-12-16 18:05:17 -08:00
Ryan Dahl
e61de70c96 gyp: use built-in openssl by default 2011-12-16 15:00:23 -08:00
Ryan Dahl
64de69c1a4 Upgrade GYP to r1107 2011-12-16 14:06:29 -08:00
Ryan Dahl
1865b11dcb Merge remote branch 'origin/v0.6'
Conflicts:
	wscript
2011-12-16 13:57:36 -08:00
Ryan Dahl
67e12a0f84 Remove UVTEST from makefile 2011-12-16 13:46:42 -08:00
Ryan Dahl
01e4fe5fbc upgrade libuv to cb70db1 2011-12-16 13:35:08 -08:00
Andreas Madsen
a599aeb2a8 jslint
Fixes #2306
2011-12-16 12:57:03 -08:00
Dave Pacheco
b9049d2f90 simple DTrace ustack helper 2011-12-16 11:38:20 -08:00
Igor Zinkovsky
d6bae2cb95 document mode argument for fs.symlink 2011-12-16 11:16:33 -08:00
Ben Noordhuis
666aa0a343 uv: upgrade to d808cf9 2011-12-16 17:57:56 +01:00
koichik
c744e925df doc: correct http.Server.listen()
Fixes #2325.
2011-12-17 00:32:29 +09:00
Roman Shtylman
4b123f9ca2 crypto: rewrite HexDecode without snprintf
No need to use snprintf to create a hex string. It creates
more overhead than is needed. This new version is much faster.
2011-12-16 14:35:15 +01:00
Igor Zinkovsky
45822da46a fix windows build 2011-12-15 18:42:03 -08:00
Igor Zinkovsky
500c8f45f5 Remove platform files, and use uv platform api 2011-12-15 18:01:22 -08:00
Ben Noordhuis
cc2861ee44 crypto: don't ignore DH init errors 2011-12-16 02:26:01 +01:00
Igor Zinkovsky
88cc688731 fix windows build 2011-12-15 17:20:49 -08:00
Igor Zinkovsky
da3356bb38 upgrade libuv to 8e50b6043da7b3221f51b3158033255c9a210d08 2011-12-15 15:56:42 -08:00
Ryan Dahl
de5ba2db25 Don't print args from gyp_node 2011-12-15 13:19:36 -08:00
Ryan Dahl
ee7313266a use rsync instead of scp to upload website 2011-12-15 12:51:11 -08:00
isaacs
dd8018de95 now working on 0.6.7 2011-12-15 11:08:28 -08:00
isaacs
9a059ea69e 2011.12.14, Version 0.6.6 (stable)
* npm update to 1.1.0-beta-4 (Isaac Z. Schlueter)

* cli: fix output of --help (Ben Noordhuis)

* new website

* pause/resume semantics for stdin (Isaac Z. Schlueter)

* Travis CI integration (Maciej Małecki)

* child_process: Fix bug regarding closed stdin (Ben Noordhuis)

* Enable upgrades in MSI. (Igor Zinkovsky)

* net: Fixes memory leak (Ben Noordhuis)

* fs: handle fractional or NaN ReadStream buffer size (Ben Noordhuis)

* crypto: fix memory leaks in PBKDF2 error path (Ben Noordhuis)
2011-12-15 10:55:52 -08:00
isaacs
56f65e3c3e npm 1.1.0-beta-4 2011-12-15 08:32:07 -08:00
Ryan Dahl
ae17e2d90a Fix doc generation for new website 2011-12-14 18:20:11 -08:00
Robert Mustacchi
2240486d3d Add process.abort 2011-12-14 17:02:15 -08:00
Ryan Dahl
de3c16afae Upgrade V8 to 3.6.6.14 2011-12-14 16:33:11 -08:00
isaacs
2255efa171 npm 1.1.0-beta-3 2011-12-14 16:27:01 -08:00
Ryan Dahl
b04d4fff35 Add docs.nodejitsu.com to community page 2011-12-14 15:19:22 -08:00
Ryan Dahl
b3a7de15b7 Upgrade V8 to 3.8.0 2011-12-14 15:02:32 -08:00
Fedor Indutny
be23c51f69 Implement make install
Fixes #2331, #2197, #2283
2011-12-14 14:41:44 -08:00
isaacs
bb9316da28 npm 1.1.0-beta-2 2011-12-14 14:17:16 -08:00
isaacs
f490934c33 Properly support old IE DOM methods. 2011-12-14 14:17:16 -08:00
Ryan Dahl
1c3883bef2 Add changelog link to website 2011-12-14 11:11:55 -08:00
Ben Noordhuis
97900776bb util: add internal function _deprecationWarning() 2011-12-14 13:36:21 +01:00
Ben Noordhuis
d29be0dfa2 test: binding twice to the same port should raise an error 2011-12-14 03:43:04 +01:00
Ben Noordhuis
43e91da074 .gitignore core and vgcore files 2011-12-14 03:38:41 +01:00
Ben Noordhuis
ef12fa1bf7 crypto: deduplicate encoding parsing logic 2011-12-14 03:18:17 +01:00
Ben Noordhuis
bdd19ab40b build: update 'make install' warning message 2011-12-14 02:49:34 +01:00
Ben Noordhuis
321ec97d95 crypto: deduplicate decipher logic 2011-12-14 02:32:07 +01:00
Ben Noordhuis
77f21787d4 crypto: fix memory leak when decrypting empty strings
Also fixes a dangling pointer delete[] in the error path.
2011-12-13 21:22:44 +01:00
Ben Noordhuis
d70ef199f1 crypto: fix memory leaks in PBKDF2 error path 2011-12-13 18:08:18 +01:00
Ben Noordhuis
b1b3dc62ff fs: handle fractional or NaN ReadStream buffer size
Fixes #2320.
2011-12-13 16:31:12 +01:00
Ben Noordhuis
e90db17392 fs: fix typo in error message 2011-12-13 16:02:14 +01:00
Ryan Dahl
6e76fc2866 make jobs the last nav
fixes display bug
2011-12-12 14:40:03 -08:00
Ryan Dahl
19a18add4e better <br>s 2011-12-12 14:34:37 -08:00
Ryan Dahl
95b034e484 Reorder nav 2011-12-12 14:30:54 -08:00
isaacs
93188918ea Website js/css tweaks
Remove jquery
Use HTML5 doctype
Simpler clearfix implementation
Close download dialog with <Esc> key
2011-12-12 14:28:49 -08:00
Ben Noordhuis
8295c80618 net: check status code in afterWrite
Fixes memory leak and spin on writing to dead fds. This was tested in
production.
2011-12-12 13:45:44 -08:00
Ryan Dahl
e698dd38c3 website fixes 2011-12-12 09:58:23 -08:00
Ryan Dahl
5bbb4cadc3 new website 2011-12-12 09:12:42 -08:00
Igor Zinkovsky
06a22e2ea1 fix windows build 2011-12-09 17:24:37 -08:00
Igor Zinkovsky
8e2c014e43 Fix MSI generation on VC Express 2011-12-09 17:20:22 -08:00
Ryan Dahl
429efdd974 Change artwork in msi 2011-12-09 17:14:39 -08:00
Ryan Dahl
c5e51cead8 Move lock back to node_crypto.cc 2011-12-08 15:58:29 -08:00
Ryan Dahl
3d3f29cf06 Remove wscript 2011-12-08 15:10:26 -08:00
Ryan Dahl
cced79d4a8 Move a few more global vars into struct 2011-12-08 15:09:47 -08:00
Igor Zinkovsky
b24cdb3d36 Enable upgrades in MSI.
Fixes #2228.
2011-12-08 15:02:59 -08:00
Tim Oxley
871194d5fd docs: document util.inspect's colors param 2011-12-08 15:47:18 +01:00
Ryan Dahl
e10fd321e4 move global vars from platfrom, node_signal_watcher to struct 2011-12-07 18:03:18 -08:00
Ryan Dahl
59055b227a Move node_buffer.cc globals to struct 2011-12-07 16:01:46 -08:00
Ryan Dahl
e53e9c72cb move global vars for node_file.cc, node_zlib.cc, and node_crypto.cc 2011-12-07 15:44:33 -08:00
Ben Noordhuis
22c2c34952 fs: fix fs.watch() segmentation fault
The binding layer failed to initialize the event string if both UV_RENAME and
UV_CHANGE were set.

Fixes #2287.
2011-12-07 23:19:57 +01:00
Ryan Dahl
06d86ebe84 Move node_http_parser.cc global vars into node_vars.h 2011-12-07 13:31:55 -08:00
koichik
f8c335d0ca tls: enable rejectUnauthorized option to client
Fiexes #2247.
2011-12-07 22:47:06 +09:00
Ben Noordhuis
eef5d3257d build: check for libkvm and libexecinfo on all the BSDs 2011-12-07 14:36:21 +01:00
Ryan Dahl
e0a207c27a Begin moving static vars into struct for isolates.
Only node.cc, stream_wrap.cc, and tcp_wrap.cc have been done. The rest still
need work.
2011-12-07 01:14:54 -08:00
Ryan Dahl
ebe0fb697a Merge remote branch 'origin/v0.6' 2011-12-06 17:04:51 -08:00
Ryan Dahl
7547c7df1a Deshadow, denamespace variables in node.cc
Prep for isolates.
2011-12-06 17:01:56 -08:00
Ben Noordhuis
fd29448be0 test: add missing copyright headers 2011-12-06 22:02:26 +01:00
Ben Noordhuis
70bc2e32af test: new test, verify that we don't close and reuse fd 0 2011-12-06 22:02:26 +01:00
Ben Noordhuis
23bb5986d4 Remove unused variable.
The file descriptor arg to child_process._forkChild() is not used any more.
Remove it, avoids future confusion.
2011-12-06 22:02:26 +01:00
Ben Noordhuis
57d2857938 uv: upgrade to 0db3274 2011-12-06 22:02:26 +01:00
Ryan Dahl
2003593143 Merge remote branch 'origin/v0.6'
Conflicts:
	deps/v8/src/debug.cc
	deps/v8/src/version.cc
	src/node_version.h
2011-12-06 11:50:54 -08:00
isaacs
580e67015c Apply #2257 fix for Pipe streams as well as TTYs 2011-12-06 10:13:31 -08:00
Fedor Indutny
e609195202 [zlib] added dictionary support 2011-12-05 17:58:31 -08:00
Maciej Małecki
89e894b17a doc: add Travis CI build status image 2011-12-05 16:51:03 -08:00
Maciej Małecki
9023b0b3a2 test: add .travis.yml for testing on Travis CI
As discussed with @isaacs, build reports will be sent to #libuv IRC
channel. E-mail notifications are turned off so that Travis doesn't
bother committers about failures in forks.
2011-12-05 16:50:55 -08:00
isaacs
cf20b6bf65 Fix #2257 pause/resume semantics for stdin
This makes it so that the stdin TTY-wrap stream gets ref'ed on
.resume() and unref'ed on .pause()

The semantics of the names "pause" and "resume" are a bit weird, but the
important thing is that this corrects an API change from 0.4 -> 0.6
which made it impossible to read from stdin multiple times, without
knowing when it might end up being closed.  If no one has it open, this
lets the process die naturally.

LGTM'd by @ry
2011-12-05 16:47:11 -08:00
Ryan Dahl
21d081fd7f Upgrade V8 to 3.7.12 2011-12-05 16:29:01 -08:00
Ryan Dahl
6f86b9cb70 Disable test-setproctitle on darwin 2011-12-05 16:25:32 -08:00
isaacs
db273818f6 s/NPM/npm/
http://npmjs.org/doc/faq.html#If-npm-is-an-acronym-why-is-it-never-capitalized
2011-12-05 16:20:44 -08:00
Ben Noordhuis
36815e4179 process: fix stack overflow when recursively calling process.exit() 2011-12-05 22:43:27 +01:00
Ryan Dahl
1a89c8d061 Add analytics tracking to docs 2011-12-05 11:17:57 -08:00
Ben Noordhuis
fdf180f9ce cli: fix output of --help 2011-12-05 08:42:11 +01:00
Ben Noordhuis
aeb124f7f3 test: create test file in temp dir 2011-12-05 06:37:18 +01:00
Ben Noordhuis
a0fdd5f3f6 uv: upgrade to 34e95d1 2011-12-04 13:22:21 +01:00
Ryan Dahl
c50b0c9237 Now working on Node v0.6.6 2011-12-04 00:59:16 -08:00
Ryan Dahl
6cc94db653 Bump version to v0.6.5 2011-12-04 00:10:23 -08:00
Ryan Dahl
60e26668b3 Remove superfluous 'new' 2011-12-04 00:09:10 -08:00
Ryan Dahl
1cf26e2bf1 Upgrade V8 to 3.6.6.11 2011-12-03 23:31:02 -08:00
Ben Noordhuis
e90623edc2 gyp: upgrade to r1103 2011-12-03 21:28:17 +01:00
Ryan Dahl
46b6954acd Add link to license file on website 2011-12-02 17:06:05 -08:00
isaacs
ffc8110659 Workaround: A/V software prevents folder rename 2011-12-02 13:45:08 -08:00
Ben Noordhuis
49ba55b100 Merge branch 'v0.6'
Conflicts:
	src/node_version.h
2011-12-02 16:34:33 +01:00
koichik
3ebbdc6320 Update ChangeLog 2011-12-03 00:21:55 +09:00
Ben Noordhuis
a29a7c72fa Now working on v0.6.5 2011-12-02 03:15:10 +01:00
Ben Noordhuis
9170077f13 Bump version to v0.6.4 2011-12-02 02:31:41 +01:00
Bert Belder
641f2bedf3 Fix UVException errno bug 2011-12-02 02:21:50 +01:00
Bert Belder
ded97eb892 Exclude getbuf from the windows build
It's not used.
2011-12-02 02:21:50 +01:00
Bert Belder
e84edd2593 Win: make process.cwd and chdir support non-ansi characters
Closes GH-2215
2011-12-02 02:21:50 +01:00
Bert Belder
823a443321 Rename FSError to UVException and move to node.cc 2011-12-02 02:21:50 +01:00
isaacs
1ad30a2af4 npm 1.1.0-alpha-6 2011-12-01 17:12:21 -08:00
Igor Zinkovsky
99c9d19184 binding for uv_pipe_pending_instances 2011-12-01 13:57:47 -08:00
Igor Zinkovsky
dd4b280d8c upgrade libuv to 60630dab0f 2011-12-01 13:56:04 -08:00
Bert Belder
ae648a44c4 Upgrade libuv to 9c064fb 2011-12-01 22:50:09 +01:00
Ben Noordhuis
9b4e8e0a0d fs: fix typo in function names
The build was not affected: the typos were in macros that only come into effect
when _LARGEFILE_SOURCE is not defined - which is never.
2011-12-01 22:29:39 +01:00
isaacs
0f6d3e22d9 Remove duplicate npmrc file 2011-12-01 12:23:43 -08:00
Igor Zinkovsky
3e7f4b0f82 npm msi changes 2011-12-01 21:12:17 +01:00
isaacs
d5f401147a Re #2207 Add default npmrc for MSI install 2011-12-01 21:12:17 +01:00
isaacs
61764613d1 npm 1.1.0-alpha-5
Fix #2186
First part of #2207
2011-12-01 21:12:17 +01:00
Ben Noordhuis
d5feb1c280 Revert "build: compile with -D__DARWIN_64_BIT_INO_T on OS X"
This reverts commit f004d5aeac.

__DARWIN_64_BIT_INO_T is a no-op in most cases and might be actively harmful in
some others.
2011-12-01 21:00:46 +01:00
Ben Noordhuis
3d22dbf27b cli: add -p switch, print result of --eval 2011-12-01 18:02:15 +01:00
Ben Noordhuis
03eb41c2ec net: don't emit 'close' event twice
Don't allow `socket.destroy()` to run twice. The self-destruct sequence itself
is idempotent but it makes the 'close' and 'error' events fire more than once,
which may confuse listeners.

Fixes #2223.
2011-12-01 14:57:06 +01:00
Ben Noordhuis
3ca0517749 build: add --without-npm flag to configure script
Fixes #2200.
2011-11-30 15:50:08 +01:00
Mathias Bynens
456dafc3c6 Docs template: HTML cleanup
Remove references to `/favicon.ico` as it’s the default in all browsers. More
info: http://mathiasbynens.be/notes/rel-shortcut-icon

`type=text/css` and `media=all` are the implied defaults for `<link
rel=stylesheet>` (and `<style>`), so omit these attributes.

Similarly, `type=text/javascript` is the default for `<script>` elements, so
omit these attributes.
2011-11-30 15:28:48 +01:00
Mathias Bynens
cf89beec6f punycode: Update to v0.2.1 2011-11-30 15:28:48 +01:00
Ben Noordhuis
f44d0b9044 crypto: throw exception on unknown digest method
Fixes #2227.
2011-11-30 14:27:53 +01:00
Nathan Rajlich
b204006105 util: ensure that the .inspect function isn't the one being executed
Fixes #2225.
2011-11-30 14:14:24 +01:00
Ben Noordhuis
bbd976b8c4 build: always compile with large file support
Fixes a nasty sizeof(struct stat) mismatch bug that caused random crashes and
silent memory corruption.
2011-11-30 02:28:12 +01:00
Russ Bradberry
754e23db27 fixed problem with rss memory reporting incorrect number over 4 gigs 2011-11-30 02:11:40 +01:00
Ingmar Runge
260383215b node_crypto: use EVP_Cipher*_ex methods, not 'obsolete' versions
This also fixes an issue that made blowfish's ECB mode unusable.
2011-11-30 01:29:35 +01:00
eddy_me08@yahoo.com
eda15387a0 build: regenerate out/Makefile from within the main Makefile
Fixes #2147.
2011-11-29 19:35:58 +01:00
Ben Noordhuis
5fea00581b sys: print stack trace if NODE_DEBUG=sys 2011-11-29 19:22:13 +01:00
Ben Noordhuis
a033261f39 build: DRY configure script 2011-11-29 16:30:35 +01:00
Bert Belder
6ed721afd2 Upgrade libuv to fce90652ed38ab0925131ed141972354a494933b 2011-11-29 12:45:39 +01:00
seebees
aab958b713 OutgoingMessage.prototype.write does not take Array
Changed the type checking for OutgoingMessage.prototype.write so it only accepts string and Buffer.

And test.
Fixes #2162
Fixes #2208
2011-11-29 16:52:15 +09:00
Roman Shtylman
1c62e807e1 doc: add note about NODE_MODULE module_name requirement
module_name needs to match the final binary name
2011-11-28 20:52:40 +01:00
Thomas Shinnick
eba1f7b1a4 child_process: fix order of args to errnoException() 2011-11-28 20:45:01 +01:00
Ben Noordhuis
a5c51b4858 docs: add rel="canonical" link to latest API docs 2011-11-28 16:47:53 +01:00
Ben Noordhuis
216019b72d modules: fix error message for native add-ons without entry points
Trying to load an add-on without "init" or "modname_module" symbols would raise
an "Out of memory" exception. Let's improve that error message.
2011-11-27 22:47:05 +01:00
isaacs
e85a95dfa3 Remove npm's .gitignore, add generated docs 2011-11-27 13:09:04 -08:00
Tim Oxley
fc0a4c2781 docs: fix favicon 2011-11-27 21:52:27 +01:00
koichik
5451ba3aa8 tls: fix https with fs.openReadStream hangs
Fixes #2185.
Fixes #2198.
2011-11-27 16:31:45 +09:00
Ben Noordhuis
2445fb8bdd Fix double #define of NODE_VERSION_IS_RELEASE 2011-11-27 02:09:15 +01:00
koichik
6392eba3f9 test: update an expired certificate 2011-11-27 02:05:24 +09:00
kyle@dontkry.com
34f34e4411 docs: fix typo
Fixes #2193.
2011-11-27 01:45:27 +09:00
Ben Noordhuis
1cf13bca19 build: compile with -D__DARWIN_64_BIT_INO_T on OS X
Fixes a struct stat size mismatch on 64 bits machines that made Node crash with
a EXC_BAD_ACCESS on startup.

Fixes #2061 for gyp builds. Solution proposed by Paddy Byers.
2011-11-25 16:53:38 +01:00
Bert Belder
3a160646df Now working on v0.6.4 2011-11-25 12:43:44 +01:00
Bert Belder
cffd0bb68d Merge branch 'v0.6'
Conflicts:
	Makefile
	src/node_version.h
	test/simple/test-http-response-no-headers.js
2011-11-25 12:34:29 +01:00
Bert Belder
b159c6d62e Bump version to v0.6.3 2011-11-25 11:23:28 +01:00
Bert Belder
2335c4bb41 Strip trailing whitespace in changelog 2011-11-25 11:07:57 +01:00
Bert Belder
b480cfaf34 Make the pummel test runner not crash on windows when a directory is locked 2011-11-25 10:27:30 +01:00
Bert Belder
a056ef1f39 Upgrade libuv to 01f64f6 2011-11-25 10:16:43 +01:00
Bert Belder
5b014e0725 Fs: use strncmp instead of memcmp for comparing strings 2011-11-25 09:35:52 +01:00
Author: Igor Zinkovsky
1f16a7b6e5 Enable long paths on windows 2011-11-25 09:35:52 +01:00
Igor Zinkovsky
319580953d update libuv to cfa4112950b1f897fda7 2011-11-24 19:45:35 -08:00
Bert Belder
232e8e19a1 Fix test-stdin-from-file 2011-11-25 03:08:27 +01:00
Bert Belder
95eb729e6f Upgrade libuv to 3a50f8f 2011-11-25 02:13:37 +01:00
Bert Belder
236b217cd7 Fix issues with test-fs-chmod
- The test simultaneously chmods and fchmods the same file.
- On windows, it leaves behind a fixture in read-only mode,
  which causes test-fs-fsync to fail.
2011-11-25 01:25:38 +01:00
Bert Belder
d51a0c353b Upgrade libuv to 45b976a 2011-11-25 01:01:57 +01:00
Ben Noordhuis
55a8a3aad4 test: better fs.lchmod() availability check
fs.lchmod() is a BSD-ism, not a "not Windows"-ism.
2011-11-25 00:56:05 +01:00
Bert Belder
7244b9cee8 Upgrade libuv to ea63f06 2011-11-24 19:57:17 +01:00
Bert Belder
a639cf7d84 Add test for GH-2177 2011-11-24 19:56:41 +01:00
Bert Belder
83152d174c Dgram: correctly report recvmsg errors 2011-11-24 19:11:13 +01:00
Bert Belder
86fba381fd Windows: correctly resolve drive-relative paths 2011-11-24 02:38:34 +01:00
Bert Belder
cbcf4fe768 Don't die when arguments are passed to process.cwd() 2011-11-24 02:19:54 +01:00
Ben Noordhuis
1db9a2adbe build: print "not yet implemented" warning on make install 2011-11-23 13:27:53 +01:00
Ben Noordhuis
16889e22cc docs: fix dgram markdown 2011-11-23 12:56:05 +01:00
Ben Noordhuis
ce3ccc8d5a build: fix circular dependency in doc target 2011-11-23 12:56:05 +01:00
Ryan Dahl
b906e85996 Fixes #2076. Add logos to MSI 2011-11-22 19:23:41 -08:00
Ryan Dahl
055a933fa9 Add exe and msi signing to vcbuild.bat 2011-11-22 18:17:12 -08:00
Ryan Dahl
e5cf3f9751 Fixes #2083. Support installing npm in the .msi 2011-11-22 17:59:18 -08:00
isaacs
3ab15cde25 Update npm to 1.1.0-alpha-2 2011-11-22 17:03:58 -08:00
isaacs
0ba78d5f36 Close #2166 Close the fd in lchmod 2011-11-22 14:00:48 -08:00
Felix Geisendörfer
6e1e9e2fcb Get test-http-response-no-headers.js to pass
Main fix was in 3abebf which added HTTP/0.9 support to http parser.

Changed test because HTTP 1.1 mandates keep-alive when no headers are
given.

Fixes #1711
2011-11-22 22:48:50 +01:00
Ben Noordhuis
246805d386 test: add 'response body with no headers' http test
HTTP/0.9 - fails with a parse error
HTTP/1.0 - works
HTTP/1.1 - fails with an empty response body

See #1711.
2011-11-22 22:47:20 +01:00
Ryan Dahl
8595981195 Merge remote branch 'origin/v0.6'
Conflicts:
	Makefile
	src/node_version.h
	test/simple/test-crypto.js
2011-11-22 13:01:10 -08:00
Ryan Dahl
3abebfea98 Upgrade http-parser to joyent/http-parser@2498961 2011-11-22 12:56:01 -08:00
Ryan Dahl
38c49fbc4a Fix broken commit 2cd5adc 2011-11-22 12:44:01 -08:00
Ryan Dahl
2cd5adc28b Install npm with 'make install' 2011-11-22 12:38:48 -08:00
Ryan Dahl
6035651fad Fixes #2160. Fix tty.getWindowSize docs 2011-11-22 10:24:41 -08:00
Felix Geisendörfer
b3f91f15b2 Remove support for multi-source pipe()
This reverts 6c5b31bd which had too few use cases, too much complexity,
and can be handled in user-land by using `{end: false}`.

Closes #1996
2011-11-22 08:51:19 -08:00
isaacs
e543b0e95e zlib: Fix invalidly failing test 2011-11-22 08:51:19 -08:00
Ben Noordhuis
7defbd27ef test: add DSA sign/verify crypto tests 2011-11-22 16:01:07 +01:00
Ryan Dahl
b488be127a Include NPM, update .pkg to install it.
.msi update coming soon.
2011-11-21 10:50:52 -08:00
Ben Noordhuis
05de01d707 tls: expose more openssl SSL context options 2011-11-21 13:59:43 +01:00
Roman Shtylman
4d05f56dcd tls: expose ssl bug workaround constants
The internet is filled with servers which have various bugs and other
ssl handshake issues. These constants can be used with the Agent
secureOptions option to get around such server limitations when performing
https requests
2011-11-21 13:59:43 +01:00
Maciej Małecki
3f862cf179 test: stdin isn't closed after resume() and pause()
This works on `node v0.4.12`, but doesn't work on `node v0.6.2`
2011-11-21 12:34:19 +01:00
Ryan Dahl
9d1bdbcf05 Fixes #2084. Makeify tools/osx-dist.sh 2011-11-20 19:22:30 -08:00
Ben Noordhuis
61e796decc Now working on v0.6.3 2011-11-19 00:22:13 +01:00
Ben Noordhuis
a4402f0b2e Bump version to v0.6.2 2011-11-18 23:43:03 +01:00
isaacs
975f1930b1 zlib: Fix invalidly failing test 2011-11-18 14:38:44 -08:00
Ben Noordhuis
f004d5aeac build: compile with -D__DARWIN_64_BIT_INO_T on OS X
Fixes a struct stat size mismatch on 64 bits machines that made Node crash with
a EXC_BAD_ACCESS on startup.

Fixes #2061. Solution proposed by Paddy Byers.
2011-11-18 21:17:13 +01:00
Ben Noordhuis
3f92031aeb uv: upgrade to 01fbe7b 2011-11-18 21:17:09 +01:00
Ryan Dahl
585936157c Add missing rm 2011-11-18 12:03:35 -08:00
Ben Noordhuis
8bdf6bae30 docs: document dgram error event 2011-11-18 14:18:42 +01:00
Ben Noordhuis
a808ab4ac4 crypto: use the libuv rwlock API 2011-11-18 13:07:13 +01:00
Ben Noordhuis
1b2d333ee3 uv: upgrade to e4680cc 2011-11-18 13:07:01 +01:00
Ben Noordhuis
59a9a9b5b0 buffer: add .read*() and .write*() methods to SlowBuffer prototype
Fixes #2138.
2011-11-18 11:13:37 +01:00
Ryan Dahl
48d21dd541 Force makefile generation in gyp 2011-11-17 17:30:30 -08:00
Trevor Burnham
06d71ad457 docs: document the persistent option for fs.watch and fs.watchFile 2011-11-18 00:00:01 +01:00
Paddy Byers
4f8d6d0834 build: fix gyp xcode project generator
Only attempt to generate FrameworkPhase output for code targets.
2011-11-17 23:49:55 +01:00
Ben Noordhuis
29d8ff51c8 build: remove v8-node.gyp 2011-11-17 23:48:40 +01:00
Ben Noordhuis
9d3faf4f9a crypto: add support for RSA public key signing/verification 2011-11-17 23:01:39 +01:00
Ben Noordhuis
3ac5f1106d crypto: make verify() return true or false, not 1 or 0
It's what the documentation says it should return.
2011-11-17 23:01:39 +01:00
E. Azer Koçulu
1cb6fe47fc util: remove the line requiring events 2011-11-17 23:01:39 +01:00
Ben Noordhuis
534e41b474 crypto: make verify() return true or false, not 1 or 0
It's what the documentation says it should return.
2011-11-17 21:17:21 +01:00
Ben Noordhuis
bed405cfea Merge remote branch 'origin/v0.6' 2011-11-17 20:06:50 +00:00
Ryan Dahl
b0030af135 Fixes #2140. Fix illumos build. 2011-11-17 11:39:34 -08:00
E. Azer Koçulu
e258169666 util: remove the line requiring events 2011-11-17 20:21:48 +01:00
Ben Noordhuis
4f8a0cd2f9 v8: add platform-solaris.cc to gyp build
Re-applies 77e4abbc3e, lost in a V8 upgrade.
2011-11-17 19:39:39 +01:00
Ben Noordhuis
2c52ccea80 v8: compile with __C99FEATURES__=1 on sunos
Exposes INFINITY, isinf(), isfinite(), etc.

Re-applies d104e5b91c, lost in a V8 upgrade.
2011-11-17 19:39:39 +01:00
Ben Noordhuis
4f38c5ece3 test: add 'response body with no headers' http test
HTTP/0.9 - fails with a parse error
HTTP/1.0 - works
HTTP/1.1 - fails with an empty response body

See #1711.
2011-11-17 16:32:09 +01:00
Ben Noordhuis
8f15582ef3 test: add 'no response headers' http parser test 2011-11-17 13:36:29 +01:00
Artur Adib
960ccdc72c docs: clarify addon docs 2011-11-17 13:15:49 +01:00
Bert Belder
3e696d189c Windows: make Buffer and ObjectWrap available to compiled extensions
Closes GH-2036
2011-11-17 00:54:42 +01:00
Bert Belder
9c70b09e0a Fix strange vcbuild "label not found" error 2011-11-17 00:10:14 +01:00
Ben Noordhuis
5e3b0095de tls: make cipher list configurable
options.ciphers existed but didn't work, the cipher list was effectively
hard-coded to RC4-SHA:AES128-SHA:AES256-SHA.

Fixes #2066.
2011-11-17 00:01:41 +01:00
Ryan Dahl
40cb398867 Working on v0.7.0 2011-11-16 13:38:04 -08:00
Ryan Dahl
93dc713670 Merge remote branch 'origin/v0.6' 2011-11-16 13:37:20 -08:00
Ryan Dahl
44314ccf48 Upgrade libuv to 2007eb8 2011-11-16 13:06:10 -08:00
Łukasz Walukiewicz
3b852d7fab buffer: fix minimum values for writeInt*() functions 2011-11-16 21:30:26 +01:00
Łukasz Walukiewicz
5d0b5a00aa buffer: fix minimum values for writeInt*() functions 2011-11-16 21:27:26 +01:00
Ben Noordhuis
cf2ee19049 crypto: fix 'var may be used uninitialized' compiler warnings 2011-11-15 22:56:11 +01:00
Ben Noordhuis
b9e1bb3d92 build: auto-run tools/gyp_node after ./configure 2011-11-15 17:17:05 +01:00
Ryan Dahl
14b04b06b4 Remove SCONS deprecate WAF
We keep around WAF for node-waf only.

We need great diligence by people over the next couple weeks to work out all
the kinks in the GYP build system. We realize that it is currently several
times slower than the WAF build. Please lend a hand.

Fixes #1504
Fixes #1500
2011-11-14 19:17:42 -08:00
Ryan Dahl
17a82e72f4 Upgrade V8 to 3.6.6.8 2011-11-14 17:17:23 -08:00
Ryan Dahl
4b0241d589 Remove str.format to support python2.5.
Fixes #2077
Fixes #2108

Thanks to David Keegan for debugging and the patch.
2011-11-14 17:09:44 -08:00
Trent Mick
2cd51ef5d4 "Trailer" header should mention "Content-MD5" trailer name in this example.
Fixes #2107
2011-11-14 16:54:24 -08:00
seebees
3222a04d5e test for REPL .save and .load and documentation updates 2011-11-13 19:54:35 +01:00
Mathias Bynens
897208e06d punycode: Update to v0.1.1. 2011-11-13 15:38:27 +01:00
seebees
3421f43351 .load, .save and local scope tab completion
Fixes #2063.

REPLServer.prototype.resetContext:
Reset the line cache

REPLServer.prototype.memory (don't know if I like that name, called from finish)
pushes what cmd's have been executed against it into this.lines
pushes the "tab depth" for bufferedCommands, in this.lines.level

REPLServer.prototype.displayPrompt:
Uses "tab depth" from this.lines.level to adjust the prompt to visually
denote this depth e.g.
> asdf = function () {
… var inner = {
….. one:1

REPLServer.prototype.complete:
Now notices if there is a bufferedCommand and attempts determine locally
scoped variables by removing any functions from this.lines and evaling these
lines in a nested REPL e.g.
> asdf = function () {
… var inner = { one: 1};
… inn\t
will complete to 'inner' and inner.o\t will complete to 'inner.one'
If the nested REPL still has a bufferedCommand it will falls back to the
default.

ArrayStream is a helper class for the nested REPL to get commands pushed to it.
new REPLServer('', new ArrayStream());

Finally added two new REPL commands .save and .load, each takes 1 parameter,
a file and attempts to save or load the file to or from the REPL
respectively.
2011-11-12 11:34:55 -08:00
seebees
b00f5e2e14 Tab Compete test for node REPL
Currently the REPL only tab completes for globally scoped variables
2011-11-12 11:34:55 -08:00
Ben Noordhuis
098fef6740 timers: remember extra setTimeout() arguments when timeout==0
Fixes #2079.
2011-11-12 13:31:28 +01:00
Ryan Dahl
8082858ee7 Now working on v0.6.2 2011-11-11 15:35:10 -08:00
Ryan Dahl
170f2addb2 Bump version to v0.6.1 2011-11-11 14:56:27 -08:00
Ryan Dahl
5bc1809b43 Add 'make dist-upload' 2011-11-11 14:31:15 -08:00
Ryan Dahl
d214576d2b Be consistent with v before version in packages 2011-11-11 14:02:42 -08:00
Igor Zinkovsky
2095eea3da msi changes
- remove license from MSI
- adjust path on install
- add message to the end
2011-11-11 12:50:04 -08:00
Ryan Dahl
2af6431619 Add upload command to vcbuild.bat 2011-11-11 12:38:55 -08:00
Ryan Dahl
895fa3a56b Simplify and move getnodeversion.py 2011-11-11 12:09:48 -08:00
Shigeki Ohtsu
e0f10ecfd9 debugger: correctly handle source with multi-byte characters 2011-11-11 20:29:50 +01:00
Ryan Dahl
4e2343c6b5 Fixes #2073. Cluster should be silent. 2011-11-11 11:24:59 -08:00
Ben Noordhuis
10d4bd8266 test: add more punycode tests 2011-11-11 17:02:43 +01:00
Ben Noordhuis
326b2cb34e punycode: replace with Mathias Bynens's implementation
The currently bundled library doesn't pass all the test cases from RFC 3492.
Mathias's library does.

Home: https://github.com/bestiejs/punycode.js
2011-11-11 17:02:43 +01:00
Yoji SHIDARA
426298c8c1 docs: dgram client should be closed in the callback 2011-11-11 10:39:32 +01:00
Ryan Dahl
74f39041d4 dont use blue for numbers in util.inspect 2011-11-10 23:35:35 -08:00
Ryan Dahl
dc39ab3bbf Improve OSX installer 2011-11-10 18:41:44 -08:00
Igor Zinkovsky
ec90ede1cf fix msi builder 2011-11-10 18:40:49 -08:00
Igor Zinkovsky
13324bf844 throw from stdout.end and stderr.end 2011-11-10 14:51:16 -08:00
Igor Zinkovsky
09329e7833 Add node.rc with a version resource
Fixes #2059
2011-11-10 13:22:13 -08:00
Ben Noordhuis
78ca555845 bench: optimize io.c benchmark
Use static buffers. Most clock ticks were spent in malloc() and free() instead
of read() and write().

Fix measurements. Really fast runs would result in bogus results like:

  Wrote 1048576000 bytes in -0.731630s using 8192 byte buffers: -1366.811093mB/s
2011-11-10 21:13:37 +01:00
Ben Noordhuis
0757c73a20 uv: upgrade to 224584c 2011-11-10 20:10:54 +01:00
Ben Noordhuis
e34a2c170c uv: upgrade to 26806e2 2011-11-10 16:40:56 +00:00
Ben Noordhuis
8dd4fcbe8f fs: don't close uninitialized fs.watch handle
Makes uv_close() assert because the uv_fs_event_t struct contains garbage.
2011-11-10 13:17:51 +01:00
Igor Zinkovsky
f84d86b660 make stdout stream non-destroyable 2011-11-09 15:04:44 -08:00
Igor Zinkovsky
5d89540b77 make stderr stream non-destroyable 2011-11-09 13:53:19 -08:00
Ben Noordhuis
4fc0fdc6ee bench: start (NUM_CPUS-1) workers
The master is a worker too so fork off one less worker.
2011-11-09 17:34:53 +01:00
Ben Noordhuis
cdcb1118c8 Remove stray NODE_MODULE() semi-colons. 2011-11-09 16:34:09 +01:00
Ryan Dahl
0fa3cf94a3 Remove 'report this bug' message from cluster master 2011-11-08 17:07:49 -08:00
Ryan Dahl
da9bf0ee80 Fixes #2047. Fill workers array immediately after fork 2011-11-08 17:03:29 -08:00
Ryan Dahl
3ae644d48c Upgrade libuv to 196e145 2011-11-08 16:59:40 -08:00
Ryan Dahl
2a462abf5f process.kill doesn't create error obj correctly 2011-11-08 16:58:32 -08:00
Ryan Dahl
05727f6e3e Upgrade libuv to 2b7774a 2011-11-08 16:52:45 -08:00
Ryan Dahl
2d13cdfd2a Fixes #2052. Readline get win cols correctly 2011-11-08 13:37:08 -08:00
Ben Noordhuis
efb833f342 crypto: use the right mutex 2011-11-08 20:56:45 +01:00
Ryan Dahl
409915e955 Upgrade libuv to f1859eb
Fixes #2040
Fixes 0e8a55d2a2 (commitcomment-69710)
2011-11-08 11:52:18 -08:00
Ben Noordhuis
97cada0e6a crypto: make module thread-safe 2011-11-08 20:04:23 +01:00
Ryan Dahl
0ba8f05a42 Upgrade V8 to 3.6.6.7 2011-11-08 10:00:12 -08:00
Scott Anderson
0d19d82498 Cluster documentation added. 2011-11-09 00:02:18 +09:00
Ben Noordhuis
6f96e78dea test: fs.realpath() should not call its callback twice
Test case for #2045.
2011-11-08 13:03:29 +01:00
Benjamin Pasero
b1bb17fd2b fs: fix fs.realpath on windows to return on error 2011-11-08 13:02:04 +01:00
Ben Noordhuis
04958e88a4 fs: make mkdir() call callback if mode is omitted
Fixes #2043.
2011-11-08 12:48:09 +01:00
Ben Noordhuis
105d1787dc cluster: fix call to undefined function 2011-11-08 08:29:25 +01:00
Eric Lovett
69d3bf1068 docs: minor grammar fix in cluster page 2011-11-08 00:43:59 +01:00
Ben Noordhuis
d7bcf21340 build: fix race in parallel build
Run `make clean` first, *then* `make all`
2011-11-08 00:25:54 +01:00
Ryan Dahl
6a83df04b6 Update multi-core text on index.html 2011-11-07 10:43:48 -08:00
Ryan Dahl
a9366818a1 Remove v0.4 links from index.html 2011-11-07 10:41:01 -08:00
Ben Noordhuis
edcfea5d02 build: fix man page install path on the BSDs
Fixes #2026.
2011-11-07 06:46:09 +01:00
koichik
1001cf412c bench: update static_http_server benchmark to new API
Fixes #2016.
2011-11-06 01:25:07 +09:00
Fedor Indutny
da82daf54c test: debugger-repl should wait for 'drain' event 2011-11-05 15:24:28 +01:00
Eric Lovett
febe5c44c0 docs: use markdown for link, not html 2011-11-05 13:00:20 +01:00
Ben Noordhuis
099c717baf docs: fix copy/paste error, 0.6.0 is a stable release 2011-11-05 10:44:27 +01:00
Eric Lovett
8f2b03242d docs: minor typo fix in child process docs 2011-11-05 10:41:39 +01:00
Ryan Dahl
9e00b7d3d0 Now working on v0.6.1 2011-11-05 01:55:34 -07:00
Ryan Dahl
865b077819 Bump version to v0.6.0 2011-11-04 23:48:57 -07:00
koichik
96fe50400d docs: fix typo 2011-11-05 12:35:38 +09:00
Ben Noordhuis
10edbbb927 uv: upgrade to c468e2a 2011-11-05 03:13:55 +01:00
Igor Zinkovsky
7335a4234a fix test-module-loading on windows 2011-11-04 18:05:53 -07:00
Igor Zinkovsky
1a9286c6e9 update fs_event_wrap.cc to work with new uv_fs_event_init api 2011-11-04 18:04:52 -07:00
Igor Zinkovsky
6545a6dc5d make updates to work with latest libuv api changes 2011-11-04 18:01:03 -07:00
Bert Belder
b54da8a10f Upgrade libuv to 1997e10b50 2011-11-05 01:50:05 +01:00
Ryan Dahl
5c3954aa6f docs: make std*Stream spawn opts explicitly internal
Fixes #1884.
2011-11-04 15:56:28 -07:00
Jacob H.C. Kragh
c1472ac105 docs: fix some minor typos in the fs documentation
* fchmodSync: replace 'path' with 'fd'
* lchmod: replace 'fd' with 'path'
* utimes, futimes, fsync: mark 'callback' as optional
2011-11-04 23:53:01 +01:00
Ben Noordhuis
89014c9d40 bench: add http_simple cluster edition benchmark 2011-11-04 23:53:01 +01:00
Ryan Dahl
1e3e6b7c15 cluster: add example for message passing 2011-11-04 15:34:18 -07:00
Igor Zinkovsky
5496e67f83 upgrade libuv to 82cf0b38c0
fixes #2004
2011-11-04 15:19:46 -07:00
Ryan Dahl
d42006c80a cluster: Remove eachWorker, workerCount
unnecessary
2011-11-04 15:14:38 -07:00
Ryan Dahl
86528489ec new cluster api 2011-11-04 15:12:11 -07:00
Jacob H.C. Kragh
44a5452a4f docs: fix typo in the documented fchown signature 2011-11-04 20:10:21 +01:00
Matt Robenolt
5213c39038 Close #1930 Convenience methods for zlib
This is a combination of 20 commits. Their commit messages are preserved
below for the benefit of future generations.

* Adding a shortcut to easily compress/decompress a string of text.
* Making the API consistent. unzip should accept a Buffer for input as well.
* Adding docs.
* Oops, typo.
* Propagate error through the callback.
* Adding zlib from string tests.
* Typo in test.
* Remove 'end' listeners, and join buffers properly instead of joining them
  as a string.
* Oops, needs to be rendered to a string.
* Updated test to include multi-byte characters.
* unzip should return a raw Buffer. Updated docs to reflect.
* And finally updating test.
* EventEmitter.destroy() is a bit more customary
* Revert "EventEmitter.destroy() is a bit more customary"
* Renaming internal methods to "buffer" instead of string.
* Remove the 'error' listeners as well.
* @isaacs: spacing/style, and compress duplicate functions into one
* @isaacs: Update docs
* @isaacs: doc style fix
2011-11-04 10:32:57 -07:00
Fedor Indutny
8ef2c13d6c fix debugger-repl test 2011-11-04 18:00:18 +01:00
Fedor Indutny
b5d32d4a9e debugger: do not request continue on connection
* Updated test
* Use `node debug file`, not `node debug -e "..."` in test
2011-11-04 17:50:46 +01:00
Bert Belder
829735e738 Implement process._debugProcess 2011-11-04 17:50:28 +01:00
Bert Belder
35f4182cee Make error reporting from node::DLOpen more consistent 2011-11-04 16:24:35 +01:00
Bert Belder
6ee73a2fee Windows: ErrnoException shouldn't mix up crt and win32 errors 2011-11-04 16:24:35 +01:00
Bert Belder
189dd8f803 Fix line endings and trailing whitespace 2011-11-04 16:24:34 +01:00
Jordan Sissel
358f0ce96b url: add '.' '+' and '-' in url protocol
- Based on BNF from RFC 1738 section 5.
- Added tests to cover svn+ssh and some other examples
2011-11-04 13:36:06 +01:00
Ben Noordhuis
5fd012e67a fs: don't use octal values, not allowed in strict mode 2011-11-04 13:10:07 +01:00
Ben Noordhuis
8974ba31a3 test: fix simple/net-pipe-connect-errors
When trying to connect to something that is not a UNIX socket, Linux returns
ECONNREFUSED, not ENOTSOCK.

We cannot atomically determine if the other end is a) a stale socket, or b) not
a socket at all, so let's accept both error codes.
2011-11-04 05:30:00 +01:00
Ryan Dahl
cf78d04ae2 Upgrade libuv to 9c7ed0d
Fixes test-net-pipe-connect-errors.js on UNIX.
See #2001.
2011-11-03 16:33:54 -07:00
Fedor Indutny
b904a078d8 report debugger's test errors 2011-11-03 14:11:14 -07:00
Ryan Dahl
a936768890 stdout and stderr are blocking when referring to regular files
Fixes message tests.
2011-11-03 13:27:33 -07:00
Ryan Dahl
4a8088a603 Socket.write should reset timeout timer.
Fixes #2002.
2011-11-03 12:37:04 -07:00
Ben Noordhuis
9c11e8a1ca net: implement Server.prototype.address() for pipes 2011-11-03 19:16:10 +01:00
Maciej Małecki
481c17504d test error codes related to pipes
This tests passes on node v0.4, but fails on node v0.5. v0.5 seems to
generally lack error codes for various error events related to UNIX
pipes.

Fixes #2001
2011-11-03 10:54:00 -07:00
Ryan Dahl
2dd68af334 Remove -Werror from V8 build 2011-11-03 10:46:16 -07:00
Ryan Dahl
0e9c1ca673 Downgrade V8 to 3.6.4 2011-11-03 10:34:22 -07:00
koichik
a6dbe0ff23 docs: make fs.mkdir()'s mode argument an option. 2011-11-03 20:04:22 +09:00
Ben Noordhuis
11d68eb3fc fs: make mkdir() default to 0777 permissions
Fixes #1999.
2011-11-03 09:37:23 +01:00
Ben Noordhuis
52eaac4382 uv: upgrade to 0fb3769 2011-11-03 03:25:11 +01:00
Ben Noordhuis
818f0cba55 v8: fix freebsd build, implement VirtualMemory class 2011-11-03 03:23:59 +01:00
Igor Zinkovsky
434ccd2e20 fix process.uptime() on windows 2011-11-02 18:27:43 -07:00
Igor Zinkovsky
24a69d22a0 process.kill to use uv_kill 2011-11-02 17:34:17 -07:00
Ben Noordhuis
359a65a6db http: emit Error object after .abort()
It was emitting the net.Socket object due to misuse of the arguments object.

Fixes #1399.
2011-11-03 01:30:03 +01:00
Igor Zinkovsky
143aeb9ea7 upgrade libuv to e1bee05ecdbffbe9de37830530ad2ae2f1fb41c8 2011-11-02 16:51:26 -07:00
Ryan Dahl
850609ea2d Remove separation of libuv tests 2011-11-02 16:38:59 -07:00
Ben Noordhuis
1ba834bd3f docs: http: link to relevant net.Socket methods 2011-11-03 00:22:02 +01:00
Fedor Indutny
9ad27f7853 ignore undefined messages in the debugger repl
fixes #1995
2011-11-02 15:55:36 -07:00
Ben Noordhuis
c8646e0c41 test: add ChildProcess.prototype.killed test case 2011-11-02 18:37:34 +01:00
Maciej Małecki
6bd0bcd5af child_process: in a new ChildProcess set killed to false
This behavior is consistent with what v0.4 does.
2011-11-02 18:17:51 +01:00
Ryan Dahl
60818b957c Add missing copyright headers 2011-11-02 10:00:57 -07:00
Ben Noordhuis
672b453a76 docs: http: fix docs for the 'close' event 2011-11-02 17:28:46 +01:00
Ben Noordhuis
edea4122b1 Revert "Upgrade V8 to 3.7.1"
This reverts commit 92f5a5d3ca.

V8 3.7.1 in debug mode on ia32 has a curious race-like bug where an fs.Stats
object is not fully formed until some time after it's created. This is easy
to demonstrate by running `make test-debug`.

V8 3.7.0 does not exhibit this behaviour so back we go.

Fixes #1981.
2011-11-02 16:58:35 +01:00
Igor Zinkovsky
cc92234068 fix pummel/test-net-throttle on windows 2011-11-01 16:44:08 -07:00
Maciej Małecki
fc61134b1a doc: fix links
Changes:

  * 'http://github.com' => 'https://github.com'
  * 'https://github.com/ry/node' => 'https://github.com/joyent/node'
  * 'https://github.com/ry/http-parser' =>
    'https://github.com/joyent/http-parser'
  * old issue links
  * wiki link
2011-11-01 22:26:52 +01:00
Igor Zinkovsky
3060266ff1 windows: enable pending accepts knob 2011-11-01 14:14:52 -07:00
Ben Noordhuis
21b64dc7c9 uv: upgrade to 90b0b7d 2011-11-01 22:11:58 +01:00
Ben Noordhuis
37bb37d151 os: rename getNetworkInterfaces() to networkInterfaces() 2011-11-01 18:10:06 +01:00
Maciej Małecki
b4afe605f4 node: remove process.compile
It was deprecated before v0.4.
2011-11-01 17:45:21 +01:00
Ben Noordhuis
362b5a6c40 process: fix process.nextTick() error case regression
Patch and test by Koichi Kobayashi.
2011-11-01 16:30:43 +01:00
koichik
f5a01d1764 test: fix test/message/undefined_reference_in_new_context.js
after 4d4900f, stack trace was changed.
2011-11-01 19:30:19 +09:00
isaacs
06190928c0 doc: Correct blatantly wrong futimes documentation 2011-10-31 16:31:59 -07:00
Ben Noordhuis
4d4900fc65 process: optimize process.nextTick()
33% performance boost on large nextTick queues.
2011-10-31 22:31:14 +01:00
Ben Noordhuis
5fee1ff7bc bench: add process.nextTick() benchmark 2011-10-31 22:02:46 +01:00
koichik
f53d092a2a tls, https: add passphrase option
Fixes #1925.
2011-10-31 17:36:43 +09:00
Ben Noordhuis
b6c582a3a3 docs: tty: remove tty.open() documentation 2011-10-30 21:22:46 +01:00
Ben Noordhuis
a1fa3efd2b core: fix off-by-one error in node::DLOpen()
Fixes loading of modules that use the NODE_MODULE macro on POSIX platforms.
2011-10-30 17:35:08 +01:00
Ben Noordhuis
26874e2e07 docs: addons: fix example 2011-10-30 17:15:10 +01:00
koichik
8a729270c1 fix for --harmony_block_scoping
Fixes #1969.
2011-10-31 00:49:20 +09:00
koichik
52c2988f16 docs: fix option's name of cluster.startMaster() 2011-10-30 11:40:31 +09:00
Ben Noordhuis
a7803c58e4 uv: upgrade to 70381ce 2011-10-30 02:56:51 +01:00
Siddharth Mahendraker
12cf730b69 events: separate maxListeners and _events
Fixes #1479.
Fixes #1923.
2011-10-30 02:14:30 +01:00
Igor Zinkovsky
6d7aa65399 fix pummel/test-child-process-spawn-loop.js on windows 2011-10-28 18:32:27 -07:00
Bert Belder
60efa608d6 Upgrade libuv to e4d6509211 2011-10-29 01:33:01 +02:00
Bert Belder
a56a95b652 Export some functions from node.h 2011-10-29 01:06:53 +02:00
Bert Belder
4a1efb2b9c Support native extension loading on Windows 2011-10-29 01:06:51 +02:00
Bert Belder
dd93c53c4e Make node::DLOpen use uv_dlopen 2011-10-29 01:06:49 +02:00
Bert Belder
2f22024806 Upgrade libuv to 90e15f1110 2011-10-29 01:06:47 +02:00
Bert Belder
c0c4bd4efa Add common.gypi to gyp output 2011-10-29 01:06:45 +02:00
Bert Belder
889620dcd2 Wrap long lines, strip trailing whitespace 2011-10-29 01:06:44 +02:00
Bert Belder
1e2d777601 Remove outdated comment 2011-10-29 01:06:42 +02:00
Bert Belder
6a6a70e80e Fix v8 build on Windows
There's probably a better way to fix this
2011-10-29 01:06:40 +02:00
Igor Zinkovsky
56315494dd fix simple/test-child-process-double-pipe on windows 2011-10-28 15:57:39 -07:00
Igor Zinkovsky
f35a396c54 Revert "remove node_io_watcher"
This reverts commit cc2ac1ccc7.
2011-10-28 15:35:38 -07:00
Ben Noordhuis
ccd8b55b01 linux: unbreak build if HAVE_MONOTONIC_CLOCK=0 2011-10-28 23:47:08 +02:00
Ben Noordhuis
004e6fbe1f docs: addons: fix NODE_SET_METHOD example 2011-10-28 22:36:55 +02:00
Zachary Scott
e35ce7baa1 docs: tty: stdin must be initialized before calling setRawMode 2011-10-28 22:32:04 +02:00
Ben Noordhuis
1d94d4fa70 docs: fix home page link to API docs 2011-10-28 18:22:39 +02:00
Ben Noordhuis
3dee0e4cd8 zlib: compile without -ansi
Source contains C++ / C99 comments, gcc in strict mode doesn't like that.
2011-10-28 17:31:40 +02:00
Igor Zinkovsky
cc2ac1ccc7 remove node_io_watcher 2011-10-27 16:47:37 -07:00
koichik
173f91c791 docs: add zlib.createXxx() functions 2011-10-27 21:21:54 +09:00
Ben Noordhuis
b9529545e1 v8: implement VirtualMemory class on SunOS
Unbreaks build on SunOS. Re-applies 4908e5bf7a.
2011-10-27 11:22:07 +00:00
Ryan Dahl
92f5a5d3ca Upgrade V8 to 3.7.1 2011-10-27 00:48:23 -07:00
Tj Holowaychuk
528c28587f cluster: Add some docs, improve cluster.isWorker()
Fixes #1949.
2011-10-26 16:42:00 -07:00
Ryan Dahl
c5d54010bc node cluster is now a module instead of CLI interface
This is to make room for master process plugins instead of adding CLI
options as proposed in #1879.
2011-10-26 13:50:53 -07:00
Nathan Rajlich
4fb2ac5be1 Add test cases for #1944. 2011-10-27 04:58:51 +09:00
Nathan Rajlich
ebefe77bc0 More bulletproof util.inspect() function.
Use the *real* versions of the Date and RegExp functions, from the
prototype. This defends against code like:

  var d = new Date()
  d.toUTCString = null
  util.inspect(d)
    // TypeError: toUTCString is not a function

Fixes #1944.
2011-10-27 04:58:34 +09:00
Nathan Rajlich
d4379fcee3 Add test case for #1941.
Add test for the false-positives from #1942.
Fix test-sys.js.
2011-10-27 04:33:24 +09:00
Nathan Rajlich
2dbb470ea1 Don't use instanceof in lib/util.js "is" checks.
While using `instanceof`, these functions could easily be faked with something
like:  Object.create(Date.prototype)

So let's just not use it at all. A little slower, but these functions are only
used in the REPL / for debugging so it's OK.

Fixes #1941.
Fixes #1942.
2011-10-27 04:33:24 +09:00
Ryan Dahl
194511ff1a Return IPv4 addresses before IPv6 addresses from getaddrinfo 2011-10-26 12:28:25 -07:00
Nathan Rajlich
3524f41a27 Add docs for the type checking functions in util.js. 2011-10-27 03:38:29 +09:00
Nathan Rajlich
a6a04fb1ec Add test case for the util.js type checking functions. 2011-10-27 03:38:29 +09:00
Nathan Rajlich
b8f3e18a5d Export the type checking functions from util.js.
As per discussion at:
http://groups.google.com/group/nodejs-dev/browse_thread/thread/b08970166e4670cf
2011-10-27 03:38:29 +09:00
Ryan Dahl
b3ddb895d2 Don't compile in node_dtrace.cc when not supported 2011-10-26 11:36:21 -07:00
Zachary Scott
3961b5a131 docs: update email address 2011-10-26 20:00:54 +02:00
Zachary Scott
7fb8c7c37f docs: update socket.io url 2011-10-26 20:00:10 +02:00
koichik
cbcaeedba9 tls: add address(), remoteAddress/remotePort
Fixes #758.
Fixes #1055.
2011-10-27 00:28:16 +09:00
koichik
0e8a55d2a2 tls: does not emit 'end' from EncryptedStream
de09168 and 4cdf9d4 breaks `test/pummel/test-https-large-response.js`.
It is never finished.

Fixes #1936.
2011-10-27 00:18:29 +09:00
Ben Noordhuis
13871fa2f8 build: fix sunos gyp build, include platform file 2011-10-26 05:11:38 +00:00
Ben Noordhuis
15628f6735 sunos: don't use exceptions
Don't use exceptions in platform functions. Fix a resource leak
(leaked kstat handle) while we're at it.
2011-10-26 05:09:21 +00:00
Ben Noordhuis
d7dff34bad gyp: support older bash versions
Older bash versions in `sh -c` mode don't parse `export FOO=42` constructs,
they bail out with a "FOO is not an identifier" error message.

This was fixed somewhere between bash 4.1.0 and 4.1.5 but let's support the
older versions anyway.
2011-10-26 04:59:31 +00:00
Ben Noordhuis
b8847e9ac6 uv: upgrade to 0cb2213 2011-10-26 00:05:24 +02:00
Igor Zinkovsky
0a5708c3e9 fix test-http-curl-chunk-problem.js and test-pipe-file-to-http.js on windows 2011-10-25 14:10:12 -07:00
Ben Noordhuis
680765abec http: fix gcc 3.x build, don't use always_inline 2011-10-25 19:18:58 +00:00
Ben Noordhuis
dddfd0f8b8 test: spawn process.argv[0], not 'node'
'node' may or may not be on the path and may or may not be the version we are
running the test suite for.
2011-10-25 02:24:51 +02:00
Nathan Rajlich
58cb0fa639 Directly export the Stream constructor.
Also setting up a circular reference back to the
stream as `Stream.Stream`, for backwards-compatibility.

Fixes #1933
2011-10-24 15:45:35 -07:00
Ryan Dahl
239b3d62de Remove resume and pause events
Too complex; unnecessary.
2011-10-24 13:23:59 -07:00
isaacs
4c5751ba97 Close #1929 zlib Respond to 'resume' events properly 2011-10-24 12:55:45 -07:00
Maciej Małecki
7ee29d1d5b net: Server.listen, Server.close and Socket.connect return this
Just a syntactic sugar for doing, for example:

    var server = net.createServer(function (c) {
      c.end('goodbye, cruel world!\r\n');
      server.close().on('close', function () {
        console.log('really, goodbye!');
      });
    }).listen(1337);

Fixes #1922.
2011-10-24 22:19:42 +09:00
koichik
00aa8935d7 docs: improvement fs, http and https 2011-10-22 23:40:15 +09:00
seebees
216570b5e1 Lint 2011-10-22 14:14:40 +09:00
seebees
a2eaddaa51 Documentation update
http.markdown
  note options now align with url.parse
  added note that hostname is preferred over host.
  added auth
  added not that setting an explicit Authorization header will override basic authentication with 'auth'

https.markdown
  Made a link to http.request and noted that all http.request options are valid.

url.markdown
  added path option
2011-10-22 14:14:40 +09:00
seebees
1ead20f274 remove auth from host
Fixes #1626
2011-10-22 14:14:40 +09:00
seebees
005d607aed http.request(url.parse(x))
http2.js

protocols object to store defaults for http and https, and use as a switch for supported protocols.
options.hostname > options.host > 'localhost'
if I have an options.auth element and I do not have an Authorization header, I do basic auth.
http.request collapses to new ClientRequest since the defaults are handled by the protocol object

test-http-url.parse*

Fixes #1390

Conflicts:

	lib/http2.js
2011-10-22 14:14:40 +09:00
seebees
be4576de7a url.resolveObject(url.parse(x), y) == url.parse(url.resolve(x, y));
added a .path property = .pathname + .search for use with http.request

And tests to verify everything.
With the tests, I changed over to deepEqual, and I would note the comment on the test
['.//g', 'f:/a', 'f://g'], which I think is a fundamental problem

This supersedes pull 1596
2011-10-22 14:14:39 +09:00
koichik
ed744ecbfd docs: remove #1914 from Changelog. 2011-10-22 14:02:36 +09:00
Nathan Rajlich
bdb9d09aef Print out undefined on the REPL when returned.
util.inspect() has a special case for "undefined", so it's nice to be able to
distinguish visually that undefined is the result of an expression.
2011-10-22 14:02:35 +09:00
koichik
7e2d799328 docs: fix typo 2011-10-22 14:02:35 +09:00
Ryan Dahl
9b808c2d1b Now working on v0.5.11 2011-10-21 19:16:06 -07:00
Ryan Dahl
220e61c1f6 Bump version to v0.5.10 2011-10-21 18:46:42 -07:00
Ben Noordhuis
dd6faa5adf uv: upgrade to 179f475 2011-10-21 18:44:19 -07:00
Ben Noordhuis
ac379b3be1 net: bring back .setNoDelay() and .setKeepAlive() 2011-10-21 18:09:23 -07:00
Ben Noordhuis
401c073dd2 uv: upgrade to ec825ff 2011-10-21 18:09:17 -07:00
Ryan Dahl
493d3b9f7c Merge remote branch 'origin/v0.4'
Conflicts:
	ChangeLog
	Makefile
	deps/libev/wscript
	doc/index.html
	doc/template.html
	lib/net.js
	src/node_version.h
	src/platform_cygwin.cc
	test/pummel/test-net-write-callbacks.js
	test/simple/test-buffer.js
2011-10-21 18:02:30 -07:00
Igor Zinkovsky
8498ee03bc make simple\test-fs-symlink.js work on windows 2011-10-21 17:31:32 -07:00
Maciej Małecki
8f1ba251dd test: #1899 - output in child process raises an exception 2011-10-21 15:53:09 -07:00
Ryan Dahl
d5a21a29f8 getaddrinfo returns ENOTFOUND for invalid domain names
change test-http-dns-error to reflect this.
2011-10-21 15:19:53 -07:00
Ryan Dahl
efa95c2718 Fix test-eio-race on Windows 2011-10-21 14:55:28 -07:00
Ben Noordhuis
3c3ec7b2d7 gyp: upgrade to r1081 2011-10-21 13:49:29 -07:00
Ryan Dahl
9b2335a356 Upgrade libuv to 7738306 2011-10-21 13:44:30 -07:00
Ryan Dahl
de09168e5a Emit 'end' from crypto streams on close
Fixes test/simple/test-tls-peer-certificate.js on Windows

Patch from bnoordhuis.

See also 75a0cf970f
2011-10-21 13:16:41 -07:00
isaacs
2d02e6a992 Add useGlobal flag for standard node repl 2011-10-21 13:02:49 -07:00
isaacs
caf70f5e94 Revert "Don't use a separate context for the repl."
This reverts commit b70fed48a7.
2011-10-21 13:00:37 -07:00
Ben Noordhuis
0ae98dfc66 build: fix wscript on solaris
os.path.exists() in python 2.5.2 returns false for symlinks.
2011-10-21 12:46:55 -07:00
Igor Zinkovsky
69b73f9cf0 make process.kill a no-op on windows 2011-10-21 10:27:22 -07:00
Ryan Dahl
fafb584881 Fix race condition in test-dgram-pingpong 2011-10-21 10:21:23 -07:00
Ben Noordhuis
84d0b1bcc5 http: improve http parser bindings
Speeds up HTTP benchmarks by 10% on average.
2011-10-20 19:19:02 -07:00
Ryan Dahl
c83dda89a4 dns.lookup uses cares_wrap::GetAddrInfo 2011-10-20 18:03:02 -07:00
Ryan Dahl
fb3cccc257 Upgrade libuv to 2c7e8bb 2011-10-20 17:58:35 -07:00
Bert Belder
00bbe958c4 Fix windows build 2011-10-20 15:40:08 -07:00
Ben Noordhuis
145aa636b9 uv: upgrade to 28234d7 2011-10-20 15:30:09 -07:00
Ryan Dahl
be2320d408 Add binding to uv_getaddrinfo 2011-10-20 15:06:53 -07:00
Nathan Rajlich
95d530f2b4 repl: print out undefined
util.inspect() has a special case for "undefined", so it's nice to be able to
distinguish visually that undefined is the result of an expression.
2011-10-20 08:41:33 -07:00
Fedor Indutny
b43eb9678b debugger: fix backtrace err handling 2011-10-20 08:37:51 -07:00
Ben Noordhuis
9bb3a683fe docs: improve buffer.fill() documentation
Fixes #1912.
2011-10-19 18:20:55 -07:00
Ryan Dahl
6cc42927d8 Display sys_errno when UV_UNKNOWN is returned 2011-10-19 16:53:07 -07:00
Ryan Dahl
88af0c8635 Remove os.openOSHandle
Unused.
2011-10-19 16:28:58 -07:00
Ryan Dahl
67b235735e Remove support for cygwin 2011-10-19 16:23:26 -07:00
Ryan Dahl
9d27faa2c4 Revert "Fix #1801 vm: Use 'sandbox' as global_prototype"
Accidentally committed. Revert until review.

This reverts commit 200df8641b.
2011-10-19 11:01:08 -07:00
Thomas Parslow
b0f78afe58 http: Added support for HTTP PATCH verb
Fixes #1907.
2011-10-19 19:59:16 +09:00
koichik
6a72e52520 buffer: use NO_NULL_TERMINATION flag
Refs #394.
Fixes #1902.
2011-10-19 15:03:00 +09:00
isaacs
b70fed48a7 Don't use a separate context for the repl.
Fix #1484
Fix #1834
Fix #1482
Fix #771

It's been a while now, and we've seen how this separate context thing
works.  It constantly confuses people, and no one actually uses '.clear'
anyway, so the benefit of that feature does not justify the constant
WTFery.

This makes repl.context actually be a getter that returns the global
object, and prints a deprecation warning.  The '.clear' command is gone,
and will report that it's an invalid repl keyword.  Tests updated to
allow the require, module, and exports globals, which are still
available in the repl just like they were before, by making them global.
2011-10-18 18:18:32 -07:00
elliottcable
200df8641b Fix #1801 vm: Use 'sandbox' as global_prototype
Squashed commit:

(- re tests) Cleaning up the `Script` test suite.

For whatever reason, there were several duplicate test files related to `Script`
and the `'vm'` module. I removed these, and fixed a few other small issues.
(More fixes coming in subsequent commits.)

Squashes: 19e86045a0..1e3dcff4eb

(api fix:1801 new:1801) `'vm'` module uses sandbox as prototype

As described in GH-1801, the `'vm'` module was handling the `sandbox` object
provided by the API consumer in a particularly terrible and fragile fashion: it
was simply shallow-copying any enumerable properties from the sandbox onto the
global context before executing the code, and then eventually copying any values
on the global context back into the sandbox object *afterwards*.

This commit removes all of that implementation, and utilizes the passed sandbox
object as the *prototype of the context* instead. A bit of a hack, but a very
effective one.

This no longer allows for new variables created in the global context to be
placed into your sandbox after execution has completed, but that’s for the best
anyway, as it’s not very in line with the concept of a “box of passed-in
context.” I’m planning to further implement an interface for API consumers to
acquire the *actual global* from within the VM soon, thus allowing for
separation-of-concerns: providing data *to* the VM via the sandbox-prototype,
and exploring the internal environment of the VM itself.

// GitHub cruft: closes #1801

Squashes: 43b8e3c..209ed86
2011-10-18 17:56:35 -07:00
Ryan Dahl
d9bc8455cb Fix test-c-ares.js on Windows by disabling PTR test 2011-10-18 16:12:07 -07:00
Ryan Dahl
6cc0c9e6a9 Remove superfluous nextTick during server binding
This breaks fork().send({}, server._handle) after server.listen() because
server._handle is not set.
2011-10-18 15:12:18 -07:00
Ryan Dahl
dbfc8198a6 Upgrade GYP to r1078 2011-10-18 14:39:39 -07:00
Ryan Dahl
5783a52a9c Remove process.memoryUsage().vsize
Not meaningful cross platform; unused.
2011-10-18 14:31:37 -07:00
Ryan Dahl
d77ce4b998 Fixes #1860. Remove process.writeError
Breaks a few tests in "make test-message"
2011-10-18 13:12:50 -07:00
koichik
d2698d1822 http: add test for #1885 2011-10-17 16:14:35 +09:00
Yoshihiro Kikuchi
f90ba61478 http: tiny fix in http.js
Fixes #1885.
2011-10-17 01:14:45 +09:00
koichik
cdec7e3ae5 docs: improvement tls example 2011-10-16 16:50:16 +09:00
Igor Zinkovsky
5ca3dcd127 test: fix test-child-process-stdin and test-child-process-kill on windows 2011-10-15 22:55:24 +02:00
koichik
d6191f593d net: fix error handling in listen()
Fixes #1894.
2011-10-16 01:30:19 +09:00
koichik
86a67f15a0 docs: add example of tls 2011-10-16 01:26:38 +09:00
koichik
68cc173c6d tls: The TLS API is inconsistent with the TCP API
Add 'secureConnect' event to tls.CleartextStream.

Fixes #1467.
2011-10-15 19:27:21 +09:00
Ben Noordhuis
0b92fa0e93 net: fix connect queue bugs
This commit fixes two bugs in the handling of write requests when the connect()
call is still in progress.

1. The deferred write request's size was counted twice towards `.bytesWritten`.

2. The callback was not called. After connecting, `Socket.write()` was called
   with three arguments (data, encoding, cb) but it ignored the third argument.

Coincidentally fixes test/simple/test-net-connect-buffer.js.
2011-10-15 03:34:09 +02:00
Ben Noordhuis
6df574b744 net: properly account multi-byte chars in .bytesWritten 2011-10-15 03:24:34 +02:00
Igor Zinkovsky
971c3d90eb win: remove pthread-win32 init code 2011-10-15 02:50:16 +02:00
Igor Zinkovsky
107b05772a build: fix windows build 2011-10-15 02:12:53 +02:00
Ben Noordhuis
2f8596ee10 test: fix bug in setproctitle test
Output from `ps` may contain trailing whitespace, trim it.
2011-10-15 02:07:57 +02:00
Ben Noordhuis
4908e5bf7a v8: implement VirtualMemory class on SunOS
Unbreaks build on SunOS. Un-reverts 9bbca99107.
2011-10-14 23:29:35 +00:00
isaacs
e6f147141e doc: Add examples of zlib usage with http 2011-10-14 16:15:08 -07:00
Ben Noordhuis
b6a869ef4f test: check that EventEmitter.on == EventEmitter.addListener 2011-10-15 01:08:41 +02:00
Ben Noordhuis
018e110cd1 test: replace .addListener() calls with .on() 2011-10-15 01:08:36 +02:00
Ben Noordhuis
3108a9ee38 uv: upgrade to 456f831 2011-10-15 00:42:10 +02:00
koichik
19a855382c tls: requestCert unusable with Firefox and Chrome
Fixes #1516.
2011-10-15 00:54:46 +09:00
koichik
a09b747f30 child_process.fork: don't modify args
Fixes #1888.
2011-10-15 00:15:38 +09:00
Ben Noordhuis
e0297ca59b node: fix use of potentially uninitialized variable 2011-10-14 15:05:02 +00:00
Ben Noordhuis
87b34c94fa timer_wrap: add sanity check assert 2011-10-14 15:01:26 +00:00
Ben Noordhuis
9193062e70 tcp_wrap: add sanity check asserts 2011-10-14 15:01:26 +00:00
Ben Noordhuis
0dc844de17 node_script: remove unused variable 2011-10-14 15:01:21 +00:00
Ben Noordhuis
dc0b7364b5 node: fix arguments to uv_timer_start() 2011-10-14 14:43:49 +00:00
Ben Noordhuis
f1d3ae7753 cares_wrap: make destructor virtual
A class with virtual methods should have a virtual destructor.
2011-10-14 14:39:25 +00:00
Ryan Dahl
33b5f2f779 Upgrade V8 to 3.7.0 2011-10-13 17:45:02 -07:00
isaacs
59a5262041 Fix #1882 zlib Update 'availOutBefore' value, and test 2011-10-13 16:47:51 -07:00
Guglielmo Ferri
66a10b6e58 docs: add API documentation note about UDP datagram size 2011-10-13 18:10:01 +02:00
Maciej Małecki
683c1c6583 docs: document process.versions 2011-10-13 17:02:54 +02:00
Simen Brekken
4b0e36810a net: register net.Server callback only once
Only register once for listening when passing a callback to Server.listen(),
this prevents servers recycled using close() from invoking the callback when
Server.listen() is called later.
2011-10-13 16:09:14 +02:00
Ben Noordhuis
fab68aa1ed platform: support long process names on linux 2011-10-13 15:48:02 +02:00
Ben Noordhuis
5faff9ebdf test: test long process name support
On platforms that support it: linux, freebsd, darwin
2011-10-13 15:47:05 +02:00
koichik
1b55010a04 docs: added .json modules. 2011-10-13 17:06:27 +09:00
Brian White
f243ca199b docs: mention util instead of sys 2011-10-13 05:06:42 +02:00
Ryan Dahl
3a34972672 Fix test-http-conn-reset.js on OSX 2011-10-12 17:31:49 -07:00
Ilya Dmitrichenko
39987cbc80 docs: improved fs.Stats section in API documentation 2011-10-13 02:25:30 +02:00
Arnout Kazemier
e3d2ae0bfd sys has been moved to util 2011-10-13 02:21:37 +02:00
Ryan Dahl
e911171e03 Move some slow tests to pummel 2011-10-12 16:59:00 -07:00
Ryan Dahl
7b4370e5f8 Fix test/pummel/test-watch-file.js 2011-10-12 16:19:46 -07:00
Ryan Dahl
651b8a06d6 Fix test/pummel/test-exec.js 2011-10-12 16:12:24 -07:00
Karl Skomski
9557020dc1 New win32 platform function: GetCPUInfo
Fixes #1644
2011-10-12 15:10:19 -07:00
Daniel Ennis
59be975322 Improve IPC performance.
Reading of JSON data off the buffer, 10-15% performance increase.

Fixes #1864.
2011-10-12 15:06:51 -07:00
Ryan Dahl
73b4b86d29 Add cluster.js to node.gyp 2011-10-12 14:51:25 -07:00
Ryan Dahl
de7fb33879 Add some docs for node cluster 2011-10-12 14:19:32 -07:00
Ryan Dahl
08cb8fce67 Remove process.ARGV
Use process.argv instead.
2011-10-12 14:10:37 -07:00
Ryan Dahl
25ff181300 Revert some changes made in 12486a6
Some of the perf improvements from many-writes-fix branch were accidentally
undone in that commit. This puts them back in.
2011-10-12 12:49:58 -07:00
Ryan Dahl
16e1d5b5ce Remove uname and git-rev detection from http_simple.js 2011-10-12 12:29:40 -07:00
Ryan Dahl
b8966872b3 Upgrade libuv to c903bc3 2011-10-12 12:27:46 -07:00
Ben Noordhuis
6ed8d41ddd docs: fix child_process.send() example 2011-10-12 17:44:47 +02:00
Ben Noordhuis
bc96302fae uv: upgrade to 25a177a
Fixes #1869.
2011-10-12 17:37:35 +02:00
Ben Noordhuis
c82828ec27 test: add test for #1869
fs.readdir() on file should raise ENOTDIR, not UNKNOWN.
2011-10-12 17:37:30 +02:00
Ben Noordhuis
752571c7ba Remove --use-legacy switch from --help section. 2011-10-12 15:47:20 +02:00
Ryan Dahl
87339a22b1 introduce node cluster 2011-10-12 02:58:35 -07:00
Igor Zinkovsky
99757cbeb2 fix simple/test-fs-utimes.js on windows 2011-10-11 22:50:16 -07:00
Ryan Dahl
2b46959075 Add throughput benchmark 2011-10-11 22:40:04 -07:00
Igor Zinkovsky
f164704383 fs.watch documentation 2011-10-11 18:28:16 -07:00
Ryan Dahl
e0b59e7dbc Remove more dead code 2011-10-11 15:20:12 -07:00
Ryan Dahl
7085a04a1e Remove process.ENV 2011-10-11 15:17:32 -07:00
Ryan Dahl
83fce75700 Remove stdio binding source - somehow this was missed in cdf5d91 2011-10-11 14:59:39 -07:00
Ryan Dahl
0e2bbac4e0 Fix test-module-load-list.js 2011-10-11 14:49:39 -07:00
Ryan Dahl
9631e29933 Remove tests relying on !process.features.uv 2011-10-11 14:47:02 -07:00
Ryan Dahl
c8dbaf579c Remove --use-legacy and --use-uv 2011-10-11 14:39:31 -07:00
Ryan Dahl
4f59041990 Fix windows build 2011-10-11 14:25:50 -07:00
Ryan Dahl
cdf5d91fe5 Remove tty_legacy 2011-10-11 13:41:33 -07:00
Ryan Dahl
71cce3f45b Remove dgram_legacy 2011-10-11 13:26:41 -07:00
Ryan Dahl
58e892dadd Remove dns_legacy 2011-10-11 13:21:30 -07:00
Ryan Dahl
96e423a665 Remove child_process_legacy 2011-10-11 13:16:33 -07:00
Ryan Dahl
be0bb2dc13 Remove net_legacy timers_legacy 2011-10-11 13:11:54 -07:00
Ryan Dahl
d2b8037ed0 disable test-sendfd 2011-10-11 13:03:29 -07:00
Fedor Indutny
178e2ce65f docs: improve addons, readline, repl documentation 2011-10-11 21:44:09 +02:00
Ben Noordhuis
49c3a910c6 docs: fix typo in code snippet 2011-10-11 21:05:45 +02:00
Ryan Dahl
53c163cd5b Disable test-child-process-custom-fds.js 2011-10-11 11:27:58 -07:00
Ryan Dahl
728b04067d Upgrade libuv to 4ac1309
Fixes #1857
2011-10-11 10:51:07 -07:00
Tomasz Janczuk
6fadbec797 wix project to create msi installer for windows
Fixes #1706.
2011-10-11 10:29:03 -07:00
Ryan Dahl
b280a2d44d Remove ANOTHER old TODO list 2011-10-11 10:08:49 -07:00
Ryan Dahl
4f4f6dfce8 Remove old TODO list 2011-10-11 10:08:09 -07:00
Ryan Dahl
a29421bcfd Delete another CMake file 2011-10-11 10:07:36 -07:00
Ryan Dahl
6a371834d8 Remove cmake build system
This removes one of the three build systems. CMake has never been officially
supported and is not updated with WAF and GYP. WAF itself is considered
legacy and will be removed once the GYP system is feature complete on
Unixes. GYP is used currently on Windows/MSVS.
2011-10-11 09:58:38 -07:00
Ben Noordhuis
6cb1d26924 v8: fix gyp build on windows 2011-10-11 17:21:35 +02:00
Ben Noordhuis
c215262db4 uv: upgrade to 47d22ac 2011-10-11 16:56:43 +02:00
Ryan Dahl
24dabec039 now working on v0.5.10 2011-10-10 18:56:37 -07:00
Ryan Dahl
3bd9b08fb1 Bump version to v0.5.9 2011-10-10 18:18:56 -07:00
Ryan Dahl
07703fa78e Revert "v8: implement VirtualMemory class on SunOS"
This reverts commit 9bbca99107.
2011-10-10 18:18:12 -07:00
Ryan Dahl
3b1d656da5 Revert "Upgrade V8 to 3.6.6"
Not stable enough.
- Windows snapshot linking broken
- Linux crash on ./node_g test/simple/test-stream-pipe-multi.js

This reverts commit 56e6952e63.
2011-10-10 17:58:30 -07:00
Ben Noordhuis
9bbca99107 v8: implement VirtualMemory class on SunOS 2011-10-10 17:06:24 -07:00
Ryan Dahl
75cfc77527 Upgrade libuv to f7f518a 2011-10-10 17:05:18 -07:00
Ryan Dahl
8c738fa90c child_process.fork: don't overwrite env
thanks to Malte-Thorben Bruns for pointing this out
2011-10-10 14:49:02 -07:00
Ryan Dahl
ca4a0fce65 Remove test-child-process-channel.js 2011-10-10 14:27:52 -07:00
Ryan Dahl
982b19dbd7 Adjust listenFD deprecation message. Remove test. 2011-10-10 14:24:56 -07:00
Ryan Dahl
2c25507b81 process.stderr goes through libuv now
This commit removes one assert from test-console.js in which we check that
process.stderr.write returns true. In the case of a dump to a file we cannot
guarantee this any longer now that it goes through fs.WriteStream.
2011-10-10 14:15:44 -07:00
Ben Noordhuis
6b9f559984 gyp: work around sunos python flock() bug
flock(LOCK_EX) always fails with EBADF, use fcntl(F_SETLK) instead.
2011-10-10 20:52:37 +00:00
Ryan Dahl
e6092f337c tty.WritableStream should be writable 2011-10-10 13:41:04 -07:00
Ryan Dahl
7cf787a2d1 Upgrade libuv to 5656e3
This modifies the TTYWrap constructor to add another argument specifying if
it's a readable or writable TTY . That is stdin or stdout. If a TTYWrap is
not readable then writes to it are blocking.

This makes process.stdout blocking.
2011-10-10 13:33:45 -07:00
isaacs
4f91b72dbe Fix #1851 Correct X/index doc 2011-10-10 12:44:20 -07:00
Ryan Dahl
56e6952e63 Upgrade V8 to 3.6.6 2011-10-10 11:52:42 -07:00
isaacs
ff942c6b39 Fix #1851 Correct X/index doc 2011-10-10 11:47:10 -07:00
Ryan Dahl
0fec213656 Update docs for server fd sharing 2011-10-10 11:36:00 -07:00
Ben Noordhuis
025f5c89c7 uv: upgrade to 41e8574 2011-10-10 16:56:02 +02:00
Ben Noordhuis
326ba25451 tty: unbreak --use-legacy
Fixes #1844.
2011-10-10 15:37:09 +02:00
Brian White
eb40dcb097 Fix typo for fs.write docs
Fixes #1843.
2011-10-09 16:51:42 +09:00
Bert Belder
d3f3f2e455 Windows: exit on ctrl+c
Fixes #1813
2011-10-08 02:52:07 +02:00
Igor Zinkovsky
af014c1a5e fix for simple/test-executable-path.js on windows 2011-10-07 17:48:47 -07:00
Ryan Dahl
12486a6437 Change API for sending handles
Does not support sending net.Server objects only raw TCPWrap objects.
2011-10-07 16:43:55 -07:00
Ryan Dahl
a23d8ad313 Upgrade libuv to 9f6024a
Fixes #1840
2011-10-07 15:20:35 -07:00
Ryan Dahl
26c08a3f35 Do load balancing test in test-child-process-fork2. 2011-10-07 13:58:55 -07:00
Bert Belder
153629c99a Some small optimizations 2011-10-07 13:38:23 -07:00
Ryan Dahl
29ec850478 Simplify arg parsing in String.write 2011-10-07 13:38:23 -07:00
Ben Noordhuis
1bb820a339 net: remove unconditional getpeername() call
Speeds up http_simple benchmark by about 1.0%
2011-10-07 13:38:23 -07:00
Bert Belder
ed65b7b375 Simplify writeReq handling in net_uv 2011-10-07 13:38:23 -07:00
talltyler
10f97f9424 Fixing #1774 about issues when running node with --harmony_block_scoping v8 option
Fixes #1837.
2011-10-08 04:33:10 +09:00
Bert Belder
fcad5e35fd Black hole tcp reads after destroy() 2011-10-07 19:03:23 +02:00
Ryan Dahl
899358e797 Add test-child-process-fork2 and fixes to make it work 2011-10-07 04:03:47 -07:00
Fedor Indutny
4561d9e07b Don't check sign of loadavg
Fixes #1838
2011-10-07 01:32:54 -07:00
Fedor Indutny
698455384f use uv for memory and loadavg functions 2011-10-07 01:31:35 -07:00
Ryan Dahl
b413c77583 Support sending handles to other processes
Needs test.
2011-10-07 01:30:28 -07:00
Ryan Dahl
d2ab314e08 Turn off V8's -Werror in GYP 2011-10-07 01:08:53 -07:00
Ryan Dahl
51f7ba4147 Merge branch 'ipc-binding' 2011-10-07 01:00:40 -07:00
Ryan Dahl
26c5905a99 Reimplement child_process.fork
Fixes test/simple/test-child-process-fork.js
2011-10-07 00:57:41 -07:00
Ryan Dahl
08c12de8e2 Upgrade libuv to 886b112 2011-10-07 00:47:13 -07:00
Ryan Dahl
f6d889523d mv test-child-process-spawn-node.js test/simple/test-child-process-fork.js 2011-10-06 22:56:29 -07:00
Ryan Dahl
471c5701c3 uv_write2 uv_read2_start binding 2011-10-06 22:31:57 -07:00
Ryan Dahl
f018be3b5f Print libuv counters after http_simple exits 2011-10-06 15:02:27 -07:00
Ryan Dahl
c344fbc285 Add process.uvCounters() for debugging 2011-10-06 14:59:38 -07:00
Ryan Dahl
311fe737e8 Upgrade libuv to 60c639f
Also remove unused src/stdio_wrap.cc
2011-10-06 12:34:24 -07:00
Bert Belder
4c1d441159 Fix gyp build 2011-10-06 21:25:13 +02:00
koichik
9797482568 docs: add example to net.connect()
Fixes #1824.
2011-10-06 21:36:46 +09:00
Colton Baker
87286cc737 Fixed a lot of jslint errors.
Fixes #1831
2011-10-05 18:51:06 -07:00
Ryan Dahl
627f379f22 upgrade libuv to 0303197 2011-10-04 16:53:20 -07:00
Ben Noordhuis
bc7cfd7cd7 http: remove legacy http library 2011-10-04 20:51:34 +02:00
Ben Noordhuis
976c6b0826 test: add TXT DNS record lookup test 2011-10-03 16:50:09 +02:00
Christian Tellnes
d9c67aebff dns: implement resolveTxt() 2011-10-03 16:41:29 +02:00
Ben Noordhuis
f1ca485357 zlib: fix assert message 2011-10-03 13:40:42 +02:00
Maciej Małecki
365fdbfc64 test: Update assert module tests 2011-10-02 02:25:52 +02:00
Maciej Małecki
f4f037aa64 docs: Update assert module docs 2011-10-02 02:25:52 +02:00
Maciej Małecki
8c8d518723 assert: Make assert module an assert.ok function
Code can be written:

    var assert = require('assert');
    assert(true);

instead of:

    var assert = require('assert');
    assert.ok(true);
2011-10-02 02:25:52 +02:00
Fedor Indutny
234afa5be1 docs: document watcher debugger commands 2011-10-02 02:19:17 +02:00
Ryan Dahl
f30cba2ba4 add zlib module to doc index 2011-09-30 17:01:07 -07:00
Ryan Dahl
8f23fd545d Now working on v0.5.9 2011-09-30 16:49:30 -07:00
Ryan Dahl
7cc17a0cea Bump version to v0.5.8 2011-09-30 13:59:44 -07:00
Fedor Indutny
360ce526fd debugger: watch, unwatch, watchers
Fixes #1800.
2011-09-30 13:22:56 -07:00
Ryan Dahl
4e43afd973 Fixes #1805. Reset TTY mode on exit. 2011-09-30 13:12:29 -07:00
Ryan Dahl
d1e6a13179 Upgrade libuv to fe18438 2011-09-30 13:12:12 -07:00
Ryan Dahl
007ddcd2cd Move test-net-write-callbacks to pummel
Runs in 3 seconds.
2011-09-30 10:31:39 -07:00
Ryan Dahl
49806864e4 Add test from v0.4 dea49e3
Note this test completes in 3 seconds on v0.4 and 7 minutes on master. NOT
GOOD.
2011-09-30 09:56:37 -07:00
koichik
530082932d docs: Added missing parenthesis to buffer.readUInt8 example.
Fixes #1790.
2011-09-30 17:05:50 +09:00
koichik
4cdf9d4158 tls: Improve TLS flow control
Fixes #1775.
2011-09-30 15:44:45 +09:00
koichik
49ac083dc1 tls: Add test for #1775 2011-09-30 15:44:13 +09:00
Ryan Dahl
84641fcdf0 WAF: Clean out/Release/deps/uv before build 2011-09-29 11:35:21 -07:00
Ryan Dahl
005448bdeb Don't ls node_g after make - it confuses people 2011-09-29 09:52:24 -07:00
Marco Rogers
3fc01d9770 docs: note about empty environment in child processes
Fixes #1794.
2011-09-29 19:50:25 +09:00
Ben Noordhuis
fa44659c66 test: fix typo in error message 2011-09-29 04:51:40 +02:00
Ryan Dahl
dea49e3d19 net: Fix string-concat hot path bug
Also removes functionality added in f9fec3a2d6
because it changes API. (That patch shouldn't have been added anyway.)
2011-09-28 17:49:33 -07:00
Fedor Indutny
1b8b097fad debugger: refactor, no more res.success checks
Fixes #1779.
2011-09-28 11:40:51 -07:00
Fedor Indutny
542156a6a1 debugger: use regexps in repl test
Fixes #1788
2011-09-28 11:39:45 -07:00
Ryan Dahl
416c14f644 Remove a few instances of process.binding('stdio') from src/node.js 2011-09-27 15:04:01 -07:00
Ryan Dahl
7e62bc9828 Move process.stdout unref hack to handle_wrap.cc
See #1726
2011-09-27 15:01:28 -07:00
Fedor Indutny
0a42266824 debugger: double ctrl+break on win should exit node
Fixes #1780.
2011-09-27 14:31:30 -07:00
Ryan Dahl
f63a1f8409 Merge branch 'new-tty-binding' 2011-09-27 13:13:21 -07:00
Ryan Dahl
41d811f41f Fix test-module-load-list.js 2011-09-27 13:11:09 -07:00
Bert Belder
c06af229dc Upgrade libuv to 2c0fca9a41 2011-09-27 13:03:29 -07:00
Bert Belder
81425598db Enable console colors on windows by default 2011-09-27 13:03:29 -07:00
Bert Belder
73fcd43b85 Add new tty js files to node.gyp 2011-09-27 13:03:28 -07:00
Ryan Dahl
2e389c6531 scope.Close in GuessHandleType; don't use uv_is_tty 2011-09-27 13:03:28 -07:00
Ryan Dahl
e1dc6e6d73 Bind uv_tty_get_winsize 2011-09-27 13:03:28 -07:00
Ryan Dahl
1de156abb1 Bind/use uv_guess_handle 2011-09-27 13:03:28 -07:00
Ryan Dahl
74b6426ec6 Initial pass at new TTY js layer
This breaks Windows.
2011-09-27 13:02:11 -07:00
Ryan Dahl
f5bdce9cc0 Disable test-dgram-unix.js test-dgram-unix-anon.js test-dgram-multicast.js 2011-09-27 12:52:48 -07:00
Fedor Indutny
95866a6445 debugger: export port
Fixes test-debugger-client.js

Fixes #1782.
2011-09-27 12:49:03 -07:00
Ryan Dahl
0f8f863043 Fixes #1726, hack to unref process.stdout 2011-09-27 12:41:59 -07:00
Ben Noordhuis
abfcd1fb00 docs: document crypto.randomBytes() 2011-09-27 20:27:57 +02:00
Ben Noordhuis
413d38c43b test: test crypto (P)RNG functions 2011-09-27 20:27:57 +02:00
Ben Noordhuis
c4eaf7e5a9 crypto: implement randomBytes() and pseudoRandomBytes() 2011-09-27 20:27:53 +02:00
Fedor Indutny
67706b8bb7 Export disableColors from repl, share with debugger 2011-09-27 11:58:02 +02:00
Fedor Indutny
f4124e18cb debugger: setBreakpoint('fn()')
Fixes #1777
2011-09-27 00:26:16 -07:00
Ryan Dahl
fa2eaeafda write-only streams should not shutdown
See
https://github.com/joyent/node/issues/1726#issuecomment-2207602
2011-09-26 23:25:50 -07:00
Ryan Dahl
040cf02724 Re-land Bert's test for #1697
Was reverted out in cde81a6675
2011-09-26 12:50:59 -07:00
isaacs
c828ded0c2 zlib: Typo. s/opt/opts/ 2011-09-26 11:50:20 -07:00
Fedor Indutny
c26cf84a08 debugger: fix backtrace with no frames
Fixes #1768
2011-09-26 10:57:19 -07:00
Fedor Indutny
02e0a0aa10 debugger docs
Fixes #1767
2011-09-25 12:38:06 -07:00
Fedor Indutny
82d0ac7ac7 Ctrl+Break on windows starts debugger server 2011-09-25 11:58:23 -07:00
Fedor Indutny
26aab0dc5d EnableDebug immediatly on SIGUSR1
Don't wait for script to break somewhere, because that may not happen if
execution is inside event-loop, not in v8.

Add '\n' to the end of 'debugger listening...' message
2011-09-25 11:58:22 -07:00
Fedor Indutny
9b6acc27aa handle backtrace errors 2011-09-25 11:58:22 -07:00
Fedor Indutny
2c9bcb28be move debugger_running to correct place 2011-09-25 11:58:22 -07:00
Fedor Indutny
9e09fc0508 more cli options
* node debug localhost:5858 - connects to remote debugger
* node debug -p `pgrep node` - connects to running process
* Fixed double-run of debugger on SIGUSR1
2011-09-25 11:58:22 -07:00
Ben Noordhuis
942b92a06e cygwin: fix new[]/delete mismatch 2011-09-25 03:59:50 +02:00
Ben Noordhuis
aff91f79ae cygwin: fix return of uninitialized variable 2011-09-25 03:59:50 +02:00
Ben Noordhuis
d91f64fcbb cygwin: fix new[]/delete mismatch 2011-09-25 03:34:19 +02:00
Ben Noordhuis
6ee676c0e4 cygwin: fix return of uninitialized variable 2011-09-25 03:34:12 +02:00
Eric Lovett
f9fec3a2d6 net: callback to socket.write should always be called asynchronously 2011-09-25 00:23:27 +02:00
Ben Noordhuis
f6bce20e5e buffers: handle bad length argument in constructor
Coerce fractional, negative and non-numeric length arguments to numbers.
Fractional numbers are rounded up, negative numbers and non-numeric values
are set to zero.
2011-09-24 18:31:56 +02:00
Ben Noordhuis
d157131439 buffers: handle bad length argument in constructor
Coerce fractional, negative and non-numeric length arguments to numbers.
Fractional numbers are rounded up, negative numbers and non-numeric values
are set to zero.
2011-09-24 18:27:03 +02:00
Ben Noordhuis
fcba1459f2 uv: upgrade to 8f617b9 2011-09-24 05:23:41 +02:00
Fedor Indutny
43cb4ec76b debugger fix for #1707 2011-09-23 13:42:41 -07:00
Fedor Indutny
39fec6003e debugger: remove useless clearlines, updated test
* remove useless clearline call at Interface start
* silence after .handleBreak()
* output '\b' if this.stdout is not a tty (debugger)
* add '\b' checks for clearline (test)
2011-09-23 13:42:41 -07:00
Fedor Indutny
e406613ee5 test-debugger-repl improvements 2011-09-23 13:42:41 -07:00
Fedor Indutny
78d91ff074 don't use global vars 2011-09-23 13:42:41 -07:00
Fedor Indutny
2010071339 readline: custom streams support 2011-09-23 13:42:41 -07:00
Ben Leslie
a4e10cdb07 Raise an error when a malformed package.json file is found.
The current behaviour will silently ignore any parsing errors
that may occur when loading a package.json file. This makes
debugging errors in the package.json file very difficult.

This changes the behaviour that that errors opening and reading
the file package.json file continue to be ignored, but errors
in parsing will throw an exception.
2011-09-23 12:00:26 -07:00
Ryan Dahl
94bedc60f4 Upgrade libuv to f20297f 2011-09-23 11:10:18 -07:00
Fedor Indutny
1e37efb08b initial tests
* Don't buffer command, before it's execution (repl)
* `quit` command, custom streams for .start, stubbed out test, disable
  history repeation for non-tty (debugger)
2011-09-23 09:38:24 -07:00
Igor Zinkovsky
66293f6e98 fix spelling 2011-09-23 09:20:15 -07:00
Ben Noordhuis
9ad334085f build: explicitly link in libz on non-win32 platforms 2011-09-23 15:40:35 +02:00
Igor Zinkovsky
8fe5712477 fs watcher binding 2011-09-22 22:32:33 -07:00
Ryan Dahl
8d37b6c92b upgrade libuv 2011-09-22 22:29:20 -07:00
isaacs
74c02066fe Add broken test for #1726. 2011-09-22 19:38:01 -07:00
Ben Noordhuis
93aad55342 crypto: fix delete of potentially uninitialized pointer 2011-09-22 06:16:53 +02:00
Ben Noordhuis
fdb0eb5825 crypto: fix read of potentially uninitialized variable 2011-09-22 06:16:47 +02:00
Ben Noordhuis
3a9b08f156 crypto: look up SSL errors with ERR_print_errors() 2011-09-22 06:16:42 +02:00
Ben Noordhuis
9ef962f9ee crypto: fix error message buffer overrun
ERR_error_string() expects a buffer of at least 256 bytes, the input buffer
was not even half that size. Use ERR_error_string_n() instead.
2011-09-22 06:16:34 +02:00
Igor Zinkovsky
de0066c697 remove node_zlib.h from node.gyp 2011-09-21 16:54:35 -07:00
Fedor Indutny
8efe7a8304 [debugger] shorten break message 2011-09-21 13:27:24 -07:00
Fedor Indutny
79fd1f7f0b [debugger] optimize context's properties initialization, make 'list' a function, not a getter 2011-09-21 13:27:24 -07:00
Fedor Indutny
3148f1400e [debugger] fix 'debug> connecting...', fixed autostart (XXX figure out why it wasn't working in some cases), fixed highlighting for first line of module's code 2011-09-21 13:27:23 -07:00
Vitor Balocco
97d355c273 docs: Add anchor links next to each function
Modify doctool.js to automatically create anchor links for
every function, for easy linking.
Include support for functions that have a <h4> level

Fixes: #1718.
2011-09-21 21:08:53 +09:00
Ben Noordhuis
320cf729db crypto: fix delete of potentially uninitialized pointer 2011-09-21 01:58:27 +02:00
Ben Noordhuis
b185751c3f crypto: fix read of potentially uninitialized variable 2011-09-21 01:58:27 +02:00
koichik
b93a7cc99e docs: add links 2011-09-20 15:50:36 +09:00
Ben Noordhuis
ed44098cf6 build: fix SYS_clock_gettime feature check
execute=True makes it fail while cross-compiling.

Fixes #1541.
2011-09-16 17:55:54 +02:00
Ryan Dahl
b31d5ac639 Update website address in Makefile 2011-09-15 17:49:29 -07:00
Ryan Dahl
cfe0f4226b Now working on v0.4.13 2011-09-15 17:31:35 -07:00
Ryan Dahl
771ba34ca7 Bump version to v0.4.12 2011-09-15 16:46:39 -07:00
Ryan Dahl
6312e889b1 Drain OpenSSL error queue? Addresses #1719 2011-09-15 15:04:09 -07:00
isaacs
e06ce7562c Fix #1707 hasOwnProperty usage
If hasOwnProperty is overridden, then calling `obj.hasOwnProperty(prop)`
can fail.  Any time a dictionary of user-generated items is built, we
cannot rely on hasOwnProperty being safe, so must call it from the
Object.prototype explicitly.
2011-09-15 10:54:08 -07:00
isaacs
b3af074a02 Add querystring test for hasOwnProperty usage 2011-09-15 09:52:49 -07:00
isaacs
98990b9779 Fix #1707 hasOwnProperty usage 2011-09-15 09:46:30 -07:00
Ben Noordhuis
5724b54d2e test: add http multi-line header test
Test case for #1569. Verify that http_parser parses multi-line headers.
2011-09-14 16:29:32 +02:00
Ben Noordhuis
8b2a3354f9 http_parser: cherry-pick 3258e4a and b89f944 from upstream
Fixes #1569, parse error on multi-line HTTP headers.
2011-09-14 16:07:37 +02:00
koichik
fdbfc9ceb7 net: Socket write encoding case sensitivity
Fixes #1586.
2011-09-04 13:53:38 +09:00
koichik
3e853e627e buffer: write() should always set _charsWritten.
Refs #1633.
2011-09-03 11:48:27 +09:00
koichik
96ede8cc9b buffer: Avoid overrun with 'binary' encoding.
Fixes #1624.
2011-09-02 09:56:58 +09:00
isaacs
ef27d56cc1 Fixes #1610 Remove DigiNotar CA from trusted list
Details:
https://threatpost.com/en_us/blogs/attackers-obtain-valid-cert-google-domains-mozilla-moves-revoke-it-082911
http://www.coriolis-systems.com/blog/2011/08/diginotar-certificate-security.php
2011-08-30 08:53:21 -07:00
Nathan Rajlich
0c91a835ff util: isRegExp() should not call toString() on its argument
An overloaded toString() method may have side effects
so don't call it for a simple type check.

Back-port of 54b409d to the v0.4 branch.
2011-08-25 19:23:31 +02:00
Ryan Dahl
827b9c5f1f net: fix throw error
Thanks Tobi
2011-08-23 14:30:12 -07:00
koichik
509a676128 Doc improvements 2011-08-23 01:15:32 +09:00
Ryan Dahl
ce9caa237f Fix #1563. overflow in ChildProcess custom_fd.
Backported from master f5db3f1f85
2011-08-20 12:42:58 -07:00
Maciej Małecki
e150bc4f2b docs: process.memoryUsage returns memory usage measured in bytes 2011-08-20 01:00:21 +02:00
isaacs
b4712bf1ac Close #1544 Document slashesDenoteHost flag in url.parse 2011-08-17 18:47:48 -07:00
Ryan Dahl
dc578724b1 Now working on v0.4.12 2011-08-17 18:45:28 -07:00
Ryan Dahl
a745d19ce7 Bump version to v0.4.11 2011-08-17 18:18:10 -07:00
Ryan Dahl
9cd510846e Fixes #1546. Remove expensive debug call. 2011-08-17 13:21:15 -07:00
Ben Noordhuis
decd81838a build: fix freebsd gyp build 2011-08-17 07:50:59 +02:00
Ben Noordhuis
52037d897d uv: upgrade to 2dae0c9 2011-08-17 07:50:58 +02:00
Ben Noordhuis
0f077a78ad gyp: add freebsd support 2011-08-17 07:50:58 +02:00
Ben Noordhuis
1e7a0aa883 gyp: revive sunos support, lost in 6b98a63 2011-08-17 07:50:58 +02:00
Ryan Dahl
ae0dd0d89c Remove extra method declaration 2011-09-20 14:08:55 -07:00
Ryan Dahl
c1ae6ea2f2 Add TTYWrap 2011-09-20 13:39:48 -07:00
Ryan Dahl
6b98a63974 Upgrade libuv to 2ef8f35 2011-09-20 13:34:52 -07:00
Fedor Indutny
b20c98e427 fix 'null' mirroring 2011-09-20 08:35:16 -07:00
Fedor Indutny
a0556fcbe1 repeat last command if empty line was entered 2011-09-20 08:35:15 -07:00
Fedor Indutny
41a41825f6 micro-refactor, use rli.output.write instead of rli.write ('line' event was emitted for those writes) 2011-09-20 08:35:15 -07:00
Fedor Indutny
292e2ea5ad fix breakpoint prefixing in list() 2011-09-20 08:35:15 -07:00
Fedor Indutny
c8ffbcd9f1 added comments, spawn child process automatically at debugger's start 2011-09-20 08:35:15 -07:00
Fedor Indutny
4ff15512f5 remove arrow from current source line 2011-09-20 08:35:15 -07:00
Fedor Indutny
ff05beeef3 fix inspection of zero 2011-09-20 08:35:15 -07:00
Ben Noordhuis
44bebc0d52 crypto: look up SSL errors with ERR_print_errors() 2011-09-20 08:12:35 +02:00
Ryan Dahl
6326b04b07 Fix test-regress-GH-819
Problem was exposed in 12798c6.
2011-09-19 13:41:48 -07:00
Ben Noordhuis
3aa1975c58 build: make wscript work with python 2.4 2011-09-19 16:44:03 +02:00
Ben Noordhuis
243c218c7a tls: remove superfluous setOptions() call 2011-09-19 16:28:22 +02:00
Ryan Dahl
12798c620d dns callbacks should go through MakeCallback 2011-09-18 13:20:16 -07:00
Ryan Dahl
100fc27ebb Upgrade gyp to r1046 2011-09-18 12:25:30 -07:00
isaacs
f90264d246 zlib: lint 2011-09-17 23:03:36 -07:00
isaacs
d104bfd5a6 zlib: Fix test so that it's not trivially passing, then pass it.
Regression from the refactor to move more things into JS.
2011-09-17 23:03:23 -07:00
isaacs
5b8e1dabbc Initial pass at zlib bindings 2011-09-17 18:22:09 -07:00
Ryan Dahl
dcd911e24b Now working on v0.5.8 2011-09-16 18:38:46 -07:00
Ryan Dahl
558241166c Bump version to v0.5.7 2011-09-16 17:54:20 -07:00
Fedor Indutny
145fac7fb1 setBreakpoint w/o arguments should set one on a current line 2011-09-16 17:53:20 -07:00
Fedor Indutny
4a537c1b88 restore breakpoints after restart, fix message handling 2011-09-16 17:53:19 -07:00
Fedor Indutny
d6088b2667 fix spawn call, customFds ain't supported yet 2011-09-16 17:53:19 -07:00
Ryan Dahl
cde81a6675 Revert "Add regression test for issue 1697"
Causing many test failures due to lingering process

This reverts commit 8b754a9e02.
2011-09-16 17:24:34 -07:00
Ryan Dahl
d750927b36 Upgrade libuv to 75a088e 2011-09-16 16:19:33 -07:00
Bert Belder
8b754a9e02 Add regression test for issue 1697 2011-09-17 00:05:15 +02:00
Ben Noordhuis
0ad28fdd37 crypto: fix error message buffer overrun
ERR_error_string() expects a buffer of at least 256 bytes, the input buffer
was not even half that size. Use ERR_error_string_n() instead.
2011-09-16 19:16:32 +02:00
Ryan Dahl
2d0b1ed7ad Upgrade libuv to 2640aae
Add test for bug fixed in joyent/libuv@2640aae1
2011-09-15 15:37:57 -07:00
Ryan Dahl
1b0a5cbaaa Merge remote branch 'origin/v0.4' 2011-09-15 15:08:38 -07:00
Ryan Dahl
b281171030 Support legacy API: process.stdout.fd 2011-09-15 13:57:41 -07:00
Ryan Dahl
5cb1fd2e32 net.Socket(fd) should start readable and writable 2011-09-15 13:35:29 -07:00
Ryan Dahl
763059ee09 Remove pthread-win32 from license file (no longer using it) 2011-09-15 13:05:54 -07:00
Jeroen Janssen
3e667804eb Fix options_file_memory_leak
Fixes #1714.
Fixes #1715.
2011-09-15 12:03:06 -07:00
Ryan Dahl
a1bafc5566 Merge remote branch 'origin/v0.4'
Conflicts:
	deps/http_parser/http_parser.c
	deps/http_parser/test.c
	lib/repl.js
2011-09-15 11:48:37 -07:00
Ryan Dahl
1b15af9dd2 Upgrade V8 to 3.6.4 2011-09-15 09:42:06 -07:00
Ben Noordhuis
f8b90946ae node: disable uv backend if NODE_USE_UV=0 2011-09-15 00:32:07 +02:00
Igor Zinkovsky
6cb15403d3 remove SetCloseOnExec 2011-09-14 13:47:00 -07:00
Ryan Dahl
a6ef3eb271 Upgrade libuv to 4197fc7
and use return value from sync uv_fs functions
2011-09-14 13:46:54 -07:00
Ryan Dahl
70966002c0 Forward customFds to ChildProcess.spawn
Fixes #1695
2011-09-14 12:33:42 -07:00
Fedor Indutny
d2dadf32db [debugger] added setBreakpoint and clearBreakpoint to help message
group commands in help message, added shortcuts info
2011-09-14 10:17:17 -07:00
Fedor Indutny
1dd3b68c4f [debugger] separate history of control and debug, make scripts command getter 2011-09-14 23:05:04 +07:00
Fedor Indutny
19194f87c5 [debugger] setBreakpoint, clearBreakpoint, fix reqSource error handling, show breakpoints in list() 2011-09-14 23:05:04 +07:00
Fedor Indutny
3a7713ff10 [debugger] synonym=>shortcut, added shortcut for backtrace (as in gdb), simplify regexp 2011-09-14 23:05:04 +07:00
Fedor Indutny
f2ec46a7a7 [debugger] color mark in _debugger, kill child on Ctrl+D 2011-09-14 23:05:01 +07:00
Ryan Dahl
0e0fbf7e6a Upgrade libuv to 4b9b692 2011-09-14 08:43:27 -07:00
Ben Noordhuis
92d4ed397b readline: handle null completer graciously
Fixes #1698.
2011-09-14 17:33:07 +02:00
koichik
244675cab1 doc: HTTPS client's options 2011-09-14 23:48:42 +09:00
koichik
e7f64a7d41 doc: HTTPS client's options
Fixes #1494.
2011-09-14 20:17:30 +09:00
Ryan Dahl
70a5659a46 Document child_process.execFile
Fixes #1700
2011-09-13 20:50:49 -07:00
Fedor Indutny
9fb186892c [debugger] requireConnection() returns bool, break UI
Stepping commands will overwrite output of previous step command
2011-09-13 20:40:26 -07:00
Fedor Indutny
57388d8b2e [repl] add error handling for async scope fetching 2011-09-13 20:40:21 -07:00
Ryan Dahl
69c35f990f Doc fixes
Fixes #1701. Thanks baudehlo.
2011-09-13 20:02:54 -07:00
isaacs
dc8f4eed53 Fix #1694 Document require() cycles 2011-09-13 10:59:42 -07:00
Ryan Dahl
cb6b9eb19e Fix windows build 2011-09-12 19:42:12 -07:00
Ryan Dahl
8c87250816 Do not load readline from util.inspect
This causes all modules using console.log() to load readline which seems
unnecessary.
2011-09-12 18:25:23 -07:00
Ryan Dahl
0928f0f290 Fix test-module-load-list
and lazy load modules for process.stdout

This probably breaks test-module-load-list on windows, but it hopefully is
an easy fix to replace "_posix" bindings with "_win32".
2011-09-12 18:12:48 -07:00
Ryan Dahl
0aad61e802 Use net_uv instead of net_legacy for stdio
Also temporary hack to prevent process.stdout from keeping event loop alive
by calling uv_unref on process.stdout initialization.
2011-09-12 17:32:52 -07:00
isaacs
190abcac9d mkdir EEXIST test
Fixed on uv 3c00d87b4239a6b8358e2085f806170c3eca10cf
2011-09-12 17:13:12 -07:00
isaacs
8b6277a460 Update uv to 3c00d87b4239a6b8358e2085f806170c3eca10cf 2011-09-12 17:11:03 -07:00
Ben Noordhuis
718032777d v8: move __C99FEATURES__=1 into common.gypi 2011-09-12 22:52:56 +00:00
Ryan Dahl
caaa59c559 Wrap uv_pipe_open, implement net.Stream(fd);
Fixes simple/test-child-process-ipc on unix.
2011-09-12 15:09:44 -07:00
Ryan Dahl
51f2e8439e Upgrade libuv to e7eeacb 2011-09-12 15:09:26 -07:00
Ben Noordhuis
77e4abbc3e v8: add platform-solaris.cc to gyp build 2011-09-12 21:48:30 +00:00
Ben Noordhuis
d104e5b91c v8: compile with __C99FEATURES__=1 on sunos
Exposes INFINITY, isinf(), isfinite(), etc.
2011-09-12 21:48:30 +00:00
Ben Noordhuis
c18ef0fed5 openssl: fixups for sunos 2011-09-12 21:48:30 +00:00
Ben Noordhuis
e4e1917936 build: fixups for sunos 2011-09-12 21:48:30 +00:00
Ben Noordhuis
d7c16fa372 build: disable -fvisibility=hidden
Not recognized by older versions of gcc.
2011-09-12 21:48:30 +00:00
Ben Noordhuis
12351a2591 build: fix breakage when resuming make 2011-09-12 21:48:30 +00:00
Ben Noordhuis
9f986981f8 build: configure node, v8, cares and openssl 2011-09-12 21:48:29 +00:00
Ben Noordhuis
fe7e00d51a gyp: add sunos support 2011-09-12 21:48:29 +00:00
Ben Noordhuis
0d80040adf uv: upgrade to 9bd8bd7 2011-09-12 23:46:39 +02:00
Ben Noordhuis
7e7e983781 uv: upgrade to b450d87 2011-09-12 18:41:48 +02:00
Thomas Shinnick
7dc2c492e9 fs: unguarded fs.watchFile cache statWatchers checking fixed
Use hasOwnProperty to check filepath cache; previous code could fail if
a filepath duplicated a chained property name.

Fixes #1637.
2011-09-12 15:59:00 +09:00
Thomas Shinnick
e58c036c27 fs: add positioned file writing feature to fs.WriteStream
Patterned on same feature in ReadStream; a small bit of new code added
plus two refactorings of previous code; added two test files.

Fixes #1645.
2011-09-12 14:57:49 +09:00
Thomas Shinnick
e4ebeb630e fs: minor corrections from examining stream read positioning
Fix minor typos, one small refactor, and change emit() in a constructor
to a throw
2011-09-12 14:57:43 +09:00
koichik
389e2a07e6 util: Fix inspection for Error
Fixes #1634.
2011-09-11 23:13:06 +09:00
Fedor Indutny
df480e0357 fix syntax error handling for 'throw ...', fix return value assertion 2011-09-11 02:19:42 -07:00
Bert Belder
55c1546f01 Un-break the windows build 2011-09-11 03:54:08 +02:00
Bert Belder
10e7c52a70 win: make test-cli-eval.js pass 2011-09-11 03:52:44 +02:00
Ryan Dahl
0f211048a0 Upgrade libuv to efa1b54 2011-09-10 18:40:40 -07:00
Ryan Dahl
67cc5c9218 Merge remote branch 'indutny/feature-debugger'
Fixes #1667
2011-09-10 17:46:14 -07:00
Fedor Indutny
b942c6339a Remove obsolete 'using v8::Null'
Fixes #1680.
2011-09-10 17:44:52 -07:00
Fedor Indutny
8c2c7bb8a9 vm context with accessors
fixes #1673
2011-09-10 10:51:58 -07:00
Fedor Indutny
fe4b0f40d6 [debugger] fixed piping from stdout of child process, fixed eval in debug repl (when not on breakpoint) 2011-09-10 23:55:38 +07:00
Fedor Indutny
54520981a4 [debugger] implemented setBreakpoint, etc
Lift prototype methods not only as accessors, but as properties too.
this.print() supports javascript objects inspection
this.error() implemented, don't throw error at callbacks and commands
Fixed list() invokation, when script is not on a breakpoint
Removed obsolete process.nextTick from `step` commands
2011-09-10 19:18:36 +07:00
Fedor Indutny
db6526f962 [debugger] deep cloning (depth = 3) 2011-09-10 18:39:34 +07:00
Fedor Indutny
69fa7ef65d [debugger] fix slow repl evals inside async callbacks 2011-09-10 18:19:47 +07:00
Fedor Indutny
79265fe389 [debugger] rename function, add it to ignore list 2011-09-10 17:57:55 +07:00
Fedor Indutny
5a3639985a [debugger] print data from child process' stdout and stderr 2011-09-10 17:43:22 +07:00
Fedor Indutny
3dd573e858 [debugger] nicier output, clear line before writing 2011-09-10 17:33:07 +07:00
Fedor Indutny
03adceec62 [debugger] more informative break message (reverting back partially) 2011-09-10 12:48:21 +07:00
Ryan Dahl
8821eb24c2 Correct date 2011-09-09 20:18:40 -07:00
Bert Belder
0be4812c35 Now working on v0.5.7 2011-09-10 01:38:51 +02:00
Bert Belder
b49bec5580 Bump version to 0.5.6 2011-09-10 00:29:35 +02:00
Bert Belder
0a72ac3770 Upgrade libuv to bd6066cb 2011-09-10 00:29:27 +02:00
Igor Zinkovsky
79ce48d3f0 fix for test-fs-chmod 2011-09-09 21:09:59 +02:00
Ben Noordhuis
fa334ef0b7 build: install uv-private/*.h, fixes native add-on builds 2011-09-09 17:30:08 +02:00
Bert Belder
97cf216c74 Upgrade libuv to e95a29ee18 2011-09-09 15:05:12 +02:00
Bert Belder
b5db0767d5 net_uv: fix 'set is undefined' error 2011-09-09 14:59:54 +02:00
Bert Belder
f810998871 net_uv: use sufficient buffer to read sock/peername 2011-09-09 14:59:27 +02:00
Igor Zinkovsky
85357abba1 fix test-fs-chmod test 2011-09-09 14:45:37 +02:00
Ryan Dahl
03c2f62020 Upgrade V8 to 3.6.2 2011-09-08 16:11:20 -07:00
Bert Belder
0a127d6a69 Upgrade libuv to 2d1c672e 2011-09-08 23:53:40 +02:00
Ryan Dahl
b6e0433755 Upgrade libuv to 5b567b2 2011-09-08 14:29:12 -07:00
Ryan Dahl
26834b0524 Revert "vm context with accessors"
This reverts commit 4527de8cba.

Causes segfault in test/message/undefined_reference_in_new_context.js
2011-09-08 13:30:52 -07:00
Fedor Indutny
8d7aade663 [debugger] call silent resume in debugEval to prevent incorrect cursor position after repl autocompletion, small refactor in readline 2011-09-09 03:05:21 +07:00
Igor Zinkovsky
65e6ba9cce Enable link, symlink, and readlink on windows 2011-09-08 12:52:08 -07:00
Fedor Indutny
01349bbd70 [debugger] added synonyms for run, cont, next, step, out, shorten breakpoint message and do not output explicit debug> on breaks 2011-09-09 02:33:28 +07:00
Fedor Indutny
46382a728a [debugger] resume stdin at right time when running code remotely 2011-09-09 02:06:07 +07:00
Fedor Indutny
d36d5c34df [debugger] revert to using getter 2011-09-09 02:06:07 +07:00
Fedor Indutny
199f90b138 [debugger] fix messages 2011-09-09 02:06:07 +07:00
Fedor Indutny
22eb2d5084 [debugger] pause stdin on debugEval 2011-09-09 02:06:07 +07:00
Fedor Indutny
3b593c9ec5 [debugger] handle lookup error, no more need to handle SyntaxErrors 2011-09-09 02:06:07 +07:00
Fedor Indutny
e13ed4a8d0 [repl, readline] refactor async completion and execution 2011-09-09 02:06:07 +07:00
Fedor Indutny
2c2397d333 [debugger] simulate getters 2011-09-09 02:06:07 +07:00
Fedor Indutny
00343a9af0 [debugger] display message on repl(), do not display warnings on Ctrl+C 2011-09-09 02:06:07 +07:00
Fedor Indutny
77eb8eabe2 [debugger] use newly added eval argument for REPLServer 2011-09-09 02:06:06 +07:00
Fedor Indutny
0d4dc3a8b5 [repl] let self.eval be configurable on REPLServer initialization 2011-09-09 02:06:06 +07:00
Fedor Indutny
f549f2bf1d [debugger] Fix help message 2011-09-09 02:06:06 +07:00
Fedor Indutny
3b2577b4fe [debugger] restructurize code, eval control repl asynchronously
Move commands closer to each other, use .debugEval and .controlEval for
controlling repl output (no more incorrect 'debug>' prints).
2011-09-09 02:06:06 +07:00
Fedor Indutny
e01635eb9b [debugger] port all commands 2011-09-09 02:06:06 +07:00
Fedor Indutny
eab65e214e [repl] Async global completion 2011-09-09 02:06:06 +07:00
Fedor Indutny
134ab61131 [debugger] two repls, initial 2011-09-09 02:06:06 +07:00
Fedor Indutny
71a9aefa0f [readline, repl] Fix completion grouping, fix parens eval results
handling
2011-09-09 02:06:06 +07:00
Fedor Indutny
42b8b77d9f [repl, readline] async interface
Add async completion and execution interface for repl and readline
2011-09-09 02:06:06 +07:00
Fedor Indutny
bd69afbc83 [debugger] readline => repl
Started porting to high-level javascript API and repl.
2011-09-09 02:06:05 +07:00
Fedor Indutny
4527de8cba vm context with accessors
true copy of sandbox properties

catch sealed errors, pass global's prototype to CloneObject

Fixes #1673
2011-09-08 11:59:21 -07:00
Ben Noordhuis
bb3a1d5b67 http: set .code='ECONNRESET' on socket hang up errors
Fixes #1672.
2011-09-08 20:47:16 +02:00
koichik
6139459d45 util: Fix inspection for sparse array
Fixes #1651.
2011-09-09 00:57:42 +09:00
koichik
98b64422bb util: Divide inspect() into some subroutines 2011-09-09 00:53:37 +09:00
Ryan Dahl
ee2c12d48e Upgrade GYP to r1034 2011-09-08 01:11:45 -07:00
Ryan Dahl
0bca54444a Upgrade V8 to 3.6.1 2011-09-07 21:23:29 -07:00
koichik
526c54c979 buffer: write() should always set _charsWritten.
Fixes #1633.
2011-09-08 11:47:32 +09:00
Ryan Dahl
52044fd1b1 Merge remote branch 'origin/v0.4'
Conflicts:
	lib/net.js
	test/simple/test-buffer.js
2011-09-07 17:51:33 -07:00
Ben Noordhuis
638773628c tls: new[] instead of malloc() in Connection::GetSession() 2011-09-07 20:02:14 +02:00
Sean Cunningham
eb99083d0b tls: add client-side session resumption support 2011-09-07 20:01:14 +02:00
Ben Noordhuis
b66d225c6e docs: document that the build system depends on python >= 2.5.2
Fixes #354.
2011-09-06 23:11:17 +02:00
Thomas Shinnick
4cf0ce5bb4 docs: typos and minor edits in several modules
Mostly quite minor edits.  Those possibly of more interest are:

  emitter.setMaxListeners(n)

    That the limit is per event name for an emitter.

  fs.readlink()

    Not a path, but rather the symbolic link's string value, which
      would be at best a partial path, certainly not a 'resolvedPath'

  global.__filename

    This may be "well-known" but this is a full path to the module
    that referencing code is running in.  It is not the main program's
    path, unless you are in the main program.  Each module knows only
    its own path.

  server.listen(port,...)

    I actually needed this functionality... "gimme just _any_ next port"

  stream.end()
  stream.destroy()

    Yeah, everybody knows what happens to the queued data, but let's
    make it *really* explicit for the first readers.
2011-09-06 18:19:41 +02:00
Maciej Małecki
fb93ab4125 test: test for correct parsing of URLs with plus character in protocol 2011-09-06 17:04:00 +02:00
Maciej Małecki
d0552949b9 url: add plus sign to protocol pattern 2011-09-06 17:03:52 +02:00
Ben Noordhuis
56efe9cbc5 file: translate libuv error codes to errno names
Fixes incorrect error names (ex. ENOEXEC instead of EBADF,
EMLINK instead of ENOENT).

Fixes #1656.
2011-09-06 16:34:21 +02:00
Ben Noordhuis
94b0481a56 uv: upgrade to cc91989 2011-09-06 16:14:14 +02:00
Bert Belder
8153a21613 Improve path parsing on windows
Closes #650
2011-09-06 04:47:36 +02:00
Ben Noordhuis
2d9ab49239 file: fix errno propagation in sync fs calls
Include libuv fs error code in the JS exception.

Fixes #1657.
2011-09-06 02:15:08 +02:00
Ben Noordhuis
554dc63328 uv: upgrade to 58ef43e 2011-09-06 02:15:08 +02:00
Peter Bright
de978991d8 windows: it's rude to clobber quick edit mode
Closes #1429
2011-09-06 00:36:41 +02:00
Ryan Dahl
061811f328 ObjectWraps should be MarkIndependent 2011-09-05 14:40:30 -07:00
Ryan Dahl
ece5c64504 Upgrade libuv to a8017fd 2011-09-05 00:32:15 -07:00
isaacs
ef523e5719 fix test-fs-realpath 2011-09-04 22:14:03 -07:00
Ryan Dahl
fcfec075e3 internal fs functions called with this == ReqWrap 2011-09-04 19:48:55 -07:00
Ryan Dahl
39ea27470c Return ReqWrap from internal fs functions 2011-09-04 19:44:01 -07:00
Ryan Dahl
f5e486ebab Fix test-fs-error-messages.js 2011-09-04 18:48:19 -07:00
Ryan Dahl
7272dbdbc6 Upgrade libuv to 991f6ee 2011-09-04 18:48:19 -07:00
Bert Belder
b5d58f11cb dgram-uv: black hole incoming messages after closing
Fixes test/simple/test-dgram-pingpong.js on windows
2011-09-05 03:30:12 +02:00
Ryan Dahl
01bf209a3d Upgrade libuv to b6ede6c
Fixes require('fs').readdirSync on unix.
2011-09-04 17:17:00 -07:00
Bert Belder
e20d0c1cd0 net-uv: correctly set socket.remoteAddress and -port
closes #1345
2011-09-05 02:10:14 +02:00
Bert Belder
ae2ac4fb1b gyp: add js files to node project 2011-09-05 02:10:12 +02:00
Bert Belder
d01b87d9c4 win: vcbuild.bat should attempt to run vcvarsall.bat 2011-09-05 02:10:12 +02:00
Ryan Dahl
17021ea631 Upgrade libuv to 142a702 2011-09-04 16:17:00 -07:00
Bert Belder
3742aeea4c resolve mingw32 build problem 2011-09-04 22:54:24 +02:00
Bert Belder
c82ab45ee6 uv_getsockname got renamed 2011-09-04 22:53:01 +02:00
Bert Belder
cb1a21b1d4 Upgrade libuv to 7b87ff7c9b 2011-09-04 22:25:40 +02:00
Peter Bright
766430c743 Windows: set executables to be console programs
closes #1644
2011-09-04 19:27:04 +02:00
Logan Smyth
bc0a552a84 docs: Fix merge error in tls docs
Fixes #1648.
2011-09-05 00:48:35 +09:00
Ashok Mudukutore
908ee33f2d build: add RPATH environment variable
Overrides default run-time library paths
2011-09-04 17:26:05 +02:00
Igor Zinkovsky
29e929de1e fix windows build break 2011-09-04 04:11:54 +02:00
Igor Zinkovsky
a3d7782c08 enable missing fs functions on windows 2011-09-03 17:45:22 -07:00
Igor Zinkovsky
ee048aa3ab fix async readdir 2011-09-03 17:44:54 -07:00
Ben Noordhuis
0df8ffe472 uv: upgrade to 6422a14 2011-09-04 02:31:12 +02:00
AJ ONeal
087d210679 docs: explain how url.format works (search trumps query, etc) 2011-09-03 03:29:49 +02:00
Michael Jackson
3bf20e43cf Fixes #1635. Fixed typo 2011-09-02 13:01:05 -07:00
Ryan Dahl
197628846d win: link to psapi.lib
broke in 65c2763
2011-09-02 12:53:20 -07:00
koichik
c28f20f880 docs: console.log() refer to util.format(). 2011-09-03 01:46:53 +09:00
koichik
28a908471d crypto: Fix BIO's usage.
Fixes #1612.
Fixes #1296.
2011-09-03 00:53:47 +09:00
Ben Noordhuis
5ded5e274f crypto: use X509_get_ext_by_NID(NID_subject_alt_name) 2011-09-03 00:49:37 +09:00
Niclas Hoyer
b7e36f8584 added test case for foaf+ssl client certificate 2011-09-03 00:49:37 +09:00
Niclas Hoyer
7b2536a1a2 Added additional properties to getPeerCertificate, now includes subjectAltName, Exponent and Modulus (FOAF+SSL friendly).
Patch written by Nathan,
http://groups.google.com/group/nodejs/browse_thread/thread/1d42da4cb2e51536
2011-09-03 00:49:37 +09:00
Nathan Rajlich
cafcc7e67a test: add test case for util.isDate() behavior 2011-09-02 17:29:33 +02:00
Nathan Rajlich
44574bc39b util: improve util.isDate() function
The old implementation was fragile. i.e. node-time is an example of a user-land
module that exports an extended Date object (with a few added functions on it's
own Date object's prototype). In that case, the old check fails.
2011-09-02 17:29:20 +02:00
Ryan Dahl
2b0a7d63a8 Upgrade libuv to b89f4f3 2011-09-01 17:44:06 -07:00
Karl Skomski
65c27638ec Added some win32 platform functions
Fixes #1617
2011-09-01 14:56:32 -07:00
Ryan Dahl
3efcbadf6b Upgrade libuv to 2e60358
Fixes #1621.
2011-09-01 14:16:04 -07:00
Nathan Rajlich
cf24f561a3 repl: don't eval twice when an Error is thrown 2011-09-01 17:15:07 +02:00
Ryan Dahl
84cf0c5280 crypto: set data before sending to thread pool
fixes test-crypto
2011-08-31 16:11:08 -07:00
Ryan Dahl
c91ec225e6 Upgrade libuv to 836cc20 2011-08-31 15:59:36 -07:00
Maciej Małecki
8d70cc607c Show warning when using lib/sys.js 2011-08-31 19:26:34 +02:00
Jeroen Janssen
f013f15c89 fix win32 uv loop breakage 2011-08-31 10:09:44 -07:00
Ryan Dahl
21cc4c4985 Upgrade libuv to ea4271f
Required adding uv_default_loop() in many places.
2011-08-31 01:53:30 -07:00
koichik
6f60683802 tls: x509 certificate subject parsing fail
Fixes #1568.
2011-08-31 03:47:23 +09:00
Ryan Dahl
d8f7a8655f Strip V8 -Werror 2011-08-30 09:44:19 -07:00
isaacs
6b6f2b1d2c Fixes #1610 Remove DigiNotar CA from trusted list
Details:
https://threatpost.com/en_us/blogs/attackers-obtain-valid-cert-google-domains-mozilla-moves-revoke-it-082911
http://www.coriolis-systems.com/blog/2011/08/diginotar-certificate-security.php
2011-08-30 08:52:49 -07:00
AJ ONeal
8039086470 docs: document querystring behavior for arrays and unassigned parameters 2011-08-30 15:17:05 +02:00
Ben Noordhuis
fe4b7420a3 uv: upgrade to 0ba44cf 2011-08-30 13:09:47 +02:00
Ryan Dahl
b68c6bac96 Fix Windows build 2011-08-30 02:26:29 -07:00
Ryan Dahl
2823ab47dc Upgrade libuv to ca11711 2011-08-30 01:59:38 -07:00
Igor Zinkovsky
bce41fac94 Use new uv_fs_ apis
This will cause master to be unstable for a while as we replace existing eio
calls with uv_fs calls.
2011-08-30 01:36:10 -07:00
Ryan Dahl
1088638725 upgrade libuv to a6ed175 2011-08-30 01:35:54 -07:00
Ryan Dahl
da00ff4999 Upgrade V8 to 3.5.9.1 2011-08-29 15:47:16 -07:00
Ryan Dahl
59fa16f648 Upgrade libuv to cbbb254
Fixes #1506
2011-08-29 15:23:20 -07:00
Ryan Dahl
ff7f7ae386 Fixes #1503. make libuv backend default on unix 2011-08-29 14:01:41 -07:00
Abimanyu Raja
b5144b245b stdio: fix typo in doc comment 2011-08-29 21:26:58 +02:00
Mikeal Rogers
7c87e092fb Sockets should never be attached to a ClientRequest before nextTick().
This way the API for interacting directly with the socket object is
consistent before and after the Agent pool is exhausted.

Fixes #1601.
2011-08-29 12:22:19 -07:00
Jann Horn
1a0edbca86 module: remove 'is URL?' check in module loader, dead code 2011-08-29 18:20:58 +02:00
jkummerow@chromium.org
b5643cb2a6 v8: remove unnecessary break-after-return in switch statement
BUG=v8:1642

Review URL: http://codereview.chromium.org/7781007

This is a back-port of upstream r9043. Fixes build on OS X 10.5.
2011-08-29 16:00:48 +02:00
Peter Lyons
d2defa3012 test: test for issue #752 2011-08-28 23:49:24 +02:00
Peter Lyons
a4eee3d28f http: remove 'headers sent?' check in OutgoingMessage.getHeader()
Fixes #752.
2011-08-28 23:47:10 +02:00
Peter Bright
186364e24f Don't load-time link against CreateSymbolicLink, it doesn't exist on Windows Server 2003.
Fixes #1592.
2011-08-26 19:55:25 -07:00
Igor Zinkovsky
779c93c523 merge vcbuild.bat and generate_projects.bat 2011-08-26 17:06:01 -07:00
Ben Noordhuis
8342f31af9 Now working on 0.5.6 2011-08-27 01:27:52 +02:00
Ben Noordhuis
d2d53d4bb2 Bump version to v0.5.5 2011-08-26 23:24:18 +02:00
Ben Noordhuis
790f13df9c Fix typo in configure script 2011-08-26 20:38:45 +00:00
Ryan Dahl
7d38a3b81c Fix build - due to V8 API change 2011-08-26 13:20:27 -07:00
Ryan Dahl
f1996ffebc Merge remote branch 'origin/v0.4'
Conflicts:
	AUTHORS
	ChangeLog
	doc/api/stdio.markdown
	doc/index.html
	doc/template.html
	lib/net.js
	src/node_version.h
	test/simple/test-child-process-customfd-bounded.js
	test/simple/test-console-not-call-toString.js
2011-08-26 13:16:16 -07:00
Ryan Dahl
028908ab7c Upgrade V8 to 3.5.8 2011-08-26 13:07:04 -07:00
Ryan Dahl
8af0abde3f prepare for release - website under new user 2011-08-26 10:31:42 -07:00
Ryan Dahl
16b3f2c3ff Fix dns_uv.lookup order 2011-08-26 10:31:42 -07:00
Ben Noordhuis
5e765fe5e8 uv: upgrade to 835782a 2011-08-26 18:10:35 +02:00
koichik
43cdbec3be test: simple/test-tls-client-abort fails on SunOS
Fixes #1583.
2011-08-26 23:57:36 +09:00
Bert Belder
6ab4a4c05c Upgrade libuv to 39aac4a5 2011-08-26 02:39:54 +02:00
Ben Noordhuis
576b11662e uv: upgrade to 6490c6a 2011-08-26 00:23:17 +02:00
Peter Bright
64b41680fd Add headers to improve the IDE experience. 2011-08-24 19:12:39 -07:00
Ryan Dahl
90da5339c1 Upgrade libuv to 40efa9c 2011-08-24 17:43:33 -07:00
Ryan Dahl
48918f5503 Reapply Peter Bright's fixes for GYP on MSVS
Originally 71333b3f5b
2011-08-24 16:23:12 -07:00
Ryan Dahl
06f750c466 fix windows build 2011-08-24 16:20:14 -07:00
Ryan Dahl
f9dae9e8d6 Add dgram_legacy and dgram_uv to node.gyp 2011-08-24 15:55:57 -07:00
Ben Noordhuis
8f245486aa net: fix multicast on sunos
setsockopt(IP_MULTICAST_TTL|IP_MULTICAST_LOOP) takes an unsigned char as
its argument on sunos.

Partially fixes simple/test-dgram-multicast: test hangs after socket
close but it no longer throws EINVAL exceptions.
2011-08-24 22:46:55 +00:00
Ben Noordhuis
accc34c50f test: fix simple/test-eval
Test expects output of console.error(process.argv) to be spread out
over several lines but if /path/to/node is short, it stays on a single line.
2011-08-25 00:18:39 +02:00
Ryan Dahl
52a40e0fd5 Add process.features.debug; fixes simple/test-executable-path.js 2011-08-24 14:16:35 -07:00
Ryan Dahl
2876141c42 dns_uv: add localhost hack for windows 2011-08-24 13:43:05 -07:00
Ben Noordhuis
2513538109 test: add dgram tests to test-uv list 2011-08-24 22:27:25 +02:00
Ben Noordhuis
48f4b2be2b docs: remove unix dgram documentation 2011-08-24 22:27:25 +02:00
Ben Noordhuis
bba432f00e dgram: add socket.fd compatibility hack to dgram_uv.js 2011-08-24 22:27:25 +02:00
Ben Noordhuis
11e3cfce8b dgram: integrate libuv support for UDP over IPv6 2011-08-24 22:27:24 +02:00
Ben Noordhuis
cbd4033619 dgram: integrate libuv UDP support 2011-08-24 22:27:24 +02:00
Ben Noordhuis
9cb624986c tcp_wrap: update after libuv API change 2011-08-24 22:27:24 +02:00
Ben Noordhuis
2aefea5a2f stream_wrap: update after libuv API change 2011-08-24 22:27:24 +02:00
Ben Noordhuis
28998a8cfe uv: upgrade to 80e5491 2011-08-24 22:27:24 +02:00
Ben Noordhuis
7003d6eff5 Move ARRAY_SIZE macro to node.h 2011-08-24 22:27:24 +02:00
Mikeal Rogers
cdbecc48a1 docs: Improved http2 agent docs
Fixes #1517.
2011-08-25 00:55:51 +09:00
Igor Zinkovsky
19ff87a9db vcbuild.bat - for building from cmd-line using msbuild 2011-08-23 23:55:11 -07:00
Ryan Dahl
06428d853c tools/test.py to support marking files a libuv-broken
Use

  export NODE_USE_UV=1
  python tools/test.py --libuv simple pummel

To run the equivalent of "make test-uv".
2011-08-23 23:45:46 -07:00
Ryan Dahl
4e1d6fca8e Mark tests which are broken in libuv 2011-08-23 23:45:21 -07:00
Ryan Dahl
4fa13152af Support MSVS build directories in tools/test.py 2011-08-23 19:59:07 -07:00
Nathan Rajlich
8ec31a3362 Use Object.getPrototypeOf() on the object in the REPL tab-completion.
Some people use __proto__ to augment an Object's prototype after it's been created.
This patch helps make the "new" prototype properties visible if necessary.

This is also more consistent with the while logic below.
2011-08-23 15:35:36 -07:00
Ryan Dahl
b15ab5de51 Upgrade V8 to 3.5.7 2011-08-23 15:17:57 -07:00
Ryan Dahl
42529ddfb5 waf: Don't build out/Debug/node_g - just out/Debug/node
This is to match how GYP does it.
2011-08-23 15:13:09 -07:00
Ryan Dahl
ea156359e9 net_legacy: Fix throw typo
Thanks Tobi
2011-08-23 14:27:50 -07:00
Ryan Dahl
a7300c8297 WAF builds in out/ instead of build/ 2011-08-23 14:10:39 -07:00
Ryan Dahl
879eb16280 Have WAF variants match GYP configuration names 2011-08-23 14:10:35 -07:00
Ryan Dahl
85f7b78e9b gyp: Further fixes to target_defaults for mac 2011-08-23 13:19:17 -07:00
Evan Martin
8a29e5ea5b gyp: Don't pass C++ flags to C compiler, and don't pass -ansi in OpenSSL builds. 2011-08-23 13:19:17 -07:00
Evan Martin
a916d888f2 common.gypi: don't nest "target_defaults" within "target_defaults"
The "conditions" block is already within a "target_defaults", so its
children amend target default settings already.
2011-08-23 13:19:17 -07:00
koichik
485d5b5dff dns: Force the DNS module to invoke callbacks asynchronously.
Fixes #1164.
2011-08-24 03:01:41 +09:00
Ryan Dahl
e3413f08fd net_uv: throw when people construct net.Socket(fd)
Easier to catch compatibility errors.
2011-08-23 02:31:22 -07:00
Ryan Dahl
c4454d2efc net_uv: Don't error on ECONNRESET
Fixes #1571.
2011-08-22 19:11:38 -07:00
Ryan Dahl
80dd818290 Upgrade GYP to r1010 2011-08-22 17:09:57 -07:00
Ryan Dahl
c2ae39b8d6 gyp: -ldl on linux 2011-08-22 20:07:07 -04:00
Ryan Dahl
cf2e68d960 net_uv: handle read errors 2011-08-22 15:03:27 -07:00
Ryan Dahl
b8d40be611 Upgrade libuv to joyent/libuv@ce20791 2011-08-22 14:52:28 -07:00
Mikeal Rogers
103990b640 Fixes #1531 2011-08-22 14:31:25 -07:00
Maciej Małecki
94963ab39a Add failing test for https2 compatibility
Issue #1531
2011-08-22 14:30:58 -07:00
Ryan Dahl
2e5a8e071e Update license info for openssl 2011-08-22 11:36:38 -07:00
Peter Bright
0110c90382 Upgrade to 0.9.8r.
Build in Win32.
2011-08-22 11:30:47 -07:00
Ryan Dahl
e80cac6225 import openssl from chrome 2011-08-22 11:30:45 -07:00
koichik
1adfd48448 Doc improvements 2011-08-23 00:18:46 +09:00
Ryan Dahl
f5db3f1f85 Fix #1563. overflow in ChildProcess custom_fd. 2011-08-20 12:39:40 -07:00
Maciej Małecki
962a9e808c docs: process.memoryUsage returns memory usage measured in bytes 2011-08-20 00:59:31 +02:00
Ryan Dahl
05e6f318c6 Upgrade V8 to 3.5.6 2011-08-18 16:59:30 -07:00
Ben Noordhuis
63607a0304 bench: make number of response body chunks configurable in http_simple 2011-08-17 23:26:23 +02:00
Ben Noordhuis
8e8f36f958 Fix #1546 some more. Remove expensive debug call. 2011-08-17 22:53:42 +02:00
isaacs
711a356468 Close #1544 Document slashesDenoteHost flag in url.parse 2011-08-17 13:43:09 -07:00
Ryan Dahl
8320af7ef3 Merge remote branch 'origin/v0.4'
Conflicts:
	doc/api/tls.markdown
2011-08-17 13:25:44 -07:00
Ben Noordhuis
d72c6940f8 bench: make http_simple send chunked encoding if requested 2011-08-17 20:39:20 +02:00
koichik
4cf931db17 http: improve compatibility of legacy API
In http1, legacy http.Client shares one connection with multiple requests.
But in http2, it uses concurrent connections.
With --use-http1, test/simple/test-http-legacy.js passes.
However, it fails without --use-http1 (use http2).

This improves compatibility of legacy http.Client API between http1 and http2.

Fixes #1530.
2011-08-17 00:19:55 +09:00
koichik
8293bb8a32 test: refactored http test.
Many http tests had used legacy http.Client.
This refactored it to use modern API.

Fixes #1528.
2011-08-16 23:59:57 +09:00
Antranig Basman
c05936ca13 vm: fix incorrect dispatch of vm.runInContext for argument "filename"
Adds test case and documentation for vm.runInContext and vm.createContext.

Fixes #1140.
2011-08-16 14:50:04 +02:00
Ryan Dahl
72246d97a2 Complete GYP support for Python 2.5.2 2011-08-15 18:26:48 -07:00
Ryan Dahl
e57ed540e6 GYP Support python 2.5.2 2011-08-15 21:18:21 -04:00
Ryan Dahl
b433c42a56 gyp: Support Linux 2011-08-15 21:17:02 -04:00
Mikeal Rogers
584ae7b084 Remove http.cat. fixes #1447 2011-08-16 01:24:41 +02:00
Ryan Dahl
721f26520d Upgrade GYP to r999
To fix osx/make build http://codereview.chromium.org/7618052
2011-08-15 15:47:18 -07:00
Ryan Dahl
66f77963a3 Upgrade GYP to r995 2011-08-15 13:49:15 -07:00
Ryan Dahl
25a5e90289 Fix GYP build on OSX
Broken due to DOS line endings.

  ./configure-gyp
  make -f Makefile-gyp
2011-08-15 13:41:07 -07:00
Ben Noordhuis
5e37e10e41 module: fix pointer reference to out-of-scope variable
Reported by Tom Hughes.
2011-08-15 20:08:18 +02:00
Nathan Rajlich
54b409d650 util: isRegExp() should not call toString() on its argument
An overloaded toString() method may have side effects
so don't call it for a simple type check.
2011-08-15 17:22:48 +02:00
Mickaël Delahaye
e8d268fd5f Fix docs for fs.*chown
Fix bad parameters of fs.chown[Sync], fs.fchown[Sync] and
fs.lchown[Sync] in documentation.

Fixes #1533.
2011-08-15 22:45:41 +09:00
Bert Belder
9728723508 node_crypto: interface with libuv, not libev 2011-08-15 02:30:35 +02:00
koichik
4d186f270f Docs: Not memcpy, but memmove
Fixes #1520.
2011-08-14 23:10:36 +09:00
Peter Bright
16788f461a Rename gyp files to produce useful solution names.
Hoist common settings into common.gypi.

Restrict v8's common.gypi to v8 projects.

Ensure v8 doesn't use /MP in debug builds.

Add basic settings for other platforms.

Make uv import common.gypi properly.

Remove LTCG warning.
2011-08-13 19:57:42 -07:00
Thomas Shinnick
a5d90c435c path.js: correct three harmless .length typos
lib/path.js routines normalizeArray() and resolve() have for loops that
count down from end of an array.  The loop indexes are initialized using
"array.length" rather than "array.length-1".  The initial array element
accessed is always beyond the end of array and the value is 'undefined'.
Strangely, code exists that acts to ignore undefined values so that the
typos are unnoticeable.

Existing tests emit no errors either before or after changing to "length-1".
Tests _do_ start failing at "length-2". (Actually it is node that starts
to fail at "length-2" - that's a valid enough test...)
2011-08-14 04:10:42 +02:00
Ben Noordhuis
bfc2982f10 uv: upgrade to 5899192 2011-08-14 03:15:12 +02:00
Ben Noordhuis
eaac88163a module: fix pointer reference to out-of-scope variable
Reported by Tom Hughes.
2011-08-14 01:25:39 +02:00
Thomas Shinnick
59b815b097 test: add typed arrays to known globals list 2011-08-13 23:51:31 +02:00
Fedor Indutny
c0d8311f6b small NPN doc fix
Fixes #1522.
2011-08-14 02:51:35 +09:00
Artem Zaytsev
a38bda9fb2 platform: fix GetFreeMemory() on 64 bits freebsd
v_free_count is defined as u_int v_free_count (struct vmmeter sys/vmmeter.h:87)
but variable info defined as unsigned long, this cause error on 64-bits systems
because higher 32 bits remain uninitialized
2011-08-12 19:17:05 +02:00
Ben Noordhuis
97b0000c53 build: add src/v8_typed_array.cc to gyp sources list 2011-08-12 18:58:54 +02:00
Ben Noordhuis
cbea40eaf2 typed arrays: fix signed/unsigned compiler warnings 2011-08-12 18:52:06 +02:00
Ben Noordhuis
4726504663 typed arrays: preliminary benchmarks 2011-08-12 18:42:24 +02:00
Ben Noordhuis
efcbe3b21a typed arrays: add Float64Array 2011-08-12 18:42:24 +02:00
Ben Noordhuis
83b211ecb2 typed arrays: alias method subarray() to slice() 2011-08-12 18:42:24 +02:00
Ben Noordhuis
7cab4d6870 typed arrays: integrate plask's typed array implementation 2011-08-12 18:42:24 +02:00
Glen Low
04122ad2d3 crypto: PBKDF2 function from OpenSSL 2011-08-12 16:23:11 +02:00
Ben Noordhuis
01b64fc36b uv: upgrade to 7f82995 2011-08-12 16:14:58 +02:00
Brian White
b7c23ac3f5 Incorporate endianness into buffer.read* function names instead of passing in a boolean flag 2011-08-12 15:49:57 +02:00
Ben Noordhuis
a002f4f453 test: enable simple/test-http-dns-error for make test-uv 2011-08-12 15:46:44 +02:00
Ben Noordhuis
028b33b18a test: add test for #1202, uncatchable exception on bad host name 2011-08-12 15:46:18 +02:00
Ben Noordhuis
4e204f37fd net: defer DNS lookup error events to next tick
net.createConnection() creates a net.Socket object
and immediately calls net.Socket.connect() on it.

There are no event listeners registered yet so
defer the error event to the next tick.

Fixes #1202.
2011-08-12 15:42:45 +02:00
Ben Noordhuis
e00c2ec5e3 build: remove 1024 char read limit from cmake file 2011-08-12 15:32:43 +02:00
Ben Noordhuis
3cac57658f test: add test for #1202, uncatchable exception on bad host name 2011-08-12 15:23:29 +02:00
Ben Noordhuis
fa378ee4d8 net: defer DNS lookup error events to next tick
net.createConnection() creates a net.Socket object
and immediately calls net.Socket.connect() on it.

There are no event listeners registered yet so
defer the error event to the next tick.

Fixes #1202.
2011-08-12 15:22:56 +02:00
Arnout Kazemier
7ba30a4c2e Small changes for fs.watchFile. Fixed broken markdown. Changed variable f to a proper filename.
Fixes #1507.
2011-08-12 21:57:58 +09:00
Ryan Dahl
5b58473b40 Now working on v0.5.5 2011-08-12 02:15:19 -07:00
Ryan Dahl
cfba1f5922 Bump version to v0.5.4 2011-08-12 01:17:05 -07:00
Ryan Dahl
6c614fe585 Upgrade libuv to 65f71a2 2011-08-12 01:14:46 -07:00
Ryan Dahl
89bed19513 Upgrade V8 to v3.5.4 2011-08-11 23:59:21 -07:00
Ryan Dahl
fb7faefbf5 Upgrade libuv to d358738 2011-08-11 17:25:55 -07:00
Ryan Dahl
2c11718d79 Add some debug output to test-child-process-double-pipe 2011-08-11 17:25:55 -07:00
Ryan Dahl
3a219de586 net_uv: resume on closed net.Socket shouldn't crash 2011-08-11 17:25:54 -07:00
Ben Noordhuis
3cd694c9f3 build: .gitignore build/ directory 2011-08-12 01:10:41 +02:00
isaacs
ac4791393e Fix #1497 querystring: Replace 'in' test with 'hasOwnProperty' 2011-08-11 15:36:02 -07:00
isaacs
3210809d0a Fix #1497 querystring: Replace 'in' test with 'hasOwnProperty' 2011-08-11 15:31:29 -07:00
Ben Noordhuis
eb09b0644b http: destroy socket on error
Needs further investigation, the test passed without `--use-uv`.

Fixes failing test:
  test/simple/test-http-dns-fail.js
2011-08-11 23:39:38 +02:00
Ryan Dahl
3d4ae3ab4d net_uv: pipes don't have getsockname 2011-08-11 10:44:20 -07:00
koichik
d1a2628499 Doc improvements
related to #1472.
2011-08-12 02:00:42 +09:00
Ben Noordhuis
79f064f565 net: properly export remoteAddress to user land
Fixes failing test:
  test/simple/test-net-remote-address-port.js
2011-08-11 17:51:03 +02:00
Ben Noordhuis
f52a8db280 test: fix logic error in test-net-remote-address-port.js
The test intended to register an 'at exit' listener
but called `process.exit()` instead.
2011-08-11 16:26:01 +02:00
Christopher Wright
0d8d04e585 Correct code span
Fixes #1489.
2011-08-11 16:29:37 +09:00
Peter Bright
b9d777734d Fix MSVS building. 2011-08-11 04:52:33 +02:00
Bert Belder
74e8fa2e57 Upgrade libuv to ca633920f564167158d0bb82989d842a47c27d56 2011-08-11 04:38:41 +02:00
Ben Noordhuis
fcf9cfa137 node: propagate --use-uv to child processes 2011-08-11 02:47:43 +02:00
Ben Noordhuis
ef496dc39d uv: upgrade to e8497ae 2011-08-11 02:46:02 +02:00
Ryan Dahl
e6b06bc6c5 win: fix test-process-env
Remove support for setting process.env.TZ as it doesn't seem we can do it
x-platform without fixing V8.
2011-08-10 17:15:13 -07:00
Ben Noordhuis
e62cdd0488 uv: upgrade to b328e4c 2011-08-11 01:40:16 +02:00
Ben Noordhuis
c4549b8573 uv: upgrade to b6b97f3 2011-08-11 00:37:45 +02:00
Ben Noordhuis
460614125b tcp: propagate libuv tcp accept() errors to net_uv.js 2011-08-11 00:36:58 +02:00
Ryan Dahl
46b0654347 Upgrade libuv to db190c7 2011-08-10 14:23:26 -07:00
Ryan Dahl
72c412767d net_uv: Handle failed shutdown req 2011-08-10 14:09:39 -07:00
Ryan Dahl
c171a0851a Add test-pipe-file-to-http to test-uv 2011-08-10 13:33:22 -07:00
Ryan Dahl
4f03f1bead net_uv: fix test/simple/test-pipe-file-to-http.js 2011-08-10 13:27:11 -07:00
Ryan Dahl
35d0df919a test: Allow common.ddCommand to be run in presence of existing file 2011-08-10 11:32:37 -07:00
Ryan Dahl
4983bd348d x-platform func for spawning pwd in tests
Fixes test-child-process-buffering
2011-08-10 11:23:55 -07:00
Bert Belder
43da0e6fe4 Explicitly disable cr/lf conversion for test fixtures
Otherwise git's autocrlf feature makes test fail on windows.
2011-08-10 19:59:37 +02:00
Bert Belder
c96ef84427 Revert "Make test-sync-fileread pass even when git cr/lf conversion is enabled"
We'll solve this problem with a .gitattributes file.
This reverts commit 27ef0b0903.
2011-08-10 19:59:36 +02:00
Fedor Indutny
942f8b5afb Add NPN and SNI documentation.
Fixes #1420.
Fixes #1426.
2011-08-10 09:44:35 -07:00
Bert Belder
27ef0b0903 Make test-sync-fileread pass even when git cr/lf conversion is enabled 2011-08-10 04:30:31 +02:00
Bert Belder
764dfbb1bf Open files in binary mode, on msvc too 2011-08-10 04:23:44 +02:00
Ryan Dahl
3ce4adf3c6 Remove unnecessary line 2011-08-09 18:05:57 -07:00
Ryan Dahl
b3bc009a89 Fix test-net-server-on-fd-0 for windows by removing assert
Rename to regression test for GH-746 as the fd 0 behavior was not what the
bug report was about.
2011-08-09 18:01:54 -07:00
Ryan Dahl
501b0b91be Add fixed tests to test-uv 2011-08-09 17:46:29 -07:00
Ryan Dahl
3b0f2cecff Fix dd command tests for Windows 2011-08-09 17:43:57 -07:00
Ryan Dahl
665a4e4a1d Fix test/simple/test-repl 2011-08-09 16:38:48 -07:00
Ryan Dahl
03a119eb70 Improve win compat of test-repl 2011-08-09 16:07:16 -07:00
Tom Hughes
421b6e89aa crypto: fix incorrect ssl shutdown check 2011-08-09 23:56:00 +02:00
Tom Hughes
25118b0a26 net: fix incorrect sizeof() 2011-08-09 23:56:00 +02:00
Tom Hughes
94db871ecf crypto: fix incorrect ssl shutdown check 2011-08-09 23:54:49 +02:00
Tom Hughes
a8692a0154 net: fix incorrect sizeof() 2011-08-09 23:54:31 +02:00
Ryan Dahl
0696e78d64 Improve assert error messages
1. actual and expected should be displayed in the same order they were given

2. long values should be truncated.
2011-08-09 14:20:06 -07:00
Ben Noordhuis
fd1fc5080f eio: define HAVE_UTIMES 1 on cygwin, fixes build
Fixes #1483.
2011-08-09 22:57:09 +02:00
Ryan Dahl
acc120a37b windows: fix test-umask 2011-08-09 13:55:04 -07:00
Ryan Dahl
bf6b5299b4 Upgrade libuv to e5f513c 2011-08-09 12:26:54 -07:00
Ryan Dahl
cbecd88199 Readd the static libpthread-win32 libraries 2011-08-09 12:25:26 -07:00
Ryan Dahl
9e5cd012e2 Revert "Unify configure scripts"
This reverts commit 71435ede81.
2011-08-09 10:19:48 -07:00
Ryan Dahl
2689d262ec Make buffer.INSPECT_MAX_BYTES public for mscdex 2011-08-08 19:04:34 -07:00
Ryan Dahl
7332c4022f Truncate Buffer.inspect at 50 bytes 2011-08-08 17:50:43 -07:00
Ryan Dahl
ab0b1f9f13 Fix test-executable-path 2011-08-08 17:35:26 -07:00
Ryan Dahl
2126989a32 Fix test-http-upgrade-server and test-http-parser
Problem was introduced in last http-parser upgrade which fixed a long
standing bug with the upgrade event and removed several callbacks.
2011-08-08 17:12:26 -07:00
Robert Mustacchi
0df08c6a0c Endian argument should be a boolean. Signed integers shouldn't run through checks for unsigned integers. Clean up jslint. Provide unchecked uint entry points. 2011-08-08 17:01:57 -07:00
Ryan Dahl
f145e35a93 Tests should point at the build directory until GYP is default 2011-08-08 17:01:44 -07:00
Ryan Dahl
df22ccb0de Merge branch 'gyp' 2011-08-08 16:22:41 -07:00
Ryan Dahl
587f6c3117 Fix test-child-process-exec-cwd. 2011-08-08 16:17:18 -07:00
Ryan Dahl
71435ede81 Unify configure scripts 2011-08-08 15:09:42 -07:00
Ryan Dahl
c110fbcc99 Revert "Remove scons"
This reverts commit bd270b48a7.
2011-08-08 14:15:51 -07:00
Ryan Dahl
09f2d386df Upgrade libuv to 75c10905 2011-08-08 14:14:47 -07:00
Ryan Dahl
03b5831f90 Bring back old Makefile and configure script
GYP and WAF need to live in parallel for some time.
2011-08-08 14:12:44 -07:00
Ryan Dahl
d53fccbce5 Fix MSVS build 2011-08-08 12:32:34 -07:00
Ryan Dahl
db1bf679d8 Move GYP file to the project root 2011-08-08 12:11:48 -07:00
Ryan Dahl
f03ea7045c generate-project.bat: Point at the right path 2011-08-08 10:25:55 -07:00
Ryan Dahl
f57d70d3c9 sketch out configure support 2011-08-08 08:55:39 -07:00
Ben Noordhuis
f69822c70e http2: reword confusing comment 2011-08-08 17:38:50 +02:00
koichik
d439c092c2 Improve util.format() compatibility with browser.
Fixes #1434.
2011-08-08 23:24:05 +09:00
Mikeal Rogers
24a1f6ecc5 Fixes https host header default port handling. 2011-08-07 17:37:56 -07:00
isaacs
ef35f4d6c1 Test for default host headers on default ports in https and http 2011-08-07 17:37:56 -07:00
Ben Noordhuis
fc57df283c docs: rename readline.md to readline.markdown 2011-08-08 00:59:14 +02:00
Tom Hughes
b267dc458d cmake: Various fixes.
* Allow overriding install path with CMAKE_INSTALL_PREFIX.
* make sure js2min.py can be found when building out of source.
* Replace empty macros with void(0).
  Expressions like "debug(x) && foo()" fail if debug(x) is an empty macro.
* Make sure node-natives.h creation is deterministic.
* Fix version string.
  The copyright header made the node_version.h file larger
  than the previously set file read limit.
2011-08-08 00:57:30 +02:00
Ben Noordhuis
d5c95f02af docs: rename readline.md to readline.markdown 2011-08-08 00:56:04 +02:00
Ryan Dahl
13d685bdab symlink in ./node and ./node_g for make users 2011-08-07 14:54:37 -07:00
Ryan Dahl
b031429dc3 Add generate-projects.bat 2011-08-07 14:54:14 -07:00
Ben Noordhuis
54bb53bf32 docs: fix typo in tls API docs 2011-08-07 23:30:03 +02:00
Peter Bright
e38fc6cc84 Disable optimization in debug builds.
Enable full optimization in release builds.
2011-08-07 14:22:59 -07:00
Peter Bright
588ef72ce0 Silence VC++ warnings about use of badly-designed parts of the C library. 2011-08-07 14:22:45 -07:00
Peter Bright
bcff53dfb5 Fix missing prototype warnings. 2011-08-07 14:22:34 -07:00
Peter Bright
79d9f62946 Fix bad platform name. 2011-08-07 14:22:17 -07:00
Ryan Dahl
cafe446f42 Add 'make test' and friends 2011-08-07 01:24:00 -07:00
Peter Bright
6ac8c55989 Make MSVS build.
MSVS settings don't actually need to be guarded by conditions. gyp will do
the right thing.
2011-08-06 22:39:28 -07:00
Peter Bright
b88c48177a V8 GYP should attempt to not use cygwin. 2011-08-06 20:13:50 -07:00
Peter Bright
71333b3f5b Modify GYP scripts for VC build 2011-08-06 19:53:11 -07:00
Ryan Dahl
5aa75ebe71 Upgrade libuv - it now depends on pthreads 2011-08-06 19:11:55 -07:00
Ben Noordhuis
ad31e5af56 build: don't try to ls -lh executables that don't exist
Avoids `ls: cannot access build/debug/node_g: No such file or directory`.
Not an actual error but it confuses people.
2011-08-07 00:09:08 +02:00
Logan Smyth
3056c2ca76 Add documentation for SecurePair and its 'secure' event.
Fixes #1443.
2011-08-06 23:31:17 +09:00
Ryan Dahl
3ebbf6ebf7 Complete eio upgrade 2011-08-06 03:47:09 -07:00
Ryan Dahl
610436f242 clean merge scabs 2011-08-06 03:46:41 -07:00
Ryan Dahl
88afc406ca Upgrade libuv to 48877ed 2011-08-06 03:38:11 -07:00
Peter Bright
13d6a1f67f Basic VC++ compatibility work. 2011-08-06 03:31:29 -07:00
Ryan Dahl
bd270b48a7 Remove scons 2011-08-06 03:12:09 -07:00
Ryan Dahl
bef9f56cac Bring gyp into the tools directory; handwritten makefile 2011-08-06 03:12:08 -07:00
Ryan Dahl
466cbfef1b gyp: fix makefile build 2011-08-06 03:12:08 -07:00
Ryan Dahl
7a38b63358 gyp fix build again 2011-08-06 03:12:08 -07:00
Ryan Dahl
4eeeb756bc gyp: Fix build 2011-08-06 03:12:07 -07:00
Ryan Dahl
f038252ba5 add build/gyp_node build script 2011-08-06 03:12:07 -07:00
Ryan Dahl
51ffed1cd0 Upgrade libuv for gyp reasons 2011-08-06 03:12:07 -07:00
Ryan Dahl
43d7cfca18 gyp: fix test runner 2011-08-06 03:12:06 -07:00
Ryan Dahl
a979ab9d99 Improve gyp build - now works kind of 2011-08-06 03:12:06 -07:00
Ryan Dahl
f55f478523 add deps/v8/build ??? 2011-08-06 03:12:06 -07:00
Ryan Dahl
bea4827de0 More progress with gyp 2011-08-06 03:12:05 -07:00
Ryan Dahl
518430db3a WIP 2011-08-06 03:12:05 -07:00
Ryan Dahl
81a999c954 Upgrade libuv for gyp support 2011-08-06 03:11:33 -07:00
Ryan Dahl
4f3c8b3972 WIP 2011-08-06 03:11:33 -07:00
Ryan Dahl
c3ccbea5cd Upgrade http_parser to 965f91bc76b2d1601e23 2011-08-06 03:04:42 -07:00
koichik
bbb38b8918 [doc] add link to npm search in Readme.md
Fixes #1459.
2011-08-06 15:25:40 +09:00
Tony Huang
891a6f24a0 add the document of the new api routine: path.relative 2011-08-06 15:02:25 +09:00
Bert Belder
9e8d812ce9 Make test-child-process-exec-env work on windows 2011-08-05 22:57:45 +02:00
Bert Belder
567470b136 Child processes: support windowsVerbatimArguments option 2011-08-05 22:57:45 +02:00
Ben Noordhuis
69ce415d38 uv: fix build on systems that don't have pipe2()
This is libuv commit 2fbcbe9, cherry-picked for node.
2011-08-05 17:16:47 +02:00
koichik
ae77b4d553 Doc improvements
Documents util.format().
Thanks @bnoordhuis and @shigeki.
Fixes #1424.
2011-08-05 23:42:24 +09:00
Bert Belder
0878293120 Upgrade libuv to c834d5de9e4747e5138bed9140320b44622ab6de 2011-08-05 09:15:04 +02:00
Ben Noordhuis
30d20cf405 Revert commits 12c8b27 and 88f416a, fixed properly in 2fe4558. 2011-08-05 04:29:16 +02:00
Ben Noordhuis
2fe4558c10 uv: cherry-pick libuv commit 041d60e into node
Fixes execve-after-fork race in uv_spawn().
2011-08-05 04:27:18 +02:00
Ben Noordhuis
5a49522ba7 child process: don't send signal if process is already terminated
Fixes failing test test/simple/test-exec-max-buffer.js
2011-08-04 21:28:49 +02:00
Ryan Dahl
eeece4f5ea Upgrade V8 to 3.5.3 2011-08-04 12:18:09 -07:00
Ben Noordhuis
b8c8e9c113 net_uv: add listenFD shim that throws when called 2011-08-04 21:05:42 +02:00
Ben Noordhuis
2bbb468428 child process: bind to libuv's kill process API
Fixes failing test test/simple/test-child-process-kill.js
2011-08-04 18:40:41 +02:00
Ben Noordhuis
ac722bbed6 module: strip byte order marker when loading *.js and *.json files
BOMs make V8 raise a 'SyntaxError: Unexpected token ILLEGAL' exception.

Fixes #1440.
2011-08-04 16:52:55 +02:00
Ben Noordhuis
f9cfd70946 test: fix bad test in test-cli-eval.js
The test checked that stdout was empty. Forgetting to escape brackets
in the argument to --eval made that true on UNIX systems: the error
was written to stderr.

Props to Peter Bright for reporting the issue.
2011-08-04 16:43:11 +02:00
Ben Noordhuis
0c4e735401 ev: fix infinite loop in ev_walk() 2011-08-04 01:38:53 +02:00
Ben Noordhuis
88f416a5ed docs: add race warning to child_process.kill() 2011-08-03 16:50:47 +02:00
Ben Noordhuis
12c8b27e24 test: fix exec-after-fork race in test/simple/test-child-process-kill.js 2011-08-03 16:05:49 +02:00
Bert Belder
09bb1d64dc Upgrade libuv to ec143961d135adb3f49f5a2322774ef43e2520b9 2011-08-03 01:45:03 +02:00
Bert Belder
6efc86df6a Upgrade libuv to dbaddc4423d61fa16cca299650f8378cffba9cce 2011-08-03 00:27:16 +02:00
Ben Noordhuis
38f948a373 http: make http2 the default, legacy backend is available with --use-http1
Fixes #1441.
2011-08-02 23:40:56 +02:00
Mikeal Rogers
48dcb905f6 Update tests for http2. 2011-08-02 12:12:14 -07:00
Bert Belder
a962cca390 V8: Don't use mprotect on Cygwin as virtual memory is managed directly via WinAPI calls.
Upstream fix: http://codereview.chromium.org/7549009
2011-08-02 18:38:35 +02:00
Bert Belder
91ecfbcae8 Remove platform_win32_winsock 2011-08-02 18:38:34 +02:00
Ryan Dahl
158bfab922 Now working on v0.5.4 2011-08-02 01:08:01 -07:00
Ryan Dahl
4585330afe Bump version to v0.5.3 2011-08-02 00:17:41 -07:00
Ryan Dahl
21964fa779 Upgrade libuv to b2ed24d 2011-08-02 00:16:15 -07:00
Ryan Dahl
8ace421bfd Complete removal of node_child_process_win32.cc 2011-08-01 22:51:14 -07:00
Ryan Dahl
3ce671284b Remove node_child_process_win32.cc 2011-08-01 22:34:16 -07:00
Ryan Dahl
6d5218bc7d Merge branch 'v0.4'
Conflicts:
	doc/api/crypto.markdown
	doc/api/modules.markdown
	src/platform_win32.cc
2011-08-01 21:52:03 -07:00
Igor Zinkovsky
a6e0a91a70 windows: remove dependency on rpcrt4 and ole32 2011-08-01 20:44:27 -07:00
Ryan Dahl
89b14fc0ff Upgrade libuv to 2e9a743 2011-08-01 20:26:26 -07:00
Igor Zinkovsky
1c09cc1550 windows: set stdio streams to binary mode 2011-08-01 18:30:13 -07:00
Bert Belder
70bf121f21 Partial fix for test-child-process.cwd on windows 2011-08-02 03:27:19 +02:00
Ryan Dahl
2908f323e1 win: fix test-child-process-exec-cwd 2011-08-01 17:40:57 -07:00
Ryan Dahl
a44748b3d7 win2k3: fix test-child-process-env 2011-08-01 17:18:01 -07:00
Ryan Dahl
bceab40b02 Upgrade libuv to c35548a 2011-08-01 17:06:03 -07:00
Ben Noordhuis
e1bb241b51 test: add targets test-http2 and test-all-http2
Passes `--use-http2` to node. Fixes #1430.
2011-08-02 01:52:24 +02:00
Ben Noordhuis
e0d7c2cfa3 Upgrade libuv to 404d697 2011-08-02 01:16:58 +02:00
Ryan Dahl
99c15e5661 child_process_uv: don't attempt to pass test-child-process-deprecated-api 2011-08-01 16:05:57 -07:00
Ryan Dahl
ced0b14185 Add test-tls-securepair-server to test-uv 2011-08-01 16:02:23 -07:00
Ryan Dahl
e3ac47771c child_process_uv: fix test-child-process-stdin and -ipc 2011-08-01 15:40:44 -07:00
Tom Hughes
707b1dee84 cmake: Update for libuv. 2011-08-01 15:14:14 -07:00
Ryan Dahl
76fd364dfe Upgrade libuv to 5af7423f 2011-08-01 14:49:58 -07:00
Igor Zinkovsky
925b467a4e fix test-child-process-env on windows 2011-08-01 14:49:10 -07:00
Ryan Dahl
1710bea355 Add a few more asserts to test/simple/test-child-process-stdin.js 2011-08-01 14:48:45 -07:00
Ben Noordhuis
7c07e75db9 Upgrade libuv to b700896 2011-08-01 22:26:28 +02:00
Ryan Dahl
c48b2a98d8 windows: Fix test-module-load-list 2011-08-01 12:09:05 -07:00
Ryan Dahl
9166f85285 Remove debug code 2011-08-01 10:28:32 -07:00
Ryan Dahl
b30ad11b59 child_process_uv: Handle spawn errors 2011-08-01 10:22:24 -07:00
Ben Noordhuis
8da4831ed0 Upgrade libuv to 023f99a 2011-08-01 18:16:27 +02:00
Ryan Dahl
f0f941a59e link to rpcrt4 and ole32 on win32 2011-07-31 18:19:37 -07:00
Ryan Dahl
baa6a925c2 Upgrade libuv to e9bee51 2011-07-31 18:13:05 -07:00
Ryan Dahl
624dd38d89 child_process_uv: fix test/simple/test-child-process-env 2011-07-31 17:51:43 -07:00
Ryan Dahl
ef767a152b child_process_uv: fix simple/test-child-process-cwd 2011-07-31 16:50:53 -07:00
Ryan Dahl
19a62589b2 child_process_uv: add exec, fix simple/test-child-process-exec-cwd 2011-07-31 16:24:29 -07:00
Ryan Dahl
4ac633bf21 Forgot to add child_process_uv.js 2011-07-31 16:00:47 -07:00
Ryan Dahl
7772f21b60 initial pass at lib/child_process_uv.js 2011-07-31 15:58:10 -07:00
koichik
d3d8f1b972 Add %% escape to util.format()
Fixes #1273.
2011-07-30 23:56:17 +09:00
Paul Querna
5501a5a641 Add stdlib include for free(), fixing build on linux after f01b241 2011-07-29 18:28:12 -07:00
Ryan Dahl
f01b241057 add wrapper for uv_spawn
process.binding('process_wrap')
2011-07-29 18:03:44 -07:00
Ben Noordhuis
874260b40f util: add sprintf-like format() function
Fixes #1407.
2011-07-30 02:11:31 +02:00
Fedor Indutny
9010f5fbab Add support for TLS SNI
Fixes #1411
2011-07-29 16:57:28 -07:00
Ryan Dahl
9dd979228d Upgrade libuv to 7108ca88 2011-07-29 15:43:56 -07:00
Robert Mustacchi
de0b8d601c jslint cleanup: path.js, readline.js, repl.js, tls.js, tty_win32.js, url.js 2011-07-29 11:58:02 -07:00
isaacs
703a1ffe52 Revert "AMD compatibility for node"
This reverts commit 9967c369c9.

Conflicts:

	test/simple/test-module-loading.js
2011-07-29 11:56:38 -07:00
koichik
c72223e2a9 Doc improvements
related to #1391, #1415.
2011-07-30 03:18:33 +09:00
koichik
bffb758243 Fix http.ClientRequest crashes if end() was called twice
Fixes #1417.
Fixes #1223.
2011-07-30 00:47:54 +09:00
koichik
62aaf56d1b Fix http.ClientRequest crashes if end() was called twice
Fixes #1417.
Fixes #1223.
2011-07-30 00:47:17 +09:00
koichik
8b3ba47f88 Fix http.ClientRequest crashes if end() was called twice
Fixes #1417.
Fixes #1223.
2011-07-30 00:07:37 +09:00
Fedor Indutny
759fb36df3 crypto: dispose persistent properties on class destruction 2011-07-28 15:16:04 +02:00
Ryan Dahl
799c7bdcb6 Fix test-module-load-list for use-uv 2011-07-27 20:03:02 -07:00
Ryan Dahl
8527f00c3c Lazy load a few modules 2011-07-27 19:54:31 -07:00
Ryan Dahl
ea9ee1fb7e Add process.moduleLoadList for better startup transparency 2011-07-27 19:30:32 -07:00
Ryan Dahl
bca6e35b2b Don't always enable debug on startup
Improves startup time. Problem introduced in
4ab5476e89
2011-07-27 17:33:06 -07:00
Ryan Dahl
497fe79f97 Speed up startup time
Reverts 2a05fe784d.
2011-07-27 16:36:05 -07:00
Ryan Dahl
1ca5b6cd05 Remove pkg-conf file 2011-07-27 16:21:54 -07:00
Tom Hughes
eab8bebced Fix memleak in libeio. 2011-07-27 23:24:55 +02:00
Ben Noordhuis
8430148ccb uv: upgrade to fc7bc2b 2011-07-27 20:10:11 +02:00
Aku Kotkavuo
562bef5ff3 Add missing parentheses in buffer docs.
Fixes #1405.
2011-07-27 23:12:17 +09:00
Ben Noordhuis
83b82f900f wrap: upgrade pipe_wrap and tcp_wrap to new libuv API 2011-07-27 04:13:49 +02:00
Igor Zinkovsky
187fe27a6e stdio binding + javascript to enable process.stdin.listen() 2011-07-27 03:59:33 +02:00
Ben Noordhuis
de261713bf uv: upgrade to a1adfe3 2011-07-27 03:54:00 +02:00
SAWADA Tadashi
d3a84bea7b Fix crypto encryption/decryption with Base64.
Fixes #738.
Fixes #1205.
2011-07-27 00:19:02 +02:00
Ben Noordhuis
2d65f3c59a Include "platform.h", not <platform.h> - conflicts with system headers
Fixes #1003.
2011-07-26 22:09:03 +02:00
Ben Noordhuis
a7bdaabf60 Include "platform.h", not <platform.h> - conflicts with system headers
Fixes #1003.
2011-07-26 22:05:08 +02:00
Felix Geisendörfer
1b3ebc32d7 Fix test-net-stream.js
I broke this in 09ee293.
2011-07-26 17:31:08 +02:00
Ben Noordhuis
0082ef271e http: add --use-http2 switch 2011-07-26 17:00:53 +02:00
Ben Noordhuis
2ed23314c3 http: make http and http2 co-exist
http2 is currently disabled pending addition of a --use-http2 switch
2011-07-26 17:00:53 +02:00
Mikeal Rogers
915fa1e44f doc: http2 documentation 2011-07-26 17:00:53 +02:00
Mikeal Rogers
2b929c7f19 http: http2 implementation 2011-07-26 16:59:52 +02:00
Felix Geisendörfer
09ee29318f Emit 'close' after all connections have closed
Fixes #1383
2011-07-26 11:07:17 +02:00
Ben Noordhuis
df3a8fcb62 cli: don't print result of --eval
Fixes #572.
2011-07-25 23:59:10 +02:00
koichik
d32971a8cb Doc improvements and change argument name.
Fixes #1318.
2011-07-25 23:57:25 +09:00
Ben Noordhuis
deb100fb17 eio: remove trailing comma from enumerations
Fixes compile-time error in strict mode. Fixes #567.
2011-07-25 15:37:21 +02:00
Alexander Uvarov
216829e752 Docs for Socket::bytesRead, Socket::bytesWritten 2011-07-25 13:29:03 +02:00
Alexander Uvarov
14b75a126f Add Socket::bytesRead, Socket::bytesWritten 2011-07-25 13:28:38 +02:00
isaacs
c050d0fa19 Finish removing require.paths
Fix require() completion bug in repl, and correct man output
2011-07-24 18:04:45 -07:00
isaacs
bf0802402d Note that require.paths is gone in 0.5
Rather than say it "may disappear", let's just be clear that it *has*
disappeared, and exactly how long it'll be supported for.
2011-07-24 17:18:33 -07:00
Stefan Bühler
db993956d6 Fix crypto hmac to accept binary keys + add test cases from rfc 2202 and 4231
Fixes #324.
Fixes #1027.

Instead of converting buffers to strings and back again to char array
directly use the buffer data in hmac_init (same as in hmac_update).
2011-07-24 19:48:18 +09:00
Ben Noordhuis
aa0308d618 process: add process.features, remove process.useUV
Partially fixes #1385.
2011-07-23 23:16:48 +02:00
koichik
50e147bd03 Add an optional length argument to Buffer.write()
Fixes #243.
Fixes #1361.
2011-07-24 02:01:02 +09:00
Daniel Pihlström
fa829b0fd3 convert nonbuffer data to string in fs.writeFile/Sync
Fixes #657.
2011-07-23 23:56:08 +09:00
Jeroen Janssen
2fe780b36c build: add wscript detection for node_version 2011-07-23 16:23:01 +02:00
SAWADA Tadashi
e357acc55b Fix crypto encryption/decryption with Base64.
Fixes #738.
Fixes #1205.
2011-07-23 21:56:41 +09:00
Vicente Jimenez Aguilar
b8e9bf0993 Typos in ChangeLog file.
Fixes #968.
2011-07-23 21:16:45 +09:00
koichik
3eb246485a Doc improvements 2011-07-23 14:29:13 +09:00
Bert Belder
7a6a77e07c Windows/cygwin: no more GetConsoleTitleW errors on XP 2011-07-22 21:06:51 +02:00
Ryan Dahl
82905fa3aa Now working on v0.5.3 2011-07-22 11:51:43 -07:00
Bert Belder
78487b6256 Windows/cygwin: no more GetConsoleTitleW errors on XP 2011-07-22 16:33:55 +02:00
koichik
691497babe Doc improvements
corresponds to #1374 and #1334.
2011-07-22 00:20:47 +09:00
Trent Mick
bbf7e8ed5e http: fix setting ServerResponse.statusCode in writeHead
Fixes #1374.
2011-07-21 14:20:40 +02:00
6143 changed files with 1031052 additions and 159277 deletions

1
.gitattributes vendored Normal file
View File

@@ -0,0 +1 @@
test/fixtures/* -text

34
.gitignore vendored
View File

@@ -1,10 +1,10 @@
build
core
vgcore.*
.waf*
tags
.lock-wscript
*.pyc
doc/api.xml
tools/nodejs.pc
tmp/
node
node_g
@@ -12,3 +12,33 @@ node_g
.benchmark_reports
/.project
/.cproject
/out
# various stuff that VC++ produces/uses
Debug/
Release/
!doc/blog/**
*.sln
!nodemsi.sln
*.suo
*.vcproj
*.vcxproj
*.vcxproj.user
*.vcxproj.filters
UpgradeLog*.XML
_UpgradeReport_Files/
ipch/
*.sdf
*.opensdf
/config.mk
/config.gypi
*-nodegyp*
/gyp-mac-tool
/dist-osx
/npm.wxs
/tools/msvs/npm.wixobj
email.md
deps/v8-*
./node_modules

14
.travis.yml Normal file
View File

@@ -0,0 +1,14 @@
language: node_js
before_script:
- "./configure"
- "make"
script:
- "make test"
notifications:
email: false
irc:
- "irc.freenode.net#libuv"

129
AUTHORS
View File

@@ -165,13 +165,14 @@ Richard Rodger <richard@ricebridge.com>
Andreas Reich <andreas@reich.name>
Dean McNamee <dean@gmail.com>
Trevor Burnham <trevor@databraid.com>
Zachary Scott <zachary.s.scott@gmail.com>
Zachary Scott <zachary@zacharyscott.net>
Arnout Kazemier <info@3rd-Eden.com>
George Stagas <gstagas@gmail.com>
Scott McWhirter <scott.mcwhirter@joyent.com>
Jakub Lekstan <jakub.lekstan@dreamlab.pl>
Tim Baumann <tim@timbaumann.info>
Robert Mustacchi <rm@joyent.com>
Håvard Stranden <havard.stranden@gmail.com>
George Miroshnykov <george.miroshnykov@gmail.com>
Marcel Laverdet <marcel@laverdet.com>
Alexandre Marangone <a.marangone@gmail.com>
@@ -183,7 +184,7 @@ Yoshihiro KIKUCHI <yknetg@gmail.com>
Brett Kiefer <kiefer@gmail.com>
Mariano Iglesias <mariano@cricava.com>
Jörn Horstmann <git@jhorstmann.net>
Joe Shaw <joeshaw@litl.com>
Joe Shaw <joe@joeshaw.org>
Alex Xu <alex_y_xu@yahoo.ca>
Kip Gebhardt <kip.gebhardt@voxer.com>
Stefan Rusu <saltwaterc@gmail.com>
@@ -197,3 +198,127 @@ Igor Zinkovsky <igorzi@microsoft.com>
Shigeki Ohtsu <ohtsu@d.jp>
vegorov@chromium.org <vegorov@chromium.org>
Pierre-Alexandre St-Jean <pierrealexandre.stjean@gmail.com>
Vicente Jimenez Aguilar <googuy@gmail.com>
SAWADA Tadashi <cesare@mayverse.jp>
Logan Smyth <loganfsmyth@gmail.com>
Christopher Wright <christopherwright@gmail.com>
Mickaël Delahaye <mickael.delahaye@gmail.com>
Aku Kotkavuo <aku@hibana.net>
Peter Bright <drpizza@quiscalusmexicanus.org>
Glen Low <glen.low@pixelglow.com>
Thomas Shinnick <tshinnic@gmail.com>
Antranig Basman <antranig.basman@colorado.edu>
Maciej Małecki <maciej.malecki@notimplemented.org>
Evan Martin <martine@danga.com>
Peter Lyons <pete@peterlyons.com>
jkummerow@chromium.org <jkummerow@chromium.org>
Jann Horn <jannhorn@googlemail.com>
Abimanyu Raja <abimanyuraja@gmail.com>
Karl Skomski <karl@skomski.com>
Niclas Hoyer <niclas@verbugt.de>
Michael Jackson <mjijackson@gmail.com>
Ashok Mudukutore <ashok@lineratesystems.com>
Sean Cunningham <sean.cunningham@mandiant.com>
Ben Leslie <benno@benno.id.au>
Christian Tellnes <christian@tellnes.no>
Colton Baker <github@netrefuge.net>
Tyler Larson <talltyler@gmail.com>
Tomasz Janczuk <tomasz@janczuk.org>
Ilya Dmitrichenko <errordeveloper@gmail.com>
Simen Brekken <simen.brekken@gmail.com>
Guglielmo Ferri <44gatti@gmail.com>
Thomas Parslow <tom@almostobsolete.net>
Ryan Emery <seebees@gmail.com>
Zachary Scott <zachary@zacharyscott.net>
Jordan Sissel <jls@semicomplete.com>
Matt Robenolt <matt@ydekproductions.com>
Jacob H.C. Kragh <jhckragh@gmail.com>
Benjamin Pasero <benjamin.pasero@gmail.com>
Scott Anderson <sanderson7@gmail.com>
Yoji SHIDARA <dara@shidara.net>
Mathias Bynens <mathias@qiwi.be>
Łukasz Walukiewicz <lukasz@walukiewicz.eu>
Artur Adib <arturadib@gmail.com>
E. Azer Koçulu <azer@kodfabrik.com>
Roman Shtylman <shtylman@gmail.com>
Kyle Robinson Young <kyle@dontkry.com>
Tim Oxley <secoif@gmail.com>
Ingmar Runge <ingmar@irsoft.de>
Russ Bradberry <rbradberry@gmail.com>
Andreas Madsen <amwebdk@gmail.com>
Adam Malcontenti-Wilson <adman.com@gmail.com>
James Hartig <james.hartig@grooveshark.com>
Shannen Saez <shannenlaptop@gmail.com>
Seong-Rak Choi <ragiragi@hanmail.net>
Dave Irvine <davman99@gmail.com>
Ju-yeong Park <interruptz@gmail.com>
Phil Sung <psung@dnanexus.com>
Damon Oehlman <damon.oehlman@sidelab.com>
Ryunosuke SATO <tricknotes.rs@gmail.com>
Michael Bernstein <michaelrbernstein@gmail.com>
Guillermo Rauch <rauchg@gmail.com>
Dan Williams <dan@igniter.com>
Brandon Benvie <brandon@bbenvie.com>
Nicolas LaCasse <nlacasse@borderstylo.com>
Dan VerWeire <dverweire@gmail.com>
Matthew Fitzsimmons <matt@joyent.com>
Philip Tellis <philip.tellis@gmail.com>
Christopher Jeffrey <chjjeffrey@gmail.com>
Paddy Byers <paddy.byers@gmail.com>
Seth Fitzsimmons <seth@mojodna.net>
Einar Otto Stangvik <einaros@gmail.com>
Paul Vorbach <paul@vorb.de>
Luke Gallagher <notfornoone@gmail.com>
Tomasz Buchert <tomek.buchert@gmail.com>
Myles Byrne <myles@myles.id.au>
T.C. Hollingsworth <tchollingsworth@gmail.com>
Cam Pedersen <diffference@gmail.com>
Roly Fentanes <roly426@gmail.com>
Ted Young <ted@radicaldesigns.org>
Joshua Holbrook <josh.holbrook@gmail.com>
Blake Miner <miner.blake@gmail.com>
Vincent Ollivier <contact@vincentollivier.com>
Jimb Esser <jimb@railgun3d.com>
Sambasiva Suda <sambasivarao@gmail.com>
Sadique Ali <sadiqalikm@gmail.com>
Dmitry Nizovtsev <dmitry@ukrteam.com>
Alex Kocharin <rlidwka@kocharin.ru>
Ming Liu <vmliu1@gmail.com>
Shea Levy <shea@shealevy.com>
Nao Iizuka <iizuka@kyu-mu.net>
Christian Ress <christian@ressonline.de>
Rod Vagg <rod@vagg.org>
Matt Ezell <ezell.matt@gmail.com>
Charlie McConnell <charlie@charlieistheman.com>
Farid Neshat <FaridN_SOAD@yahoo.com>
Johannes Wüller <johanneswueller@gmail.com>
Erik Lundin <mjor.himself@gmail.com>
Mikael Bourges-Sevenier <mikeseven@gmail.com>
Yosef Dinerstein <yosefd@microsoft.com>
Nathan Friedly <nathan@nfriedly.com>
Aaron Jacobs <jacobsa@google.com>
Mustansir Golawala <mgolawala@gmail.com>
fukayatsu <fukayatsu@gmail.com>
Domenic Denicola <domenic@domenicdenicola.com>
Bryan Cantrill <bryan@joyent.com>
lrn@chromium.org <lrn@chromium.org>
Dane Springmeyer <dane@dbsgeo.com>
Sambasiva Suda <sambasivarao@gmail.com>
Vincent Voyer <v@fasterize.com>
ANDO Takahiro <takahiro.ando@gmail.com>
Brian Schroeder <bts@gmail.com>
J. Lee Coltrane <lee@projectmastermind.com>
Javier Hernández <jhernandez@emergya.com>
James Koval <james.ross.koval@gmail.com>
Kevin Gadd <kevin.gadd@gmail.com>
Ray Solomon <raybsolomon@gmail.com>
Kevin Bowman <github@magicmonkey.org>
Jeroen Janssen <jeroen.janssen@gmail.com>
Matt Gollob <mattgollob@gmail.com>
Simon Sturmer <sstur@me.com>
Joel Brandt <joelrbrandt@gmail.com>
Marc Harter <wavded@gmail.com>
Nuno Job <nunojobpinto@gmail.com>
Ben Kelly <ben@wanderview.com>
Felix Böhm <felixboehm55@googlemail.com>
Gabriel de Perthuis <g2p.code@gmail.com>

View File

@@ -1,97 +0,0 @@
cmake_minimum_required(VERSION 2.6)
project(node)
if(USE_GCOV)
set(CMAKE_BUILD_TYPE "Debug")
# Set global c and c++ flags
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fprofile-arcs -ftest-coverage")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fprofile-arcs -ftest-coverage")
# Link flags used for creating executables
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -lgcov -fprofile-arcs")
# Link flags used for creating shared libraries
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -lgcov -profile-arcs")
endif()
#
# options
#
find_package(PythonInterp 2 REQUIRED)
option(SHARED_V8 "use system shared V8 library")
option(SHARED_LIBEV "use system shared libev library")
option(SHARED_CARES "use system shared c-ares library")
option(V8_SNAPSHOT "turn on snapshot when building stock v8")
option(V8_OPROFILE "Add oprofile support")
option(V8_GDBJIT "add gdbjit support")
option(DTRACE "build with DTrace (experimental)")
# cmake policies to get rid of some warnings
cmake_policy(SET CMP0009 NEW) # GLOB_RECURSE should no follow symlinks
# generic cmake configuration
include("cmake/configure.cmake")
# find and configure libs
include("cmake/libs.cmake")
# setup node build targets
include("cmake/node_build.cmake")
# setup v8 build targets
include("cmake/v8_build.cmake")
# docs
## might want to move this to doc/CMakeLists.txt
include("cmake/docs.cmake")
# tests
enable_testing()
include(CTest)
add_subdirectory("test/")
# package
include("cmake/package.cmake")
#
# Final build configuration output
#
message("** Build Summary **")
message(" Version: ${node_version_string}")
message(" Prefix: ${PREFIX}")
message(" Build Type: ${CMAKE_BUILD_TYPE}")
message(" Architecture: ${CMAKE_SYSTEM_PROCESSOR}")
message(" Platform: ${node_platform}")
if(SHARED_V8)
message(" V8: ${V8_LIBRARY_PATH}")
#else()
#message(" V8 jobs: ${parallel_jobs}")
endif()
if(SHARED_libev)
message(" libev: ${LIBEV_LIBRARY}")
endif()
if(SHARED_CARES)
message(" libc-ares: ${LIBCARES_LIBRARY}")
endif()
message(" RT library: ${RT}")
message(" DL library: ${DL}")
if(${OPENSSL_FOUND} MATCHES TRUE)
message(" OpenSSL: ${OPENSSL_LIBRARIES}")
endif()
if(USE_GCOV)
message(" gcov: enabled")
endif()
message(" CCFLAGS: ${CCFLAGS}")
message(" CPPFLAGS: ${CPPFLAGS}")

View File

@@ -1,7 +0,0 @@
set(CTEST_PROJECT_NAME "node")
set(CTEST_NIGHTLY_START_TIME "00:00:00 EST")
set(CTEST_DROP_METHOD "http")
set(CTEST_DROP_SITE "my.cdash.org")
set(CTEST_DROP_LOCATION "/submit.php?project=node")
set(CTEST_DROP_SITE_CDASH TRUE)

1412
ChangeLog

File diff suppressed because it is too large Load Diff

602
LICENSE
View File

@@ -24,58 +24,580 @@ IN THE SOFTWARE.
====
This license applies to all parts of Node that are not externally
maintained libraries.
maintained libraries. The externally maintained libraries used by Node are:
The externally maintained libraries used by Node are:
- V8, located at deps/v8. V8's license follows:
"""
This license applies to all parts of V8 that are not externally
maintained libraries. The externally maintained libraries used by V8
are:
- v8, located at deps/v8. v8 is copyright Google, Inc, and released
under a BSD license.
- PCRE test suite, located in
test/mjsunit/third_party/regexp-pcre.js. This is based on the
test suite from PCRE-7.3, which is copyrighted by the University
of Cambridge and Google, Inc. The copyright notice and license
are embedded in regexp-pcre.js.
- libev, located at deps/libev, and libeio, located at deps/libeio. libev
and libeio are copyright Marc Alexander Lehmann, and dual-licensed
under the MIT license and GPL2.
- Layout tests, located in test/mjsunit/third_party. These are
based on layout tests from webkit.org which are copyrighted by
Apple Computer, Inc. and released under a 3-clause BSD license.
- WAF build system, located at tools/waf. WAF is copyright Thomas Nagy,
and released under the MIT license.
- Strongtalk assembler, the basis of the files assembler-arm-inl.h,
assembler-arm.cc, assembler-arm.h, assembler-ia32-inl.h,
assembler-ia32.cc, assembler-ia32.h, assembler-x64-inl.h,
assembler-x64.cc, assembler-x64.h, assembler-mips-inl.h,
assembler-mips.cc, assembler-mips.h, assembler.cc and assembler.h.
This code is copyrighted by Sun Microsystems Inc. and released
under a 3-clause BSD license.
- The SCONS build system, located at tools/scons. SCONS is copyright
the SCONS Foundation and released under the MIT license.
- Valgrind client API header, located at third_party/valgrind/valgrind.h
This is release under the BSD license.
- C-Ares, an asynchronous DNS client, located at deps/c-ares. C-Ares is
copyright the Massachusetts Institute of Technology, authored by
Greg Hudson, Daniel Stenberg and others, and released under the MIT
license.
These libraries have their own licenses; we recommend you read them,
as their terms may differ from the terms below.
- Node, optionally, dynamically links to OpenSSL, cryptographic software
written by Eric Young (eay@cryptsoft.com) to provide SSL/TLS encryption.
OpenSSL is copyright The OpenSSL Project and released under the OpenSSL
license. OpenSSL is not included in the Node distribution.
See http://openssl.org/ for more information.
Copyright 2006-2012, the V8 project authors. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
- tools/doctool/markdown.js is copyright 2009-2010 Dominic Baggott and Ash
Berli and released under the MIT license.
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.
* Neither the name of Google Inc. nor the names of its
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
- HTTP Parser, located at deps/http_parser, is a small C library
copyright Ryan Lienhart Dahl and released under the MIT license.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
"""
- src/platform_darwin_proctitle.cc, has code taken from the Chromium
project copyright Google Inc. and released under a BSD license.
- libev, located at deps/uv/src/unix/ev. libev's license follows:
"""
All files in libev are Copyright (C)2007,2008,2009 Marc Alexander Lehmann.
- tools/closure_linter is copyright The Closure Linter Authors and
Google Inc. and released under the Apache License, version 2.0.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
- tools/cpplint.py is copyright Google Inc. and released under a
BSD license.
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
- lib/buffer_ieee754.js is copyright 2008 Fair Oaks Labs, Inc. and released
under the New BSD license.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.
- lib/punycode.js is copyright 2011 Ben Noordhuis and released under the MIT license.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- deps/pthread-win32/libpthreadGC2.a and
deps/pthread-win32/libpthreadGC2d.a is a POSIX threads library for
Microsoft Windows and is used for the Windows build and statically
linked into the Node executable. This software is freely available at
http://sourceware.org/pthreads-win32/ It is Copyright 1998 John E.
Bossom and 1999,2006 Pthreads-win32 contributors and licensed under the
LGPL. See deps/pthread-win32/COPYING.LIB for more details.
Alternatively, the contents of this package may be used under the terms
of the GNU General Public License ("GPL") version 2 or any later version,
in which case the provisions of the GPL are applicable instead of the
above. If you wish to allow the use of your version of this package only
under the terms of the GPL and not to allow others to use your version of
this file under the BSD license, indicate your decision by deleting the
provisions above and replace them with the notice and other provisions
required by the GPL in this and the other files of this package. If you do
not delete the provisions above, a recipient may use your version of this
file under either the BSD or the GPL.
"""
- libeio, located at deps/uv/src/unix/eio. libeio's license follows:
"""
All files in libeio are Copyright (C)2007,2008 Marc Alexander Lehmann.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Alternatively, the contents of this package may be used under the terms
of the GNU General Public License ("GPL") version 2 or any later version,
in which case the provisions of the GPL are applicable instead of the
above. If you wish to allow the use of your version of this package only
under the terms of the GPL and not to allow others to use your version of
this file under the BSD license, indicate your decision by deleting the
provisions above and replace them with the notice and other provisions
required by the GPL in this and the other files of this package. If you do
not delete the provisions above, a recipient may use your version of this
file under either the BSD or the GPL.
"""
- WAF build system, located at tools/waf*. WAF's license follows:
"""
Copyright Thomas Nagy, 2005-2011
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. The name of the author may not be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
"""
- C-Ares, an asynchronous DNS client, located at deps/uv/src/ares. C-Ares license
follows:
"""
/* Copyright 1998 by the Massachusetts Institute of Technology.
*
* Permission to use, copy, modify, and distribute this
* software and its documentation for any purpose and without
* fee is hereby granted, provided that the above copyright
* notice appear in all copies and that both that copyright
* notice and this permission notice appear in supporting
* documentation, and that the name of M.I.T. not be used in
* advertising or publicity pertaining to distribution of the
* software without specific, written prior permission.
* M.I.T. makes no representations about the suitability of
* this software for any purpose. It is provided "as is"
* without express or implied warranty.
"""
- OpenSSL located at deps/openssl. OpenSSL is cryptographic software written
by Eric Young (eay@cryptsoft.com) to provide SSL/TLS encryption. OpenSSL's
license follows:
"""
/* ====================================================================
* Copyright (c) 1998-2011 The OpenSSL Project. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. All advertising materials mentioning features or use of this
* software must display the following acknowledgment:
* "This product includes software developed by the OpenSSL Project
* for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
*
* 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
* endorse or promote products derived from this software without
* prior written permission. For written permission, please contact
* openssl-core@openssl.org.
*
* 5. Products derived from this software may not be called "OpenSSL"
* nor may "OpenSSL" appear in their names without prior written
* permission of the OpenSSL Project.
*
* 6. Redistributions of any form whatsoever must retain the following
* acknowledgment:
* "This product includes software developed by the OpenSSL Project
* for use in the OpenSSL Toolkit (http://www.openssl.org/)"
*
* THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
* EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
* OF THE POSSIBILITY OF SUCH DAMAGE.
* ====================================================================
*
* This product includes cryptographic software written by Eric Young
* (eay@cryptsoft.com). This product includes software written by Tim
* Hudson (tjh@cryptsoft.com).
*
*/
"""
- HTTP Parser, located at deps/http_parser. HTTP Parser's license follows:
"""
http_parser.c is based on src/http/ngx_http_parse.c from NGINX copyright
Igor Sysoev.
Additional changes are licensed under the same terms as NGINX and
copyright Joyent, Inc. and other Node contributors. All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to
deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
IN THE SOFTWARE.
"""
- Closure Linter is located at tools/closure_linter. Closure's license
follows:
"""
# Copyright (c) 2007, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following disclaimer
# in the documentation and/or other materials provided with the
# distribution.
# * Neither the name of Google Inc. nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
"""
- tools/cpplint.py is a C++ linter. Its license follows:
"""
# Copyright (c) 2009 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following disclaimer
# in the documentation and/or other materials provided with the
# distribution.
# * Neither the name of Google Inc. nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
"""
- lib/buffer_ieee754.js. Its license follows:
"""
// Copyright (c) 2008, Fair Oaks Labs, Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// * Redistributions of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
//
// * Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// * Neither the name of Fair Oaks Labs, Inc. nor the names of its contributors
// may be used to endorse or promote products derived from this software
// without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
"""
- lib/punycode.js is copyright 2011 Mathias Bynens <http://mathiasbynens.be/>
and released under the MIT license.
"""
* Punycode.js <http://mths.be/punycode>
* Copyright 2011 Mathias Bynens <http://mathiasbynens.be/>
* Available under MIT license <http://mths.be/mit>
"""
- tools/gyp. GYP is a meta-build system. GYP's license follows:
"""
Copyright (c) 2009 Google Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following disclaimer
in the documentation and/or other materials provided with the
distribution.
* Neither the name of Google Inc. nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
"""
- Zlib at deps/zlib. zlib's license follows:
"""
/* zlib.h -- interface of the 'zlib' general purpose compression library
version 1.2.4, March 14th, 2010
Copyright (C) 1995-2010 Jean-loup Gailly and Mark Adler
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
Jean-loup Gailly
Mark Adler
*/
"""
- npm is a package manager program located at deps/npm.
npm's license follows:
"""
Copyright 2009-2012, Isaac Z. Schlueter (the "Original Author")
All rights reserved.
MIT +no-false-attribs License
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
Distributions of all or part of the Software intended to be used
by the recipients as they would use the unmodified Software,
containing modifications that substantially alter, remove, or
disable functionality of the Software, outside of the documented
configuration mechanisms provided by the Software, shall be
modified such that the Original Author's bug reporting email
addresses and urls are either replaced with the contact information
of the parties responsible for the changes, or removed entirely.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
Except where noted, this license applies to any and all software
programs and associated documentation files created by the
Original Author, when distributed with the Software.
"Node.js" and "node" trademark Joyent, Inc. npm is not officially
part of the Node.js project, and is neither owned by nor
officially affiliated with Joyent, Inc.
Packages published in the npm registry are not part of npm
itself, are the sole property of their respective maintainers,
and are not covered by this license.
"npm Logo" created by Mathias Pettersson and Brian Hammond,
used with permission.
"Gubblebum Blocky" font
Copyright (c) 2007 by Tjarda Koster, http://jelloween.deviantart.com
included for use in the npm website and documentation,
used with permission.
This program uses "node-uuid", Copyright (c) 2010 Robert Kieffer,
according to the terms of the MIT license.
This program uses "request", Copyright (c) 2011 Mikeal Rogers,
according to the terms of the Apache license.
This program uses "mkdirp", Copyright (c) 2010 James Halliday,
according to the terms of the MIT/X11 license.
"""
- tools/doc/node_modules/marked. Marked is a Markdown parser. Marked's
license follows:
"""
Copyright (c) 2011-2012, Christopher Jeffrey (https://github.com/chjj/)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
"""
- test/gc/node_modules/weak. Node-weak is a node.js addon that provides garbage
collector notifications. Node-weak's license follows:
"""
Copyright (c) 2011, Ben Noordhuis <info@bnoordhuis.nl>
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
"""
- src/ngx-queue.h. ngx-queue.h is taken from the nginx source tree. nginx's
license follows:
"""
Copyright (C) 2002-2012 Igor Sysoev
Copyright (C) 2011,2012 Nginx, Inc.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
"""

453
Makefile
View File

@@ -1,317 +1,258 @@
WAF=python tools/waf-light
-include config.mk
web_root = ryan@nodejs.org:~/web/nodejs.org/
BUILDTYPE ?= Release
PYTHON ?= python
DESTDIR ?=
#
# Because we recursively call make from waf we need to make sure that we are
# using the correct make. Not all makes are GNU Make, but this likely only
# works with gnu make. To deal with this we remember how the user invoked us
# via a make builtin variable and use that in all subsequent operations
#
export NODE_MAKE := $(MAKE)
# BUILDTYPE=Debug builds both release and debug builds. If you want to compile
# just the debug build, run `make -C out BUILDTYPE=Debug` instead.
ifeq ($(BUILDTYPE),Release)
all: out/Makefile node
else
all: out/Makefile node node_g
endif
all: program
@-ls -lh build/default/node
@-ls -lh build/debug/node_g || echo ""
# The .PHONY is needed to ensure that we recursively use the out/Makefile
# to check for changes.
.PHONY: node node_g
all-progress:
@$(WAF) -p build
node: config.gypi
$(MAKE) -C out BUILDTYPE=Release
ln -fs out/Release/node node
program:
@$(WAF) --product-type=program build
node_g: config.gypi
$(MAKE) -C out BUILDTYPE=Debug
ln -fs out/Debug/node node_g
staticlib:
@$(WAF) --product-type=cstaticlib build
config.gypi: configure
./configure
dynamiclib:
@$(WAF) --product-type=cshlib build
out/Debug/node:
$(MAKE) -C out BUILDTYPE=Debug
install:
@$(WAF) install
out/Makefile: common.gypi deps/uv/uv.gyp deps/http_parser/http_parser.gyp deps/zlib/zlib.gyp deps/v8/build/common.gypi deps/v8/tools/gyp/v8.gyp node.gyp config.gypi
$(PYTHON) tools/gyp_node -f make
install: all
out/Release/node tools/installer.js install $(DESTDIR)
uninstall:
@$(WAF) uninstall
out/Release/node tools/installer.js uninstall
clean:
-rm -rf out/Makefile node node_g out/$(BUILDTYPE)/node blog.html email.md
-find out/ -name '*.o' -o -name '*.a' | xargs rm -rf
-rm -rf node_modules
distclean:
-rm -rf out
-rm -f config.gypi
-rm -f config.mk
-rm -rf node node_g blog.html email.md
-rm -rf node_modules
test: all
python tools/test.py --mode=release simple message
$(PYTHON) tools/test.py --mode=release simple message
PYTHONPATH=tools/closure_linter/ $(PYTHON) tools/closure_linter/closure_linter/gjslint.py --unix_mode --strict --nojsdoc -r lib/ -r src/ --exclude_files lib/punycode.js
test-http1: all
$(PYTHON) tools/test.py --mode=release --use-http1 simple message
test-valgrind: all
python tools/test.py --mode=release --valgrind simple message
$(PYTHON) tools/test.py --mode=release --valgrind simple message
test-all: all
python tools/test.py --mode=debug,release
test/gc/node_modules/weak/build:
@if [ ! -f node ]; then make all; fi
./node deps/npm/node_modules/node-gyp/bin/node-gyp rebuild \
--directory="$(shell pwd)/test/gc/node_modules/weak" \
--nodedir="$(shell pwd)"
test-gc: all test/gc/node_modules/weak/build
$(PYTHON) tools/test.py --mode=release gc
test-all: all test/gc/node_modules/weak/build
$(PYTHON) tools/test.py --mode=debug,release
make test-npm
test-all-http1: all
$(PYTHON) tools/test.py --mode=debug,release --use-http1
test-all-valgrind: all
python tools/test.py --mode=debug,release --valgrind
$(PYTHON) tools/test.py --mode=debug,release --valgrind
test-release: all
python tools/test.py --mode=release
$(PYTHON) tools/test.py --mode=release
test-debug: all
python tools/test.py --mode=debug
$(PYTHON) tools/test.py --mode=debug
test-message: all
python tools/test.py message
$(PYTHON) tools/test.py message
test-simple: all
python tools/test.py simple
$(PYTHON) tools/test.py simple
test-pummel: all
python tools/test.py pummel
$(PYTHON) tools/test.py pummel
test-internet: all
python tools/test.py internet
$(PYTHON) tools/test.py internet
UVTEST += simple/test-assert
UVTEST += simple/test-buffer
UVTEST += simple/test-c-ares
UVTEST += simple/test-chdir
UVTEST += simple/test-delayed-require
UVTEST += simple/test-eio-race2
UVTEST += simple/test-eio-race4
UVTEST += simple/test-event-emitter-add-listeners
UVTEST += simple/test-event-emitter-modify-in-emit
UVTEST += simple/test-event-emitter-num-args
UVTEST += simple/test-event-emitter-once
UVTEST += simple/test-event-emitter-remove-all-listeners
UVTEST += simple/test-event-emitter-remove-listeners
UVTEST += simple/test-exception-handler
UVTEST += simple/test-exception-handler2
UVTEST += simple/test-exception-handler
UVTEST += simple/test-executable-path
UVTEST += simple/test-file-read-noexist
UVTEST += simple/test-file-write-stream
UVTEST += simple/test-fs-fsync
UVTEST += simple/test-fs-open
UVTEST += simple/test-fs-readfile-empty
UVTEST += simple/test-fs-read-file-sync
UVTEST += simple/test-fs-read-file-sync-hostname
UVTEST += simple/test-fs-sir-writes-alot
UVTEST += simple/test-fs-write
UVTEST += simple/test-fs-write-buffer
UVTEST += simple/test-fs-write-file
UVTEST += simple/test-fs-write-file-buffer
UVTEST += simple/test-fs-write-stream
UVTEST += simple/test-fs-write-stream-end
UVTEST += simple/test-fs-write-sync
UVTEST += simple/test-global
UVTEST += simple/test-http
UVTEST += simple/test-http-1.0
UVTEST += simple/test-http-abort-client
UVTEST += simple/test-http-allow-req-after-204-res
UVTEST += simple/test-http-blank-header
UVTEST += simple/test-http-buffer-sanity
UVTEST += simple/test-http-cat
UVTEST += simple/test-http-chunked
UVTEST += simple/test-http-client-abort
UVTEST += simple/test-http-client-parse-error
UVTEST += simple/test-http-client-race
UVTEST += simple/test-http-client-race-2
UVTEST += simple/test-http-client-upload
UVTEST += simple/test-http-client-upload-buf
UVTEST += simple/test-http-contentLength0
UVTEST += simple/test-http-default-encoding
UVTEST += simple/test-http-dns-fail
UVTEST += simple/test-http-eof-on-connect
UVTEST += simple/test-http-exceptions
UVTEST += simple/test-http-expect-continue
UVTEST += simple/test-http-extra-response
UVTEST += simple/test-http-head-request
UVTEST += simple/test-http-head-response-has-no-body
UVTEST += simple/test-http-keep-alive
UVTEST += simple/test-http-keep-alive-close-on-header
UVTEST += simple/test-http-malformed-request
UVTEST += simple/test-http-many-keep-alive-connections
UVTEST += simple/test-http-mutable-headers
UVTEST += simple/test-http-parser
UVTEST += simple/test-http-proxy
UVTEST += simple/test-http-request-end
UVTEST += simple/test-http-response-close
UVTEST += simple/test-http-response-readable
UVTEST += simple/test-http-unix-socket
UVTEST += simple/test-http-server
UVTEST += simple/test-http-server-multiheaders
UVTEST += simple/test-http-set-cookies
UVTEST += simple/test-http-set-timeout
UVTEST += simple/test-http-set-trailers
UVTEST += simple/test-http-upgrade-agent
UVTEST += simple/test-http-upgrade-client
UVTEST += simple/test-http-upgrade-client2
UVTEST += simple/test-http-upgrade-server
UVTEST += simple/test-http-upgrade-server2
UVTEST += simple/test-http-wget
UVTEST += simple/test-http-write-empty-string
UVTEST += simple/test-http-wget
UVTEST += simple/test-mkdir-rmdir
UVTEST += simple/test-net-binary
UVTEST += simple/test-net-pingpong
UVTEST += simple/test-net-can-reset-timeout
UVTEST += simple/test-net-connect-buffer
UVTEST += simple/test-net-connect-timeout
UVTEST += simple/test-net-create-connection
UVTEST += simple/test-net-eaddrinuse
UVTEST += simple/test-net-isip
UVTEST += simple/test-net-keepalive
UVTEST += simple/test-net-pingpong
UVTEST += simple/test-net-reconnect
UVTEST += simple/test-net-remote-address-port
UVTEST += simple/test-net-server-bind
UVTEST += simple/test-net-server-max-connections
UVTEST += simple/test-net-server-try-ports
UVTEST += simple/test-net-stream
UVTEST += simple/test-net-socket-timeout
UVTEST += simple/test-next-tick
UVTEST += simple/test-next-tick-doesnt-hang
UVTEST += simple/test-next-tick-errors
UVTEST += simple/test-next-tick-ordering
UVTEST += simple/test-next-tick-ordering2
UVTEST += simple/test-next-tick-starvation
UVTEST += simple/test-path
UVTEST += simple/test-pipe-stream
UVTEST += simple/test-pump-file2tcp
UVTEST += simple/test-pump-file2tcp-noexist
UVTEST += simple/test-punycode
UVTEST += simple/test-querystring
UVTEST += simple/test-readdir
UVTEST += simple/test-readdouble
UVTEST += simple/test-readfloat
UVTEST += simple/test-readint
UVTEST += simple/test-readuint
UVTEST += simple/test-regress-GH-819
UVTEST += simple/test-regress-GH-897
UVTEST += simple/test-regression-object-prototype
UVTEST += simple/test-require-cache
UVTEST += simple/test-require-cache-without-stat
UVTEST += simple/test-require-exceptions
UVTEST += simple/test-require-resolve
UVTEST += simple/test-script-context
UVTEST += simple/test-script-new
UVTEST += simple/test-script-static-context
UVTEST += simple/test-script-static-new
UVTEST += simple/test-script-static-this
UVTEST += simple/test-script-this
UVTEST += simple/test-stream-pipe-cleanup
UVTEST += simple/test-stream-pipe-error-handling
UVTEST += simple/test-stream-pipe-event
UVTEST += simple/test-stream-pipe-multi
UVTEST += simple/test-string-decoder
UVTEST += simple/test-sys
UVTEST += simple/test-tcp-wrap
UVTEST += simple/test-tcp-wrap-connect
UVTEST += simple/test-tcp-wrap-listen
UVTEST += simple/test-timers-linked-list
UVTEST += simple/test-tty-stdout-end
UVTEST += simple/test-url
UVTEST += simple/test-utf8-scripts
UVTEST += simple/test-vm-create-context-circular-reference
UVTEST += simple/test-writedouble
UVTEST += simple/test-writefloat
UVTEST += simple/test-writeint
UVTEST += simple/test-writeuint
UVTEST += simple/test-zerolengthbufferbug
UVTEST += pummel/test-http-client-reconnect-bug
UVTEST += pummel/test-http-upload-timeout
UVTEST += pummel/test-net-many-clients
UVTEST += pummel/test-net-pause
UVTEST += pummel/test-net-pingpong-delay
UVTEST += pummel/test-net-timeout
UVTEST += pummel/test-timers
UVTEST += pummel/test-timer-wrap
UVTEST += pummel/test-timer-wrap2
UVTEST += pummel/test-vm-memleak
UVTEST += internet/test-dns
UVTEST += simple/test-tls-client-abort
UVTEST += simple/test-tls-client-verify
UVTEST += simple/test-tls-connect
#UVTEST += simple/test-tls-ext-key-usage # broken
UVTEST += simple/test-tls-junk-closes-server
UVTEST += simple/test-tls-npn-server-client
UVTEST += simple/test-tls-request-timeout
#UVTEST += simple/test-tls-securepair-client # broken
#UVTEST += simple/test-tls-securepair-server # broken
#UVTEST += simple/test-tls-server-verify # broken
UVTEST += simple/test-tls-set-encoding
test-npm: node
./node deps/npm/test/run.js
test-uv: all
NODE_USE_UV=1 python tools/test.py $(UVTEST)
test-uv-debug: all
NODE_USE_UV=1 python tools/test.py --mode=debug $(UVTEST)
build/default/node: all
test-npm-publish: node
npm_package_config_publishtest=true ./node deps/npm/test/run.js
apidoc_sources = $(wildcard doc/api/*.markdown)
apidocs = $(addprefix build/,$(apidoc_sources:.markdown=.html))
apidocs = $(addprefix out/,$(apidoc_sources:.markdown=.html)) \
$(addprefix out/,$(apidoc_sources:.markdown=.json))
apidoc_dirs = build/doc build/doc/api/ build/doc/api/assets
apidoc_dirs = out/doc out/doc/api/ out/doc/api/assets out/doc/about out/doc/community out/doc/logos out/doc/images
apiassets = $(subst api_assets,api/assets,$(addprefix build/,$(wildcard doc/api_assets/*)))
apiassets = $(subst api_assets,api/assets,$(addprefix out/,$(wildcard doc/api_assets/*)))
doc_images = $(addprefix out/,$(wildcard doc/images/* doc/*.jpg doc/*.png))
website_files = \
build/doc/index.html \
build/doc/v0.4_announcement.html \
build/doc/cla.html \
build/doc/sh_main.js \
build/doc/sh_javascript.min.js \
build/doc/sh_vim-dark.css \
build/doc/logo.png \
build/doc/sponsored.png \
build/doc/favicon.ico \
build/doc/pipe.css
out/doc/index.html \
out/doc/v0.4_announcement.html \
out/doc/cla.html \
out/doc/sh_main.js \
out/doc/sh_javascript.min.js \
out/doc/sh_vim-dark.css \
out/doc/sh.css \
out/doc/favicon.ico \
out/doc/pipe.css \
out/doc/about/index.html \
out/doc/community/index.html \
out/doc/logos/index.html \
out/doc/changelog.html \
$(doc_images)
doc: build/default/node $(apidoc_dirs) $(website_files) $(apiassets) $(apidocs)
doc: program $(apidoc_dirs) $(website_files) $(apiassets) $(apidocs) tools/doc/ blog
blogclean:
rm -rf out/blog
blog: doc/blog out/Release/node tools/blog
out/Release/node tools/blog/generate.js doc/blog/ out/blog/ doc/blog.html doc/rss.xml
$(apidoc_dirs):
mkdir -p $@
build/doc/api/assets/%: doc/api_assets/% build/doc/api/assets/
out/doc/api/assets/%: doc/api_assets/% out/doc/api/assets/
cp $< $@
build/doc/%: doc/%
cp $< $@
out/doc/changelog.html: ChangeLog doc/changelog-head.html doc/changelog-foot.html tools/build-changelog.sh
bash tools/build-changelog.sh
build/doc/api/%.html: doc/api/%.markdown build/default/node $(apidoc_dirs) $(apiassets) tools/doctool/doctool.js
build/default/node tools/doctool/doctool.js doc/template.html $< > $@
out/doc/%.html: doc/%.html
cat $< | sed -e 's|__VERSION__|'$(VERSION)'|g' > $@
build/doc/%:
out/doc/%: doc/%
cp -r $< $@
out/doc/api/%.json: doc/api/%.markdown
out/Release/node tools/doc/generate.js --format=json $< > $@
out/doc/api/%.html: doc/api/%.markdown
out/Release/node tools/doc/generate.js --format=html --template=doc/template.html $< > $@
email.md: ChangeLog tools/email-footer.md
bash tools/changelog-head.sh | sed 's|^\* #|* \\#|g' > $@
cat tools/email-footer.md | sed -e 's|__VERSION__|'$(VERSION)'|g' >> $@
blog.html: email.md
cat $< | ./node tools/doc/node_modules/.bin/marked > $@
blog-upload: blog
rsync -r out/blog/ node@nodejs.org:~/web/nodejs.org/blog/
website-upload: doc
scp -r build/doc/* $(web_root)
rsync -r out/doc/ node@nodejs.org:~/web/nodejs.org/
ssh node@nodejs.org '\
rm -f ~/web/nodejs.org/dist/latest &&\
ln -s $(VERSION) ~/web/nodejs.org/dist/latest &&\
rm -f ~/web/nodejs.org/docs/latest &&\
ln -s $(VERSION) ~/web/nodejs.org/docs/latest &&\
rm -f ~/web/nodejs.org/dist/node-latest.tar.gz &&\
ln -s $(VERSION)/node-$(VERSION).tar.gz ~/web/nodejs.org/dist/node-latest.tar.gz'
docopen: build/doc/api/all.html
-google-chrome build/doc/api/all.html
docopen: out/doc/api/all.html
-google-chrome out/doc/api/all.html
docclean:
-rm -rf build/doc
-rm -rf out/doc
clean:
$(WAF) clean
-find tools -name "*.pyc" | xargs rm -f
distclean: docclean
-find tools -name "*.pyc" | xargs rm -f
-rm -rf build/ node node_g
check:
@tools/waf-light check
VERSION=$(shell git describe)
VERSION=v$(shell $(PYTHON) tools/getnodeversion.py)
TARNAME=node-$(VERSION)
TARBALL=$(TARNAME).tar.gz
PKG=out/$(TARNAME).pkg
packagemaker=/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker
#dist: doc/node.1 doc/api
dist: doc
dist: doc $(TARBALL) $(PKG)
PKGDIR=out/dist-osx
pkg: $(PKG)
$(PKG):
rm -rf $(PKGDIR)
rm -rf out/deps out/Release
./configure --prefix=$(PKGDIR)/32/usr/local --without-snapshot --dest-cpu=ia32
$(MAKE) install
rm -rf out/deps out/Release
./configure --prefix=$(PKGDIR)/usr/local --without-snapshot --dest-cpu=x64
$(MAKE) install
lipo $(PKGDIR)/32/usr/local/bin/node \
$(PKGDIR)/usr/local/bin/node \
-output $(PKGDIR)/usr/local/bin/node-universal \
-create
mv $(PKGDIR)/usr/local/bin/node-universal $(PKGDIR)/usr/local/bin/node
rm -rf $(PKGDIR)/32
$(packagemaker) \
--id "org.nodejs.NodeJS-$(VERSION)" \
--doc tools/osx-pkg.pmdoc \
--out $(PKG)
$(TARBALL): node out/doc
@if [ "$(shell git status --porcelain | egrep -v '^\?\? ')" = "" ]; then \
exit 0 ; \
else \
echo "" >&2 ; \
echo "The git repository is not clean." >&2 ; \
echo "Please commit changes before building release tarball." >&2 ; \
echo "" >&2 ; \
git status --porcelain | egrep -v '^\?\?' >&2 ; \
echo "" >&2 ; \
exit 1 ; \
fi
@if [ $(shell ./node --version) = "$(VERSION)" ]; then \
exit 0; \
else \
echo "" >&2 ; \
echo "$(shell ./node --version) doesn't match $(VERSION)." >&2 ; \
echo "Did you remember to update src/node_version.cc?" >&2 ; \
echo "" >&2 ; \
exit 1 ; \
fi
git archive --format=tar --prefix=$(TARNAME)/ HEAD | tar xf -
mkdir -p $(TARNAME)/doc
mkdir -p $(TARNAME)/doc/api
cp doc/node.1 $(TARNAME)/doc/node.1
cp -r build/doc/api $(TARNAME)/doc/api
cp -r out/doc/api/* $(TARNAME)/doc/api/
rm -rf $(TARNAME)/deps/v8/test # too big
rm -rf $(TARNAME)/doc/logos # too big
rm -rf $(TARNAME)/doc/images # too big
find $(TARNAME)/ -type l | xargs rm # annoying on windows
tar -cf $(TARNAME).tar $(TARNAME)
rm -rf $(TARNAME)
gzip -f -9 $(TARNAME).tar
dist-upload: $(TARBALL) $(PKG)
ssh node@nodejs.org mkdir -p web/nodejs.org/dist/$(VERSION)
scp $(TARBALL) node@nodejs.org:~/web/nodejs.org/dist/$(VERSION)/$(TARBALL)
scp $(PKG) node@nodejs.org:~/web/nodejs.org/dist/$(VERSION)/$(TARNAME).pkg
bench:
benchmark/http_simple_bench.sh
@@ -321,11 +262,11 @@ bench-idle:
./node benchmark/idle_clients.js &
jslint:
PYTHONPATH=tools/closure_linter/ python tools/closure_linter/closure_linter/gjslint.py --unix_mode --strict --nojsdoc -r lib/ -r src/ -r test/
PYTHONPATH=tools/closure_linter/ $(PYTHON) tools/closure_linter/closure_linter/gjslint.py --unix_mode --strict --nojsdoc -r lib/ -r src/ --exclude_files lib/punycode.js
cpplint:
@python tools/cpplint.py $(wildcard src/*.cc src/*.h src/*.c)
@$(PYTHON) tools/cpplint.py $(wildcard src/*.cc src/*.h src/*.c)
lint: jslint cpplint
.PHONY: lint cpplint jslint bench clean docopen docclean doc dist distclean check uninstall install all program staticlib dynamiclib test test-all website-upload
.PHONY: lint cpplint jslint bench clean docopen docclean doc dist distclean check uninstall install install-includes install-bin all program staticlib dynamiclib test test-all website-upload pkg blog blogclean

View File

@@ -1,40 +0,0 @@
BUILD?=build
VERBOSE?=0
PARALLEL_JOBS?=1
CMAKE?=cmake
TOOLCHAIN_FILE=#./cmake/codesourcery-arm-toolchain.cmake
all: package
$(BUILD)/Makefile:
mkdir $(BUILD) || exit 0
cd $(BUILD) && $(CMAKE) -DCMAKE_VERBOSE_MAKEFILE=$(VERBOSE) -DCMAKE_TOOLCHAIN_FILE=$(TOOLCHAIN_FILE) ..
build: $(BUILD)/Makefile
cd $(BUILD) && make -j $(PARALLEL_JOBS)
install: build
cd $(BUILD) && sudo make install
clean:
rm -rf $(BUILD)
doc: $(BUILD)/Makefile
cd $(BUILD) && make doc
package: $(BUILD)/Makefile
cd $(BUILD) && make package
test: $(BUILD)/Makefile
cd $(BUILD) && make test
cdash: $(BUILD)/Makefile
cd $(BUILD) && make Experimental
cdash-cov: $(BUILD)/Makefile
cd $(BUILD) && $(CMAKE) -DUSE_GCOV=True .. && make Experimental
cdash-mem: $(BUILD)/Makefile
cd $(BUILD) && make NightlyMemoryCheck
.PHONY: build install clean doc package test cdash cdash-cov cdash-mem

View File

@@ -1,77 +0,0 @@
Instructions for building with cmake
Make sure you have cmake:
Ubuntu/Debian: sudo apt-get install cmake
Mac: http://www.cmake.org/files/v2.8/cmake-2.8.3-Darwin-universal.dmg
Other platforms: http://www.cmake.org/cmake/resources/software.html
To build:
make -f Makefile.cmake
make -f Makefile.cmake install
To run the tests:
make -f Makefile.cmake test
To build the documentation:
make -f Makefile.cmake doc
To read the documentation:
man doc/node.1
To build distro packages (tgz, deb, rpm, PackageMaker):
make -f Makefile.cmake package
To submit test results (see http://my.cdash.org/index.php?project=node):
make -f Makefile.cmake cdash
To submit coverage test results:
make -f Makefile.cmake cdash-cov
To submit valgrind test results:
make -f Makefile.cmake cdash-mem
Cross-compiling:
An example toolchain file for the CodeSourcery ARM toolchain is included in
the cmake directory: codesourcery-arm-toolchain.cmake.
Install the CodeSourcery toolchain, set the path to the toolchain in
cmake/codesourcery-arm-toolchain.cmake, and uncomment the TOOLCHAIN_FILE
variable in Makefile.cmake to use it.
If you are using cmake directly, just add the flag
"-DCMAKE_TOOLCHAIN_FILE=/path/to/toolchain-file" when
running cmake.
Using cmake directly:
cd ~/your-node-source-dir
mkdir name-of-build-dir (can be anything)
cd name-of-build-dir
cmake ..
At this point you have generated a set of Makefiles and can use the standard
make commands (make, make install, etc.). The Makefile.cmake file is just a
wrapper around these commands; take a look at it for more details.
Other build targets:
make Experimental
make Nightly
make NightlyMemoryCheck
make Continuous
Additional options:
In the CMakeLists.txt, you'll see things like
option(SHARED_V8, ...). If you want to enable any of those options you can
pass "-DOPTION=True" when running cmake (e.g., cmake -DSHARED_V8=True).
See http://nodejs.org/ for more information. For help and discussion
subscribe to the mailing list by visiting
http://groups.google.com/group/nodejs or by sending an email to
nodejs+subscribe@googlegroups.com.

View File

@@ -1,33 +1,46 @@
Evented I/O for V8 javascript.
Evented I/O for V8 javascript. [![Build Status](https://secure.travis-ci.org/joyent/node.png)](http://travis-ci.org/joyent/node)
===
To build:
### To build:
Unix/Macintosh (requires python 2.6 or 2.7):
./configure
make
make install
To run the tests:
Windows:
vcbuild.bat
### To run the tests:
Unix/Macintosh:
make test
To build the documentation:
Windows:
vcbuild.bat test
### To build the documentation:
make doc
To read the documentation:
### To read the documentation:
man doc/node.1
Resources for Newcomers
---
- [The Wiki](http://github.com/ry/node/wiki)
- [The Wiki](https://github.com/joyent/node/wiki)
- [nodejs.org](http://nodejs.org/)
- [how to install node.js and npm (node package manager)](http://joyeur.com/2010/12/10/installing-node-and-npm/)
- [list of modules](http://github.com/ry/node/wiki/modules)
- [list of companies and projects using node](http://github.com/ry/node/wiki)
- [list of modules](https://github.com/joyent/node/wiki/modules)
- [searching the npm registry](http://search.npmjs.org/)
- [list of companies and projects using node](https://github.com/joyent/node/wiki/Projects,-Applications,-and-Companies-Using-Node)
- [node.js mailing list](http://groups.google.com/group/nodejs)
- irc chatroom, [#node.js on freenode.net](http://webchat.freenode.net?channels=node.js&uio=d4)
- [community](https://github.com/ry/node/wiki/Community)
- [contributing](https://github.com/ry/node/wiki/Contributing)
- [big list of all the helpful wiki pages](https://github.com/ry/node/wiki/_pages)
- [community](https://github.com/joyent/node/wiki/Community)
- [contributing](https://github.com/joyent/node/wiki/Contributing)
- [big list of all the helpful wiki pages](https://github.com/joyent/node/wiki/_pages)

33
TODO
View File

@@ -1,33 +0,0 @@
- fix tests for NODE_MODULE_CONTEXTS=1
- readline
- fix for two column glyphs. use Markus Kuhn's wcwidth.c
- fix for commands that extend beyond term width
- Erradicate all traces of 'binary' encoding. Only used, now, in OpenSSL
binding.
- EventSource branch merged
- Use C++ style casts everywhere.
- Ruby-like Process#detach (is that possible?)
- stderr isn't flushing on exit
- ReadStream should not use an offset in calls to fs.read
(so that it can pull in files larger than 2G)
- process object should be defined in src/node.js not in c++
- Test for EMFILE accept spin bug.
- Deprecate setEncoding() and instead add option to on('data').
Example:
stdin.on('data', { encoding: 'utf8' }, function (chunk) {
process.stdout.write('WRITE: ' + chunk);
});
Perhaps by assigning cb.opts.encoding and calling
EventEmitter.optHandlers.encoding() if it exists.
- DOCS
- anchor links next to each function, for easy linking.
EG <a href="#fs.stat">#</a>
- "node --raw-js script.js" should bipass all Node code and load a raw V8
interpreter
- Use http_parser_execute2() in node_http_parser.cc and make req.pause()
work correctly
https://github.com/ry/http-parser/blob/c95a5479596e95b7cdd88ca9d7b32fd3afb4379c/http_parser.h#L266

View File

@@ -1,88 +0,0 @@
- Implement setenv / unsetenv
- Implement other stuff missing in node.cc/process
Like getuid, getgid, setgid, kill etc.
- Better `net` support
* getaddrinfo
* setMulticastTTL, setMembership, setLoopback
* pipe, socketpair
* A named pipe should be provided when a unix socket is requested.
* SendMsg and RecvMsg should be supported with named pipes.
- New libev backend
The current libev backend supports sockets only. This complicates stuff like
child processes, stdio. Best would be if node_net switched from exposing
readyness notifications to using completion notifications, so on windows we
could use IOCP for sockets. Experts tell me that is really the fastest way
to work with sockets on windows.
- Child process issues
* Communication between parent and child is slow; it uses a socketpair
where a pipe would be much faster. Replace it by a pipe when there
is a libev backend that supports waiting for a pipe.
* When a child process spawns the pid is not available straightaway.
On linux the pid is available immediately because fork() doesn't
block; on windows a libeio thread is used to call CreateProcess.
So this can't really be fixed, but it could be worked around by adding a
'spawn' or 'pid' event.
* passing socket custom_fds is not supported
* child_process.exec() only works on systems with msys installed.
It's because it relies on the 'sh' shell. The default windows shell
is 'cmd' and it works a little differently. Maybe add an option to
specify the shell to exec()?
- Make colorful util.inspect work on windows.
- Stdio: support passing sockets between master/child process
Normal windows applications wouldn't like this, but it can be useful for
communication between node processes. This requires
stdio.isStdinBlocking/isStdoutBlocking to be smarter.
- Skip/fix tests that can never pass on windows
- Find a solution for fs.symlink / fs.lstat / fs.chown
Windows has different symlink types: file symlinks (vista+),
directory symlinks (vista+), junction points (xp+)
- Handle _open_osfhandle failures
E.g. currently we're using the construct _open_osfhandle(socket/open/accept(...)).
Now socket() can fail by itself and _open_osfhandle can fail by itself too.
If socket() fails it returns -1 so _open_osfhandle fails as well, but and we'll always return/throw EBADF.
If _open_osfhandle fails but socket doesn't, a stray handle is left open. It should be fixed.
- Think about `make install`
- Extensions
Should be DLLs on windows.
- Link pthreads-w32 statically by default
- Link Mingw libraries statically by default
Like libstdc++.dll, more maybe.
Microsoft libs are always there, no static linkage required (e.g. msvcrt, winsock2).
- Make (open?)SSL work
- Support using shared libs (libeio, v8, c-ares)
Need to link with with a stub library. Libraries should use `dllexport`,
headers must have `dllimport`.
- V8: push MINGW32 build fixes upstream
- Work around missing pread/pwrite more elegantly
Currently it's exported from libeio, while it wasn't intended to be exported.
The libeio workaround implementation sucks, it uses a global mutex.
It should be possible to implement pread and pwrite using winapi's ReadFile/Writefile
directly, passing an OVERLAPPED structure while not associating with an completion port.
- Work around missing inet_pton/inet_ntop more elegantly
Currently it's exported from from c-ares, while it wasn't intended to be exported.
It prevents linking c-ares dynamically.
- See what libev/libeio changes can be pushed upstream
- 64-bit build
Should be possible with MinGW-w64, it's pretty good.
- ... much more probably

View File

@@ -0,0 +1,15 @@
var types = 'Array Buffer Int8Array Uint8Array Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array'.split(' ');
var type = types[types.indexOf(process.argv[2])];
if (!type)
type = types[0];
console.error('Benchmarking', type);
var clazz = global[type];
var arr = new clazz(25 * 10e5);
for (var i = 0; i < 10; ++i) {
for (var j = 0, k = arr.length; j < k; ++j) {
arr[j] = (j ^ k) & 127;
}
}

View File

@@ -0,0 +1,15 @@
var types = 'Array Buffer Int8Array Uint8Array Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array'.split(' ');
var type = types[types.indexOf(process.argv[2])];
if (!type)
type = types[0];
console.error('Benchmarking', type);
var clazz = global[type];
var arr = new clazz(25 * 10e5);
for (var i = 0; i < 10; ++i) {
for (var j = 0, k = arr.length; j < k; ++j) {
arr[j] = 0.0;
}
}

View File

@@ -0,0 +1,15 @@
var types = 'Array Buffer Int8Array Uint8Array Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array'.split(' ');
var type = types[types.indexOf(process.argv[2])];
if (!type)
type = types[0];
console.error('Benchmarking', type);
var clazz = global[type];
var arr = new clazz(25 * 10e5);
for (var i = 0; i < 10; ++i) {
for (var j = 0, k = arr.length; j < k; ++j) {
arr[j] = 0;
}
}

View File

@@ -0,0 +1,80 @@
// first start node http_simple.js
var http = require('http');
var latency = [];
var numRequests = parseInt(process.argv[2], 10) || 100;
var maxSockets = parseInt(process.argv[3], 10) || 100;
var runs = parseInt(process.argv[4], 10) || 100;
var prefix = process.argv[5] || '';
if (prefix) prefix += '_';
var r = 0;
var port = parseInt(process.env.PORT, 10) || 8000;
var host = process.env.HOST || '127.0.0.1';
http.globalAgent.maxSockets = maxSockets;
run();
function run() {
if (r++ === runs) {
return finish();
}
// make numRequests in parallel
// retain the order in which they are *made*. This requires trapping
// each one in a closure, since otherwise, we'll of course end
// up mostly sorting them in ascending order, since the cb from a
// fast request will almost always be called before the cb from a
// slow one.
var c = numRequests;
var lat = [];
latency.push(lat);
for (var i = 0; i < numRequests; i++) (function (i) {
makeRequest(function(l) {
lat[i] = l;
c--;
if (c === 0) run();
});
})(i);
}
function makeRequest(cb) {
var opts = { host: host,
port: port,
uri: 'http://'+host+':'+port+'/bytes/12',
forever: true,
path: '/bytes/12' };
var pre = Date.now();
var req = http.get(opts, function(res) {
return cb(Date.now() - pre);
});
}
function finish() {
var data = [];
latency.forEach(function(run, i) {
run.forEach(function(l, j) {
data[j] = data[j] || [];
data[j][i] = l;
});
});
data = data.map(function (l, i) {
return l.join('\t')
}).join('\n') + '\n';
var fname = prefix +
'client_latency_' +
numRequests + '_' +
maxSockets + '_' +
runs + '.tab';
var path = require('path');
fname = path.resolve(__dirname, '..', 'out', fname);
fname = path.relative(process.cwd(), fname);
require('fs').writeFile(fname, data, function(er) {
if (er) throw er;
console.log('written: %s', fname);
});
}

72
benchmark/fs-readfile.js Normal file
View File

@@ -0,0 +1,72 @@
// Call fs.readFile over and over again really fast.
// Then see how many times it got called.
// Yes, this is a silly benchmark. Most benchmarks are silly.
var path = require('path');
var filename = path.resolve(__dirname, 'http.sh');
var fs = require('fs');
var count = 0;
var go = true;
var len = -1;
var assert = require('assert');
var concurrency = 1;
var encoding = null;
var time = 10;
for (var i = 2; i < process.argv.length; i++) {
var arg = process.argv[i];
if (arg.match(/^-e$/)) {
encoding = process.argv[++i] || null;
} else if (arg.match(/^-c$/)) {
concurrency = ~~process.argv[++i];
if (concurrency < 1) concurrency = 1;
} else if (arg === '-t') {
time = ~~process.argv[++i];
if (time < 1) time = 1;
}
}
setTimeout(function() {
go = false;
}, time * 1000);
function round(n) {
return Math.floor(n * 100) / 100;
}
var start = process.hrtime();
while (concurrency--) readFile();
function readFile() {
if (!go) {
process.stdout.write('\n');
console.log('read the file %d times (higher is better)', count);
var end = process.hrtime();
var elapsed = [end[0] - start[0], end[1] - start[1]];
var ns = elapsed[0] * 1E9 + elapsed[1];
var nsper = round(ns / count);
console.log('%d ns per read (lower is better)', nsper);
var readsper = round(count / (ns / 1E9));
console.log('%d reads per sec (higher is better)', readsper);
process.exit(0);
return;
}
if (!(count % 1000)) {
process.stdout.write('.');
}
if (encoding) fs.readFile(filename, encoding, then);
else fs.readFile(filename, then);
function then(er, data) {
assert.ifError(er);
count++;
// basic sanity test: we should get the same number of bytes each time.
if (count === 1) len = data.length;
else assert(len === data.length);
readFile();
}
}

12
benchmark/http.sh Executable file
View File

@@ -0,0 +1,12 @@
#!/bin/bash
cd "$(dirname "$(dirname $0)")"
sudo sysctl -w net.inet.ip.portrange.first=12000
sudo sysctl -w net.inet.tcp.msl=1000
sudo sysctl -w kern.maxfiles=1000000 kern.maxfilesperproc=1000000
ulimit -n 100000
./node benchmark/http_simple.js || exit 1 &
sleep 1
ab -n 30000 -c 100 http://127.0.0.1:8000/${TYPE:-bytes}/${LENGTH:-1024} | grep Req
killall node

127
benchmark/http_bench.js Normal file
View File

@@ -0,0 +1,127 @@
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.
var spawn = require('child_process').spawn;
var cluster = require('cluster');
var http = require('http');
var options = {
mode: 'master',
host: '127.0.0.1',
port: 22344,
path: '/',
servers: 1,
clients: 1
};
for (var i = 2; i < process.argv.length; ++i) {
var args = process.argv[i].split('=', 2);
var key = args[0];
var val = args[1];
options[key] = val;
}
switch (options.mode) {
case 'master': startMaster(); break;
case 'server': startServer(); break;
case 'client': startClient(); break;
default: throw new Error('Bad mode: ' + options.mode);
}
process.title = 'http_bench[' + options.mode + ']';
// monkey-patch the log functions so they include name + pid
console.log = patch(console.log);
console.trace = patch(console.trace);
console.error = patch(console.error);
function patch(fun) {
var prefix = process.title + '[' + process.pid + '] ';
return function() {
var args = Array.prototype.slice.call(arguments);
args[0] = prefix + args[0];
return fun.apply(console, args);
};
}
function startMaster() {
if (!cluster.isMaster) return startServer();
for (var i = ~~options.servers; i > 0; --i) cluster.fork();
for (var i = ~~options.clients; i > 0; --i) {
var cp = spawn(process.execPath, [__filename, 'mode=client']);
cp.stdout.pipe(process.stdout);
cp.stderr.pipe(process.stderr);
}
}
function startServer() {
http.createServer(onRequest).listen(options.port, options.host);
var body = Array(1024).join('x');
var headers = {'Content-Length': '' + body.length};
function onRequest(req, res) {
req.on('error', onError);
res.on('error', onError);
res.writeHead(200, headers);
res.end(body);
}
function onError(err) {
console.error(err.stack);
}
}
function startClient() {
// send off a bunch of concurrent requests
// TODO make configurable
sendRequest();
sendRequest();
function sendRequest() {
var req = http.request(options, onConnection);
req.on('error', onError);
req.end();
}
// add a little back-off to prevent EADDRNOTAVAIL errors, it's pretty easy
// to exhaust the available port range
function relaxedSendRequest() {
setTimeout(sendRequest, 1);
}
function onConnection(res) {
res.on('error', onError);
res.on('data', onData);
res.on('end', relaxedSendRequest);
}
function onError(err) {
console.error(err.stack);
relaxedSendRequest();
}
function onData(data) {
// this space intentionally left blank
}
}

View File

@@ -0,0 +1,13 @@
var http = require('http');
var port = parseInt(process.env.PORT, 10) || 8000;
var defaultLag = parseInt(process.argv[2], 10) || 100;
http.createServer(function(req, res) {
res.writeHead(200, { 'content-type': 'text/plain',
'content-length': '2' });
var lag = parseInt(req.url.split("/").pop(), 10) || defaultLag;
setTimeout(function() {
res.end('ok');
}, lag);
}).listen(port, 'localhost');

View File

@@ -1,95 +1,129 @@
path = require("path");
exec = require("child_process").exec;
http = require("http");
var path = require('path'),
exec = require('child_process').exec,
http = require('http');
port = parseInt(process.env.PORT || 8000);
var port = parseInt(process.env.PORT || 8000);
console.log('pid ' + process.pid);
fixed = ""
for (var i = 0; i < 20*1024; i++) {
fixed += "C";
var fixed = makeString(20 * 1024, 'C'),
storedBytes = {},
storedBuffer = {},
storedUnicode = {};
var useDomains = process.env.NODE_USE_DOMAINS;
// set up one global domain.
if (useDomains) {
var domain = require('domain');
var gdom = domain.create();
gdom.on('error', function(er) {
console.log('Error on global domain', er);
throw er;
});
gdom.enter();
}
var uname, rev;
exec('git rev-list -1 HEAD', function (e, stdout) {
if (e) {
console.error("Problem executing: 'git rev-list -1 HEAD'");
throw new Error(e);
}
rev = stdout.replace(/\s/g, '');
});
exec('uname -a', function (e, stdout) {
if (e) {
console.error("Problem executing: 'uname -a'");
throw new Error(e);
}
uname = stdout.replace(/[\r\n]/g, '');
});
stored = {};
storedBuffer = {};
var server = http.createServer(function (req, res) {
var commands = req.url.split("/");
if (useDomains) {
var dom = domain.create();
dom.add(req);
dom.add(res);
}
var commands = req.url.split('/');
var command = commands[1];
var body = "";
var body = '';
var arg = commands[2];
var n_chunks = parseInt(commands[3], 10);
var status = 200;
if (command == "bytes") {
var n = parseInt(arg, 10)
if (command == 'bytes') {
var n = ~~arg;
if (n <= 0)
throw "bytes called with n <= 0"
if (stored[n] === undefined) {
console.log("create stored[n]");
stored[n] = "";
for (var i = 0; i < n; i++) {
stored[n] += "C"
}
throw new Error('bytes called with n <= 0')
if (storedBytes[n] === undefined) {
console.log('create storedBytes[n]');
storedBytes[n] = makeString(n, 'C');
}
body = stored[n];
body = storedBytes[n];
} else if (command == "buffer") {
var n = parseInt(arg, 10)
if (n <= 0) throw new Error("bytes called with n <= 0");
} else if (command == 'buffer') {
var n = ~~arg;
if (n <= 0)
throw new Error('buffer called with n <= 0');
if (storedBuffer[n] === undefined) {
console.log("create storedBuffer[n]");
console.log('create storedBuffer[n]');
storedBuffer[n] = new Buffer(n);
for (var i = 0; i < n; i++) {
storedBuffer[n][i] = "C".charCodeAt(0);
storedBuffer[n][i] = 'C'.charCodeAt(0);
}
}
body = storedBuffer[n];
} else if (command == "quit") {
res.connection.server.close();
body = "quitting";
} else if (command == 'unicode') {
var n = ~~arg;
if (n <= 0)
throw new Error('unicode called with n <= 0');
if (storedUnicode[n] === undefined) {
console.log('create storedUnicode[n]');
storedUnicode[n] = makeString(n, '\u263A');
}
body = storedUnicode[n];
} else if (command == "fixed") {
} else if (command == 'quit') {
res.connection.server.close();
body = 'quitting';
} else if (command == 'fixed') {
body = fixed;
} else if (command == "info") {
body = 'rev=' + rev + '\nuname="' + uname + '"\n';
} else if (command == 'echo') {
res.writeHead(200, { 'Content-Type': 'text/plain',
'Transfer-Encoding': 'chunked' });
req.pipe(res);
return;
} else {
status = 404;
body = "not found\n";
body = 'not found\n';
}
var content_length = body.length.toString();
// example: http://localhost:port/bytes/512/4
// sends a 512 byte body in 4 chunks of 128 bytes
if (n_chunks > 0) {
res.writeHead(status, { 'Content-Type': 'text/plain',
'Transfer-Encoding': 'chunked' });
// send body in chunks
var len = body.length;
var step = ~~(len / n_chunks) || len;
res.writeHead(status, { "Content-Type": "text/plain",
"Content-Length": content_length });
res.end(body);
for (var i = 0; i < len; i += step) {
res.write(body.slice(i, i + step));
}
res.end();
} else {
var content_length = body.length.toString();
res.writeHead(status, { 'Content-Type': 'text/plain',
'Content-Length': content_length });
res.end(body);
}
});
function makeString(size, c) {
var s = '';
while (s.length < size) {
s += c;
}
return s;
}
server.listen(port, function () {
console.log('Listening at http://127.0.0.1:'+port+'/');
});
process.on('exit', function() {
console.error('libuv counters', process.uvCounters());
});

View File

@@ -0,0 +1,128 @@
//
// Usage:
// node benchmark/http_simple_auto.js <args> <target>
//
// Where:
// <args> Arguments to pass to `ab`.
// <target> Target to benchmark, e.g. `bytes/1024` or `buffer/8192`.
//
var path = require("path");
var http = require("http");
var spawn = require("child_process").spawn;
var port = parseInt(process.env.PORT || 8000);
var fixed = ""
for (var i = 0; i < 20*1024; i++) {
fixed += "C";
}
var stored = {};
var storedBuffer = {};
var server = http.createServer(function (req, res) {
var commands = req.url.split("/");
var command = commands[1];
var body = "";
var arg = commands[2];
var n_chunks = parseInt(commands[3], 10);
var status = 200;
if (command == "bytes") {
var n = parseInt(arg, 10)
if (n <= 0)
throw "bytes called with n <= 0"
if (stored[n] === undefined) {
stored[n] = "";
for (var i = 0; i < n; i++) {
stored[n] += "C"
}
}
body = stored[n];
} else if (command == "buffer") {
var n = parseInt(arg, 10)
if (n <= 0) throw new Error("bytes called with n <= 0");
if (storedBuffer[n] === undefined) {
storedBuffer[n] = new Buffer(n);
for (var i = 0; i < n; i++) {
storedBuffer[n][i] = "C".charCodeAt(0);
}
}
body = storedBuffer[n];
} else if (command == "quit") {
res.connection.server.close();
body = "quitting";
} else if (command == "fixed") {
body = fixed;
} else if (command == "echo") {
res.writeHead(200, { "Content-Type": "text/plain",
"Transfer-Encoding": "chunked" });
req.pipe(res);
return;
} else {
status = 404;
body = "not found\n";
}
// example: http://localhost:port/bytes/512/4
// sends a 512 byte body in 4 chunks of 128 bytes
if (n_chunks > 0) {
res.writeHead(status, { "Content-Type": "text/plain",
"Transfer-Encoding": "chunked" });
// send body in chunks
var len = body.length;
var step = ~~(len / n_chunks) || len;
for (var i = 0; i < len; i += step) {
res.write(body.slice(i, i + step));
}
res.end();
} else {
var content_length = body.length.toString();
res.writeHead(status, { "Content-Type": "text/plain",
"Content-Length": content_length });
res.end(body);
}
});
server.listen(port, function () {
var url = 'http://127.0.0.1:' + port + '/';
var n = process.argv.length - 1;
process.argv[n] = url + process.argv[n];
var cp = spawn('ab', process.argv.slice(2));
cp.stdout.pipe(process.stdout);
cp.stderr.pipe(process.stderr);
cp.on('exit', function() {
server.close();
process.nextTick(dump_mm_stats);
});
});
function dump_mm_stats() {
if (typeof gc != 'function') return;
var before = process.memoryUsage();
for (var i = 0; i < 10; ++i) gc();
var after = process.memoryUsage();
setTimeout(print_stats, 250); // give GC time to settle
function print_stats() {
console.log('\nBEFORE / AFTER GC');
['rss', 'heapTotal', 'heapUsed'].forEach(function(key) {
var a = before[key] / (1024 * 1024);
var b = after[key] / (1024 * 1024);
console.log('%sM / %sM %s', a.toFixed(2), b.toFixed(2), key);
});
}
}

View File

@@ -0,0 +1,9 @@
var cluster = require('cluster');
var os = require('os');
if (cluster.isMaster) {
console.log('master running on pid %d', process.pid);
for (var i = 1, n = os.cpus().length; i < n; ++i) cluster.fork();
} else {
require(__dirname + '/http_simple.js');
}

View File

@@ -2,41 +2,47 @@
* gcc -o iotest io.c
*/
#include <assert.h>
#include <unistd.h>
#include <string.h>
#include <fcntl.h>
#include <sys/time.h>
#include <assert.h>
#include <stdlib.h>
#include <stdint.h>
#include <stdio.h>
int tsize = 1000 * 1048576;
const char *path = "/tmp/wt.dat";
static int c = 0;
static int tsize = 1000 * 1048576;
static const char path[] = "/tmp/wt.dat";
static char buf[65536];
int c = 0;
static uint64_t now(void) {
struct timeval tv;
char* bufit(size_t l)
{
char *p = malloc(l);
memset(p, '!', l);
return p;
if (gettimeofday(&tv, NULL))
abort();
return tv.tv_sec * 1000000ULL + tv.tv_usec;
}
void writetest(int size, size_t bsize)
static void writetest(int size, size_t bsize)
{
int i;
char *buf = bufit(bsize);
struct timeval start, end;
uint64_t start, end;
double elapsed;
double mbps;
assert(bsize <= sizeof buf);
int fd = open(path, O_CREAT|O_WRONLY, 0644);
if (fd < 0) {
perror("open failed");
exit(254);
}
assert(0 == gettimeofday(&start, NULL));
start = now();
for (i = 0; i < size; i += bsize) {
int rv = write(fd, buf, bsize);
if (c++ % 2000 == 0) fprintf(stderr, ".");
@@ -45,35 +51,41 @@ void writetest(int size, size_t bsize)
exit(254);
}
}
#ifdef __linux__
fdatasync(fd);
#else
fsync(fd);
#endif
close(fd);
assert(0 == gettimeofday(&end, NULL));
elapsed = (end.tv_sec - start.tv_sec) + ((double)(end.tv_usec - start.tv_usec))/100000.;
mbps = ((tsize/elapsed)) / 1048576;
fprintf(stderr, "\nWrote %d bytes in %03fs using %ld byte buffers: %03fmB/s\n", size, elapsed, bsize, mbps);
free(buf);
#ifndef NSYNC
# ifdef __linux__
fdatasync(fd);
# else
fsync(fd);
# endif
#endif /* SYNC */
close(fd);
end = now();
elapsed = (end - start) / 1e6;
mbps = ((tsize/elapsed)) / 1048576;
fprintf(stderr, "\nWrote %d bytes in %03fs using %ld byte buffers: %03fmB/s\n", size, elapsed, bsize, mbps);
}
void readtest(int size, size_t bsize)
{
int i;
char *buf = bufit(bsize);
struct timeval start, end;
uint64_t start, end;
double elapsed;
double mbps;
assert(bsize <= sizeof buf);
int fd = open(path, O_RDONLY, 0644);
if (fd < 0) {
perror("open failed");
exit(254);
}
assert(0 == gettimeofday(&start, NULL));
start = now();
for (i = 0; i < size; i += bsize) {
int rv = read(fd, buf, bsize);
if (rv < 0) {
@@ -82,12 +94,12 @@ void readtest(int size, size_t bsize)
}
}
close(fd);
assert(0 == gettimeofday(&end, NULL));
elapsed = (end.tv_sec - start.tv_sec) + ((double)(end.tv_usec - start.tv_usec))/100000.;
mbps = ((tsize/elapsed)) / 1048576;
fprintf(stderr, "Read %d bytes in %03fs using %ld byte buffers: %03fmB/s\n", size, elapsed, bsize, mbps);
free(buf);
end = now();
elapsed = (end - start) / 1e6;
mbps = ((tsize/elapsed)) / 1048576;
fprintf(stderr, "Read %d bytes in %03fs using %ld byte buffers: %03fmB/s\n", size, elapsed, bsize, mbps);
}
void cleanup() {

View File

@@ -62,7 +62,7 @@ function readtest(size, bsize) {
function wt(tsize, bsize, done) {
var start = Date.now();
s = writetest(tsize, bsizes[0]);
s = writetest(tsize, bsize);
s.addListener('close', function() {
var end = Date.now();
var diff = end - start;
@@ -73,7 +73,7 @@ function wt(tsize, bsize, done) {
function rt(tsize, bsize, done) {
var start = Date.now();
s = readtest(tsize, bsizes[0]);
s = readtest(tsize, bsize);
s.addListener('close', function() {
var end = Date.now();
var diff = end - start;

41
benchmark/next-tick-2.js Normal file
View File

@@ -0,0 +1,41 @@
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.
var count = 2e6,
left = count,
start;
function onNextTick() {
if (--left) {
process.nextTick(onNextTick);
} else {
finalize();
}
}
function finalize() {
var duration = (new Date()).getTime() - start,
ticksPerSec = count / duration * 1000;
console.log("nextTick callbacks per second: " + Math.round(ticksPerSec));
}
start = (new Date()).getTime();
process.nextTick(onNextTick);

17
benchmark/next-tick.js Normal file
View File

@@ -0,0 +1,17 @@
// run with `time node benchmark/next-tick.js`
var assert = require('assert');
var N = 1e7;
var n = 0;
process.on('exit', function() {
assert.equal(n, N);
});
function cb() {
n++;
}
for (var i = 0; i < N; ++i) {
process.nextTick(cb);
}

View File

@@ -1,48 +1,43 @@
var http = require("http");
var http = require('http');
var concurrency = 30;
var port = 12346;
var n = 7; // several orders of magnitude slower
var n = 700;
var bytes = 1024*5;
var requests = 0;
var responses = 0;
var body = "";
var body = '';
for (var i = 0; i < bytes; i++) {
body += "C";
body += 'C';
}
var server = http.createServer(function (req, res) {
var server = http.createServer(function(req, res) {
res.writeHead(200, {
"Content-Type": "text/plain",
"Content-Length": body.length
'Content-Type': 'text/plain',
'Content-Length': body.length
});
res.write(body);
res.close();
res.end(body);
})
server.listen(port);
function responseListener (res) {
res.addListener("end", function () {
if (requests < n) {
var req = res.client.request("/");
req.addListener('response', responseListener);
req.close();
requests++;
}
server.listen(port, function() {
var agent = new http.Agent();
agent.maxSockets = concurrency;
if (++responses == n) {
server.close();
}
});
}
for (var i = 0; i < concurrency; i++) {
var client = http.createClient(port);
client.id = i;
var req = client.request("/");
req.addListener('response', responseListener);
req.close();
requests++;
}
for (var i = 0; i < n; i++) {
var req = http.get({
port: port,
path: '/',
agent: agent
}, function(res) {
res.on('end', function() {
if (++responses === n) {
server.close();
}
});
});
req.id = i;
requests++;
}
});

View File

@@ -0,0 +1,25 @@
var net = require('net');
var received = 0;
var start = new Date();
var socket = net.connect(8000);
socket.on('data', function(d) {
received += d.length;
});
var interval = setInterval(function() {
// After 1 gigabyte shutdown.
if (received > 10 * 1024 * 1024 * 1024) {
socket.destroy();
clearInterval(interval);
process.exit(0);
} else {
// Otherwise print some stats.
var now = new Date();
var gigabytes = received / (1024 * 1024 * 1024);
var gigabits = gigabytes * 8.0;
var millisec = now - start;
var sec = millisec / 1000;
console.log((gigabits / sec) + " gbit/sec")
}
}, 1000);

21
benchmark/throughput.js Normal file
View File

@@ -0,0 +1,21 @@
var fork = require('child_process').fork;
var net = require('net');
var buffer = new Buffer(1024 * 1024);
function write(socket) {
if (!socket.writable) return;
socket.write(buffer, function() {
write(socket);
});
}
var server = net.createServer(function(socket) {
server.close();
write(socket);
});
server.listen(8000, function() {
fork(__dirname + '/throughput-child.js');
});

View File

@@ -0,0 +1,63 @@
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.
if (!process.versions.openssl) {
console.error('Skipping because node compiled without OpenSSL.');
process.exit(0);
}
var common = require('../common');
var assert = require('assert');
var tls = require('tls');
var fs = require('fs');
var path = require('path');
var options = {
key: fs.readFileSync(path.join(common.fixturesDir, 'test_key.pem')),
cert: fs.readFileSync(path.join(common.fixturesDir, 'test_cert.pem'))
};
var fragment = 'fr';
var dataSize = 1024 * 1024;
var sent = 0;
var received = 0;
var server = tls.createServer(options, function (stream) {
for (sent = 0; sent <= dataSize; sent += fragment.length) {
stream.write(fragment);
}
stream.end();
});
server.listen(common.PORT, function () {
var client = tls.connect(common.PORT, function () {
client.on('data', function (data) {
received += data.length;
});
client.on('end', function () {
server.close();
});
});
});
process.on('exit', function () {
assert.equal(sent, received);
});

View File

@@ -1,4 +0,0 @@
set(CTEST_CUSTOM_PRE_TEST "sh -c \"rm -rf ../test/tmp && mkdir ../test/tmp\"")
set(CTEST_CUSTOM_POST_TEST ${CTEST_CUSTOM_PRE_TEST})
set(CTEST_CUSTOM_PRE_MEMCHECK ${CTEST_CUSTOM_PRE_TEST})
set(CTEST_CUSTOM_POST_MEMCHECK ${CTEST_CUSTOM_PRE_TEST})

View File

@@ -1,22 +0,0 @@
set(toolchain_dir #SET THIS TO YOUR TOOLCHAIN PATH)
set(toolchain_bin_dir ${toolchain_dir}/bin)
set(toolchain_libc_dir ${toolchain_dir}/arm-none-linux-gnueabi/libc)
set(toolchain_inc_dir ${toolchain_libc_dir}/include)
set(toolchain_lib_dir ${toolchain_libc_dir}/usr/lib)
set(CMAKE_SYSTEM_NAME Linux CACHE INTERNAL "system name")
set(CMAKE_SYSTEM_PROCESSOR arm CACHE INTERNAL "processor")
set(CMAKE_C_COMPILER ${toolchain_bin_dir}/arm-none-linux-gnueabi-gcc)
set(CMAKE_CXX_COMPILER ${toolchain_bin_dir}/arm-none-linux-gnueabi-g++)
set(CMAKE_C_FLAGS "-isystem ${toolchain_inc_dir}" CACHE INTERNAL "c compiler flags")
set(CMAKE_CXX_FLAGS "-isystem ${toolchain_inc_dir}" CACHE INTERNAL "cxx compiler flags")
set(link_flags -L${toolchain_lib_dir})
set(CMAKE_EXE_LINKER_FLAGS ${link_flags} CACHE INTERNAL "exe link flags")
set(CMAKE_MODULE_LINKER_FLAGS ${link_flags} CACHE INTERNAL "module link flags")
set(CMAKE_SHARED_LINKER_FLAGS ${link_flags} CACHE INTERNAL "shared lnk flags")
set(CMAKE_FIND_ROOT_PATH ${toolchain_libc_dir} CACHE INTERNAL "cross root directory")
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM BOTH CACHE INTERNAL "")
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY CACHE INTERNAL "")
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY CACHE INTERNAL "")

View File

@@ -1,127 +0,0 @@
#
# configure node for building
#
include(CheckFunctionExists)
include(CheckLibraryExists)
include(CheckSymbolExists)
if(NOT "v${CMAKE_BUILD_TYPE}" MATCHES vDebug)
set(CMAKE_BUILD_TYPE "Release")
endif()
string(TOLOWER ${CMAKE_SYSTEM_NAME} node_platform)
if(${node_platform} MATCHES darwin)
execute_process(COMMAND sw_vers -productVersion OUTPUT_VARIABLE OSX_VERSION)
string(REGEX REPLACE "^([0-9]+\\.[0-9]+).*$" "\\1" OSX_VERSION "${OSX_VERSION}")
if(OSX_VERSION GREATER 10.5)
# 10.6 builds are 64-bit
set(CMAKE_SYSTEM_PROCESSOR x86_64)
endif()
endif()
# Get system architecture
if(${CMAKE_SYSTEM_PROCESSOR} MATCHES i686*)
set(node_arch x86)
elseif(${CMAKE_SYSTEM_PROCESSOR} MATCHES i386*)
set(node_arch x86)
else()
set(node_arch ${CMAKE_SYSTEM_PROCESSOR})
endif()
if(${node_arch} MATCHES unknown)
set(node_arch x86)
endif()
# Copy tools directory for out-of-source build
string(COMPARE EQUAL $(PROJECT_BINARY_DIR) ${PROJECT_SOURCE_DIR} in_source_build)
if(NOT ${in_source_build})
execute_process(COMMAND cmake -E copy_directory ${PROJECT_SOURCE_DIR}/tools ${PROJECT_BINARY_DIR}/tools)
endif()
# Set some compiler/linker flags..
set(CMAKE_C_FLAGS_DEBUG "-O0 -Wall -g -Wextra -DDEBUG $ENV{CFLAGS}")
set(CMAKE_CXX_FLAGS_DEBUG "-O0 -Wall -g -Wextra -DDEBUG $ENV{CXXFLAGS}")
set(CMAKE_C_FLAGS_RELEASE "-g -O3 -DNDEBUG $ENV{CFLAGS}")
set(CMAKE_CXX_FLAGS_RELEASE "-g -O3 -DNDEBUG $ENV{CXXFLAGS}")
if(NOT ${node_platform} MATCHES windows)
add_definitions(-D__POSIX__=1)
endif()
if(${node_platform} MATCHES sunos)
add_definitions(-threads)
elseif(NOT ${node_platform} MATCHES cygwin*)
add_definitions(-pthread)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -rdynamic")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -rdynamic")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pthread")
endif()
if(${node_platform} MATCHES darwin)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -framework Carbon")
# explicitly set this so that we don't check again when building libeio
set(HAVE_FDATASYNC 0)
else()
# OSX fdatasync() check wrong: http://public.kitware.com/Bug/view.php?id=10044
check_function_exists(fdatasync HAVE_FDATASYNC)
endif()
if(HAVE_FDATASYNC)
add_definitions(-DHAVE_FDATASYNC=1)
else()
add_definitions(-DHAVE_FDATASYNC=0)
endif()
# check first without rt and then with rt
check_function_exists(clock_gettime HAVE_CLOCK_GETTIME)
check_library_exists(rt clock_gettime "" HAVE_CLOCK_GETTIME_RT)
if(HAVE_CLOCK_GETTIME OR HAVE_CLOCK_GETTIME_RT)
check_symbol_exists(CLOCK_MONOTONIC "time.h" HAVE_MONOTONIC_CLOCK)
endif()
if(HAVE_MONOTONIC_CLOCK)
add_definitions(-DHAVE_MONOTONIC_CLOCK=1)
else()
add_definitions(-DHAVE_MONOTONIC_CLOCK=0)
endif()
if(DTRACE)
if(NOT ${node_platform} MATCHES sunos)
message(FATAL_ERROR "DTrace support only currently available on Solaris")
endif()
find_program(dtrace_bin dtrace)
if(NOT dtrace_bin)
message(FATAL_ERROR "DTrace binary not found")
endif()
add_definitions(-DHAVE_DTRACE=1)
endif()
add_definitions(
-DPLATFORM="${node_platform}"
-DARCH="${node_arch}"
-DX_STACKSIZE=65536
-D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64
-DEV_MULTIPLICITY=0
-D_FORTIFY_SOURCE=2
)
# set the exec output path to be compatible with the current waf build system
if(${CMAKE_BUILD_TYPE} MATCHES Debug)
set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/debug/)
else()
set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/default/)
endif()
#
## ---------------------------------------------------------
#
file(GLOB js2c_files ${PROJECT_SOURCE_DIR}/lib/*.js)
set(js2c_files ${PROJECT_SOURCE_DIR}/src/node.js ${js2c_files})
file(MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/src)

View File

@@ -1,80 +0,0 @@
#
# docs
#
file(MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/doc)
set(node_binary ${PROJECT_BINARY_DIR}/default/node)
set(doctool tools/doctool/doctool.js)
set(changelog_html ${PROJECT_BINARY_DIR}/doc/changelog.html)
file(GLOB_RECURSE doc_sources RELATIVE ${PROJECT_SOURCE_DIR} doc/*)
foreach(FILE ${doc_sources})
string(REGEX REPLACE "(.*)api_assets(.*)" "\\1api/assets\\2" OUT_FILE ${FILE})
add_custom_command(OUTPUT ${PROJECT_BINARY_DIR}/${OUT_FILE}
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${PROJECT_SOURCE_DIR}/${FILE} ${PROJECT_BINARY_DIR}/${OUT_FILE}
DEPENDS ${PROJECT_SOURCE_DIR}/${FILE}
)
list(APPEND doc_sources_copy ${PROJECT_BINARY_DIR}/${OUT_FILE})
endforeach()
file(GLOB_RECURSE api_markdown RELATIVE ${PROJECT_SOURCE_DIR} ${PROJECT_SOURCE_DIR}/doc/api/*)
foreach(file ${api_markdown})
string(REGEX REPLACE "(.*)\\.markdown" "\\1" tmp ${file})
set(api_basenames ${api_basenames} ${tmp})
endforeach()
foreach(api ${api_basenames})
set(api_html ${api_html} ${PROJECT_BINARY_DIR}/${api}.html)
add_custom_command(
OUTPUT "${PROJECT_BINARY_DIR}/${api}.html"
COMMAND ${node_binary} ${doctool} ${PROJECT_BINARY_DIR}/doc/template.html "${PROJECT_BINARY_DIR}/${api}.markdown" > "${PROJECT_BINARY_DIR}/${api}.html"
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
DEPENDS node ${doctool} ${doc_sources_copy}
VERBATIM
)
endforeach()
add_custom_target(
doc
DEPENDS node ${doc_sources_copy} ${api_html} ${changelog_html}
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
)
#add_custom_command(
# OUTPUT ${PROJECT_BINARY_DIR}/doc/api.html
# COMMAND ${PROJECT_BINARY_DIR}/default/node tools/ronnjs/bin/ronn.js --fragment doc/api.markdown
# | sed "s/<h2>\\\(.*\\\)<\\/h2>/<h2 id=\"\\1\">\\1<\\/h2>/g"
# | cat doc/api_header.html - doc/api_footer.html > ${PROJECT_BINARY_DIR}/doc/api.html
# WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
# DEPENDS node doc/api.markdown doc/api_header.html doc/api_footer.html
# VERBATIM
# )
add_custom_command(
OUTPUT ${changelog_html}
COMMAND ${node_binary} ${doctool} doc/template.html ChangeLog
| sed "s|assets/|api/assets/|g"
| sed "s|<body>|<body id=\"changelog\">|g" > ${changelog_html}
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
DEPENDS ChangeLog node ${doctool} ${doc_sources_copy}
VERBATIM
)
#add_custom_command(
# OUTPUT ${PROJECT_BINARY_DIR}/doc/changelog.html
# COMMAND cat doc/changelog_header.html ChangeLog doc/changelog_footer.html > ${PROJECT_BINARY_DIR}/doc/changelog.html
# WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
# DEPENDS ChangeLog doc/changelog_header.html doc/changelog_footer.html
# VERBATIM
# )
#add_custom_command(
# OUTPUT ${PROJECT_BINARY_DIR}/doc/node.1
# COMMAND ${PROJECT_BINARY_DIR}/default/node tools/ronnjs/bin/ronn.js --roff doc/api.markdown > ${PROJECT_BINARY_DIR}/doc/node.1
# WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
# DEPENDS node doc/api.markdown tools/ronnjs/bin/ronn.js
# VERBATIM
# )

View File

@@ -1,18 +0,0 @@
if(SHARED_CARES)
find_library(LIBCARES_LIBRARY NAMES cares)
find_path(LIBCARES_INCLUDE_DIR ares.h
PATH_SUFFIXES include
) # Find header
find_package_handle_standard_args(libcares DEFAULT_MSG LIBCARES_LIBRARY LIBCARES_INCLUDE_DIR)
else()
set(cares_arch ${node_arch})
if(${node_arch} MATCHES x86_64)
set(cares_arch x64)
elseif(${node_arch} MATCHES x86)
set(cares_arch ia32)
endif()
add_subdirectory(deps/c-ares)
set(LIBCARES_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/deps/c-ares ${CMAKE_SOURCE_DIR}/deps/c-ares/${node_platform}-${cares_arch})
endif()

View File

@@ -1,10 +0,0 @@
if(SHARED_LIBEV)
find_library(LIBEV_LIBRARY NAMES ev)
find_path(LIBEV_INCLUDE_DIR ev.h
PATH_SUFFIXES include/ev include
) # Find header
find_package_handle_standard_args(libev DEFAULT_MSG LIBEV_LIBRARY LIBEV_INCLUDE_DIR)
else()
add_subdirectory(deps/libev)
set(LIBEV_INCLUDE_DIR deps/libev)
endif()

View File

@@ -1,55 +0,0 @@
#
# libraries
#
include(CheckLibraryExists)
include(FindPackageHandleStandardArgs)
set(HAVE_CONFIG_H True)
add_definitions(-DHAVE_CONFIG_H=1)
find_package(OpenSSL QUIET)
find_package(Threads)
find_library(RT rt)
find_library(DL dl)
check_library_exists(socket socket "" HAVE_SOCKET_LIB)
check_library_exists(nsl gethostbyname "" HAVE_NSL_LIB)
check_library_exists(util openpty "" HAVE_UTIL_LIB)
if(RT)
set(extra_libs ${extra_libs} ${RT})
endif()
if(DL)
set(extra_libs ${extra_libs} ${DL})
endif()
if(${node_platform} MATCHES freebsd)
find_library(KVM NAMES kvm)
set(extra_libs ${extra_libs} KVM)
endif()
if(${HAVE_SOCKET_LIB})
set(extra_libs ${extra_libs} socket)
endif()
if(${HAVE_NSL_LIB})
set(extra_libs ${extra_libs} nsl)
endif()
if(HAVE_UTIL_LIB)
set(extra_libs ${extra_libs} util)
endif()
if(OPENSSL_FOUND)
add_definitions(-DHAVE_OPENSSL=1)
set(HAVE_OPENSSL True)
set(node_extra_src ${node_extra_src} src/node_crypto.cc)
set(extra_libs ${extra_libs} ${OPENSSL_LIBRARIES})
endif()
include("cmake/libc-ares.cmake")
include("cmake/libev.cmake")
include("cmake/libv8.cmake")
add_subdirectory(deps/libeio)
add_subdirectory(deps/http_parser)

View File

@@ -1,25 +0,0 @@
set(V8_INCLUDE_NAMES v8.h v8-debug.h v8-profiler.h v8stdint.h)
set(V8_LIBRARY_NAMES v8)
if(SHARED_V8)
find_path(V8_INCLUDE_DIR NAMES ${V8_INCLUDE_NAMES})
find_library(V8_LIBRARY_PATH NAMES ${V8_LIBRARY_NAMES} NO_CMAKE_PATH)
else()
set(V8_INCLUDE_DIR "${PROJECT_BINARY_DIR}/deps/v8/include")
if(${CMAKE_BUILD_TYPE} MATCHES Debug)
set(v8_fn "libv8_g.a")
else()
set(v8_fn "libv8.a")
endif()
set(V8_LIBRARY_PATH "${PROJECT_BINARY_DIR}/deps/v8/${v8_fn}")
install(DIRECTORY
## Do NOT remove the trailing slash
## it is required so that v8 headers are
## copied directly into include/node
## rather than in a subdirectory
## See CMake's install(DIRECTORY) manual for details
${V8_INCLUDE_DIR}/
DESTINATION include/node
)
endif()

View File

@@ -1,142 +0,0 @@
#
# node build stuff
#
set(macros_file ${PROJECT_BINARY_DIR}/macros.py)
# replace debug(x) and assert(x) with nothing in release build
if(${CMAKE_BUILD_TYPE} MATCHES Release)
file(APPEND ${macros_file} "macro debug(x) = ;\n")
file(APPEND ${macros_file} "macro assert(x) = ;\n")
endif()
if(NOT DTRACE)
set(dtrace_probes
DTRACE_HTTP_CLIENT_REQUEST
DTRACE_HTTP_CLIENT_RESPONSE
DTRACE_HTTP_SERVER_REQUEST
DTRACE_HTTP_SERVER_RESPONSE
DTRACE_NET_SERVER_CONNECTION
DTRACE_NET_STREAM_END
DTRACE_NET_SOCKET_READ
DTRACE_NET_SOCKET_WRITE)
foreach(probe ${dtrace_probes})
file(APPEND ${macros_file} "macro ${probe}(x) = ;\n")
endforeach()
endif()
# include macros file in generation
set(js2c_files ${js2c_files} ${macros_file})
add_custom_command(
OUTPUT ${PROJECT_BINARY_DIR}/src/node_natives.h
COMMAND ${PYTHON_EXECUTABLE} tools/js2c.py ${PROJECT_BINARY_DIR}/src/node_natives.h ${js2c_files}
DEPENDS ${js2c_files})
set(node_platform_src "src/platform_${node_platform}.cc")
if(NOT EXISTS ${CMAKE_SOURCE_DIR}/${node_platform_src})
set(node_extra_src ${node_extra_src} "src/platform_none.cc")
else()
set(node_extra_src ${node_extra_src} ${node_platform_src})
endif()
set(node_sources
src/node_main.cc
src/node.cc
src/node_buffer.cc
src/node_javascript.cc
src/node_extensions.cc
src/node_http_parser.cc
src/node_net.cc
src/node_io_watcher.cc
src/node_child_process.cc
src/node_constants.cc
src/node_cares.cc
src/node_events.cc
src/node_file.cc
src/node_signal_watcher.cc
src/node_stat_watcher.cc
src/node_stdio.cc
src/node_timer.cc
src/node_script.cc
src/node_os.cc
src/node_dtrace.cc
src/node_string.cc
src/node_natives.h
${node_extra_src})
# Set up PREFIX, CCFLAGS, and CPPFLAGS for node_config.h
set(PREFIX ${CMAKE_INSTALL_PREFIX})
if(${CMAKE_BUILD_TYPE} MATCHES Debug)
set(CCFLAGS "${CMAKE_C_FLAGS_DEBUG} ${CMAKE_C_FLAGS}")
else()
set(CCFLAGS "${CMAKE_C_FLAGS_RELEASE} ${CMAKE_C_FLAGS}")
endif()
get_directory_property(compile_defs COMPILE_DEFINITIONS)
foreach(def ${compile_defs})
set(CPPFLAGS "${CPPFLAGS} -D${def}")
endforeach()
configure_file(src/node_config.h.in ${PROJECT_BINARY_DIR}/src/node_config.h ESCAPE_QUOTES)
configure_file(config.h.cmake ${PROJECT_BINARY_DIR}/config.h)
include_directories(
src
deps/libeio
deps/http_parser
${V8_INCLUDE_DIR}
${LIBEV_INCLUDE_DIR}
${LIBCARES_INCLUDE_DIR}
${PROJECT_BINARY_DIR}
${PROJECT_BINARY_DIR}/src
)
if(DTRACE)
add_custom_command(OUTPUT ${PROJECT_BINARY_DIR}/src/node_provider.h
COMMAND ${dtrace_bin} -x nolibs -h -o ${PROJECT_BINARY_DIR}/src/node_provider.h -s ${PROJECT_SOURCE_DIR}/src/node_provider.d
DEPENDS ${PROJECT_SOURCE_DIR}/src/node_provider.d)
set(node_sources ${node_sources} src/node_provider.o)
set(node_sources src/node_provider.h ${node_sources})
endif()
add_executable(node ${node_sources})
set_target_properties(node PROPERTIES DEBUG_POSTFIX "_g")
target_link_libraries(node
ev
eio
cares
http_parser
${V8_LIBRARY_PATH}
${CMAKE_THREAD_LIBS_INIT}
${extra_libs})
if(DTRACE)
# manually gather up the object files for dtrace
get_property(sourcefiles TARGET node PROPERTY SOURCES)
foreach(src_file ${sourcefiles})
if(src_file MATCHES ".*\\.cc$")
set(node_objs ${node_objs} ${PROJECT_BINARY_DIR}/CMakeFiles/node.dir/${src_file}.o)
endif()
endforeach()
add_custom_command(OUTPUT ${PROJECT_BINARY_DIR}/src/node_provider.o
#COMMAND cmake -E echo ${node_objs}
COMMAND ${dtrace_bin} -G -x nolibs -s ${PROJECT_SOURCE_DIR}/src/node_provider.d -o ${PROJECT_BINARY_DIR}/src/node_provider.o ${node_objs}
DEPENDS ${node_objs})
endif()
install(TARGETS node RUNTIME DESTINATION bin)
install(FILES
${PROJECT_BINARY_DIR}/config.h
src/node.h
src/node_object_wrap.h
src/node_buffer.h
src/node_events.h
src/node_version.h
${PROJECT_BINARY_DIR}/src/node_config.h
DESTINATION include/node
)

View File

@@ -1,35 +0,0 @@
#
# package
#
if(${node_platform} MATCHES darwin)
set(CPACK_GENERATOR "TGZ;PackageMaker")
# CPack requires the files to end in .txt
configure_file(LICENSE ${PROJECT_BINARY_DIR}/LICENSE.txt COPYONLY)
configure_file(ChangeLog ${PROJECT_BINARY_DIR}/ChangeLog.txt COPYONLY)
set(CPACK_RESOURCE_FILE_LICENSE "${PROJECT_BINARY_DIR}/LICENSE.txt")
set(CPACK_RESOURCE_FILE_README "${PROJECT_BINARY_DIR}/ChangeLog.txt")
#set(CPACK_RESOURCE_FILE_WELCOME "")
elseif(${node_platform} MATCHES linux)
set(CPACK_GENERATOR "TGZ;DEB;RPM")
else()
set(CPACK_GENERATOR "TGZ")
endif()
set(CPACK_DEBIAN_PACKAGE_MAINTAINER "Tom Hughes <tom.hughes@palm.com>")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Evented I/O for V8 JavaScript.")
set(CPACK_PACKAGE_DESCRIPTION "Evented I/O for V8 JavaScript.
Node's goal is to provide an easy way to build scalable network programs.
Node is similar in design to and influenced by systems like Ruby's Event
Machine or Python's Twisted. Node takes the event model a bit further—it
presents the event loop as a language construct instead of as a library.")
set(CPACK_DEBIAN_PACKAGE_DESCRIPTION "${CPACK_PACKAGE_DESCRIPTION}")
set(CPACK_DEBIAN_PACKAGE_SECTION "web")
file(READ ${PROJECT_SOURCE_DIR}/src/node_version.h node_version_h LIMIT 1024 OFFSET 0)
string(REGEX REPLACE ".*NODE_MAJOR_VERSION[ ]*([0-9]+).*" "\\1" CPACK_PACKAGE_VERSION_MAJOR "${node_version_h}")
string(REGEX REPLACE ".*NODE_MINOR_VERSION[ ]*([0-9]+).*" "\\1" CPACK_PACKAGE_VERSION_MINOR "${node_version_h}")
string(REGEX REPLACE ".*NODE_PATCH_VERSION[ ]*([0-9]+).*" "\\1" CPACK_PACKAGE_VERSION_PATCH "${node_version_h}")
set(node_version_string "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
# Note: this is intentionally at the bottom so that the above CPACK variables
# are used by CPack.
include(CPack)

View File

@@ -1,102 +0,0 @@
#
# v8 build stuff
#
string(TOLOWER ${CMAKE_BUILD_TYPE} v8mode)
set(v8arch ${node_arch})
if(${node_arch} MATCHES x86_64)
set(v8arch x64)
elseif(${node_arch} MATCHES x86)
set(v8arch ia32)
endif()
if(NOT SHARED_V8)
if(V8_SNAPSHOT)
set(v8_snapshot snapshot=on)
endif()
if(V8_OPROFILE)
set(v8_oprofile prof=oprofile)
endif()
if(V8_GDBJIT)
set(v8_gdbjit gdbjit=on)
endif()
if(${node_platform} MATCHES darwin)
execute_process(COMMAND hwprefs cpu_count OUTPUT_VARIABLE cpu_count)
elseif(${node_platform} MATCHES linux)
execute_process(COMMAND sh -c "cat /proc/cpuinfo | grep processor | sort | uniq | wc -l"
OUTPUT_VARIABLE cpu_count)
elseif(${node_platform} MATCHES sunos)
execute_process(COMMAND sh -c "psrinfo | wc -l" OUTPUT_VARIABLE cpu_count)
else()
set(cpu_count 1)
endif()
if(${cpu_count} GREATER 1)
math(EXPR parallel_jobs ${cpu_count}*2)
else()
set(parallel_jobs 1)
endif()
add_library(v8 STATIC IMPORTED)
set_property(TARGET v8
PROPERTY IMPORTED_LOCATION ${PROJECT_BINARY_DIR}/deps/v8/${v8_fn})
set(compile_env_vars "CC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} AR=${CMAKE_AR} RANLIB=${CMAKE_RANLIB} CFLAGS=\"${CMAKE_C_FLAGS}\" CXXFLAGS=\"${CMAKE_CXX_FLAGS}\" LDFLAGS=\"${CMAKE_EXE_LINKER_FLAGS}\"")
set(compile_cmd "${compile_env_vars} ${PYTHON_EXECUTABLE} ${PROJECT_BINARY_DIR}/tools/scons/scons.py -j ${parallel_jobs} visibility=default mode=${v8mode} arch=${v8arch} library=static ${v8_snapshot} ${v8_oprofile} ${v8_gdbjit} verbose=on")
if(CMAKE_VERSION VERSION_GREATER 2.8 OR CMAKE_VERSION VERSION_EQUAL 2.8)
# use ExternalProject for CMake >2.8
include(ExternalProject)
ExternalProject_Add(v8_extprj
URL ${PROJECT_SOURCE_DIR}/deps/v8
BUILD_IN_SOURCE True
BUILD_COMMAND sh -c "${compile_cmd}"
SOURCE_DIR ${PROJECT_BINARY_DIR}/deps/v8
# ignore this stuff, it's not needed for building v8 but ExternalProject
# demands these steps
CONFIGURE_COMMAND "true" # fake configure
INSTALL_COMMAND "true" # fake install
)
add_dependencies(node v8_extprj)
else()
# copy v8 sources inefficiently with CMake versions <2.8
file(GLOB_RECURSE v8_sources RELATIVE ${PROJECT_SOURCE_DIR} deps/v8/*)
if(NOT ${in_source_build})
file(MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/deps/v8)
foreach(FILE ${v8_sources})
add_custom_command(OUTPUT ${PROJECT_BINARY_DIR}/${FILE}
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${PROJECT_SOURCE_DIR}/${FILE} ${PROJECT_BINARY_DIR}/${FILE}
DEPENDS ${PROJECT_SOURCE_DIR}/${FILE}
)
list(APPEND v8_sources_dest ${PROJECT_BINARY_DIR}/${FILE})
endforeach()
else()
set(v8_sources_dest ${v8_sources})
endif()
add_custom_command(
OUTPUT ${PROJECT_BINARY_DIR}/deps/v8/${v8_fn}
COMMAND sh -c "${compile_cmd}"
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/deps/v8/
DEPENDS ${v8_sources_dest}
)
add_custom_target(v8_stock ALL DEPENDS ${PROJECT_BINARY_DIR}/deps/v8/${v8_fn})
set_property(TARGET v8 PROPERTY
IMPORTED_LOCATION ${PROJECT_BINARY_DIR}/deps/v8/${v8_fn})
add_dependencies(node v8_stock)
endif()
endif()

205
common.gypi Normal file
View File

@@ -0,0 +1,205 @@
{
'variables': {
'strict_aliasing%': 'false', # turn on/off -fstrict-aliasing
'visibility%': 'hidden', # V8's visibility setting
'target_arch%': 'ia32', # set v8's target architecture
'host_arch%': 'ia32', # set v8's host architecture
'want_separate_host_toolset': 0, # V8 should not build target and host
'library%': 'static_library', # allow override to 'shared_library' for DLL/.so builds
'component%': 'static_library', # NB. these names match with what V8 expects
'msvs_multi_core_compile': '0', # we do enable multicore compiles, but not using the V8 way
# Enable V8's post-mortem debugging only on unix flavors.
'conditions': [
['OS != "win"', {
'v8_postmortem_support': 'true'
}]
],
},
'target_defaults': {
'default_configuration': 'Release',
'configurations': {
'Debug': {
'defines': [ 'DEBUG', '_DEBUG' ],
'cflags': [ '-g', '-O0' ],
'conditions': [
['target_arch=="x64"', {
'msvs_configuration_platform': 'x64',
}],
],
'msvs_settings': {
'VCCLCompilerTool': {
'RuntimeLibrary': 1, # static debug
'Optimization': 0, # /Od, no optimization
'MinimalRebuild': 'false',
'OmitFramePointers': 'false',
'BasicRuntimeChecks': 3, # /RTC1
},
'VCLinkerTool': {
'LinkIncremental': 2, # enable incremental linking
},
},
},
'Release': {
'cflags': [ '-O3', '-fdata-sections', '-ffunction-sections' ],
'conditions': [
['target_arch=="x64"', {
'msvs_configuration_platform': 'x64',
}],
['OS=="solaris"', {
'cflags': [ '-fno-omit-frame-pointer' ],
# pull in V8's postmortem metadata
'ldflags': [ '-Wl,-z,allextract' ]
}],
['strict_aliasing!="true"', {
'cflags': [ '-fno-strict-aliasing' ],
}],
],
'msvs_settings': {
'VCCLCompilerTool': {
'RuntimeLibrary': 0, # static release
'Optimization': 3, # /Ox, full optimization
'FavorSizeOrSpeed': 1, # /Ot, favour speed over size
'InlineFunctionExpansion': 2, # /Ob2, inline anything eligible
'WholeProgramOptimization': 'true', # /GL, whole program optimization, needed for LTCG
'OmitFramePointers': 'true',
'EnableFunctionLevelLinking': 'true',
'EnableIntrinsicFunctions': 'true',
'RuntimeTypeInfo': 'false',
'ExceptionHandling': '0',
'AdditionalOptions': [
'/MP', # compile across multiple CPUs
],
},
'VCLibrarianTool': {
'AdditionalOptions': [
'/LTCG', # link time code generation
],
},
'VCLinkerTool': {
'LinkTimeCodeGeneration': 1, # link-time code generation
'OptimizeReferences': 2, # /OPT:REF
'EnableCOMDATFolding': 2, # /OPT:ICF
'LinkIncremental': 1, # disable incremental linking
},
},
}
},
'msvs_settings': {
'VCCLCompilerTool': {
'StringPooling': 'true', # pool string literals
'DebugInformationFormat': 3, # Generate a PDB
'WarningLevel': 3,
'BufferSecurityCheck': 'true',
'ExceptionHandling': 1, # /EHsc
'SuppressStartupBanner': 'true',
'WarnAsError': 'false',
},
'VCLibrarianTool': {
},
'VCLinkerTool': {
'conditions': [
['target_arch=="x64"', {
'TargetMachine' : 17 # /MACHINE:X64
}],
],
'GenerateDebugInformation': 'true',
'RandomizedBaseAddress': 2, # enable ASLR
'DataExecutionPrevention': 2, # enable DEP
'AllowIsolation': 'true',
'SuppressStartupBanner': 'true',
'target_conditions': [
['_type=="executable"', {
'SubSystem': 1, # console executable
}],
],
},
},
'conditions': [
['OS == "win"', {
'msvs_cygwin_shell': 0, # prevent actions from trying to use cygwin
'defines': [
'WIN32',
# we don't really want VC++ warning us about
# how dangerous C functions are...
'_CRT_SECURE_NO_DEPRECATE',
# ... or that C implementations shouldn't use
# POSIX names
'_CRT_NONSTDC_NO_DEPRECATE',
'BUILDING_V8_SHARED=1',
'BUILDING_UV_SHARED=1',
],
}, {
'defines': [
'_LARGEFILE_SOURCE',
'_FILE_OFFSET_BITS=64',
],
}],
[ 'OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris"', {
'cflags': [ '-Wall', '-pthread', ],
'cflags_cc': [ '-fno-rtti', '-fno-exceptions' ],
'ldflags': [ '-pthread', ],
'conditions': [
[ 'target_arch=="ia32"', {
'cflags': [ '-m32' ],
'ldflags': [ '-m32' ],
}],
[ 'target_arch=="x64"', {
'cflags': [ '-m64' ],
'ldflags': [ '-m64' ],
}],
[ 'OS=="linux"', {
'ldflags': [ '-rdynamic' ],
}],
[ 'OS=="solaris"', {
'cflags': [ '-pthreads' ],
'ldflags': [ '-pthreads' ],
'cflags!': [ '-pthread' ],
'ldflags!': [ '-pthread' ],
}],
],
}],
['OS=="mac"', {
'defines': ['_DARWIN_USE_64_BIT_INODE=1'],
'xcode_settings': {
'ALWAYS_SEARCH_USER_PATHS': 'NO',
'GCC_CW_ASM_SYNTAX': 'NO', # No -fasm-blocks
'GCC_DYNAMIC_NO_PIC': 'NO', # No -mdynamic-no-pic
# (Equivalent to -fPIC)
'GCC_ENABLE_CPP_EXCEPTIONS': 'NO', # -fno-exceptions
'GCC_ENABLE_CPP_RTTI': 'NO', # -fno-rtti
'GCC_ENABLE_PASCAL_STRINGS': 'NO', # No -mpascal-strings
'GCC_THREADSAFE_STATICS': 'NO', # -fno-threadsafe-statics
'GCC_VERSION': '4.2',
'GCC_WARN_ABOUT_MISSING_NEWLINE': 'YES', # -Wnewline-eof
'PREBINDING': 'NO', # No -Wl,-prebind
'MACOSX_DEPLOYMENT_TARGET': '10.5', # -mmacosx-version-min=10.5
'USE_HEADERMAP': 'NO',
'OTHER_CFLAGS': [
'-fno-strict-aliasing',
],
'WARNING_CFLAGS': [
'-Wall',
'-Wendif-labels',
'-W',
'-Wno-unused-parameter',
],
},
'target_conditions': [
['_type!="static_library"', {
'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-search_paths_first']},
}],
],
'conditions': [
['target_arch=="ia32"', {
'xcode_settings': {'ARCHS': ['i386']},
}],
['target_arch=="x64"', {
'xcode_settings': {'ARCHS': ['x86_64']},
}],
],
}],
],
}
}

View File

@@ -1,2 +0,0 @@
#cmakedefine HAVE_OPENSSL 1
#cmakedefine HAVE_CONFIG_H 1

418
configure vendored
View File

@@ -1,21 +1,407 @@
#! /bin/sh
#!/usr/bin/env python
import optparse
import os
import pprint
import re
import subprocess
import sys
# v8 doesn't like ccache
if [ ! -z "`echo $CC | grep ccache`" ]; then
echo "Error: V8 doesn't like cache. Please set your CC env var to 'gcc'"
echo " (ba)sh: export CC=gcc"
exit 1
fi
CC = os.environ.get('CC', 'cc')
CUR_DIR=$PWD
root_dir = os.path.dirname(__file__)
sys.path.insert(0, os.path.join(root_dir, 'deps', 'v8', 'tools'))
#possible relative path
WORKINGDIR=`dirname $0`
cd "$WORKINGDIR"
#abs path
WORKINGDIR=`pwd`
cd "$CUR_DIR"
# parse our options
parser = optparse.OptionParser()
"${WORKINGDIR}/tools/waf-light" --jobs=1 configure $*
parser.add_option("--debug",
action="store_true",
dest="debug",
help="Also build debug build")
exit $?
parser.add_option("--prefix",
action="store",
dest="prefix",
help="Select the install prefix (defaults to /usr/local)")
parser.add_option("--without-npm",
action="store_true",
dest="without_npm",
help="Don\'t install the bundled npm package manager")
parser.add_option("--without-waf",
action="store_true",
dest="without_waf",
help="Don\'t install node-waf")
parser.add_option("--without-ssl",
action="store_true",
dest="without_ssl",
help="Build without SSL")
parser.add_option("--without-snapshot",
action="store_true",
dest="without_snapshot",
help="Build without snapshotting V8 libraries. You might want to set"
" this for cross-compiling. [Default: False]")
parser.add_option("--shared-v8",
action="store_true",
dest="shared_v8",
help="Link to a shared V8 DLL instead of static linking")
parser.add_option("--shared-v8-includes",
action="store",
dest="shared_v8_includes",
help="Directory containing V8 header files")
parser.add_option("--shared-v8-libpath",
action="store",
dest="shared_v8_libpath",
help="A directory to search for the shared V8 DLL")
parser.add_option("--shared-v8-libname",
action="store",
dest="shared_v8_libname",
help="Alternative lib name to link to (default: 'v8')")
parser.add_option("--openssl-use-sys",
action="store_true",
dest="openssl_use_sys",
help="Use the system OpenSSL instead of one included with Node")
parser.add_option("--openssl-includes",
action="store",
dest="openssl_includes",
help="A directory to search for the OpenSSL includes")
parser.add_option("--openssl-libpath",
action="store",
dest="openssl_libpath",
help="A directory to search for the OpenSSL libraries")
parser.add_option("--no-ssl2",
action="store_true",
dest="no_ssl2",
help="Disable OpenSSL v2")
parser.add_option("--shared-zlib",
action="store_true",
dest="shared_zlib",
help="Link to a shared zlib DLL instead of static linking")
parser.add_option("--shared-zlib-includes",
action="store",
dest="shared_zlib_includes",
help="Directory containing zlib header files")
parser.add_option("--shared-zlib-libpath",
action="store",
dest="shared_zlib_libpath",
help="A directory to search for the shared zlib DLL")
parser.add_option("--shared-zlib-libname",
action="store",
dest="shared_zlib_libname",
help="Alternative lib name to link to (default: 'z')")
parser.add_option("--with-dtrace",
action="store_true",
dest="with_dtrace",
help="Build with DTrace (default is true on supported systems)")
parser.add_option("--without-dtrace",
action="store_true",
dest="without_dtrace",
help="Build without DTrace")
parser.add_option("--with-etw",
action="store_true",
dest="with_etw",
help="Build with ETW (default is true on Windows)")
parser.add_option("--without-etw",
action="store_true",
dest="without_etw",
help="Build without ETW")
# CHECKME does this still work with recent releases of V8?
parser.add_option("--gdb",
action="store_true",
dest="gdb",
help="add gdb support")
parser.add_option("--dest-cpu",
action="store",
dest="dest_cpu",
help="CPU architecture to build for. Valid values are: arm, ia32, x64")
parser.add_option("--no-ifaddrs",
action="store_true",
dest="no_ifaddrs",
help="Use on deprecated SunOS systems that do not support ifaddrs.h")
(options, args) = parser.parse_args()
def b(value):
"""Returns the string 'true' if value is truthy, 'false' otherwise."""
if value:
return 'true'
else:
return 'false'
def pkg_config(pkg):
cmd = os.popen('pkg-config --libs %s' % pkg, 'r')
libs = cmd.readline().strip()
ret = cmd.close()
if (ret): return None
cmd = os.popen('pkg-config --cflags %s' % pkg, 'r')
cflags = cmd.readline().strip()
ret = cmd.close()
if (ret): return None
return (libs, cflags)
def host_arch_cc():
"""Host architecture check using the CC command."""
try:
p = subprocess.Popen(CC.split() + ['-dM', '-E', '-'],
stdin=subprocess.PIPE,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
except OSError:
print '''Node.js configure error: No acceptable C compiler found!
Please make sure you have a C compiler installed on your system and/or
consider adjusting the CC environment variable if you installed
it in a non-standard prefix.
'''
sys.exit()
p.stdin.write('\n')
out = p.communicate()[0]
out = str(out).split('\n')
k = {}
for line in out:
import shlex
lst = shlex.split(line)
if len(lst) > 2:
key = lst[1]
val = lst[2]
k[key] = val
matchup = {
'__x86_64__' : 'x64',
'__i386__' : 'ia32',
'__arm__' : 'arm',
}
rtn = 'ia32' # default
for i in matchup:
if i in k and k[i] != '0':
rtn = matchup[i]
break
return rtn
def host_arch_win():
"""Host architecture check using environ vars (better way to do this?)"""
arch = os.environ.get('PROCESSOR_ARCHITECTURE', 'x86')
matchup = {
'AMD64' : 'x64',
'x86' : 'ia32',
'arm' : 'arm',
}
return matchup.get(arch, 'ia32')
def host_arch():
"""Host architecture. One of arm, ia32 or x64."""
if os.name == 'nt':
arch = host_arch_win()
else:
arch = host_arch_cc()
return arch
def target_arch():
return host_arch()
def compiler_version():
try:
proc = subprocess.Popen(CC.split() + ['-v'], stderr=subprocess.PIPE)
except OSError:
return (False, False, None)
lines = proc.communicate()[1].split('\n')
version_line = None
for i, line in enumerate(lines):
if 'version' in line:
version_line = line
if not version_line:
return (False, False, None)
version = version_line.split("version")[1].strip().split()[0].split(".")
if not version:
return (False, False, None)
return ('LLVM' in version_line, 'clang' in CC, tuple(version))
def configure_node(o):
# TODO add gdb
o['variables']['node_prefix'] = os.path.expanduser(options.prefix or '')
o['variables']['node_install_npm'] = b(not options.without_npm)
o['variables']['node_install_waf'] = b(not options.without_waf)
o['variables']['host_arch'] = host_arch()
o['variables']['target_arch'] = options.dest_cpu or target_arch()
o['default_configuration'] = 'Debug' if options.debug else 'Release'
is_llvm, is_clang, cc_version = compiler_version()
# turn off strict aliasing if gcc < 4.6.0 unless it's llvm-gcc
# see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45883
# see http://code.google.com/p/v8/issues/detail?id=884
o['variables']['strict_aliasing'] = b(is_clang or cc_version >= (4,6,0))
# disable strict aliasing in V8 if we're compiling with gcc 4.5.x,
# it makes V8 crash in various ways
o['variables']['v8_no_strict_aliasing'] = b(
not is_clang and (4,5,0) <= cc_version < (4,6,0))
# clang has always supported -fvisibility=hidden, right?
if not is_clang and cc_version < (4,0,0):
o['variables']['visibility'] = ''
# By default, enable DTrace on SunOS systems. Don't allow it on other
# systems, since it won't work. (The MacOS build process is different than
# SunOS, and we haven't implemented it.)
if sys.platform.startswith('sunos'):
o['variables']['node_use_dtrace'] = b(not options.without_dtrace);
# Strict aliasing causes problems with the V8 snapshots on SunOS
o['variables']['strict_aliasing'] = b(False);
elif b(options.with_dtrace) == 'true':
raise Exception('DTrace is currently only supported on SunOS systems.')
else:
o['variables']['node_use_dtrace'] = 'false'
# By default, enable ETW on Windows.
if sys.platform.startswith('win32'):
o['variables']['node_use_etw'] = b(not options.without_etw);
elif b(options.with_etw) == 'true':
raise Exception('ETW is only supported on Windows.')
else:
o['variables']['node_use_etw'] = 'false'
def configure_libz(o):
o['variables']['node_shared_zlib'] = b(options.shared_zlib)
# assume shared_zlib if one of these is set?
if options.shared_zlib_libpath:
o['libraries'] += ['-L%s' % options.shared_zlib_libpath]
if options.shared_zlib_libname:
o['libraries'] += ['-l%s' % options.shared_zlib_libname]
elif options.shared_zlib:
o['libraries'] += ['-lz']
if options.shared_zlib_includes:
o['include_dirs'] += [options.shared_zlib_includes]
def configure_v8(o):
o['variables']['v8_use_snapshot'] = b(not options.without_snapshot)
o['variables']['node_shared_v8'] = b(options.shared_v8)
# assume shared_v8 if one of these is set?
if options.shared_v8_libpath:
o['libraries'] += ['-L%s' % options.shared_v8_libpath]
if options.shared_v8_libname:
o['libraries'] += ['-l%s' % options.shared_v8_libname]
elif options.shared_v8:
o['libraries'] += ['-lv8']
if options.shared_v8_includes:
o['include_dirs'] += [options.shared_v8_includes]
def configure_openssl(o):
o['variables']['node_use_openssl'] = b(not options.without_ssl)
if options.without_ssl:
return
if options.no_ifaddrs:
o['defines'] += ['SUNOS_NO_IFADDRS']
if options.no_ssl2:
o['defines'] += ['OPENSSL_NO_SSL2=1']
if not options.openssl_use_sys:
o['variables']['node_shared_openssl'] = b(False)
else:
out = pkg_config('openssl')
(libs, cflags) = out if out else ('', '')
if options.openssl_libpath:
o['libraries'] += ['-L%s' % options.openssl_libpath, '-lssl', '-lcrypto']
else:
o['libraries'] += libs.split()
if options.openssl_includes:
o['include_dirs'] += [options.openssl_includes]
else:
o['cflags'] += cflags.split()
o['variables']['node_shared_openssl'] = b(
libs or cflags or options.openssl_libpath or options.openssl_includes)
output = {
'variables': {},
'include_dirs': [],
'libraries': [],
'defines': [],
'cflags': [],
}
configure_node(output)
configure_libz(output)
configure_v8(output)
configure_openssl(output)
# variables should be a root level element,
# move everything else to target_defaults
variables = output['variables']
del output['variables']
output = {
'variables': variables,
'target_defaults': output
}
pprint.pprint(output, indent=2)
def write(filename, data):
filename = os.path.join(root_dir, filename)
print "creating ", filename
f = open(filename, 'w+')
f.write(data)
write('config.gypi', "# Do not edit. Generated by the configure script.\n" +
pprint.pformat(output, indent=2) + "\n")
write('config.mk', "# Do not edit. Generated by the configure script.\n" +
("BUILDTYPE=%s\n" % ('Debug' if options.debug else 'Release')))
if os.name == 'nt':
gyp_args = ['-f', 'msvs', '-G', 'msvs_version=2010']
else:
gyp_args = ['-f', 'make']
subprocess.call([sys.executable, 'tools/gyp_node'] + gyp_args)

View File

@@ -1,5 +1,8 @@
core
tags
*.o
test
test_g
test_fast
*.mk
*.Makefile

4
deps/http_parser/.mailmap vendored Normal file
View File

@@ -0,0 +1,4 @@
# update AUTHORS with:
# git log --all --reverse --format='%aN <%aE>' | perl -ne 'BEGIN{print "# Authors ordered by first contribution.\n"} print unless $h{$_}; $h{$_} = 1' > AUTHORS
Ryan Dahl <ry@tinyclouds.org>
Salman Haq <salman.haq@asti-usa.com>

32
deps/http_parser/AUTHORS vendored Normal file
View File

@@ -0,0 +1,32 @@
# Authors ordered by first contribution.
Ryan Dahl <ry@tinyclouds.org>
Jeremy Hinegardner <jeremy@hinegardner.org>
Sergey Shepelev <temotor@gmail.com>
Joe Damato <ice799@gmail.com>
tomika <tomika_nospam@freemail.hu>
Phoenix Sol <phoenix@burninglabs.com>
Cliff Frey <cliff@meraki.com>
Ewen Cheslack-Postava <ewencp@cs.stanford.edu>
Santiago Gala <sgala@apache.org>
Tim Becker <tim.becker@syngenio.de>
Jeff Terrace <jterrace@gmail.com>
Ben Noordhuis <info@bnoordhuis.nl>
Nathan Rajlich <nathan@tootallnate.net>
Mark Nottingham <mnot@mnot.net>
Aman Gupta <aman@tmm1.net>
Tim Becker <tim.becker@kuriositaet.de>
Sean Cunningham <sean.cunningham@mandiant.com>
Peter Griess <pg@std.in>
Salman Haq <salman.haq@asti-usa.com>
Cliff Frey <clifffrey@gmail.com>
Jon Kolb <jon@b0g.us>
Fouad Mardini <f.mardini@gmail.com>
Paul Querna <pquerna@apache.org>
Felix Geisendörfer <felix@debuggable.com>
koichik <koichik@improvement.jp>
Andre Caron <andre.l.caron@gmail.com>
Ivo Raisr <ivosh@ivosh.net>
James McLaughlin <jamie@lacewing-project.org>
David Gwynne <loki@animata.net>
LE ROUX Thomas <thomas@procheo.fr>
Randy Rizun <rrizun@ortivawireless.com>

View File

@@ -1,2 +0,0 @@
include_directories (.)
add_library (http_parser http_parser.c)

View File

@@ -1,38 +1,50 @@
CPPFLAGS?=-Wall -Wextra -Werror -I.
OPT_DEBUG=$(CPPFLAGS) -O0 -g -DHTTP_PARSER_STRICT=1
OPT_FAST=$(CPPFLAGS) -O3 -DHTTP_PARSER_STRICT=0
CC?=gcc
AR?=ar
CPPFLAGS += -I.
CPPFLAGS_DEBUG = $(CPPFLAGS) -DHTTP_PARSER_STRICT=1 -DHTTP_PARSER_DEBUG=1
CPPFLAGS_DEBUG += $(CPPFLAGS_DEBUG_EXTRA)
CPPFLAGS_FAST = $(CPPFLAGS) -DHTTP_PARSER_STRICT=0 -DHTTP_PARSER_DEBUG=0
CPPFLAGS_FAST += $(CPPFLAGS_FAST_EXTRA)
CFLAGS += -Wall -Wextra -Werror
CFLAGS_DEBUG = $(CFLAGS) -O0 -g $(CFLAGS_DEBUG_EXTRA)
CFLAGS_FAST = $(CFLAGS) -O3 $(CFLAGS_FAST_EXTRA)
CFLAGS_LIB = $(CFLAGS_FAST) -fPIC
test: test_g test_fast
./test_g
./test_fast
test_g: http_parser_g.o test_g.o
$(CC) $(OPT_DEBUG) http_parser_g.o test_g.o -o $@
$(CC) $(CFLAGS_DEBUG) $(LDFLAGS) http_parser_g.o test_g.o -o $@
test_g.o: test.c http_parser.h Makefile
$(CC) $(OPT_DEBUG) -c test.c -o $@
test.o: test.c http_parser.h Makefile
$(CC) $(OPT_FAST) -c test.c -o $@
$(CC) $(CPPFLAGS_DEBUG) $(CFLAGS_DEBUG) -c test.c -o $@
http_parser_g.o: http_parser.c http_parser.h Makefile
$(CC) $(OPT_DEBUG) -c http_parser.c -o $@
$(CC) $(CPPFLAGS_DEBUG) $(CFLAGS_DEBUG) -c http_parser.c -o $@
test_fast: http_parser.o test.o http_parser.h
$(CC) $(CFLAGS_FAST) $(LDFLAGS) http_parser.o test.o -o $@
test.o: test.c http_parser.h Makefile
$(CC) $(CPPFLAGS_FAST) $(CFLAGS_FAST) -c test.c -o $@
http_parser.o: http_parser.c http_parser.h Makefile
$(CC) $(CPPFLAGS_FAST) $(CFLAGS_FAST) -c http_parser.c
test-run-timed: test_fast
while(true) do time ./test_fast > /dev/null; done
test-valgrind: test_g
valgrind ./test_g
http_parser.o: http_parser.c http_parser.h Makefile
$(CC) $(OPT_FAST) -c http_parser.c
libhttp_parser.o: http_parser.c http_parser.h Makefile
$(CC) $(CPPFLAGS_FAST) $(CFLAGS_LIB) -c http_parser.c -o libhttp_parser.o
test_fast: http_parser.o test.c http_parser.h
$(CC) $(OPT_FAST) http_parser.o test.c -o $@
test-run-timed: test_fast
while(true) do time ./test_fast > /dev/null; done
library: libhttp_parser.o
$(CC) -shared -o libhttp_parser.so libhttp_parser.o
package: http_parser.o
$(AR) rcs libhttp_parser.a http_parser.o
@@ -41,6 +53,6 @@ tags: http_parser.c http_parser.h test.c
ctags $^
clean:
rm -f *.o *.a test test_fast test_g http_parser.tar tags
rm -f *.o *.a test test_fast test_g http_parser.tar tags libhttp_parser.so libhttp_parser.o
.PHONY: clean package test-run test-run-timed test-valgrind

View File

@@ -24,7 +24,7 @@ The parser extracts the following information from HTTP messages:
* Response status code
* Transfer-Encoding
* HTTP version
* Request path, query string, fragment
* Request URL
* Message body
@@ -126,7 +126,7 @@ There are two types of callbacks:
* notification `typedef int (*http_cb) (http_parser*);`
Callbacks: on_message_begin, on_headers_complete, on_message_complete.
* data `typedef int (*http_data_cb) (http_parser*, const char *at, size_t length);`
Callbacks: (requests only) on_path, on_query_string, on_uri, on_fragment,
Callbacks: (requests only) on_uri,
(common) on_header_field, on_header_value, on_body;
Callbacks must return 0 on success. Returning a non-zero value indicates
@@ -164,8 +164,15 @@ and apply following logic:
------------------------ ------------ --------------------------------------------
Parsing URLs
------------
A simplistic zero-copy URL parser is provided as `http_parser_parse_url()`.
Users of this library may wish to use it to parse URLs constructed from
consecutive `on_url` callbacks.
See examples of reading in headers:
* [partial example](http://gist.github.com/155877) in C
* [from http-parser tests](http://github.com/ry/http-parser/blob/37a0ff8928fb0d83cec0d0d8909c5a4abcd221af/test.c#L403) in C
* [from Node library](http://github.com/ry/node/blob/842eaf446d2fdcb33b296c67c911c32a0dabc747/src/http.js#L284) in Javascript
* [from http-parser tests](http://github.com/joyent/http-parser/blob/37a0ff8/test.c#L403) in C
* [from Node library](http://github.com/joyent/node/blob/842eaf4/src/http.js#L284) in Javascript

File diff suppressed because it is too large Load Diff

79
deps/http_parser/http_parser.gyp vendored Normal file
View File

@@ -0,0 +1,79 @@
# This file is used with the GYP meta build system.
# http://code.google.com/p/gyp/
# To build try this:
# svn co http://gyp.googlecode.com/svn/trunk gyp
# ./gyp/gyp -f make --depth=`pwd` http_parser.gyp
# ./out/Debug/test
{
'target_defaults': {
'default_configuration': 'Debug',
'configurations': {
# TODO: hoist these out and put them somewhere common, because
# RuntimeLibrary MUST MATCH across the entire project
'Debug': {
'defines': [ 'DEBUG', '_DEBUG' ],
'msvs_settings': {
'VCCLCompilerTool': {
'RuntimeLibrary': 1, # static debug
},
},
},
'Release': {
'defines': [ 'NDEBUG' ],
'msvs_settings': {
'VCCLCompilerTool': {
'RuntimeLibrary': 0, # static release
},
},
}
},
'msvs_settings': {
'VCCLCompilerTool': {
},
'VCLibrarianTool': {
},
'VCLinkerTool': {
'GenerateDebugInformation': 'true',
},
},
'conditions': [
['OS == "win"', {
'defines': [
'WIN32'
],
}]
],
},
'targets': [
{
'target_name': 'http_parser',
'type': 'static_library',
'include_dirs': [ '.' ],
'direct_dependent_settings': {
'include_dirs': [ '.' ],
},
'defines': [ 'HTTP_PARSER_STRICT=0' ],
'sources': [ './http_parser.c', ],
'conditions': [
['OS=="win"', {
'msvs_settings': {
'VCCLCompilerTool': {
# Compile as C++. http_parser.c is actually C99, but C++ is
# close enough in this case.
'CompileAs': 2,
},
},
}]
],
},
{
'target_name': 'test',
'type': 'executable',
'dependencies': [ 'http_parser' ],
'sources': [ 'test.c' ]
}
]
}

View File

@@ -28,7 +28,7 @@ extern "C" {
#define HTTP_PARSER_VERSION_MINOR 0
#include <sys/types.h>
#if defined(_WIN32) && !defined(__MINGW32__)
#if defined(_WIN32) && !defined(__MINGW32__) && (!defined(_MSC_VER) || _MSC_VER<1600)
typedef __int8 int8_t;
typedef unsigned __int8 uint8_t;
typedef __int16 int16_t;
@@ -51,6 +51,13 @@ typedef int ssize_t;
# define HTTP_PARSER_STRICT 1
#endif
/* Compile with -DHTTP_PARSER_DEBUG=1 to add extra debugging information to
* the error reporting facility.
*/
#ifndef HTTP_PARSER_DEBUG
# define HTTP_PARSER_DEBUG 0
#endif
/* Maximium header size allowed */
#define HTTP_MAX_HEADER_SIZE (80*1024)
@@ -78,36 +85,44 @@ typedef int (*http_cb) (http_parser*);
/* Request Methods */
#define HTTP_METHOD_MAP(XX) \
XX(0, DELETE, DELETE) \
XX(1, GET, GET) \
XX(2, HEAD, HEAD) \
XX(3, POST, POST) \
XX(4, PUT, PUT) \
/* pathological */ \
XX(5, CONNECT, CONNECT) \
XX(6, OPTIONS, OPTIONS) \
XX(7, TRACE, TRACE) \
/* webdav */ \
XX(8, COPY, COPY) \
XX(9, LOCK, LOCK) \
XX(10, MKCOL, MKCOL) \
XX(11, MOVE, MOVE) \
XX(12, PROPFIND, PROPFIND) \
XX(13, PROPPATCH, PROPPATCH) \
XX(14, SEARCH, SEARCH) \
XX(15, UNLOCK, UNLOCK) \
/* subversion */ \
XX(16, REPORT, REPORT) \
XX(17, MKACTIVITY, MKACTIVITY) \
XX(18, CHECKOUT, CHECKOUT) \
XX(19, MERGE, MERGE) \
/* upnp */ \
XX(20, MSEARCH, M-SEARCH) \
XX(21, NOTIFY, NOTIFY) \
XX(22, SUBSCRIBE, SUBSCRIBE) \
XX(23, UNSUBSCRIBE, UNSUBSCRIBE) \
/* RFC-5789 */ \
XX(24, PATCH, PATCH) \
XX(25, PURGE, PURGE) \
enum http_method
{ HTTP_DELETE = 0
, HTTP_GET
, HTTP_HEAD
, HTTP_POST
, HTTP_PUT
/* pathological */
, HTTP_CONNECT
, HTTP_OPTIONS
, HTTP_TRACE
/* webdav */
, HTTP_COPY
, HTTP_LOCK
, HTTP_MKCOL
, HTTP_MOVE
, HTTP_PROPFIND
, HTTP_PROPPATCH
, HTTP_UNLOCK
/* subversion */
, HTTP_REPORT
, HTTP_MKACTIVITY
, HTTP_CHECKOUT
, HTTP_MERGE
/* upnp */
, HTTP_MSEARCH
, HTTP_NOTIFY
, HTTP_SUBSCRIBE
, HTTP_UNSUBSCRIBE
/* RFC-5789 */
, HTTP_PATCH
{
#define XX(num, name, string) HTTP_##name = num,
HTTP_METHOD_MAP(XX)
#undef XX
};
@@ -125,29 +140,98 @@ enum flags
};
/* Map for errno-related constants
*
* The provided argument should be a macro that takes 2 arguments.
*/
#define HTTP_ERRNO_MAP(XX) \
/* No error */ \
XX(OK, "success") \
\
/* Callback-related errors */ \
XX(CB_message_begin, "the on_message_begin callback failed") \
XX(CB_url, "the on_url callback failed") \
XX(CB_header_field, "the on_header_field callback failed") \
XX(CB_header_value, "the on_header_value callback failed") \
XX(CB_headers_complete, "the on_headers_complete callback failed") \
XX(CB_body, "the on_body callback failed") \
XX(CB_message_complete, "the on_message_complete callback failed") \
\
/* Parsing-related errors */ \
XX(INVALID_EOF_STATE, "stream ended at an unexpected time") \
XX(HEADER_OVERFLOW, \
"too many header bytes seen; overflow detected") \
XX(CLOSED_CONNECTION, \
"data received after completed connection: close message") \
XX(INVALID_VERSION, "invalid HTTP version") \
XX(INVALID_STATUS, "invalid HTTP status code") \
XX(INVALID_METHOD, "invalid HTTP method") \
XX(INVALID_URL, "invalid URL") \
XX(INVALID_HOST, "invalid host") \
XX(INVALID_PORT, "invalid port") \
XX(INVALID_PATH, "invalid path") \
XX(INVALID_QUERY_STRING, "invalid query string") \
XX(INVALID_FRAGMENT, "invalid fragment") \
XX(LF_EXPECTED, "LF character expected") \
XX(INVALID_HEADER_TOKEN, "invalid character in header") \
XX(INVALID_CONTENT_LENGTH, \
"invalid character in content-length header") \
XX(INVALID_CHUNK_SIZE, \
"invalid character in chunk size header") \
XX(INVALID_CONSTANT, "invalid constant string") \
XX(INVALID_INTERNAL_STATE, "encountered unexpected internal state")\
XX(STRICT, "strict mode assertion failed") \
XX(PAUSED, "parser is paused") \
XX(UNKNOWN, "an unknown error occurred")
/* Define HPE_* values for each errno value above */
#define HTTP_ERRNO_GEN(n, s) HPE_##n,
enum http_errno {
HTTP_ERRNO_MAP(HTTP_ERRNO_GEN)
};
#undef HTTP_ERRNO_GEN
/* Get an http_errno value from an http_parser */
#define HTTP_PARSER_ERRNO(p) ((enum http_errno) (p)->http_errno)
/* Get the line number that generated the current error */
#if HTTP_PARSER_DEBUG
#define HTTP_PARSER_ERRNO_LINE(p) ((p)->error_lineno)
#else
#define HTTP_PARSER_ERRNO_LINE(p) 0
#endif
struct http_parser {
/** PRIVATE **/
unsigned char type : 2;
unsigned char flags : 6; /* F_* values from 'flags' enum; semi-public */
unsigned char state;
unsigned char header_state;
unsigned char index;
unsigned char type : 2; /* enum http_parser_type */
unsigned char flags : 6; /* F_* values from 'flags' enum; semi-public */
unsigned char state; /* enum state from http_parser.c */
unsigned char header_state; /* enum header_state from http_parser.c */
unsigned char index; /* index into current matcher */
uint32_t nread;
int64_t content_length;
uint32_t nread; /* # bytes read in various scenarios */
uint64_t content_length; /* # bytes in body (0 if no Content-Length header) */
/** READ-ONLY **/
unsigned short http_major;
unsigned short http_minor;
unsigned short status_code; /* responses only */
unsigned char method; /* requests only */
unsigned char method; /* requests only */
unsigned char http_errno : 7;
/* 1 = Upgrade header was present and the parser has exited because of that.
* 0 = No upgrade header present.
* Should be checked when http_parser_execute() returns in addition to
* error checking.
*/
char upgrade;
unsigned char upgrade : 1;
#if HTTP_PARSER_DEBUG
uint32_t error_lineno;
#endif
/** PUBLIC **/
void *data; /* A pointer to get hook to the "connection" or "socket" object */
@@ -156,10 +240,7 @@ struct http_parser {
struct http_parser_settings {
http_cb on_message_begin;
http_data_cb on_path;
http_data_cb on_query_string;
http_data_cb on_url;
http_data_cb on_fragment;
http_data_cb on_header_field;
http_data_cb on_header_value;
http_cb on_headers_complete;
@@ -168,6 +249,35 @@ struct http_parser_settings {
};
enum http_parser_url_fields
{ UF_SCHEMA = 0
, UF_HOST = 1
, UF_PORT = 2
, UF_PATH = 3
, UF_QUERY = 4
, UF_FRAGMENT = 5
, UF_MAX = 6
};
/* Result structure for http_parser_parse_url().
*
* Callers should index into field_data[] with UF_* values iff field_set
* has the relevant (1 << UF_*) bit set. As a courtesy to clients (and
* because we probably have padding left over), we convert any port to
* a uint16_t.
*/
struct http_parser_url {
uint16_t field_set; /* Bitmask of (1 << UF_*) values */
uint16_t port; /* Converted UF_PORT string */
struct {
uint16_t off; /* Offset into buffer in which field starts */
uint16_t len; /* Length of run in buffer */
} field_data[UF_MAX];
};
void http_parser_init(http_parser *parser, enum http_parser_type type);
@@ -186,7 +296,21 @@ size_t http_parser_execute(http_parser *parser,
int http_should_keep_alive(http_parser *parser);
/* Returns a string version of the HTTP method. */
const char *http_method_str(enum http_method);
const char *http_method_str(enum http_method m);
/* Return a string name of the given error */
const char *http_errno_name(enum http_errno err);
/* Return a string description of the given error */
const char *http_errno_description(enum http_errno err);
/* Parse a URL; return nonzero on failure */
int http_parser_parse_url(const char *buf, size_t buflen,
int is_connect,
struct http_parser_url *u);
/* Pause or un-pause the parser; a nonzero value pauses */
void http_parser_pause(http_parser *parser, int paused);
#ifdef __cplusplus
}

View File

@@ -44,10 +44,7 @@ struct message {
enum http_parser_type type;
enum http_method method;
int status_code;
char request_path[MAX_ELEMENT_SIZE];
char request_url[MAX_ELEMENT_SIZE];
char fragment[MAX_ELEMENT_SIZE];
char query_string[MAX_ELEMENT_SIZE];
char body[MAX_ELEMENT_SIZE];
size_t body_size;
int num_headers;
@@ -55,7 +52,7 @@ struct message {
char headers [MAX_HEADERS][2][MAX_ELEMENT_SIZE];
int should_keep_alive;
int upgrade;
const char *upgrade; // upgraded body
unsigned short http_major;
unsigned short http_minor;
@@ -86,9 +83,6 @@ const struct message requests[] =
,.http_major= 1
,.http_minor= 1
,.method= HTTP_GET
,.query_string= ""
,.fragment= ""
,.request_path= "/test"
,.request_url= "/test"
,.num_headers= 3
,.headers=
@@ -117,9 +111,6 @@ const struct message requests[] =
,.http_major= 1
,.http_minor= 1
,.method= HTTP_GET
,.query_string= ""
,.fragment= ""
,.request_path= "/favicon.ico"
,.request_url= "/favicon.ico"
,.num_headers= 8
,.headers=
@@ -146,9 +137,6 @@ const struct message requests[] =
,.http_major= 1
,.http_minor= 1
,.method= HTTP_GET
,.query_string= ""
,.fragment= ""
,.request_path= "/dumbfuck"
,.request_url= "/dumbfuck"
,.num_headers= 1
,.headers=
@@ -167,9 +155,6 @@ const struct message requests[] =
,.http_major= 1
,.http_minor= 1
,.method= HTTP_GET
,.query_string= "page=1"
,.fragment= "posts-17408"
,.request_path= "/forums/1/topics/2375"
/* XXX request url does include fragment? */
,.request_url= "/forums/1/topics/2375?page=1#posts-17408"
,.num_headers= 0
@@ -186,9 +171,6 @@ const struct message requests[] =
,.http_major= 1
,.http_minor= 1
,.method= HTTP_GET
,.query_string= ""
,.fragment= ""
,.request_path= "/get_no_headers_no_body/world"
,.request_url= "/get_no_headers_no_body/world"
,.num_headers= 0
,.body= ""
@@ -205,9 +187,6 @@ const struct message requests[] =
,.http_major= 1
,.http_minor= 1
,.method= HTTP_GET
,.query_string= ""
,.fragment= ""
,.request_path= "/get_one_header_no_body"
,.request_url= "/get_one_header_no_body"
,.num_headers= 1
,.headers=
@@ -228,9 +207,6 @@ const struct message requests[] =
,.http_major= 1
,.http_minor= 0
,.method= HTTP_GET
,.query_string= ""
,.fragment= ""
,.request_path= "/get_funky_content_length_body_hello"
,.request_url= "/get_funky_content_length_body_hello"
,.num_headers= 1
,.headers=
@@ -253,9 +229,6 @@ const struct message requests[] =
,.http_major= 1
,.http_minor= 1
,.method= HTTP_POST
,.query_string= "q=search"
,.fragment= "hey"
,.request_path= "/post_identity_body_world"
,.request_url= "/post_identity_body_world?q=search#hey"
,.num_headers= 3
,.headers=
@@ -280,9 +253,6 @@ const struct message requests[] =
,.http_major= 1
,.http_minor= 1
,.method= HTTP_POST
,.query_string= ""
,.fragment= ""
,.request_path= "/post_chunked_all_your_base"
,.request_url= "/post_chunked_all_your_base"
,.num_headers= 1
,.headers=
@@ -306,9 +276,6 @@ const struct message requests[] =
,.http_major= 1
,.http_minor= 1
,.method= HTTP_POST
,.query_string= ""
,.fragment= ""
,.request_path= "/two_chunks_mult_zero_end"
,.request_url= "/two_chunks_mult_zero_end"
,.num_headers= 1
,.headers=
@@ -334,9 +301,6 @@ const struct message requests[] =
,.http_major= 1
,.http_minor= 1
,.method= HTTP_POST
,.query_string= ""
,.fragment= ""
,.request_path= "/chunked_w_trailing_headers"
,.request_url= "/chunked_w_trailing_headers"
,.num_headers= 3
,.headers=
@@ -362,9 +326,6 @@ const struct message requests[] =
,.http_major= 1
,.http_minor= 1
,.method= HTTP_POST
,.query_string= ""
,.fragment= ""
,.request_path= "/chunked_w_bullshit_after_length"
,.request_url= "/chunked_w_bullshit_after_length"
,.num_headers= 1
,.headers=
@@ -382,9 +343,6 @@ const struct message requests[] =
,.http_major= 1
,.http_minor= 1
,.method= HTTP_GET
,.query_string= "foo=\"bar\""
,.fragment= ""
,.request_path= "/with_\"stupid\"_quotes"
,.request_url= "/with_\"stupid\"_quotes?foo=\"bar\""
,.num_headers= 0
,.headers= { }
@@ -408,9 +366,6 @@ const struct message requests[] =
,.http_major= 1
,.http_minor= 0
,.method= HTTP_GET
,.query_string= ""
,.fragment= ""
,.request_path= "/test"
,.request_url= "/test"
,.num_headers= 3
,.headers= { { "Host", "0.0.0.0:5000" }
@@ -431,9 +386,6 @@ const struct message requests[] =
,.http_major= 1
,.http_minor= 1
,.method= HTTP_GET
,.query_string= "foo=bar?baz"
,.fragment= ""
,.request_path= "/test.cgi"
,.request_url= "/test.cgi?foo=bar?baz"
,.num_headers= 0
,.headers= {}
@@ -452,9 +404,6 @@ const struct message requests[] =
,.http_major= 1
,.http_minor= 1
,.method= HTTP_GET
,.query_string= ""
,.fragment= ""
,.request_path= "/test"
,.request_url= "/test"
,.num_headers= 0
,.headers= { }
@@ -473,17 +422,15 @@ const struct message requests[] =
"Sec-WebSocket-Key1: 4 @1 46546xW%0l 1 5\r\n"
"Origin: http://example.com\r\n"
"\r\n"
"Hot diggity dogg"
,.should_keep_alive= TRUE
,.message_complete_on_eof= FALSE
,.http_major= 1
,.http_minor= 1
,.method= HTTP_GET
,.query_string= ""
,.fragment= ""
,.request_path= "/demo"
,.request_url= "/demo"
,.num_headers= 7
,.upgrade=1
,.upgrade="Hot diggity dogg"
,.headers= { { "Host", "example.com" }
, { "Connection", "Upgrade" }
, { "Sec-WebSocket-Key2", "12998 5 Y3 1 .P00" }
@@ -502,17 +449,16 @@ const struct message requests[] =
"User-agent: Mozilla/1.1N\r\n"
"Proxy-authorization: basic aGVsbG86d29ybGQ=\r\n"
"\r\n"
"some data\r\n"
"and yet even more data"
,.should_keep_alive= FALSE
,.message_complete_on_eof= FALSE
,.http_major= 1
,.http_minor= 0
,.method= HTTP_CONNECT
,.query_string= ""
,.fragment= ""
,.request_path= ""
,.request_url= "0-home0.netscape.com:443"
,.num_headers= 2
,.upgrade=1
,.upgrade="some data\r\nand yet even more data"
,.headers= { { "User-agent", "Mozilla/1.1N" }
, { "Proxy-authorization", "basic aGVsbG86d29ybGQ=" }
}
@@ -529,9 +475,6 @@ const struct message requests[] =
,.http_major= 1
,.http_minor= 1
,.method= HTTP_REPORT
,.query_string= ""
,.fragment= ""
,.request_path= "/test"
,.request_url= "/test"
,.num_headers= 0
,.headers= {}
@@ -548,9 +491,6 @@ const struct message requests[] =
,.http_major= 0
,.http_minor= 9
,.method= HTTP_GET
,.query_string= ""
,.fragment= ""
,.request_path= "/"
,.request_url= "/"
,.num_headers= 0
,.headers= {}
@@ -570,9 +510,6 @@ const struct message requests[] =
,.http_major= 1
,.http_minor= 1
,.method= HTTP_MSEARCH
,.query_string= ""
,.fragment= ""
,.request_path= "*"
,.request_url= "*"
,.num_headers= 3
,.headers= { { "HOST", "239.255.255.250:1900" }
@@ -582,6 +519,32 @@ const struct message requests[] =
,.body= ""
}
#define LINE_FOLDING_IN_HEADER 20
, {.name= "line folding in header value"
,.type= HTTP_REQUEST
,.raw= "GET / HTTP/1.1\r\n"
"Line1: abc\r\n"
"\tdef\r\n"
" ghi\r\n"
"\t\tjkl\r\n"
" mno \r\n"
"\t \tqrs\r\n"
"Line2: \t line2\t\r\n"
"\r\n"
,.should_keep_alive= TRUE
,.message_complete_on_eof= FALSE
,.http_major= 1
,.http_minor= 1
,.method= HTTP_GET
,.request_url= "/"
,.num_headers= 2
,.headers= { { "Line1", "abcdefghijklmno qrs" }
, { "Line2", "line2\t" }
}
,.body= ""
}
#define QUERY_TERMINATED_HOST 21
, {.name= "host terminated by a query string"
,.type= HTTP_REQUEST
@@ -592,9 +555,6 @@ const struct message requests[] =
,.http_major= 1
,.http_minor= 1
,.method= HTTP_GET
,.query_string= "hail=all"
,.fragment= ""
,.request_path= ""
,.request_url= "http://hypnotoad.org?hail=all"
,.num_headers= 0
,.headers= { }
@@ -611,9 +571,6 @@ const struct message requests[] =
,.http_major= 1
,.http_minor= 1
,.method= HTTP_GET
,.query_string= "hail=all"
,.fragment= ""
,.request_path= ""
,.request_url= "http://hypnotoad.org:1234?hail=all"
,.num_headers= 0
,.headers= { }
@@ -630,9 +587,6 @@ const struct message requests[] =
,.http_major= 1
,.http_minor= 1
,.method= HTTP_GET
,.query_string= ""
,.fragment= ""
,.request_path= ""
,.request_url= "http://hypnotoad.org:1234"
,.num_headers= 0
,.headers= { }
@@ -651,9 +605,6 @@ const struct message requests[] =
,.http_major= 1
,.http_minor= 1
,.method= HTTP_GET
,.query_string= "q=1"
,.fragment= "narf"
,.request_path= "/δ¶/δt/pope"
,.request_url= "/δ¶/δt/pope?q=1#narf"
,.num_headers= 1
,.headers= { {"Host", "github.com" }
@@ -673,12 +624,9 @@ const struct message requests[] =
,.http_major= 1
,.http_minor= 0
,.method= HTTP_CONNECT
,.query_string= ""
,.fragment= ""
,.request_path= ""
,.request_url= "home_0.netscape.com:443"
,.num_headers= 2
,.upgrade=1
,.upgrade=""
,.headers= { { "User-agent", "Mozilla/1.1N" }
, { "Proxy-authorization", "basic aGVsbG86d29ybGQ=" }
}
@@ -701,12 +649,8 @@ const struct message requests[] =
,.http_major= 1
,.http_minor= 1
,.method= HTTP_PATCH
,.query_string= ""
,.fragment= ""
,.request_path= "/file.txt"
,.request_url= "/file.txt"
,.num_headers= 4
,.upgrade=0
,.headers= { { "Host", "www.example.com" }
, { "Content-Type", "application/example" }
, { "If-Match", "\"e0023aa4e\"" }
@@ -715,6 +659,27 @@ const struct message requests[] =
,.body= "cccccccccc"
}
#define CONNECT_CAPS_REQUEST 27
, {.name = "connect caps request"
,.type= HTTP_REQUEST
,.raw= "CONNECT HOME0.NETSCAPE.COM:443 HTTP/1.0\r\n"
"User-agent: Mozilla/1.1N\r\n"
"Proxy-authorization: basic aGVsbG86d29ybGQ=\r\n"
"\r\n"
,.should_keep_alive= FALSE
,.message_complete_on_eof= FALSE
,.http_major= 1
,.http_minor= 0
,.method= HTTP_CONNECT
,.request_url= "HOME0.NETSCAPE.COM:443"
,.num_headers= 2
,.upgrade=""
,.headers= { { "User-agent", "Mozilla/1.1N" }
, { "Proxy-authorization", "basic aGVsbG86d29ybGQ=" }
}
,.body= ""
}
, {.name= NULL } /* sentinel */
};
@@ -1076,17 +1041,25 @@ const struct message responses[] =
,.body= ""
}
#define HTTP_VERSION_0_9 12
/* Should handle HTTP/0.9 */
, {.name= "http version 0.9"
,.type= HTTP_RESPONSE
,.raw= "HTTP/0.9 200 OK\r\n"
"\r\n"
,.should_keep_alive= FALSE
,.message_complete_on_eof= TRUE
,.http_major= 0
,.http_minor= 9
,.status_code= 200
,.num_headers= 0
,.headers=
{}
,.body= ""
}
, {.name= NULL } /* sentinel */
};
int
request_path_cb (http_parser *p, const char *buf, size_t len)
{
assert(p == parser);
strncat(messages[num_messages].request_path, buf, len);
return 0;
}
};
int
request_url_cb (http_parser *p, const char *buf, size_t len)
@@ -1096,22 +1069,6 @@ request_url_cb (http_parser *p, const char *buf, size_t len)
return 0;
}
int
query_string_cb (http_parser *p, const char *buf, size_t len)
{
assert(p == parser);
strncat(messages[num_messages].query_string, buf, len);
return 0;
}
int
fragment_cb (http_parser *p, const char *buf, size_t len)
{
assert(p == parser);
strncat(messages[num_messages].fragment, buf, len);
return 0;
}
int
header_field_cb (http_parser *p, const char *buf, size_t len)
{
@@ -1205,10 +1162,7 @@ static http_parser_settings settings =
{.on_message_begin = message_begin_cb
,.on_header_field = header_field_cb
,.on_header_value = header_value_cb
,.on_path = request_path_cb
,.on_url = request_url_cb
,.on_fragment = fragment_cb
,.on_query_string = query_string_cb
,.on_body = body_cb
,.on_headers_complete = headers_complete_cb
,.on_message_complete = message_complete_cb
@@ -1218,10 +1172,7 @@ static http_parser_settings settings_count_body =
{.on_message_begin = message_begin_cb
,.on_header_field = header_field_cb
,.on_header_value = header_value_cb
,.on_path = request_path_cb
,.on_url = request_url_cb
,.on_fragment = fragment_cb
,.on_query_string = query_string_cb
,.on_body = count_body_cb
,.on_headers_complete = headers_complete_cb
,.on_message_complete = message_complete_cb
@@ -1231,10 +1182,7 @@ static http_parser_settings settings_null =
{.on_message_begin = 0
,.on_header_field = 0
,.on_header_value = 0
,.on_path = 0
,.on_url = 0
,.on_fragment = 0
,.on_query_string = 0
,.on_body = 0
,.on_headers_complete = 0
,.on_message_complete = 0
@@ -1284,7 +1232,13 @@ check_str_eq (const struct message *m,
const char *prop,
const char *expected,
const char *found) {
if (0 != strcmp(expected, found)) {
if ((expected == NULL) != (found == NULL)) {
printf("\n*** Error: %s in '%s' ***\n\n", prop, m->name);
printf("expected %s\n", (expected == NULL) ? "NULL" : expected);
printf(" found %s\n", (found == NULL) ? "NULL" : found);
return 0;
}
if (expected != NULL && 0 != strcmp(expected, found)) {
printf("\n*** Error: %s in '%s' ***\n\n", prop, m->name);
printf("expected '%s'\n", expected);
printf(" found '%s'\n", found);
@@ -1337,9 +1291,6 @@ message_eq (int index, const struct message *expected)
assert(m->message_complete_cb_called);
MESSAGE_CHECK_STR_EQ(expected, m, request_path);
MESSAGE_CHECK_STR_EQ(expected, m, query_string);
MESSAGE_CHECK_STR_EQ(expected, m, fragment);
MESSAGE_CHECK_STR_EQ(expected, m, request_url);
if (expected->body_size) {
MESSAGE_CHECK_NUM_EQ(expected, m, body_size);
@@ -1357,13 +1308,81 @@ message_eq (int index, const struct message *expected)
if (!r) return 0;
}
MESSAGE_CHECK_STR_EQ(expected, m, upgrade);
return 1;
}
/* Given a sequence of varargs messages, return the number of them that the
* parser should successfully parse, taking into account that upgraded
* messages prevent all subsequent messages from being parsed.
*/
size_t
count_parsed_messages(const size_t nmsgs, ...) {
size_t i;
va_list ap;
va_start(ap, nmsgs);
for (i = 0; i < nmsgs; i++) {
struct message *m = va_arg(ap, struct message *);
if (m->upgrade) {
va_end(ap);
return i + 1;
}
}
va_end(ap);
return nmsgs;
}
/* Given a sequence of bytes and the number of these that we were able to
* parse, verify that upgrade bodies are correct.
*/
void
upgrade_message_fix(char *body, const size_t nread, const size_t nmsgs, ...) {
va_list ap;
size_t i;
size_t off = 0;
va_start(ap, nmsgs);
for (i = 0; i < nmsgs; i++) {
struct message *m = va_arg(ap, struct message *);
off += strlen(m->raw);
if (m->upgrade) {
off -= strlen(m->upgrade);
/* Check the portion of the response after its specified upgrade */
if (!check_str_eq(m, "upgrade", body + off, body + nread)) {
exit(1);
}
/* Fix up the response so that message_eq() will verify the beginning
* of the upgrade */
*(body + nread + strlen(m->upgrade)) = '\0';
messages[num_messages -1 ].upgrade = body + nread;
va_end(ap);
return;
}
}
va_end(ap);
printf("\n\n*** Error: expected a message with upgrade ***\n");
exit(1);
}
static void
print_error (const char *raw, size_t error_location)
{
fprintf(stderr, "\n*** parse error ***\n\n");
fprintf(stderr, "\n*** %s:%d -- %s ***\n\n",
"http_parser.c", HTTP_PARSER_ERRNO_LINE(parser),
http_errno_description(HTTP_PARSER_ERRNO(parser)));
int this_line = 0, char_len = 0;
size_t i, j, len = strlen(raw), error_location_line = 0;
@@ -1418,7 +1437,10 @@ test_message (const struct message *message)
if (msg1len) {
read = parse(msg1, msg1len);
if (message->upgrade && parser->upgrade) goto test;
if (message->upgrade && parser->upgrade) {
messages[num_messages - 1].upgrade = msg1 + read;
goto test;
}
if (read != msg1len) {
print_error(msg1, read);
@@ -1429,7 +1451,10 @@ test_message (const struct message *message)
read = parse(msg2, msg2len);
if (message->upgrade && parser->upgrade) goto test;
if (message->upgrade && parser->upgrade) {
messages[num_messages - 1].upgrade = msg2 + read;
goto test;
}
if (read != msg2len) {
print_error(msg2, read);
@@ -1438,8 +1463,6 @@ test_message (const struct message *message)
read = parse(NULL, 0);
if (message->upgrade && parser->upgrade) goto test;
if (read != 0) {
print_error(message->raw, read);
exit(1);
@@ -1495,21 +1518,32 @@ test_message_count_body (const struct message *message)
}
void
test_simple (const char *buf, int should_pass)
test_simple (const char *buf, enum http_errno err_expected)
{
parser_init(HTTP_REQUEST);
size_t parsed;
int pass;
enum http_errno err;
parsed = parse(buf, strlen(buf));
pass = (parsed == strlen(buf));
err = HTTP_PARSER_ERRNO(parser);
parsed = parse(NULL, 0);
pass &= (parsed == 0);
parser_free();
if (pass != should_pass) {
fprintf(stderr, "\n*** test_simple expected %s ***\n\n%s", should_pass ? "success" : "error", buf);
/* In strict mode, allow us to pass with an unexpected HPE_STRICT as
* long as the caller isn't expecting success.
*/
#if HTTP_PARSER_STRICT
if (err_expected != err && err_expected != HPE_OK && err != HPE_STRICT) {
#else
if (err_expected != err) {
#endif
fprintf(stderr, "\n*** test_simple expected %s, but saw %s ***\n\n%s\n",
http_errno_name(err_expected), http_errno_name(err), buf);
exit(1);
}
}
@@ -1526,10 +1560,14 @@ test_header_overflow_error (int req)
assert(parsed == strlen(buf));
buf = "header-key: header-value\r\n";
size_t buflen = strlen(buf);
int i;
for (i = 0; i < 10000; i++) {
if (http_parser_execute(&parser, &settings_null, buf, strlen(buf)) != strlen(buf)) {
parsed = http_parser_execute(&parser, &settings_null, buf, buflen);
if (parsed != buflen) {
//fprintf(stderr, "error found on iter %d\n", i);
assert(HTTP_PARSER_ERRNO(&parser) == HPE_HEADER_OVERFLOW);
return;
}
}
@@ -1574,12 +1612,7 @@ test_no_overflow_long_body (int req, size_t length)
void
test_multiple3 (const struct message *r1, const struct message *r2, const struct message *r3)
{
int message_count = 1;
if (!r1->upgrade) {
message_count++;
if (!r2->upgrade) message_count++;
}
int has_upgrade = (message_count < 3 || r3->upgrade);
int message_count = count_parsed_messages(3, r1, r2, r3);
char total[ strlen(r1->raw)
+ strlen(r2->raw)
@@ -1598,7 +1631,10 @@ test_multiple3 (const struct message *r1, const struct message *r2, const struct
read = parse(total, strlen(total));
if (has_upgrade && parser->upgrade) goto test;
if (parser->upgrade) {
upgrade_message_fix(total, read, 3, r1, r2, r3);
goto test;
}
if (read != strlen(total)) {
print_error(total, read);
@@ -1607,8 +1643,6 @@ test_multiple3 (const struct message *r1, const struct message *r2, const struct
read = parse(NULL, 0);
if (has_upgrade && parser->upgrade) goto test;
if (read != 0) {
print_error(total, read);
exit(1);
@@ -1622,12 +1656,8 @@ test:
}
if (!message_eq(0, r1)) exit(1);
if (message_count > 1) {
if (!message_eq(1, r2)) exit(1);
if (message_count > 2) {
if (!message_eq(2, r3)) exit(1);
}
}
if (message_count > 1 && !message_eq(1, r2)) exit(1);
if (message_count > 2 && !message_eq(2, r3)) exit(1);
parser_free();
}
@@ -1656,6 +1686,7 @@ test_scan (const struct message *r1, const struct message *r2, const struct mess
int ops = 0 ;
size_t buf1_len, buf2_len, buf3_len;
int message_count = count_parsed_messages(3, r1, r2, r3);
int i,j,type_both;
for (type_both = 0; type_both < 2; type_both ++ ) {
@@ -1684,27 +1715,27 @@ test_scan (const struct message *r1, const struct message *r2, const struct mess
read = parse(buf1, buf1_len);
if (r3->upgrade && parser->upgrade) goto test;
if (parser->upgrade) goto test;
if (read != buf1_len) {
print_error(buf1, read);
goto error;
}
read = parse(buf2, buf2_len);
read += parse(buf2, buf2_len);
if (r3->upgrade && parser->upgrade) goto test;
if (parser->upgrade) goto test;
if (read != buf2_len) {
if (read != buf1_len + buf2_len) {
print_error(buf2, read);
goto error;
}
read = parse(buf3, buf3_len);
read += parse(buf3, buf3_len);
if (r3->upgrade && parser->upgrade) goto test;
if (parser->upgrade) goto test;
if (read != buf3_len) {
if (read != buf1_len + buf2_len + buf3_len) {
print_error(buf3, read);
goto error;
}
@@ -1712,9 +1743,13 @@ test_scan (const struct message *r1, const struct message *r2, const struct mess
parse(NULL, 0);
test:
if (parser->upgrade) {
upgrade_message_fix(total, read, 3, r1, r2, r3);
}
if (3 != num_messages) {
fprintf(stderr, "\n\nParser didn't see 3 messages only %d\n", num_messages);
if (message_count != num_messages) {
fprintf(stderr, "\n\nParser didn't see %d messages only %d\n",
message_count, num_messages);
goto error;
}
@@ -1723,12 +1758,12 @@ test:
goto error;
}
if (!message_eq(1, r2)) {
if (message_count > 1 && !message_eq(1, r2)) {
fprintf(stderr, "\n\nError matching messages[1] in test_scan.\n");
goto error;
}
if (!message_eq(2, r3)) {
if (message_count > 2 && !message_eq(2, r3)) {
fprintf(stderr, "\n\nError matching messages[2] in test_scan.\n");
goto error;
}
@@ -1868,13 +1903,13 @@ main (void)
/// REQUESTS
test_simple("hello world", 0);
test_simple("GET / HTP/1.1\r\n\r\n", 0);
test_simple("hello world", HPE_INVALID_METHOD);
test_simple("GET / HTP/1.1\r\n\r\n", HPE_INVALID_VERSION);
test_simple("ASDF / HTTP/1.1\r\n\r\n", 0);
test_simple("PROPPATCHA / HTTP/1.1\r\n\r\n", 0);
test_simple("GETA / HTTP/1.1\r\n\r\n", 0);
test_simple("ASDF / HTTP/1.1\r\n\r\n", HPE_INVALID_METHOD);
test_simple("PROPPATCHA / HTTP/1.1\r\n\r\n", HPE_INVALID_METHOD);
test_simple("GETA / HTTP/1.1\r\n\r\n", HPE_INVALID_METHOD);
// Well-formed but incomplete
test_simple("GET / HTTP/1.1\r\n"
@@ -1882,7 +1917,7 @@ main (void)
"Content-Length: 6\r\n"
"\r\n"
"fooba",
0);
HPE_OK);
static const char *all_methods[] = {
"DELETE",
@@ -1900,12 +1935,31 @@ main (void)
"PROPFIND",
"PROPPATCH",
"UNLOCK",
"REPORT",
"MKACTIVITY",
"CHECKOUT",
"MERGE",
"M-SEARCH",
"NOTIFY",
"SUBSCRIBE",
"UNSUBSCRIBE",
"PATCH",
0 };
const char **this_method;
for (this_method = all_methods; *this_method; this_method++) {
char buf[200];
sprintf(buf, "%s / HTTP/1.1\r\n\r\n", *this_method);
test_simple(buf, 1);
test_simple(buf, HPE_OK);
}
static const char *bad_methods[] = {
"C******",
"M****",
0 };
for (this_method = bad_methods; *this_method; this_method++) {
char buf[200];
sprintf(buf, "%s / HTTP/1.1\r\n\r\n", *this_method);
test_simple(buf, HPE_UNKNOWN);
}
const char *dumbfuck2 =
@@ -1943,7 +1997,7 @@ main (void)
"\tRA==\r\n"
"\t-----END CERTIFICATE-----\r\n"
"\r\n";
test_simple(dumbfuck2, 0);
test_simple(dumbfuck2, HPE_OK);
#if 0
// NOTE(Wed Nov 18 11:57:27 CET 2009) this seems okay. we just read body

20
deps/npm/.npmignore vendored Normal file
View File

@@ -0,0 +1,20 @@
*.swp
npm-debug.log
/test/bin
/test/output.log
/test/packages/*/node_modules
/test/packages/npm-test-depends-on-spark/which-spark.log
/test/packages/test-package/random-data.txt
/test/root
/node_modules/ronn
/node_modules/tap
/node_modules/.bin
/npmrc
/release/
# don't need these in the npm package.
html/*.png
# don't ignore .npmignore files
# these are used in some tests.
!.npmignore

4
deps/npm/.travis.yml vendored Normal file
View File

@@ -0,0 +1,4 @@
language: node_js
before_install: "make &>out || cat out; rm out"
node_js:
- 0.6

71
deps/npm/AUTHORS vendored Normal file
View File

@@ -0,0 +1,71 @@
# Authors sorted by whether or not they're me
Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)
Steve Steiner <ssteinerX@gmail.com> (http://websaucesoftware.com/blog/)
Mikeal Rogers <mikeal.rogers@gmail.com> (http://www.mikealrogers.com/)
Aaron Blohowiak <aaron.blohowiak@gmail.com> (http://aaronblohowiak.com/)
Martyn Smith <martyn@dollyfish.net.nz> (http://dollyfish.net.nz/)
Mathias Pettersson <mape@mape.me> (http://mape.me/)
Brian Hammond <brian@fictorial.com> (http://fictorial.com/)
Charlie Robbins <charlie.robbins@gmail.com> (http://www.charlierobbins.com/)
Francisco Treacy <francisco.treacy@gmail.com> (http://franciscotreacy.com/)
Cliffano Subagio <cliffano@gmail.com> (http://blog.cliffano.com/)
Christian Eager <christian.eager@nokia.com> (http://perpenduum.com)
Dav Glass <davglass@gmail.com> (http://blog.davglass.com)
Alex K. Wolfe <alexkwolfe@gmail.com>
James Sanders <jimmyjazz14@gmail.com> (http://james-sanders.com/)
Reid Burke <me@reidburke.com> (http://reidburke.com/)
Arlo Breault <arlolra@gmail.com> (http://thoughtherder.com/)
Timo Derstappen <teemow@gmail.com> (http://teemow.com)
Bradley Meck <bradley.meck@gmail.com>
Bart Teeuwisse <bart.teeuwisse@thecodemill.biz> (http://thecodemill.biz/)
Ben Noordhuis <info@bnoordhuis.nl> (http://bnoordhuis.nl/)
Tor Valamo <tor.valamo@gmail.com> (http://www.magnimedia.no/)
Whyme.Lyu <5longluna@gmail.com> (http://whyme.kuantu.com/)
Olivier Melcher <olivier.melcher@gmail.com>
Tomaž Muraus <kami@k5-storitve.net> (http://www.tomaz-muraus.info)
Evan Meagher <evan.meagher@gmail.com> (http://evanmeagher.net/)
Orlando Vazquez <ovazquez@gmail.com> (http://2wycked.net/)
George Miroshnykov <gmiroshnykov@lohika.com>
Geoff Flarity (http://ca.linkedin.com/pub/geoff-flarity/a/536/43a)
Pete Kruckenberg <pete@kruckenberg.com>
Laurie Harper <laurie@holoweb.net> (http://laurie.holoweb.net/)
Chris Wong <chris@chriswongstudio.com>
Max Goodman <c@chromacode.com> (http://chromacode.com/)
Scott Bronson <brons_github@rinspin.com>
Federico Romero <federomero@gmail.com>
Visnu Pitiyanuvath <visnupx@gmail.com> (http://visnup.com)
Irakli Gozalishvili <rfobic@gmail.com> (http://jeditoolkit.com/)
Mark Cahill <mark@tiemonster.info> (http://www.tiemonster.info/)
Zearin <zearin@gonk.net>
Iain Sproat <iainsproat@gmail.com>
Trent Mick <trentm@gmail.com> (http://trentm.com/)
Felix Geisendörfer <felix@debuggable.com> (http://www.debuggable.com/)
Conny Brunnkvist <cbrunnkvist@gmail.com> (http://twitter.com/connyb)
Will Elwood <w.elwood08@gmail.com> (https://github.com/welwood08)
Oleg Efimov <efimovov@gmail.com> (http://sannis.ru)
Martin Cooper <mfncooper@gmail.com>
Jameson Little <t.jameson.little@gmail.com>
cspotcode <cspotcode@gmail.com>
Maciej Małecki <maciej.malecki@notimplemented.org>
Stephen Sugden <glurgle@gmail.com>
Gautham Pai <buzypi@gmail.com>
David Trejo <david.daniel.trejo@gmail.com>
Paul Vorbach <paul@vorb.de>
George Ornbo <george@shapeshed.com>
Tim Oxley <secoif@gmail.com>
Tyler Green <tyler.green2@gmail.com>
atomizer <danila.gerasimov@gmail.com>
Rod Vagg <rod@vagg.org>
Christian Howe <coderarity@gmail.com>
Andrew Lunny <alunny@gmail.com>
Henrik Hodne <dvyjones@binaryhex.com>
Adam Blackburn <regality@gmail.com>
Kris Windham <kriswindham@gmail.com>
Jens Grunert <jens.grunert@gmail.com>
Joost-Wim Boekesteijn <joost-wim@boekesteijn.nl>
Dalmais Maxence <github@maxired.fr>
Marcus Ekwall <marcus.ekwall@gmail.com>
Aaron Stacy <aaron.r.stacy@gmail.com>
Phillip Howell <phowell@cothm.org>
Domenic Denicola <domenic@domenicdenicola.com>
James Halliday <mail@substack.net>

64
deps/npm/LICENSE vendored Normal file
View File

@@ -0,0 +1,64 @@
Copyright 2009-2012, Isaac Z. Schlueter (the "Original Author")
All rights reserved.
MIT +no-false-attribs License
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
Distributions of all or part of the Software intended to be used
by the recipients as they would use the unmodified Software,
containing modifications that substantially alter, remove, or
disable functionality of the Software, outside of the documented
configuration mechanisms provided by the Software, shall be
modified such that the Original Author's bug reporting email
addresses and urls are either replaced with the contact information
of the parties responsible for the changes, or removed entirely.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
Except where noted, this license applies to any and all software
programs and associated documentation files created by the
Original Author, when distributed with the Software.
"Node.js" and "node" trademark Joyent, Inc. npm is not officially
part of the Node.js project, and is neither owned by nor
officially affiliated with Joyent, Inc.
Packages published in the npm registry are not part of npm
itself, are the sole property of their respective maintainers,
and are not covered by this license.
"npm Logo" created by Mathias Pettersson and Brian Hammond,
used with permission.
"Gubblebum Blocky" font
Copyright (c) 2007 by Tjarda Koster, http://jelloween.deviantart.com
included for use in the npm website and documentation,
used with permission.
This program uses "node-uuid", Copyright (c) 2010 Robert Kieffer,
according to the terms of the MIT license.
This program uses "request", Copyright (c) 2011 Mikeal Rogers,
according to the terms of the Apache license.
This program uses "mkdirp", Copyright (c) 2010 James Halliday,
according to the terms of the MIT/X11 license.

136
deps/npm/Makefile vendored Normal file
View File

@@ -0,0 +1,136 @@
SHELL = bash
markdowns = $(shell find doc -name '*.md' | grep -v 'index') README.md
cli_mandocs = $(shell find doc/cli -name '*.md' \
|sed 's|.md|.1|g' \
|sed 's|doc/cli/|man/man1/|g' ) \
man/man1/README.1 \
man/man1/index.1
api_mandocs = $(shell find doc/api -name '*.md' \
|sed 's|.md|.3|g' \
|sed 's|doc/api/|man/man3/|g' )
cli_htmldocs = $(shell find doc/cli -name '*.md' \
|grep -v 'index.md' \
|sed 's|.md|.html|g' \
|sed 's|doc/cli/|html/doc/|g' ) \
html/doc/README.html \
html/doc/index.html
api_htmldocs = $(shell find doc/api -name '*.md' \
|sed 's|.md|.html|g' \
|sed 's|doc/api/|html/api/|g' )
mandocs = $(api_mandocs) $(cli_mandocs)
htmldocs = $(api_htmldocs) $(cli_htmldocs)
all: doc
latest:
@echo "Installing latest published npm"
@echo "Use 'make install' or 'make link' to install the code"
@echo "in this folder that you're looking at right now."
node cli.js install -g -f npm
install: all
node cli.js install -g -f
# backwards compat
dev: install
link: uninstall
node cli.js link -f
clean: doc-clean uninstall
rm npmrc
node cli.js cache clean
uninstall:
node cli.js rm npm -g -f
doc: $(mandocs) $(htmldocs)
docclean: doc-clean
doc-clean:
rm -rf \
node_modules/ronn \
node_modules/.bin/ronn \
.building_ronn \
doc/cli/index.md \
doc/api/index.md \
$(api_mandocs) \
$(cli_mandocs) \
$(api_htmldocs) \
$(cli_htmldocs) \
&>/dev/null || true
# use `npm install ronn` for this to work.
man/man1/README.1: README.md scripts/doc-build.sh package.json
scripts/doc-build.sh $< $@
man/man1/%.1: doc/cli/%.md scripts/doc-build.sh package.json
@[ -d man/man1 ] || mkdir -p man/man1
scripts/doc-build.sh $< $@
man/man3/%.3: doc/api/%.md scripts/doc-build.sh package.json
@[ -d man/man3 ] || mkdir -p man/man3
scripts/doc-build.sh $< $@
html/doc/README.html: README.md html/dochead.html html/docfoot.html scripts/doc-build.sh package.json
scripts/doc-build.sh $< $@
html/doc/%.html: doc/cli/%.md html/dochead.html html/docfoot.html scripts/doc-build.sh package.json
scripts/doc-build.sh $< $@
html/api/%.html: doc/api/%.md html/dochead.html html/docfoot.html scripts/doc-build.sh package.json
scripts/doc-build.sh $< $@
doc/cli/index.md: $(markdowns) scripts/index-build.js scripts/doc-build.sh package.json
node scripts/index-build.js > $@
node_modules/.bin/ronn:
node cli.js install https://github.com/isaacs/ronnjs/tarball/master
doc: man
man: $(cli_docs) $(api_docs)
test:
node cli.js test
version: link
git add package.json &&\
git ci -m v$(shell npm -v)
publish: link doc
@git tag -d v$(shell npm -v) || true
@git push origin :v$(shell npm -v) || true
@npm unpublish npm@$(shell npm -v) || true
git clean -fd
git tag -s -m v$(shell npm -v) v$(shell npm -v) &&\
git push origin --tags &&\
npm publish &&\
npm tag npm@$(shell npm -v) $(shell npm -v | awk -F. '{print $$1 "." $$2}') &&\
make doc-publish &&\
make zip-publish
docpublish: doc-publish
doc-publish: doc
rsync -vazu --stats --no-implied-dirs --delete html/doc/ npmjs.org:/var/www/npmjs.org/public/doc
rsync -vazu --stats --no-implied-dirs --delete html/api/ npmjs.org:/var/www/npmjs.org/public/api
rsync -vazu --stats --no-implied-dirs --delete html/webfonts/ npmjs.org:/var/www/npmjs.org/public/webfonts
scp html/style.css npmjs.org:/var/www/npmjs.org/public/
zip-publish: release
scp release/* npmjs.org:/var/www/npmjs.org/public/dist/
release:
@bash scripts/release.sh
sandwich:
@[ $$(whoami) = "root" ] && (echo "ok"; echo "ham" > sandwich) || echo "make it yourself"
.PHONY: all latest install dev link doc clean uninstall test man doc-publish doc-clean docclean docpublish release zip-publish

260
deps/npm/README.md vendored Normal file
View File

@@ -0,0 +1,260 @@
npm(1) -- node package manager
==============================
## SYNOPSIS
This is just enough info to get you up and running.
Much more info available via `npm help` once it's installed.
## IMPORTANT
**You need node v0.6 or higher to run this program.**
To install an old **and unsupported** version of npm that works on node 0.3
and prior, clone the git repo and dig through the old tags and branches.
## Super Easy Install
npm comes with node now.
### Windows Computers
Get the MSI. npm is in it.
### Apple Macintosh Computers
Get the pkg. npm is in it.
### Other Sorts of Unices
Run `make install`. npm will be installed with node.
If you want a more fancy pants install (a different version, customized
paths, etc.) then read on.
## Fancy Install (Unix)
To install npm with one command, do this:
curl http://npmjs.org/install.sh | sh
To skip the npm 0.x cleanup, do this:
curl http://npmjs.org/install.sh | clean=no sh
To say "yes" to the 0.x cleanup, but skip the prompt:
curl http://npmjs.org/install.sh | clean=yes sh
If you get permission errors, you'll need to **run** the script as root.
(Note, just putting `sudo` in front of the `curl` will **fetch** the script
as root.)
### Slightly Fancier
You can set any npm configuration params with that script:
curl http://npmjs.org/install.sh | npm_config_prefix=/some/path sh
Or, you can run it in uber-debuggery mode:
curl http://npmjs.org/install.sh | npm_debug=1 sh
### Even Fancier
Get the code with git. Use `make` to build the docs and do other stuff.
If you plan on hacking on npm, `make link` is your friend.
If you've got the npm source code, you can also semi-permanently set
arbitrary config keys using the `./configure --key=val ...`, and then
run npm commands by doing `node cli.js <cmd> <args>`. (This is helpful
for testing, or running stuff without actually installing npm itself.)
## Fancy Windows Install
You can download a zip file from <http://npmjs.org/dist/>, and unpack it
in the same folder where node.exe lives.
If that's not fancy enough for you, then you can fetch the code with
git, and mess with it directly.
## Installing on Cygwin
No.
## Dev Install
To install the latest **unstable** development version from git:
git clone https://github.com/isaacs/npm.git
cd npm
sudo make install # (or: `node cli.js install -gf`)
If you're sitting in the code folder reading this document in your
terminal, then you've already got the code. Just do:
sudo make install
and npm will install itself.
## Permissions when Using npm to Install Other Stuff
**tl;dr**
* Use `sudo` for greater safety. Or don't, if you prefer not to.
* npm will downgrade permissions if it's root before running any build
scripts that package authors specified.
### More details...
As of version 0.3, it is recommended to run npm as root.
This allows npm to change the user identifier to the `nobody` user prior
to running any package build or test commands.
If you are not the root user, or if you are on a platform that does not
support uid switching, then npm will not attempt to change the userid.
If you would like to ensure that npm **always** runs scripts as the
"nobody" user, and have it fail if it cannot downgrade permissions, then
set the following configuration param:
npm config set unsafe-perm false
This will prevent running in unsafe mode, even as non-root users.
## Uninstalling
So sad to see you go.
sudo npm uninstall npm -g
Or, if that fails,
sudo make uninstall
## More Severe Uninstalling
Usually, the above instructions are sufficient. That will remove
npm, but leave behind anything you've installed.
If you would like to remove all the packages that you have installed,
then you can use the `npm ls` command to find them, and then `npm rm` to
remove them.
To remove cruft left behind by npm 0.x, you can use the included
`clean-old.sh` script file. You can run it conveniently like this:
npm explore npm -g -- sh scripts/clean-old.sh
npm uses two configuration files, one for per-user configs, and another
for global (every-user) configs. You can view them by doing:
npm config get userconfig # defaults to ~/.npmrc
npm config get globalconfig # defaults to /usr/local/etc/npmrc
Uninstalling npm does not remove configuration files by default. You
must remove them yourself manually if you want them gone. Note that
this means that future npm installs will not remember the settings that
you have chosen.
## Using npm Programmatically
If you would like to use npm programmatically, you can do that.
It's not very well documented, but it *is* rather simple.
var npm = require("npm")
npm.load(myConfigObject, function (er) {
if (er) return handlError(er)
npm.commands.install(["some", "args"], function (er, data) {
if (er) return commandFailed(er)
// command succeeded, and data might have some info
})
npm.on("log", function (message) { .... })
})
The `load` function takes an object hash of the command-line configs.
The various `npm.commands.<cmd>` functions take an **array** of
positional argument **strings**. The last argument to any
`npm.commands.<cmd>` function is a callback. Some commands take other
optional arguments. Read the source.
You cannot set configs individually for any single npm function at this
time. Since `npm` is a singleton, any call to `npm.config.set` will
change the value for *all* npm commands in that process.
See `./bin/npm-cli.js` for an example of pulling config values off of the
command line arguments using nopt. You may also want to check out `npm
help config` to learn about all the options you can set there.
## More Docs
Check out the [docs](http://npmjs.org/doc/),
especially the [faq](http://npmjs.org/doc/faq.html).
You can use the `npm help` command to read any of them.
If you're a developer, and you want to use npm to publish your program,
you should
[read this](http://npmjs.org/doc/developers.html)
## Legal Stuff
"npm" and "the npm registry" are owned by Isaac Z. Schlueter. All
rights not explicitly granted in the MIT license are reserved. See the
included LICENSE file for more details.
"Node.js" and "node" are trademarks owned by Joyent, Inc. npm is not
officially part of the Node.js project, and is neither owned by nor
officially affiliated with Joyent, Inc.
The packages in the npm registry are not part of npm itself, and are the
sole property of their respective maintainers. While every effort is
made to ensure accountability, there is absolutely no guarantee,
warrantee, or assertion made as to the quality, fitness for a specific
purpose, or lack of malice in any given npm package. Modules
published on the npm registry are not affiliated with or endorsed by
Joyent, Inc., Isaac Z. Schlueter, Ryan Dahl, or the Node.js project.
If you have a complaint about a package in the npm registry, and cannot
resolve it with the package owner, please express your concerns to
Isaac Z. Schlueter at <i@izs.me>.
### In plain english
This is mine; not my employer's, not Node's, not Joyent's, not Ryan
Dahl's.
If you publish something, it's yours, and you are solely accountable
for it. Not me, not Node, not Joyent, not Ryan Dahl.
If other people publish something, it's theirs. Not mine, not Node's,
not Joyent's, not Ryan Dahl's.
Yes, you can publish something evil. It will be removed promptly if
reported, and we'll lose respect for you. But there is no vetting
process for published modules.
If this concerns you, inspect the source before using packages.
## BUGS
When you find issues, please report them:
* web:
<http://github.com/isaacs/npm/issues>
* email:
<npm-@googlegroups.com>
Be sure to include *all* of the output from the npm command that didn't work
as expected. The `npm-debug.log` file is also helpful to provide.
You can also look for isaacs in #node.js on irc://irc.freenode.net. He
will no doubt tell you to put the output in a gist or email.
## SEE ALSO
* npm(1)
* npm-faq(1)
* npm-help(1)
* npm-index(1)

2
deps/npm/bin/node-gyp-bin/node-gyp vendored Executable file
View File

@@ -0,0 +1,2 @@
#!/usr/bin/env sh
node "`dirname "$0"`/../../node_modules/node-gyp/bin/node-gyp.js" "$@"

1
deps/npm/bin/node-gyp-bin/node-gyp.cmd vendored Executable file
View File

@@ -0,0 +1 @@
node "%~dp0\..\..\node_modules\node-gyp\bin\node-gyp.js" %*

13
deps/npm/bin/npm vendored Executable file
View File

@@ -0,0 +1,13 @@
#!/bin/sh
basedir=`dirname "$0"`
case `uname` in
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
esac
if [ -x "$basedir/node.exe" ]; then
"$basedir/node.exe" "$basedir/node_modules/npm/bin/npm-cli.js" "$@"
else
node "$basedir/node_modules/npm/bin/npm-cli.js" "$@"
fi

87
deps/npm/bin/npm-cli.js vendored Executable file
View File

@@ -0,0 +1,87 @@
#!/usr/bin/env node
;(function () { // wrapper in case we're in module_context mode
// windows: running "npm blah" in this folder will invoke WSH, not node.
if (typeof WScript !== "undefined") {
WScript.echo("npm does not work when run\n"
+"with the Windows Scripting Host\n\n"
+"'cd' to a different directory,\n"
+"or type 'npm.cmd <args>',\n"
+"or type 'node npm <args>'.")
WScript.quit(1)
return
}
process.title = "npm"
var log = require("npmlog")
log.pause() // will be unpaused when config is loaded.
log.info("it worked if it ends with", "ok")
var fs = require("graceful-fs")
, path = require("path")
, npm = require("../lib/npm.js")
, ini = require("../lib/utils/ini.js")
, errorHandler = require("../lib/utils/error-handler.js")
, configDefs = require("../lib/utils/config-defs.js")
, shorthands = configDefs.shorthands
, types = configDefs.types
, nopt = require("nopt")
// if npm is called as "npmg" or "npm_g", then
// run in global mode.
if (path.basename(process.argv[1]).slice(-1) === "g") {
process.argv.splice(1, 1, "npm", "-g")
}
log.verbose("cli", process.argv)
var conf = nopt(types, shorthands)
npm.argv = conf.argv.remain
if (npm.deref(npm.argv[0])) npm.command = npm.argv.shift()
else conf.usage = true
if (conf.version) {
console.log(npm.version)
return
}
if (conf.versions) {
var v = process.versions
v.npm = npm.version
console.log(v)
return
}
log.info("using", "npm@%s", npm.version)
log.info("using", "node@%s", process.version)
// make sure that this version of node works with this version of npm.
var semver = require("semver")
, nodeVer = process.version
, reqVer = npm.nodeVersionRequired
if (reqVer && !semver.satisfies(nodeVer, reqVer)) {
return errorHandler(new Error(
"npm doesn't work with node " + nodeVer
+ "\nRequired: node@" + reqVer), true)
}
process.on("uncaughtException", errorHandler)
if (conf.usage && npm.command !== "help") {
npm.argv.unshift(npm.command)
npm.command = "help"
}
// now actually fire up npm and run the command.
// this is how to use npm programmatically:
conf._exit = true
npm.load(conf, function (er) {
if (er) return errorHandler(er)
npm.commands[npm.command](npm.argv, errorHandler)
})
})()

6
deps/npm/bin/npm.cmd vendored Normal file
View File

@@ -0,0 +1,6 @@
:: Created by npm, please don't edit manually.
@IF EXIST "%~dp0\node.exe" (
"%~dp0\node.exe" "%~dp0\.\node_modules\npm\bin\npm-cli.js" %*
) ELSE (
node "%~dp0\.\node_modules\npm\bin\npm-cli.js" %*
)

22
deps/npm/bin/read-package-json.js vendored Executable file
View File

@@ -0,0 +1,22 @@
var argv = process.argv
if (argv.length < 3) {
console.error("Usage: read-package.json <file> [<fields> ...]")
process.exit(1)
}
var fs = require("fs")
, file = argv[2]
, readJson = require("read-package-json")
readJson(file, function (er, data) {
if (er) throw er
if (argv.length === 3) console.log(data)
else argv.slice(3).forEach(function (field) {
field = field.split(".")
var val = data
field.forEach(function (f) {
val = val[f]
})
console.log(val)
})
})

2
deps/npm/cli.js vendored Executable file
View File

@@ -0,0 +1,2 @@
#!/usr/bin/env node
require("./bin/npm-cli.js")

33
deps/npm/configure vendored Executable file
View File

@@ -0,0 +1,33 @@
#!/bin/bash
# set configurations that will be "sticky" on this system,
# surviving npm self-updates.
CONFIGS=()
i=0
# get the location of this file.
unset CDPATH
CONFFILE=$(cd $(dirname "$0"); pwd -P)/npmrc
while [ $# -gt 0 ]; do
conf="$1"
case $conf in
--help)
echo "./configure --param=value ..."
exit 0
;;
--*)
CONFIGS[$i]="${conf:2}"
;;
*)
CONFIGS[$i]="$conf"
;;
esac
let i++
shift
done
for c in "${CONFIGS[@]}"; do
echo "$c" >> "$CONFFILE"
done

13
deps/npm/doc/api/bin.md vendored Normal file
View File

@@ -0,0 +1,13 @@
npm-bin(3) -- Display npm bin folder
====================================
## SYNOPSIS
npm.commands.bin(args, cb)
## DESCRIPTION
Print the folder where npm will install executables.
This function should not be used programmatically. Instead, just refer
to the `npm.bin` member.

19
deps/npm/doc/api/bugs.md vendored Normal file
View File

@@ -0,0 +1,19 @@
npm-bugs(3) -- Bugs for a package in a web browser maybe
========================================================
## SYNOPSIS
npm.commands.bugs(package, callback)
## DESCRIPTION
This command tries to guess at the likely location of a package's
bug tracker URL, and then tries to open it using the `--browser`
config param.
Like other commands, the first parameter is an array. This command only
uses the first element, which is expected to be a package name with an
optional version number.
This command will launch a browser, so this command may not be the most
friendly for programmatic use.

22
deps/npm/doc/api/commands.md vendored Normal file
View File

@@ -0,0 +1,22 @@
npm-commands(3) -- npm commands
===============================
## SYNOPSIS
npm.commands[<command>](args, callback)
## DESCRIPTION
npm comes with a full set of commands, and each of the commands takes a
similar set of arguments.
In general, all commands on the command object take an **array** of positional
argument **strings**. The last argument to any function is a callback. Some
commands are special and take other optional arguments.
All commands have their own man page. See `man npm-<command>` for command-line
usage, or `man 3 npm-<command>` for programmatic usage.
## SEE ALSO
* npm-index(1)

45
deps/npm/doc/api/config.md vendored Normal file
View File

@@ -0,0 +1,45 @@
npm-config(3) -- Manage the npm configuration files
===================================================
## SYNOPSIS
npm.commands.config(args, callback)
var val = npm.config.get(key)
npm.config.set(key, val)
## DESCRIPTION
This function acts much the same way as the command-line version. The first
element in the array tells config what to do. Possible values are:
* `set`
Sets a config parameter. The second element in `args` is interpreted as the
key, and the third element is interpreted as the value.
* `get`
Gets the value of a config parameter. The second element in `args` is the
key to get the value of.
* `delete` (`rm` or `del`)
Deletes a parameter from the config. The second element in `args` is the
key to delete.
* `list` (`ls`)
Show all configs that aren't secret. No parameters necessary.
* `edit`:
Opens the config file in the default editor. This command isn't very useful
programmatically, but it is made available.
To programmatically access npm configuration settings, or set them for
the duration of a program, use the `npm.config.set` and `npm.config.get`
functions instead.
## SEE ALSO
* npm(3)

32
deps/npm/doc/api/deprecate.md vendored Normal file
View File

@@ -0,0 +1,32 @@
npm-deprecate(3) -- Deprecate a version of a package
====================================================
## SYNOPSIS
npm.commands.deprecate(args, callback)
## DESCRIPTION
This command will update the npm registry entry for a package, providing
a deprecation warning to all who attempt to install it.
The 'args' parameter must have exactly two elements:
* `package[@version]`
The `version` portion is optional, and may be either a range, or a
specific version, or a tag.
* `message`
The warning message that will be printed whenever a user attempts to
install the package.
Note that you must be the package owner to deprecate something. See the
`owner` and `adduser` help topics.
## SEE ALSO
* npm-publish(3)
* npm-unpublish(3)
* npm-registry(1)

19
deps/npm/doc/api/docs.md vendored Normal file
View File

@@ -0,0 +1,19 @@
npm-docs(3) -- Docs for a package in a web browser maybe
========================================================
## SYNOPSIS
npm.commands.docs(package, callback)
## DESCRIPTION
This command tries to guess at the likely location of a package's
documentation URL, and then tries to open it using the `--browser`
config param.
Like other commands, the first parameter is an array. This command only
uses the first element, which is expected to be a package name with an
optional version number.
This command will launch a browser, so this command may not be the most
friendly for programmatic use.

24
deps/npm/doc/api/edit.md vendored Normal file
View File

@@ -0,0 +1,24 @@
npm-edit(3) -- Edit an installed package
========================================
## SYNOPSIS
npm.commands.edit(package, callback)
## DESCRIPTION
Opens the package folder in the default editor (or whatever you've
configured as the npm `editor` config -- see `npm help config`.)
After it has been edited, the package is rebuilt so as to pick up any
changes in compiled packages.
For instance, you can do `npm install connect` to install connect
into your package, and then `npm.commands.edit(["connect"], callback)`
to make a few changes to your locally installed copy.
The first parameter is a string array with a single element, the package
to open. The package can optionally have a version number attached.
Since this command opens an editor in a new process, be careful about where
and how this is used.

18
deps/npm/doc/api/explore.md vendored Normal file
View File

@@ -0,0 +1,18 @@
npm-explore(3) -- Browse an installed package
=============================================
## SYNOPSIS
npm.commands.explore(args, callback)
## DESCRIPTION
Spawn a subshell in the directory of the installed package specified.
If a command is specified, then it is run in the subshell, which then
immediately terminates.
Note that the package is *not* automatically rebuilt afterwards, so be
sure to use `npm rebuild <pkg>` if you make any changes.
The first element in the 'args' parameter must be a package name. After that is the optional command, which can be any number of strings. All of the strings will be combined into one, space-delimited command.

30
deps/npm/doc/api/help-search.md vendored Normal file
View File

@@ -0,0 +1,30 @@
npm-help-search(3) -- Search the help pages
===========================================
## SYNOPSIS
npm.commands.helpSearch(args, [silent,] callback)
## DESCRIPTION
This command is rarely useful, but it exists in the rare case that it is.
This command takes an array of search terms and returns the help pages that
match in order of best match.
If there is only one match, then npm displays that help section. If there
are multiple results, the results are printed to the screen formatted and the
array of results is returned. Each result is an object with these properties:
* hits:
A map of args to number of hits on that arg. For example, {"npm": 3}
* found:
Total number of unique args that matched.
* totalHits:
Total number of hits.
* lines:
An array of all matching lines (and some adjacent lines).
* file:
Name of the file that matched
The silent parameter is not neccessary not used, but it may in the future.

29
deps/npm/doc/api/init.md vendored Normal file
View File

@@ -0,0 +1,29 @@
npm init(3) -- Interactively create a package.json file
=======================================================
## SYNOPSIS
npm.commands.init(args, callback)
## DESCRIPTION
This will ask you a bunch of questions, and then write a package.json for you.
It attempts to make reasonable guesses about what you want things to be set to,
and then writes a package.json file with the options you've selected.
If you already have a package.json file, it'll read that first, and default to
the options in there.
It is strictly additive, so it does not delete options from your package.json
without a really good reason to do so.
Since this function expects to be run on the command-line, it doesn't work very
well as a programmatically. The best option is to roll your own, and since
JavaScript makes it stupid simple to output formatted JSON, that is the
preferred method. If you're sure you want to handle command-line prompting,
then go ahead and use this programmatically.
## SEE ALSO
npm-json(1)

19
deps/npm/doc/api/install.md vendored Normal file
View File

@@ -0,0 +1,19 @@
npm-install(3) -- install a package programmatically
====================================================
## SYNOPSIS
npm.commands.install([where,] packages, callback)
## DESCRIPTION
This acts much the same ways as installing on the command-line.
The 'where' parameter is optional and only used internally, and it specifies
where the packages should be installed to.
The 'packages' parameter is an array of strings. Each element in the array is
the name of a package to be installed.
Finally, 'callback' is a function that will be called when all packages have been
installed or when an error has been encountered.

33
deps/npm/doc/api/link.md vendored Normal file
View File

@@ -0,0 +1,33 @@
npm-link(3) -- Symlink a package folder
=======================================
## SYNOPSIS
npm.command.link(callback)
npm.command.link(packages, callback)
## DESCRIPTION
Package linking is a two-step process.
Without parameters, link will create a globally-installed
symbolic link from `prefix/package-name` to the current folder.
With a parameters, link will create a symlink from the local `node_modules`
folder to the global symlink.
When creating tarballs for `npm publish`, the linked packages are
"snapshotted" to their current state by resolving the symbolic links.
This is
handy for installing your own stuff, so that you can work on it and test it
iteratively without having to continually rebuild.
For example:
npm.commands.link(cb) # creates global link from the cwd
# (say redis package)
npm.commands.link('redis', cb) # link-install the package
Now, any changes to the redis package will be reflected in
the package in the current working directory

26
deps/npm/doc/api/load.md vendored Normal file
View File

@@ -0,0 +1,26 @@
npm-load(3) -- Load config settings
===================================
## SYNOPSIS
npm.load(conf, cb)
## DESCRIPTION
npm.load() must be called before any other function call. Both parameters are
optional, but the second is recommended.
The first parameter is an object hash of command-line config params, and the
second parameter is a callback that will be called when npm is loaded and
ready to serve.
The first parameter should follow a similar structure as the package.json
config object.
For example, to emulate the --dev flag, pass an object that looks like this:
{
"dev": true
}
For a list of all the available command-line configs, see `npm help config`

56
deps/npm/doc/api/ls.md vendored Normal file
View File

@@ -0,0 +1,56 @@
npm-ls(3) -- List installed packages
======================================
## SYNOPSIS
npm.commands.ls(args, [silent,] callback)
## DESCRIPTION
This command will print to stdout all the versions of packages that are
installed, as well as their dependencies, in a tree-structure. It will also
return that data using the callback.
This command does not take any arguments, but args must be defined.
Beyond that, if any arguments are passed in, npm will politely warn that it
does not take positional arguments, though you may set config flags
like with any other command, such as `global` to list global packages.
It will print out extraneous, missing, and invalid packages.
If the silent parameter is set to true, nothing will be output to the screen,
but the data will still be returned.
Callback is provided an error if one occurred, the full data about which
packages are installed and which dependencies they will receive, and a
"lite" data object which just shows which versions are installed where.
Note that the full data object is a circular structure, so care must be
taken if it is serialized to JSON.
## CONFIGURATION
### long
* Default: false
* Type: Boolean
Show extended information.
### parseable
* Default: false
* Type: Boolean
Show parseable output instead of tree view.
### global
* Default: false
* Type: Boolean
List packages in the global install prefix instead of in the current
project.
Note, if parseable is set or long isn't set, then duplicates will be trimmed.
This means that if a submodule a same dependency as a parent module, then the
dependency will only be output once.

115
deps/npm/doc/api/npm.md vendored Normal file
View File

@@ -0,0 +1,115 @@
npm(3) -- node package manager
==============================
## SYNOPSIS
var npm = require("npm")
npm.load(configObject, function (er, npm) {
// use the npm object, now that it's loaded.
npm.config.set(key, val)
val = npm.config.get(key)
console.log("prefix = %s", npm.prefix)
npm.commands.install(["package"], cb)
})
## VERSION
@VERSION@
## DESCRIPTION
This is the API documentation for npm.
To find documentation of the command line
client, see `npm(1)`.
Prior to using npm's commands,
`npm.load()` must be called with an object hash of
top-level configs. In the npm command line client,
this set of configs is parsed from the command line options. Additional
configuration params are loaded from two configuration files. See
`npm-config(1)` for more information.
After that, each of the functions are accessible in the
commands object: `npm.commands.<cmd>`. See `npm-index(1)` for a list of
all possible commands.
All commands on the command object take an **array** of positional argument
**strings**. The last argument to any function is a callback. Some
commands take other optional arguments.
Configs cannot currently be set on a per function basis, as each call to
npm.config.set will change the value for *all* npm commands in that process.
To find API documentation for a specific command, run the `npm apihelp`
command.
## METHODS AND PROPERTIES
* `npm.load(configs, cb)`
Load the configuration params, and call the `cb` function once the
globalconfig and userconfig files have been loaded as well, or on
nextTick if they've already been loaded.
* `npm.config`
An object for accessing npm configuration parameters.
* `npm.config.get(key)`
* `npm.config.set(key, val)`
* `npm.config.del(key)`
* `npm.dir` or `npm.root`
The `node_modules` directory where npm will operate.
* `npm.prefix`
The prefix where npm is operating. (Most often the current working
directory.)
* `npm.cache`
The place where npm keeps JSON and tarballs it fetches from the
registry (or uploads to the registry).
* `npm.tmp`
npm's temporary working directory.
* `npm.deref`
Get the "real" name for a command that has either an alias or
abbreviation.
## MAGIC
For each of the methods in the `npm.commands` hash, a method is added to
the npm object, which takes a set of positional string arguments rather
than an array and a callback.
If the last argument is a callback, then it will use the supplied
callback. However, if no callback is provided, then it will print out
the error or results.
For example, this would work in a node repl:
> npm = require("npm")
> npm.load() // wait a sec...
> npm.install("dnode", "express")
Note that that *won't* work in a node program, since the `install`
method will get called before the configuration load is completed.
## ABBREVS
In order to support `npm ins foo` instead of `npm install foo`, the
`npm.commands` object has a set of abbreviations as well as the full
method names. Use the `npm.deref` method to find the real name.
For example:
var cmd = npm.deref("unp") // cmd === "unpublish"

13
deps/npm/doc/api/outdated.md vendored Normal file
View File

@@ -0,0 +1,13 @@
npm-outdated(3) -- Check for outdated packages
==============================================
## SYNOPSIS
npm.commands.outdated([packages,] callback)
## DESCRIPTION
This command will check the registry to see if the specified packages are
currently outdated.
If the 'packages' parameter is left out, npm will check all packages.

31
deps/npm/doc/api/owner.md vendored Normal file
View File

@@ -0,0 +1,31 @@
npm-owner(3) -- Manage package owners
=====================================
## SYNOPSIS
npm.commands.owner(args, callback)
## DESCRIPTION
The first element of the 'args' parameter defines what to do, and the subsequent
elements depend on the action. Possible values for the action are (order of
parameters are given in parenthesis):
* ls (package):
List all the users who have access to modify a package and push new versions.
Handy when you need to know who to bug for help.
* add (user, package):
Add a new user as a maintainer of a package. This user is enabled to modify
metadata, publish new versions, and add other owners.
* rm (user, package):
Remove a user from the package owner list. This immediately revokes their
privileges.
Note that there is only one level of access. Either you can modify a package,
or you can't. Future versions may contain more fine-grained access levels, but
that is not implemented at this time.
## SEE ALSO
* npm-publish(3)
* npm-registry(1)

19
deps/npm/doc/api/pack.md vendored Normal file
View File

@@ -0,0 +1,19 @@
npm-pack(3) -- Create a tarball from a package
==============================================
## SYNOPSIS
npm.commands.pack([packages,] callback)
## DESCRIPTION
For anything that's installable (that is, a package folder, tarball,
tarball url, name@tag, name@version, or name), this command will fetch
it to the cache, and then copy the tarball to the current working
directory as `<name>-<version>.tgz`, and then write the filenames out to
stdout.
If the same package is specified multiple times, then the file will be
overwritten the second time.
If no arguments are supplied, then npm packs the current package folder.

15
deps/npm/doc/api/prefix.md vendored Normal file
View File

@@ -0,0 +1,15 @@
npm-prefix(3) -- Display prefix
===============================
## SYNOPSIS
npm.commands.prefix(args, callback)
## DESCRIPTION
Print the prefix to standard out.
'args' is never used and callback is never called with data.
'args' must be present or things will break.
This function is not useful programmatically

17
deps/npm/doc/api/prune.md vendored Normal file
View File

@@ -0,0 +1,17 @@
npm-prune(3) -- Remove extraneous packages
==========================================
## SYNOPSIS
npm.commands.prune([packages,] callback)
## DESCRIPTION
This command removes "extraneous" packages.
The first parameter is optional, and it specifies packages to be removed.
No packages are specified, then all packages will be checked.
Extraneous packages are packages that are not listed on the parent
package's dependencies list.

30
deps/npm/doc/api/publish.md vendored Normal file
View File

@@ -0,0 +1,30 @@
npm-publish(3) -- Publish a package
===================================
## SYNOPSIS
npm.commands.publish([packages,] callback)
## DESCRIPTION
Publishes a package to the registry so that it can be installed by name.
Possible values in the 'packages' array are:
* `<folder>`:
A folder containing a package.json file
* `<tarball>`:
A url or file path to a gzipped tar archive containing a single folder
with a package.json file inside.
If the package array is empty, npm will try to publish something in the
current working directory.
This command could fails if one of the packages specified already exists in
the registry. Overwrites when the "force" environment variable is set.
## SEE ALSO
* npm-registry(1)
* npm-adduser(1)
* npm-owner(3)

16
deps/npm/doc/api/rebuild.md vendored Normal file
View File

@@ -0,0 +1,16 @@
npm-rebuild(3) -- Rebuild a package
===================================
## SYNOPSIS
npm.commands.rebuild([packages,] callback)
## DESCRIPTION
This command runs the `npm build` command on each of the matched packages. This is useful
when you install a new version of node, and must recompile all your C++ addons with
the new binary. If no 'packages' parameter is specify, every package will be rebuilt.
## CONFIGURATION
See `npm help build`

22
deps/npm/doc/api/restart.md vendored Normal file
View File

@@ -0,0 +1,22 @@
npm-restart(3) -- Start a package
=================================
## SYNOPSIS
npm.commands.restart(packages, callback)
## DESCRIPTION
This runs a package's "restart" script, if one was provided.
Otherwise it runs package's "stop" script, if one was provided, and then
the "start" script.
If no version is specified, then it restarts the "active" version.
npm can run tests on multiple packages. Just specify multiple packages
in the `packages` parameter.
## SEE ALSO
* npm-start(3)
* npm-stop(3)

15
deps/npm/doc/api/root.md vendored Normal file
View File

@@ -0,0 +1,15 @@
npm-root(3) -- Display npm root
===============================
## SYNOPSIS
npm.commands.root(args, callback)
## DESCRIPTION
Print the effective `node_modules` folder to standard out.
'args' is never used and callback is never called with data.
'args' must be present or things will break.
This function is not useful programmatically.

27
deps/npm/doc/api/run-script.md vendored Normal file
View File

@@ -0,0 +1,27 @@
npm-run-script(3) -- Run arbitrary package scripts
==================================================
## SYNOPSIS
npm.commands.run-script(args, callback)
## DESCRIPTION
This runs an arbitrary command from a package's "scripts" object.
It is used by the test, start, restart, and stop commands, but can be
called directly, as well.
The 'args' parameter is an array of strings. Behavior depends on the number
of elements. If there is only one element, npm assumes that the element
represents a command to be run on the local repository. If there is more than
one element, then the first is assumed to be the package and the second is
assumed to be the command to run. All other elements are ignored.
## SEE ALSO
* npm-scripts(1)
* npm-test(3)
* npm-start(3)
* npm-restart(3)
* npm-stop(3)

35
deps/npm/doc/api/search.md vendored Normal file
View File

@@ -0,0 +1,35 @@
npm-search(3) -- Search for packages
====================================
## SYNOPSIS
npm.commands.search(searchTerms, [silent,] [staleness,] callback)
## DESCRIPTION
Search the registry for packages matching the search terms. The available parameters are:
* searchTerms:
Array of search terms. These terms are case-insensitive.
* silent:
If true, npm will not log anything to the console.
* staleness:
This is the threshold for stale packages. "Fresh" packages are not refreshed
from the registry. This value is measured in seconds.
* callback:
Returns an object where each key is the name of a package, and the value
is information about that package along with a 'words' property, which is
a space-delimited string of all of the interesting words in that package.
The only properties included are those that are searched, which generally include:
* name
* description
* maintainers
* url
* keywords
A search on the registry excludes any result that does not match all of the
search terms. It also removes any items from the results that contain an
excluded term (the "searchexclude" config). The search is case insensitive
and doesn't try to read your mind (it doesn't do any verb tense matching or the
like).

20
deps/npm/doc/api/shrinkwrap.md vendored Normal file
View File

@@ -0,0 +1,20 @@
npm-shrinkwrap(3) -- programmatically generate package shrinkwrap file
====================================================
## SYNOPSIS
npm.commands.shrinkwrap(args, [silent,] callback)
## DESCRIPTION
This acts much the same ways as shrinkwrapping on the command-line.
This command does not take any arguments, but 'args' must be defined.
Beyond that, if any arguments are passed in, npm will politely warn that it
does not take positional arguments.
If the 'silent' parameter is set to true, nothing will be output to the screen,
but the shrinkwrap file will still be written.
Finally, 'callback' is a function that will be called when the shrinkwrap has
been saved.

13
deps/npm/doc/api/start.md vendored Normal file
View File

@@ -0,0 +1,13 @@
npm-start(3) -- Start a package
===============================
## SYNOPSIS
npm.commands.start(packages, callback)
## DESCRIPTION
This runs a package's "start" script, if one was provided.
npm can run tests on multiple packages. Just specify multiple packages
in the `packages` parameter.

13
deps/npm/doc/api/stop.md vendored Normal file
View File

@@ -0,0 +1,13 @@
npm-stop(3) -- Stop a package
=============================
## SYNOPSIS
npm.commands.stop(packages, callback)
## DESCRIPTION
This runs a package's "stop" script, if one was provided.
npm can run stop on multiple packages. Just specify multiple packages
in the `packages` parameter.

Some files were not shown because too many files have changed in this diff Show More