Skip to content
Browse files

Merge branch 'master' into crypto-buffer

Conflicts:
	doc/api/crypto.markdown
	src/node_crypto.cc
	test/simple/test-crypto.js
  • Loading branch information...
2 parents 06c20ac + 57276ae commit 6ef213728bc21c1b45af8de543f7667b4478701e @thiagoarrais committed Jun 27, 2012
Showing with 1,928 additions and 4,143 deletions.
  1. +2 −1 .gitignore
  2. +19 −1 AUTHORS
  3. +262 −2 ChangeLog
  4. +62 −11 LICENSE
  5. +40 −8 Makefile
  6. +72 −0 benchmark/fs-readfile.js
  7. +127 −0 benchmark/http_bench.js
  8. +52 −41 benchmark/http_simple.js
  9. +19 −0 benchmark/http_simple_auto.js
  10. +2 −2 benchmark/io.js
  11. +7 −3 common.gypi
  12. +64 −18 configure
  13. +3 −0 deps/npm/.npmignore
  14. +5 −0 deps/npm/AUTHORS
  15. +5 −0 deps/npm/LICENSE
  16. +2 −0 deps/npm/Makefile
  17. +0 −6 deps/npm/README.md
  18. +10 −3 deps/npm/bin/npm
  19. +6 −6 deps/npm/bin/npm-cli.js
  20. +1 −1 deps/npm/bin/read-package-json.js
  21. +5 −16 deps/npm/doc/cli/coding-style.md
  22. +41 −45 deps/npm/doc/cli/config.md
  23. +1 −0 deps/npm/doc/cli/init.md
  24. +1 −1 deps/npm/doc/cli/install.md
  25. +31 −0 deps/npm/doc/cli/json.md
  26. BIN deps/npm/html/api/GubbleBum-Blocky.ttf
  27. +0 −69 deps/npm/html/api/author.html
  28. +2 −2 deps/npm/html/api/bin.html
  29. +2 −2 deps/npm/html/api/bugs.html
  30. +2 −2 deps/npm/html/api/commands.html
  31. +2 −2 deps/npm/html/api/config.html
  32. +2 −2 deps/npm/html/api/deprecate.html
  33. +2 −2 deps/npm/html/api/docs.html
  34. +2 −2 deps/npm/html/api/edit.html
  35. +2 −2 deps/npm/html/api/explore.html
  36. +0 −88 deps/npm/html/api/find.html
  37. +0 −68 deps/npm/html/api/get.html
  38. +2 −2 deps/npm/html/api/help-search.html
  39. +0 −60 deps/npm/html/api/home.html
  40. +2 −2 deps/npm/html/api/init.html
  41. +2 −2 deps/npm/html/api/install.html
  42. +2 −2 deps/npm/html/api/link.html
  43. +0 −88 deps/npm/html/api/list.html
  44. +0 −74 deps/npm/html/api/ln.html
  45. +2 −2 deps/npm/html/api/load.html
  46. +2 −2 deps/npm/html/api/ls.html
  47. +3 −3 deps/npm/html/api/npm.html
  48. +2 −2 deps/npm/html/api/outdated.html
  49. +2 −2 deps/npm/html/api/owner.html
  50. +2 −2 deps/npm/html/api/pack.html
  51. +2 −2 deps/npm/html/api/prefix.html
  52. +2 −2 deps/npm/html/api/prune.html
  53. +2 −2 deps/npm/html/api/publish.html
  54. +2 −2 deps/npm/html/api/rebuild.html
  55. +2 −2 deps/npm/html/api/restart.html
  56. +0 −57 deps/npm/html/api/rm.html
  57. +2 −2 deps/npm/html/api/root.html
  58. +2 −2 deps/npm/html/api/run-script.html
  59. +2 −2 deps/npm/html/api/search.html
  60. +0 −68 deps/npm/html/api/set.html
  61. +2 −2 deps/npm/html/api/shrinkwrap.html
  62. +2 −2 deps/npm/html/api/start.html
  63. +2 −2 deps/npm/html/api/stop.html
  64. +2 −2 deps/npm/html/api/submodule.html
  65. +2 −2 deps/npm/html/api/tag.html
  66. +2 −2 deps/npm/html/api/test.html
  67. +2 −2 deps/npm/html/api/uninstall.html
  68. +2 −2 deps/npm/html/api/unpublish.html
  69. +2 −2 deps/npm/html/api/update.html
  70. +2 −2 deps/npm/html/api/version.html
  71. +2 −2 deps/npm/html/api/view.html
  72. +2 −2 deps/npm/html/api/whoami.html
  73. BIN deps/npm/html/doc/GubbleBum-Blocky.ttf
  74. +3 −9 deps/npm/html/doc/README.html
  75. +2 −2 deps/npm/html/doc/adduser.html
  76. +0 −69 deps/npm/html/doc/author.html
  77. +2 −2 deps/npm/html/doc/bin.html
  78. +2 −2 deps/npm/html/doc/bugs.html
  79. +2 −2 deps/npm/html/doc/build.html
  80. +2 −2 deps/npm/html/doc/bundle.html
  81. +2 −2 deps/npm/html/doc/cache.html
  82. +2 −2 deps/npm/html/doc/changelog.html
  83. +7 −18 deps/npm/html/doc/coding-style.html
  84. +2 −2 deps/npm/html/doc/completion.html
  85. +40 −43 deps/npm/html/doc/config.html
  86. +2 −2 deps/npm/html/doc/deprecate.html
  87. +2 −2 deps/npm/html/doc/developers.html
  88. +2 −2 deps/npm/html/doc/disputes.html
  89. +2 −2 deps/npm/html/doc/docs.html
  90. +2 −2 deps/npm/html/doc/edit.html
  91. +2 −2 deps/npm/html/doc/explore.html
  92. +2 −2 deps/npm/html/doc/faq.html
  93. +0 −75 deps/npm/html/doc/find.html
  94. +2 −2 deps/npm/html/doc/folders.html
  95. +0 −621 deps/npm/html/doc/get.html
  96. +0 −240 deps/npm/html/doc/global.html
  97. +2 −2 deps/npm/html/doc/help-search.html
  98. +2 −2 deps/npm/html/doc/help.html
  99. +0 −72 deps/npm/html/doc/home.html
  100. +2 −2 deps/npm/html/doc/index.html
  101. +3 −3 deps/npm/html/doc/init.html
  102. +3 −3 deps/npm/html/doc/install.html
  103. +33 −2 deps/npm/html/doc/json.html
  104. +2 −2 deps/npm/html/doc/link.html
  105. +2 −2 deps/npm/html/doc/list.html
  106. +0 −93 deps/npm/html/doc/ln.html
  107. +0 −87 deps/npm/html/doc/ls.html
  108. +3 −3 deps/npm/html/doc/npm.html
  109. +2 −2 deps/npm/html/doc/outdated.html
  110. +2 −2 deps/npm/html/doc/owner.html
  111. +2 −2 deps/npm/html/doc/pack.html
  112. +2 −2 deps/npm/html/doc/prefix.html
  113. +2 −2 deps/npm/html/doc/prune.html
  114. +2 −2 deps/npm/html/doc/publish.html
  115. +2 −2 deps/npm/html/doc/rebuild.html
  116. +2 −2 deps/npm/html/doc/registry.html
  117. +2 −2 deps/npm/html/doc/removing-npm.html
  118. +2 −2 deps/npm/html/doc/restart.html
  119. +0 −57 deps/npm/html/doc/rm.html
  120. +2 −2 deps/npm/html/doc/root.html
  121. +2 −2 deps/npm/html/doc/run-script.html
  122. +2 −2 deps/npm/html/doc/scripts.html
  123. +2 −2 deps/npm/html/doc/search.html
  124. +2 −2 deps/npm/html/doc/semver.html
  125. +0 −621 deps/npm/html/doc/set.html
  126. +2 −2 deps/npm/html/doc/shrinkwrap.html
  127. +2 −2 deps/npm/html/doc/star.html
  128. +2 −2 deps/npm/html/doc/start.html
  129. +2 −2 deps/npm/html/doc/stop.html
  130. +0 −336 deps/npm/html/doc/style.css
  131. +2 −2 deps/npm/html/doc/submodule.html
  132. +2 −2 deps/npm/html/doc/tag.html
  133. +2 −2 deps/npm/html/doc/test.html
  134. +2 −2 deps/npm/html/doc/uninstall.html
  135. +2 −2 deps/npm/html/doc/unpublish.html
  136. +2 −2 deps/npm/html/doc/update.html
  137. +2 −2 deps/npm/html/doc/version.html
  138. +2 −2 deps/npm/html/doc/view.html
  139. +2 −2 deps/npm/html/doc/whoami.html
  140. +1 −1 deps/npm/html/dochead.html
  141. BIN deps/npm/html/n-64.png
  142. BIN deps/npm/html/n-large.png
  143. BIN deps/npm/html/npm-16.png
  144. BIN deps/npm/html/npm-256-square.png
  145. BIN deps/npm/html/npm-256w.png
  146. BIN deps/npm/html/npm-64-square.png
  147. BIN deps/npm/html/npm-fin.png
  148. BIN deps/npm/html/npm-large.png
  149. BIN deps/npm/html/npm.png
  150. +21 −7 deps/npm/html/{api → }/style.css
  151. BIN deps/npm/html/webfonts/23242D_3_0.eot
  152. BIN deps/npm/html/webfonts/23242D_3_0.ttf
  153. BIN deps/npm/html/webfonts/23242D_3_0.woff
  154. +62 −27 deps/npm/lib/adduser.js
  155. +26 −14 deps/npm/lib/bugs.js
  156. +10 −10 deps/npm/lib/build.js
  157. +90 −55 deps/npm/lib/cache.js
  158. +9 −2 deps/npm/lib/config.js
  159. +3 −4 deps/npm/lib/deprecate.js
  160. +23 −11 deps/npm/lib/docs.js
  161. +0 −1 deps/npm/lib/edit.js
  162. +5 −2 deps/npm/lib/help-search.js
  163. +3 −1 deps/npm/lib/help.js
  164. +12 −215 deps/npm/lib/init.js
  165. +75 −46 deps/npm/lib/install.js
  166. +22 −15 deps/npm/lib/link.js
  167. +8 −8 deps/npm/lib/ls.js
  168. +33 −15 deps/npm/lib/npm.js
  169. +9 −8 deps/npm/lib/outdated.js
  170. +37 −25 deps/npm/lib/owner.js
  171. +1 −2 deps/npm/lib/pack.js
  172. +2 −2 deps/npm/lib/prune.js
  173. +21 −83 deps/npm/lib/publish.js
  174. +6 −6 deps/npm/lib/rebuild.js
  175. +0 −1 deps/npm/lib/root.js
  176. +3 −5 deps/npm/lib/run-script.js
  177. +2 −3 deps/npm/lib/search.js
  178. +3 −3 deps/npm/lib/shrinkwrap.js
  179. +4 −4 deps/npm/lib/star.js
  180. +0 −1 deps/npm/lib/submodule.js
  181. +12 −2 deps/npm/lib/substack.js
  182. +2 −1 deps/npm/lib/tag.js
  183. +11 −1 deps/npm/lib/test.js
  184. +5 −4 deps/npm/lib/unbuild.js
  185. +71 −4 deps/npm/lib/uninstall.js
  186. +8 −4 deps/npm/lib/unpublish.js
  187. +2 −2 deps/npm/lib/update.js
  188. +30 −12 deps/npm/lib/utils/cmd-shim.js
  189. +8 −11 deps/npm/lib/utils/completion/file-completion.js
  190. +3 −3 deps/npm/lib/utils/completion/installed-deep.js
  191. +1 −1 deps/npm/lib/utils/completion/installed-shallow.js
  192. +3 −2 deps/npm/lib/utils/completion/remote-packages.js
  193. +7 −6 deps/npm/lib/utils/completion/users.js
  194. +33 −52 deps/npm/lib/utils/config-defs.js
  195. +110 −95 deps/npm/lib/utils/error-handler.js
  196. +17 −41 deps/npm/lib/utils/exec.js
  197. +4 −4 deps/npm/lib/utils/fetch.js
  198. +0 −53 deps/npm/lib/utils/find.js
  199. +4 −4 deps/npm/lib/utils/ini.js
Sorry, we could not display the entire diff because too many files (1,396) changed.
View
3 .gitignore
@@ -18,6 +18,7 @@ node_g
# various stuff that VC++ produces/uses
Debug/
Release/
+!doc/blog/**
*.sln
!nodemsi.sln
*.suo
@@ -39,5 +40,5 @@ ipch/
/npm.wxs
/tools/msvs/npm.wixobj
email.md
-blog.html
deps/v8-*
+./node_modules
View
20 AUTHORS
@@ -184,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>
@@ -301,3 +301,21 @@ 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>
View
264 ChangeLog
@@ -1,4 +1,189 @@
-2012.04.18, Version 0.7.8, (unstable)
+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.19, Version 0.7.12 (unstable), a72120190a8ffdbcd3d6ad2a2e6ceecd2087111e
+
+* 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.15, Version 0.7.11 (unstable), 5cfe0b86d5be266ef51bbba369c39e412ee51944
+
+* 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.11, Version 0.7.10 (unstable), 12a32a48a30182621b3f8e9b9695d1946b53c131
+
+* 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.05.28, Version 0.7.9 (unstable), 782277f11a753ded831439ed826448c06fc0f356
+
+* 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.04.18, Version 0.7.8 (unstable), c2b47097c0b483552efc1947c6766fa1128600b6
* Upgrade V8 to 3.9.24.9
@@ -255,7 +440,82 @@
* Bug fixes
-2012.04.09 Version 0.6.15 (stable)
+2012.05.15 Version 0.6.18 (stable), 4bc1d395de6abed2cf1e4d0b7b3a1480a21c368f
+
+* 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.04 Version 0.6.17 (stable), 4ced23deaf36493f4303a18f6fdce768c58becc0
+
+* 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.04.30 Version 0.6.16 (stable), a1d193963ddc80a27da5da01b59751e14e33d1d6
+
+* 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.09 Version 0.6.15 (stable), f160a45b254e591eb33716311c92be533c6d86c4
* Update npm to 1.1.16
View
73 LICENSE
@@ -196,7 +196,7 @@ maintained libraries. The externally maintained libraries used by Node are:
"""
- C-Ares, an asynchronous DNS client, located at deps/uv/src/ares. C-Ares license
- follows
+ follows:
"""
/* Copyright 1998 by the Massachusetts Institute of Technology.
*
@@ -215,7 +215,7 @@ maintained libraries. The externally maintained libraries used by Node are:
- 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
+ license follows:
"""
/* ====================================================================
* Copyright (c) 1998-2011 The OpenSSL Project. All rights reserved.
@@ -225,7 +225,7 @@ maintained libraries. The externally maintained libraries used by Node are:
* are met:
*
* 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
+ * 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
@@ -296,11 +296,11 @@ maintained libraries. The externally maintained libraries used by Node are:
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.
+ IN THE SOFTWARE.
"""
- Closure Linter is located at tools/closure_linter. Closure's license
- follows
+ follows:
"""
# Copyright (c) 2007, Google Inc.
# All rights reserved.
@@ -403,7 +403,7 @@ maintained libraries. The externally maintained libraries used by Node are:
* Available under MIT license <http://mths.be/mit>
"""
-- tools/gyp GYP is a meta-build system. GYP's license follows:
+- tools/gyp. GYP is a meta-build system. GYP's license follows:
"""
Copyright (c) 2009 Google Inc. All rights reserved.
@@ -434,7 +434,7 @@ maintained libraries. The externally maintained libraries used by Node are:
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
"""
-- Zlib at deps/zlib. zlib's license follows
+- 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
@@ -463,8 +463,8 @@ maintained libraries. The externally maintained libraries used by Node are:
*/
"""
-- npm is a package manager program located at deps/npm.
- npm's license follows:
+- 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.
@@ -517,6 +517,11 @@ maintained libraries. The externally maintained libraries used by Node are:
"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.
@@ -527,8 +532,8 @@ maintained libraries. The externally maintained libraries used by Node are:
according to the terms of the MIT/X11 license.
"""
-- tools/doc/node_modules/marked Marked is a Markdown parser. Marked's
- license follows
+- tools/doc/node_modules/marked. Marked is a Markdown parser. Marked's
+ license follows:
"""
Copyright (c) 2011-2012, Christopher Jeffrey (https://github.com/chjj/)
@@ -550,3 +555,49 @@ maintained libraries. The externally maintained libraries used by Node are:
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.
+ """
View
48 Makefile
@@ -42,12 +42,14 @@ 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
@@ -59,9 +61,18 @@ test-http1: all
test-valgrind: all
$(PYTHON) tools/test.py --mode=release --valgrind simple message
-test-all: all
- python tools/test.py --mode=debug,release
- $(MAKE) test-npm
+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
@@ -119,7 +130,13 @@ website_files = \
out/doc/changelog.html \
$(doc_images)
-doc: program $(apidoc_dirs) $(website_files) $(apiassets) $(apidocs) tools/doc/
+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 $@
@@ -143,12 +160,15 @@ 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 > $@
+ 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
rsync -r out/doc/ node@nodejs.org:~/web/nodejs.org/
ssh node@nodejs.org '\
@@ -197,6 +217,17 @@ $(PKG):
--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 \
@@ -207,11 +238,12 @@ $(TARBALL): node out/doc
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 out/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/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
@@ -237,4 +269,4 @@ cpplint:
lint: jslint cpplint
-.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
+.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
72 benchmark/fs-readfile.js
@@ -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();
+ }
+}
View
127 benchmark/http_bench.js
@@ -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
93 benchmark/http_simple.js
@@ -1,18 +1,15 @@
-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";
-}
-
-stored = {};
-storedBuffer = {};
+var fixed = makeString(20 * 1024, 'C'),
+ storedBytes = {},
+ storedBuffer = {},
+ storedUnicode = {};
var useDomains = process.env.NODE_USE_DOMAINS;
@@ -28,68 +25,75 @@ if (useDomains) {
}
var server = http.createServer(function (req, res) {
-
if (useDomains) {
var dom = domain.create();
dom.add(req);
dom.add(res);
}
- var commands = req.url.split("/");
+ 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") {
+ } 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 == 'quit') {
res.connection.server.close();
- body = "quitting";
+ body = 'quitting';
- } else if (command == "fixed") {
+ } else if (command == 'fixed') {
body = fixed;
- } else if (command == "echo") {
- res.writeHead(200, { "Content-Type": "text/plain",
- "Transfer-Encoding": "chunked" });
+ } 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';
}
// 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" });
+ res.writeHead(status, { 'Content-Type': 'text/plain',
+ 'Transfer-Encoding': 'chunked' });
// send body in chunks
var len = body.length;
var step = ~~(len / n_chunks) || len;
@@ -102,13 +106,20 @@ var server = http.createServer(function (req, res) {
} else {
var content_length = body.length.toString();
- res.writeHead(status, { "Content-Type": "text/plain",
- "Content-Length": content_length });
+ 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+'/');
});
View
19 benchmark/http_simple_auto.js
@@ -105,5 +105,24 @@ server.listen(port, function () {
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
4 benchmark/io.js
@@ -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;
View
10 common.gypi
@@ -1,6 +1,6 @@
{
'variables': {
- 'strict_aliasing%': 'false', # turn on/off -fstrict-aliasing
+ 'node_no_strict_aliasing%': 0, # turn 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
@@ -32,7 +32,7 @@
'VCCLCompilerTool': {
'RuntimeLibrary': 1, # static debug
'Optimization': 0, # /Od, no optimization
- 'MinimalRebuild': 'true',
+ 'MinimalRebuild': 'false',
'OmitFramePointers': 'false',
'BasicRuntimeChecks': 3, # /RTC1
},
@@ -52,7 +52,7 @@
# pull in V8's postmortem metadata
'ldflags': [ '-Wl,-z,allextract' ]
}],
- ['strict_aliasing!="true"', {
+ ['node_no_strict_aliasing==1', {
'cflags': [ '-fno-strict-aliasing' ],
}],
],
@@ -145,6 +145,10 @@
'cflags': [ '-m32' ],
'ldflags': [ '-m32' ],
}],
+ [ 'target_arch=="x64"', {
+ 'cflags': [ '-m64' ],
+ 'ldflags': [ '-m64' ],
+ }],
[ 'OS=="linux"', {
'ldflags': [ '-rdynamic' ],
}],
View
82 configure
@@ -115,6 +115,16 @@ parser.add_option("--without-dtrace",
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",
@@ -126,6 +136,11 @@ parser.add_option("--dest-cpu",
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()
@@ -154,10 +169,20 @@ def pkg_config(pkg):
def host_arch_cc():
"""Host architecture check using the CC command."""
- p = subprocess.Popen(CC.split() + ['-dM', '-E', '-'],
- stdin=subprocess.PIPE,
- stdout=subprocess.PIPE,
- stderr=subprocess.PIPE)
+ 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]
@@ -214,18 +239,22 @@ def host_arch():
def target_arch():
return host_arch()
-
-def gcc_version():
+def compiler_version():
try:
proc = subprocess.Popen([CC, '-v'], stderr=subprocess.PIPE)
except OSError:
return None
- # TODO parse clang output
- version = proc.communicate()[1].split('\n')[-2]
- match = re.match('gcc version (\d+)\.(\d+)\.(\d+)', version)
- if not match: return None
- return ['LLVM' in version] + map(int, match.groups())
-
+ 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 None
+ version = version_line.split("version")[1].strip().split()[0].split(".")
+ if not version:
+ return None
+ return ('LLVM' in version_line, 'clang' in CC, tuple(version))
def configure_node(o):
# TODO add gdb
@@ -236,27 +265,41 @@ def configure_node(o):
o['variables']['target_arch'] = options.dest_cpu or target_arch()
o['default_configuration'] = 'Debug' if options.debug else 'Release'
- # turn off strict aliasing if gcc < 4.6.0 unless it's llvm-gcc
+ is_llvm, is_clang, cc_version = compiler_version()
+
+ # turn off strict aliasing if gcc >= 4.5.0 && < 4.6.0 unless it's clang
# 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(
- 'clang' in CC or gcc_version() >= [False, 4, 6, 0])
+ no_strict_aliasing = (4,5,0) <= cc_version < (4,6,0) and not is_clang
+ o['variables']['node_no_strict_aliasing'] = int(no_strict_aliasing)
+ o['variables']['v8_no_strict_aliasing'] = int(no_strict_aliasing)
# clang has always supported -fvisibility=hidden, right?
- if 'clang' not in CC and gcc_version() < [False, 4, 0, 0]:
+ 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)
@@ -293,11 +336,14 @@ def configure_openssl(o):
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_use_system_openssl'] = b(False)
+ o['variables']['node_shared_openssl'] = b(False)
else:
out = pkg_config('openssl')
(libs, cflags) = out if out else ('', '')
@@ -312,7 +358,7 @@ def configure_openssl(o):
else:
o['cflags'] += cflags.split()
- o['variables']['node_use_system_openssl'] = b(
+ o['variables']['node_shared_openssl'] = b(
libs or cflags or options.openssl_libpath or options.openssl_includes)
View
3 deps/npm/.npmignore
@@ -12,6 +12,9 @@ npm-debug.log
.gitignore
release/
+# don't need these in the npm package.
+html/*.png
+
# don't ignore .npmignore files
# these are used in some tests.
!.npmignore
View
5 deps/npm/AUTHORS
@@ -64,3 +64,8 @@ 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>
View
5 deps/npm/LICENSE
@@ -49,6 +49,11 @@ 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.
View
2 deps/npm/Makefile
@@ -121,6 +121,8 @@ 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/
View
6 deps/npm/README.md
@@ -89,21 +89,15 @@ To install the latest **unstable** development version from git:
git clone https://github.com/isaacs/npm.git
cd npm
- git submodule update --init --recursive
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:
- git submodule update --init --recursive
sudo make install
and npm will install itself.
-Note that github tarballs **do not contain submodules**, so
-those won't work. You'll have to also fetch the appropriate submodules
-listed in the .gitmodules file.
-
## Permissions when Using npm to Install Other Stuff
**tl;dr**
View
13 deps/npm/bin/npm
@@ -1,6 +1,13 @@
#!/bin/sh
-if [ -x "`dirname "$0"`/node.exe" ]; then
- "`dirname "$0"`/node.exe" "`dirname "$0"`/node_modules/npm/bin/npm-cli.js" "$@"
+
+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 "`dirname "$0"`/node_modules/npm/bin/npm-cli.js" "$@"
+ node "$basedir/node_modules/npm/bin/npm-cli.js" "$@"
fi
View
12 deps/npm/bin/npm-cli.js
@@ -15,9 +15,9 @@ if (typeof WScript !== "undefined") {
process.title = "npm"
-var log = require("../lib/utils/log.js")
-log.waitForConfig()
-log.info("ok", "it worked if it ends with")
+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")
@@ -36,7 +36,7 @@ if (path.basename(process.argv[1]).slice(-1) === "g") {
process.argv.splice(1, 1, "npm", "-g")
}
-log.verbose(process.argv, "cli")
+log.verbose("cli", process.argv)
var conf = nopt(types, shorthands)
npm.argv = conf.argv.remain
@@ -56,8 +56,8 @@ if (conf.versions) {
return
}
-log.info("npm@"+npm.version, "using")
-log.info("node@"+process.version, "using")
+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")
View
2 deps/npm/bin/read-package-json.js
@@ -6,7 +6,7 @@ if (argv.length < 3) {
var fs = require("fs")
, file = argv[2]
- , readJson = require("../lib/utils/read-json")
+ , readJson = require("read-package-json")
readJson(file, function (er, data) {
if (er) throw er
View
21 deps/npm/doc/cli/coding-style.md
@@ -129,29 +129,18 @@ Just send the error message back as the first argument to the callback.
Always create a new Error object with your message. Don't just return a
string message to the callback. Stack traces are handy.
-Use the `require("./utils/log").er` function. It takes a callback and an
-error message, and returns an object that will report the message in the
-event of a failure. It's quite handy.
-
- function myThing (args, cb) {
- getData(args, function (er, data) {
- if (er) return log.er(cb, "Couldn't get data")(er)
- doSomethingElse(data, cb)
- })
- }
- function justHasToWork (cb) {
- doSomething(log.er(cb, "the doSomething failed."))
- }
-
## Logging
+Logging is done using the [npmlog](https://github.com/isaacs/npmlog)
+utility.
+
Please clean up logs when they are no longer helpful. In particular,
logging the same object over and over again is not helpful. Logs should
report what's happening so that it's easier to track down where a fault
occurs.
-Use appropriate log levels. The default log() function logs at the
-"info" level. See `npm-config(1)` and search for "loglevel".
+Use appropriate log levels. See `npm-config(1)` and search for
+"loglevel".
## Case, naming, etc.
View
86 deps/npm/doc/cli/config.md
@@ -117,6 +117,7 @@ The following shorthands are parsed on the command-line:
* `-S`: `--save`
* `-D`: `--save-dev`
* `-O`: `--save-optional`
+* `-B`: `--save-bundle`
* `-y`: `--yes`
* `-n`: `--yes false`
* `ll` and `la` commands: `ls --long`
@@ -167,32 +168,6 @@ then the user could change the behavior by doing:
Force npm to always require authentication when accessing the registry,
even for `GET` requests.
-### bin-publish
-
-* Default: false
-* Type: Boolean
-
-If set to true, then binary packages will be created on publish.
-
-This is the way to opt into the "bindist" behavior described below.
-
-### bindist
-
-* Default: Unstable node versions, `null`, otherwise
- `"<node version>-<platform>-<os release>"`
-* Type: String or `null`
-
-Experimental: on stable versions of node, binary distributions will be
-created with this tag. If a user then installs that package, and their
-`bindist` tag is found in the list of binary distributions, they will
-get that prebuilt version.
-
-Pre-build node packages have their preinstall, install, and postinstall
-scripts stripped (since they are run prior to publishing), and do not
-have their `build` directories automatically ignored.
-
-It's yet to be seen if this is a good idea.
-
### browser
* Default: OS X: `"open"`, others: `"google-chrome"`
@@ -375,6 +350,16 @@ Sets a User-Agent to the request header
A white-space separated list of glob patterns of files to always exclude
from packages when building tarballs.
+### init-module
+
+* Default: ~/.npm-init.js
+* Type: path
+
+A module that will be loaded by the `npm init` command. See the
+documentation for the
+[init-package-json](https://github.com/isaacs/init-package-json) module
+for more information, or npm-init(1).
+
### init.version
* Default: "0.0.0"
@@ -430,13 +415,6 @@ if one of the two conditions are met:
* the globally installed version is identical to the version that is
being installed locally.
-### logfd
-
-* Default: stderr file descriptor
-* Type: Number or Stream
-
-The location to write log output.
-
### loglevel
* Default: "http"
@@ -449,13 +427,17 @@ What level of logs to report. On failure, *all* logs are written to
Any logs of a higher level than the setting are shown.
The default is "http", which shows http, warn, and error output.
-### logprefix
+### logstream
-* Default: true on Posix, false on Windows
-* Type: Boolean
+* Default: process.stderr
+* Type: Stream
+
+This is the stream that is passed to the
+[npmlog](https://github.com/isaacs/npmlog) module at run time.
-Whether or not to prefix log messages with "npm" and the log level. See
-also "color" and "loglevel".
+It cannot be set from the command line, but if you are using npm
+programmatically, you may wish to send logs to somewhere other than
+stderr.
### long
@@ -503,13 +485,6 @@ The url to report npat test results.
A node module to `require()` when npm loads. Useful for programmatic
usage.
-### outfd
-
-* Default: standard output file descriptor
-* Type: Number or Stream
-
-Where to write "normal" output. This has no effect on log output.
-
### parseable
* Default: false
@@ -584,15 +559,33 @@ Remove failed installs.
Save installed packages to a package.json file as dependencies.
+When used with the `npm rm` command, it removes it from the dependencies
+hash.
+
Only works if there is already a package.json file present.
+### save-bundle
+
+* Default: false
+* Type: Boolean
+
+If a package would be saved at install time by the use of `--save`,
+`--save-dev`, or `--save-optional`, then also put it in the
+`bundleDependencies` list.
+
+When used with the `npm rm` command, it removes it from the
+bundledDependencies list.
+
### save-dev
* Default: false
* Type: Boolean
Save installed packages to a package.json file as devDependencies.
+When used with the `npm rm` command, it removes it from the devDependencies
+hash.
+
Only works if there is already a package.json file present.
### save-optional
@@ -602,6 +595,9 @@ Only works if there is already a package.json file present.
Save installed packages to a package.json file as optionalDependencies.
+When used with the `npm rm` command, it removes it from the devDependencies
+hash.
+
Only works if there is already a package.json file present.
### searchopts
View
1 deps/npm/doc/cli/init.md
@@ -20,5 +20,6 @@ without a really good reason to do so.
## SEE ALSO
+* <https://github.com/isaacs/init-package-json>
* npm-json(1)
* npm-version(1)
View
2 deps/npm/doc/cli/install.md
@@ -160,7 +160,7 @@ local copy exists on disk.
npm install sax --force
The `--global` argument will cause npm to install the package globally
-rather than locally. See `npm-global(1)`.
+rather than locally. See `npm-folders(1)`.
The `--link` argument will cause npm to link global installs into the
local space in some cases.
View
31 deps/npm/doc/cli/json.md
@@ -394,6 +394,7 @@ Git urls can be of the form:
git://github.com/user/project.git#commit-ish
git+ssh://user@hostname:project.git#commit-ish
+ git+ssh://user@hostname/project.git#commit-ish
git+http://user@hostname/project/blah.git#commit-ish
git+https://user@hostname/project/blah.git#commit-ish
@@ -420,6 +421,36 @@ Array of package names that will be bundled when publishing the package.
If this is spelled `"bundleDependencies"`, then that is also honorable.
+## optionalDependencies
+
+If a dependency can be used, but you would like npm to proceed if it
+cannot be found or fails to install, then you may put it in the
+`optionalDependencies` hash. This is a map of package name to version
+or url, just like the `dependencies` hash. The difference is that
+failure is tolerated.
+
+It is still your program's responsibility to handle the lack of the
+dependency. For example, something like this:
+
+ try {
+ var foo = require('foo')
+ var fooVersion = require('foo/package.json').version
+ } catch (er) {
+ foo = null
+ }
+ if ( notGoodFooVersion(fooVersion) ) {
+ foo = null
+ }
+
+ // .. then later in your program ..
+
+ if (foo) {
+ foo.doFooThings()
+ }
+
+Entries in `optionalDependencies` will override entries of the same name in
+`dependencies`, so it's usually best to only put in one place.
+
## engines
You can specify the version of
View
BIN deps/npm/html/api/GubbleBum-Blocky.ttf
Binary file not shown.
View
69 deps/npm/html/api/author.html
@@ -1,69 +0,0 @@
-<!doctype html>
-<html>
- <title>author</title>
- <meta http-equiv="content-type" value="text/html;utf-8">
- <link rel="stylesheet" type="text/css" href="./style.css">
-
- <body>
- <div id="wrapper">
-<h1><a href="../api/owner.html">owner</a></h1> <p>Manage package owners</p>
-
-<h2 id="SYNOPSIS">SYNOPSIS</h2>
-
-<pre><code>npm.commands.owner(args, callback)</code></pre>
-
-<h2 id="DESCRIPTION">DESCRIPTION</h2>
-
-<p>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):</p>
-
-<ul><li>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.</li><li>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.</li><li>rm (user, package):
-Remove a user from the package owner list. This immediately revokes their
-privileges.</li></ul>
-
-<p>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.</p>
-
-<h2 id="SEE-ALSO">SEE ALSO</h2>
-
-<ul><li><a href="../api/publish.html">publish(3)</a></li><li><a href="../doc/registry.html">registry(1)</a></li></ul>
-</div>
-<p id="footer">author &mdash; npm@1.1.0-alpha-3</p>
-<script>
-;(function () {
-var wrapper = document.getElementById("wrapper")
-var els = Array.prototype.slice.call(wrapper.getElementsByTagName("*"), 0)
- .filter(function (el) {
- return el.parentNode === wrapper
- && el.tagName.match(/H[1-6]/)
- && el.id
- })
-var l = 2
- , toc = document.createElement("ul")
-toc.innerHTML = els.map(function (el) {
- var i = el.tagName.charAt(1)
- , out = ""
- while (i > l) {
- out += "<ul>"
- l ++
- }
- while (i < l) {
- out += "</ul>"
- l --
- }
- out += "<li><a href='#" + el.id + "'>" +
- ( el.innerText || el.text || el.innerHTML)
- + "</a>"
- return out
-}).join("\n")
-toc.id = "toc"
-document.body.appendChild(toc)
-})()
-</script>
-</body></html>
View
4 deps/npm/html/api/bin.html
@@ -2,7 +2,7 @@
<html>
<title>bin</title>
<meta http-equiv="content-type" value="text/html;utf-8">
- <link rel="stylesheet" type="text/css" href="./style.css">
+ <link rel="stylesheet" type="text/css" href="../style.css">
<body>
<div id="wrapper">
@@ -19,7 +19,7 @@ <h2 id="DESCRIPTION">DESCRIPTION</h2>
<p>This function should not be used programmatically. Instead, just refer
to the <code>npm.bin</code> member.</p>
</div>
-<p id="footer">bin &mdash; npm@1.1.18</p>
+<p id="footer">bin &mdash; npm@1.1.32</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
View
4 deps/npm/html/api/bugs.html
@@ -2,7 +2,7 @@
<html>
<title>bugs</title>
<meta http-equiv="content-type" value="text/html;utf-8">
- <link rel="stylesheet" type="text/css" href="./style.css">
+ <link rel="stylesheet" type="text/css" href="../style.css">
<body>
<div id="wrapper">
@@ -25,7 +25,7 @@ <h2 id="DESCRIPTION">DESCRIPTION</h2>
<p>This command will launch a browser, so this command may not be the most
friendly for programmatic use.</p>
</div>
-<p id="footer">bugs &mdash; npm@1.1.18</p>
+<p id="footer">bugs &mdash; npm@1.1.32</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
View
4 deps/npm/html/api/commands.html
@@ -2,7 +2,7 @@
<html>