This repository has been archived by the owner. It is now read-only.
Permalink
Switch branches/tags
Commits on Mar 4, 2013
  1. stream: Don't require read(0) to emit 'readable' event

    isaacs committed Mar 3, 2013
    When a readable listener is added, call read(0) so that data will flow in, up to
    the high water mark.
    
    Otherwise, it's somewhat confusing that you have to listen for readable,
    and ALSO call read() (when it will certainly return null) just to get some
    data out of the stream.
    
    See: #4720
  2. dns: fix ReferenceError in resolve() error path

    upsuper authored and bnoordhuis committed Mar 3, 2013
    A typo in the variable name makes it throw a ReferenceError instead of
    the expected "Unknown type" error when dns.resolve() is passed a bad
    record type argument.
    
    Fixes the following exception:
    
      ReferenceError: type is not defined
        at Object.exports.resolve (dns.js:189:40)
        at /Users/bnoordhuis/src/master/test/simple/test-c-ares.js:48:9
        <snip>
  3. cluster: Rename destroy() to kill(signal=SIGTERM)

    isaacs committed Mar 3, 2013
    Fix #4133, bringing the cluster worker API more in line with the
    child process API.
  4. stream: Writable.end(chunk) after end is an error

    isaacs committed Mar 2, 2013
    Calling end(data) calls write(data).  Doing this after end should
    raise a 'write after end' error.
    
    However, because end() calls were previously ignored on already
    ended streams, this error was confusingly suppressed, even though the
    data never is written, and cannot get to the other side.
    
    This is a re-hash of 5222d19, but
    without assuming that the data passed to end() is valid, and thus
    breaking a bunch of tests.
Commits on Mar 3, 2013
  1. make repl compatible with domains

    cxreg authored and isaacs committed Jan 19, 2013
    The try/catch in repl.js keeps any active domain from catching the
    error.  Since the domain may not even be enterd until the code is run,
    it's not possible to avoid the try/catch, so emit on the domain when an
    error is thrown.
  2. Revert "stream: Writable.end(chunk) after end is an error"

    bnoordhuis committed Mar 3, 2013
    It's breaking ~22 tests, Needs further investigation.
    
    This reverts commit 5222d19.
  3. doc: Typo in ChangeLog

    isaacs committed Mar 3, 2013
    downgrade TO 3.14
  4. stream: Writable.end(chunk) after end is an error

    isaacs committed Mar 2, 2013
    Calling end(data) calls write(data).  Doing this after end should
    raise a 'write after end' error.
    
    However, because end() calls were previously ignored on already
    ended streams, this error was confusingly suppressed, even though the
    data never is written, and cannot get to the other side.
Commits on Mar 2, 2013
  1. events: Handle emit('error') before ctor

    isaacs committed Mar 2, 2013
    The previous commit did not handle the case when the event type
    is 'error', since that is checked before reading the handler.
  2. Merge remote-tracking branch 'origin/v0.8'

    bnoordhuis committed Mar 2, 2013
    Conflicts:
    	doc/api/http.markdown
    	test/simple/test-crypto.js
  3. test: make simple/test-dgram-pingpong respect PORT

    bnoordhuis committed Mar 2, 2013
    Don't use hard-coded port numbers, use common.PORT instead.
    
    Should fix the occasional Jenkins failure; the builds run in parallel.
  4. net: Provide better error when writing after FIN

    isaacs committed Mar 2, 2013
    The stock writable stream "write after end" message is overly vague, if
    you have clearly not called end() yourself yet.
    
    When we receive a FIN from the other side, and call destroySoon() as a
    result, then generate an EPIPE error (which is what would happen if you
    did actually write to the socket), with a message explaining what
    actually happened.
  5. windows/msi: fix msi build issue with WiX 3.7/3.8

    raymondfeng authored and piscisaureus committed Mar 2, 2013
    The `heat` tool that gathers NPM source files wasn't getting called.
    Closes #4896
  6. test: optionally set common.PORT via env variable

    tjfontaine authored and bnoordhuis committed Feb 26, 2013
    This is a back-port of commit 17a8126 from the master branch.
  7. test: unlink temp file at test start

    bnoordhuis committed Mar 2, 2013
    The file has a long name that's apparently impossible to remove with
    `git clean` on Windows.
  8. events: add type checks to once

    trevnorris authored and isaacs committed Feb 27, 2013
    Also cleanup unnecessary use of "self" since it will always be called
    using .apply() from emit.
  9. events: emit cleanup

    trevnorris authored and isaacs committed Feb 26, 2013
    Cleanup check logic. Place vars at top. Remove PROCESS.
  10. events: additional type check for addListener

    trevnorris authored and isaacs committed Feb 26, 2013
    Check both passed args to addListener.
    
    Place var at beginning.
  11. events: _events to object and undefined not null

    trevnorris authored and isaacs committed Feb 26, 2013
    By making sure the _events is always an object there is one less check
    that needs to be performed by emit.
    
    Use undefined instead of null. typeof checks are a lot faster than
    isArray.
    
    There are a few places where the this._events check cannot be removed
    because it is possible for the user to call those methods after using
    utils.extend to create their own EventEmitter, but before it has
    actually been instantiated.
  12. events: removeListener add checks and cleanup

    trevnorris authored and isaacs committed Feb 21, 2013
    Remove unecessary splice for single listener events. Add type check for
    "type" argument.
  13. events: type check listeners

    trevnorris authored and isaacs committed Feb 20, 2013
    Make sure the argument passed is a string. Also use typeof === function
    check instead of isArray().
  14. events: simplify removeAllListeners logic

    trevnorris authored and isaacs committed Feb 20, 2013
    Unnecessary checks were being performed on if the event existed before
    being removed.
    
    _events starts out as null, so reset to null when emptied.
    
    Checking typeof is a lot cheaper than isArray().
  15. events: type check setMaxListeners, cleanup throws

    trevnorris authored and isaacs committed Feb 20, 2013
    setMaxListeners will now make sure a positive number is passed. Also
    throwing more definitive Error types.
  16. events: ensure usingDomain is always boolean

    trevnorris authored and isaacs committed Feb 20, 2013
    Small addition to ensure that exports.usingDomains is always a bool.
  17. events: add check for listeners length

    trevnorris authored and isaacs committed Feb 14, 2013
    Ability to return just the length of listeners for a given type, using
    EventEmitter.listenerCount(emitter, event). This will be a lot cheaper
    than creating a copy of the listeners array just to check its length.
  18. crypto: don't assert when calling Cipher#final() twice

    bnoordhuis committed Mar 2, 2013
    Remove the assert() that triggered when Cipher#final() or
    Decipher#final() was called twice.
    
    Fixes #4886.
  19. doc change for Readable._read()

    Lars-Magnus Skog authored and isaacs committed Mar 1, 2013
Commits on Mar 1, 2013