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

650 Commits

Author SHA1 Message Date
Ryan Dahl
8185e1fd25 Remove include() add node.mixin()
include() should not be used by libraries because it will pollute the global
namespace. To discourage this behavior and bring Node more in-line with
the current CommonJS module system, include() is removed.

Small scripts like unit tests often times do want to pollute the global
namespace for ease. To avoid the boiler plate code of

  var x = require("/x.js");
  var foo = x.foo;
  var bar = x.bar;

The function node.mixin() is stolen from jQuery's jQuery.extend. So that it
can be written:

  node.mixin(require("/x.js"));

Reference:
http://docs.jquery.com/Utilities/jQuery.extend
http://groups.google.com/group/nodejs/browse_thread/thread/f9ac83e5c11e7e87
2009-10-05 15:46:31 +02:00
Ryan Dahl
522909bcbf Parse queryString into req.uri.params 2009-10-05 14:52:26 +02:00
Ryan Dahl
4c51af882d Fix typo 2009-10-05 13:16:56 +02:00
Ryan Dahl
bac16bd8ac Remove node.pc 2009-10-05 13:04:21 +02:00
Ryan Dahl
e2b7902469 Don't use parseUri for HTTP server
The big parseUri RE was showing up often in profiles - this is simpler and
yields better performance by taking advantage of the C http parser.
2009-10-04 12:19:01 +02:00
Ryan Dahl
7b8842b619 Modify node_addon configure api 2009-10-04 11:50:53 +02:00
Ryan Dahl
5c9fe1fce1 Update addon documentation 2009-10-04 11:14:39 +02:00
Ryan Dahl
39e6d959d7 Add node-waf to help with building addons. 2009-10-04 10:33:39 +02:00
Ryan Dahl
13793aed20 Add Makefiles which were forgotten. 2009-10-03 22:48:44 +02:00
Ryan Dahl
bf0d278a45 Improve "make dist" remove generated doc from repo. 2009-10-03 22:48:33 +02:00
Ryan Dahl
861f28f37a Don't unnecessarily output the makefile from the configure script. 2009-10-03 21:46:59 +02:00
Ryan Dahl
6f17ca51c3 Install wafadmin into $PREFIX/lib/node/wafadmin
This is in preparation for a special node_waf script for building external
modules.

Also change system library path to $PREFIX/lib/node/libraries
2009-10-03 19:09:00 +02:00
Felix Geisendörfer
eeaa267cbe Documentation for Multipart parser
Also added multipart.parse as a convenience function
2009-10-03 18:06:24 +02:00
Ryan Dahl
602f9dbf3f SetClassName on internal classes. 2009-10-03 15:08:03 +02:00
Ryan Dahl
b66c5c9808 Replace DEFINE_SIMPLE_CALLBACK macros with explicit functions 2009-10-03 14:45:35 +02:00
Ryan Dahl
84d2966377 Use waf-light instead of waf
This way there won't be strange tools/.waf-12343 directories hanging about.
All that waf needs to run is inside the tools/wafadmin directory.
2009-10-02 17:05:42 +02:00
Ryan Dahl
763137e705 chat.tinyclouds.org -> chat.nodejs.org 2009-10-02 16:24:49 +02:00
Ryan Dahl
bc9b343fd3 Add note about symbol visibility in V8 to wscript 2009-10-02 14:10:40 +02:00
Ryan Dahl
9c9d67eb6c bump version 2009-09-30 23:21:25 +02:00
Ryan Dahl
7b337096c9 Add a third argument to http.cat to specify req headers. 2009-09-30 11:55:03 +02:00
isaacs
45f5402446 Pass the Host header in http.cat calls, if it was specified in the URL passed to http.cat. 2009-09-29 16:38:07 -07:00
Ryan Dahl
a8c0211e73 Bugfix: require() and include() should work in callbacks.
Removing requireAsync and includeAsync from global scope for now as a
temporary fix.  Reported by Yuffster.
2009-09-29 19:28:54 +02:00
Ryan Dahl
1ae69a68a4 Clean up some text in documentation. 2009-09-29 18:06:36 +02:00
Ryan Dahl
cda659a8c8 Camel-case all http events 2009-09-29 18:06:14 +02:00
Ryan Dahl
18da8ffaee Copy Python's shutil.copytree into wscript.
It's broken in Python 2.4.4. One gets this message when trying to run
configure:

  [...]
  Checking for SYS_clock_gettime           : ok
  Checking for library rt                  : ok
  Checking for function clock_gettime      : ok
  Checking for function nanosleep          : ok
  Checking for function ceil               : ok
  ---- deps/udns ----
  Traceback (most recent call last):
    File "/path/to/node/tools/waf", line 148, in ?
      Scripting.prepare(t, cwd, VERSION, wafdir)
    File "/path/to/node/tools/.waf-1.5.8-3e327cd9534c48e6762f56fdb1332663/wafadmin/Scripting.py", line 102, in prepare
      prepare_impl(t,cwd,ver,wafdir)
    File "/path/to/node/tools/.waf-1.5.8-3e327cd9534c48e6762f56fdb1332663/wafadmin/Scripting.py", line 95, in prepare_impl
      main()
    File "/path/to/node/tools/.waf-1.5.8-3e327cd9534c48e6762f56fdb1332663/wafadmin/Scripting.py", line 130, in main
      fun(ctx)
    File "/path/to/node/tools/.waf-1.5.8-3e327cd9534c48e6762f56fdb1332663/wafadmin/Scripting.py", line 168, in configure
      conf.sub_config([''])
    File "/path/to/node/tools/.waf-1.5.8-3e327cd9534c48e6762f56fdb1332663/wafadmin/Configure.py", line 100, in sub_config
      self.recurse(k,name='configure')
    File "/path/to/node/tools/.waf-1.5.8-3e327cd9534c48e6762f56fdb1332663/wafadmin/Utils.py", line 391, in recurse
      f(self)
    File "<string>", line 82, in configure
    File "<string>", line 48, in conf_subproject
    File "/usr/lib/python2.4/shutil.py", line 111, in copytree
      os.mkdir(dst)
  OSError: [Errno 2] No such file or directory: '/sites/rabidlabs.net/sandboxes/m/public_html/projects/0909.node/node/build/default/deps/udns'

The problem is probably this:
http://mail.python.org/pipermail/python-bugs-list/2005-January/027118.html

As a solution I am copying 2.6's version of the function in.
2009-09-28 22:39:00 +02:00
Ryan Dahl
4ba5b7e24b Add doc for node.compile() 2009-09-28 22:16:43 +02:00
Ryan Dahl
e972add0ea Update module loading docs 2009-09-28 19:44:40 +02:00
Ryan Dahl
b7526eb324 Add warning when coroutine stack size grows too large.
For the moment too large is 10.
2009-09-28 18:48:19 +02:00
Ryan Dahl
9f07a690c6 docs: Reference node.libraryPaths in helpers section. 2009-09-28 18:48:19 +02:00
Ryan Dahl
27738d8e60 Clean up some things in the repl, add docs. 2009-09-28 18:48:19 +02:00
Ryan Dahl
835554c92b Error message on bad module load. 2009-09-28 18:48:19 +02:00
Ryan Dahl
23c7f472d0 API: Move node.exit() to process.exit(). 2009-09-28 18:48:18 +02:00
Ryan Dahl
c27d9f986a include utils in the repl. 2009-09-28 18:48:18 +02:00
Ryan Dahl
459d644a5a Don't delete timer object on clearTimeout.
I've heard delete is inefficient in v8. Better to let the garbage collector
take care of it naturally.
2009-09-28 18:48:18 +02:00
Ryan Dahl
095470854b Move tcp library to /tcp.js 2009-09-28 18:48:18 +02:00
Ryan Dahl
0955b0c8de Add forgotten file lib/utils.js 2009-09-28 18:48:17 +02:00
Ryan Dahl
83c9e64889 http.js license reference 2009-09-28 18:48:17 +02:00
Ryan Dahl
f6657c3c9d Move http library to /http.js 2009-09-28 12:36:36 +02:00
Ryan Dahl
7abad8b7b3 API: Move node.puts(), node.exec() and others to /utils.js 2009-09-28 12:06:30 +02:00
Ryan Dahl
c35dfdfd5e Remove api.xml from gitignore 2009-09-28 11:46:09 +02:00
Felix Geisendörfer
27c750154e Multipart stream parser 2009-09-27 16:58:56 +02:00
Ryan Dahl
3e7f0deef9 Add docbook documentation 2009-09-27 12:52:28 +02:00
Ryan Dahl
4f69871c17 Add node.inspect() and deprecate p(). 2009-09-27 12:33:44 +02:00
Ryan Dahl
9cd7864fd9 readFile/writeFile to read/write in file library.
as suggested by Bluebie.
2009-09-27 11:07:54 +02:00
Jeremy Lal
5e7a8dc75e Fixes for libeio wscript on Debian.
- Link libeio to pthread.
- Add -D_GNU_SOURCE to libeio wscript.
2009-09-27 10:55:18 +02:00
Ryan Dahl
45ea62a0f6 Changes to compile on Andrew Miller's very old machine 2009-09-26 15:11:31 +02:00
Ryan Dahl
0eb8d880f8 Remove -Werror on v8, for compiling on GCC 4.4 2009-09-25 08:40:47 +02:00
RayMorgan
028e24c9f5 When printing, check to see if value is undefined. If so, print nothing. 2009-09-24 22:16:07 -07:00
RayMorgan
7674bd5004 Added _ that is te result of the previous command. 2009-09-24 19:53:11 -07:00
RayMorgan
6915188a46 Enhanced the repl library.
Now supports:
- command options: .help, .break, .clear, .exit
- local vars and global functions
- ability to print 0, false and ""
- when value is a function, prints [Function]
- when object is circular, prints [Circular Object] instead of throwing an error
2009-09-24 18:56:37 -07:00