Commit Graph

1937 Commits (138593b156c20b17429aeb1ab3f1da2c3b5b7892)

Author SHA1 Message Date
Ryan Dahl 138593b156 Fix case in docs 2010-07-23 12:14:51 -07:00
isaacs f0f247d7e5 Fix dirname so that dirname('/a/b/') -> '/a', like sh's does.
Before there was this comment:
  Can't strip trailing slashes since module.js incorrectly
  thinks dirname('/a/b/') should yield '/a/b' instead of '/a'.
But now, such thinking is corrected.
2010-07-23 09:08:49 -07:00
Andrew Naylor e0d6f14b22 Buffer for Cipher, Decipher, Hmac, Sign and Verify 2010-07-23 09:08:30 -07:00
Ryan Dahl cb97cdb256 Remove Werror from SConstruct 2010-07-21 12:43:19 -07:00
Ryan Dahl e4eeaa7fbc Upgrade V8 to 2.3.2 2010-07-21 12:31:46 -07:00
Ryan Dahl 07ab34cd58 TODO items 2010-07-21 11:44:47 -07:00
Chandra Sekar S f5f7cb9264 Support for reading byte ranges from files using fs.createReadStream. 2010-07-21 11:33:35 -07:00
Peter Griess 56f200af5d Fix Buffer.toString() on 0-length slices.
- Buffer.toString('ascii', 0, 0) incorrectly returns the entire contents
  of the buffer. Fix this.
- Provide similar behavior to Buffer.write() and Buffer.copy() when
  dealing with 0-length in valid and invalid byte ranges.
2010-07-20 15:38:10 -07:00
Sam Shull 8acea2693d Add parenthesis to NODE_VERSION_AT_LEAST 2010-07-20 12:41:39 -07:00
Robert Keizer 5ebf6049d0 Added process.binding('stdio').getRows() 2010-07-20 12:38:03 -07:00
isaacs d75b63bc3c Support including modules that don't have an extension.
This way, require("/foo") will work if there is a "foo.js", or a file named
simply "foo" with no extension.
2010-07-20 10:26:24 -07:00
Ryan Dahl 7067a7155f Specify env differently in execFile
Callbacks should always be the last argument.
2010-07-19 20:08:35 -07:00
Brian 352b8c3ad5 Consistency changes in api docs 2010-07-19 14:18:55 -07:00
isaacs 49e0f14a2f Cache modules based on filename rather than ID
This is ever so slightly less efficient than caching based on ID, since the
filename has to be looked up before we can check the cache.  However, it's
the most minimal approach possible to get this change in place.  Since
require() is a blocking startup-time operation anyway, a bit of slowness is
not a huge problem.

A test involving require.paths modification and absolute loading. Here's the
gist of it.

Files: /p1/foo.js /p2/foo.js

  1. Add "/p1" to require.paths.
  2. foo1 = require("foo")
  3. assert foo1 === require("/p1/foo") (fail)
  4. Remove /p1 from require.paths.
  5. Add /p2 to require.paths.
  6. foo2 = require("foo")
  7. assert foo1 !== foo2 (fail)
  8. assert foo2 === require("/p2/foo") (fail)

It's an edge case, but it affects how dependencies are mapped by npm.
If your module requires foo-1.2.3, and my module requires foo-2.3.4,
then you should expect to have require("foo") give you foo-1.2.3, and
I should expect require("foo") to give me foo-2.3.4.  However, with
module ID based caching, if your code loads *first*, then your "foo"
is THE "foo", so I'll get your version instead of mine.

It hasn't yet been a problem, but only because there are so few
modules, and everyone pretty much uses the latest version all the
time.  But as things start to get to the 1.x and 2.x versions, it'll
be an issue, I'm sure.  Dependency hell isn't fun, so this is a way to
avoid it before it strikes.
2010-07-19 14:17:22 -07:00
Peter Griess a9d8cac4b0 Document setuid/setgid sync resolution capability. 2010-07-19 11:47:25 -07:00
Micheil Smith 299671b731 querystring: Removing typecasting of numeric strings to numbers
The tests did not accurately test for a strict equality, meaning that the
number == to the string.
2010-07-19 11:07:08 -07:00
Jan Kassens f18d9d8466 querystring.js: JSLint warnings fixed 2010-07-19 10:54:50 -07:00
Jan Kassens c7e0c64506 querystring doc fix 2010-07-19 10:53:54 -07:00
Jan Kassens bb2acd5e75 querystring.stringify is now more solid
* handles NaN and Infinity
* works with arrays from other contexts
2010-07-19 10:53:32 -07:00
Ryan Dahl eda1edd07f Add todo item 2010-07-19 10:35:59 -07:00
Ryan Dahl 9a26946aaa Fix for issue #214 2010-07-19 10:32:56 -07:00
Benjamin Fritsch 0ed3532699 added test for Issue #214 2010-07-19 10:16:31 -07:00
Ryan Dahl 65f2e72d77 Fix style in readline 2010-07-19 10:16:20 -07:00
Jérémy Lal 0fd1656d63 Support DEL in the REPL. 2010-07-18 22:20:23 -07:00
Ryan Dahl 02746eddd6 Apple's SUN_LEN is broken, override 2010-07-17 23:26:58 -07:00
Ryan Dahl 341e41726f Set SO_REUSEADDR on all sockets 2010-07-17 23:10:38 -07:00
Ryan Dahl 11a784d6da Upgrade http-parser 2010-07-17 01:22:16 -07:00
Ryan Dahl fa344d8514 Fix solaris build 2010-07-16 23:24:08 -07:00
Ryan Dahl 0174ceb6b2 bump version 2010-07-16 21:50:26 -07:00
Ryan Dahl 458bbb4687 fs.writeSync should return bytes written 2010-07-16 19:05:28 -07:00
Marco Rogers 1662c37c40 Fix console formatter to recognize json properly 2010-07-15 23:36:35 -07:00
Ryan Dahl dcd41ca864 Upgrade V8 to 2.3.0 2010-07-15 18:52:48 -07:00
Сергей Крыжановский 078a48a97b added env to child_process.exec 2010-07-15 17:17:03 -07:00
Matt Ranney 98341daee2 Fix unix dgram socket address resolution on Linux. 2010-07-15 16:46:46 -07:00
Ryan Dahl 02729d4af7 instanceof Buffer to Buffer.isBuffer() 2010-07-15 15:58:35 -07:00
Ryan Dahl 6961bc568f More instanceof Array fixes 2010-07-15 14:37:56 -07:00
Ryan Dahl bd05d83ae7 Update TODO 2010-07-15 14:21:35 -07:00
Ryan Dahl c926ab7746 Fix test-executable-path.js
Now that process.version doesn't say if the build is debug or not.
2010-07-15 14:21:32 -07:00
Ryan Dahl 8921bf454d Remove race conditions and simplify test-http-exceptions.js 2010-07-15 14:21:32 -07:00
Ryan Dahl 4c6f4dabf5 Adjust tests for error reporting on JSON.parse(undefined)
The V8 upgrade changed the stacktrace reports (?)
2010-07-15 14:21:32 -07:00
Ryan Dahl 9fd5e3c89c Update tests to work with module contexts 2010-07-15 14:21:31 -07:00
Ryan Dahl 9472812569 Fix reference to root global context 2010-07-15 10:52:31 -07:00
Ryan Dahl ddad872020 Add TODO list 2010-07-15 10:36:35 -07:00
Ryan Dahl 6a57a42109 Use Array.isArray instead of instanceof 2010-07-15 10:35:29 -07:00
Ryan Dahl 3a00470dbb Add 'root' global variable as reference to sandbox 2010-07-15 10:35:29 -07:00
Ryan Dahl 5f30377bbc Load modules in individual contexts
Add NODE_MODULE_CONTEXTS env var

Only one test was modified to check that this works. NEED to go through all
tests and modify them so that

  NODE_MODULE_CONTEXTS=1 make test

passes.
2010-07-15 10:34:39 -07:00
Matt Ranney 4e50197e53 Datagram socket refactor. Add tests and documentation.
Support setTTL() and setBroadcast() socket options.
2010-07-15 10:27:44 -07:00
Peter Griess e7c4f8cdaa Buffer.copy() should liberally allow empty copies. 2010-07-15 10:20:42 -07:00
Peter Griess b64a521d66 Buffer('') should create a 0-length buffer 2010-07-15 09:54:53 -07:00
Ryan Dahl 8e2530c320 Upgrade V8 to 2.2.24 2010-07-14 11:16:20 -07:00