- Updated to use
async-listener@0.4.7to pick up bug fixes.
- Removed the notion of a "default" or "global" context per namespace. It only existed to create a simpler interface for developing and testing the module, and created the potential for nasty information disclosure bugs (see issue #14 for details). This is potentially a breaking change, if you're depending on the global context, so semver says we have to bump the major version.
- Added this changelog.
async-listenerandemitter-listenerdependency refresh.
emitter-listenerhas been extracted fromshimmerinto a standalone module fornamespace.bindEmitter().
- When an error is thrown in a CLS-bound continuation chain, attach the active context for the namespace to which the chain is bound. This is necessary because CLS and asyncListeners actually do too good a job of cleaning up after errors, and so they don't escape the continuation chain. New Relic needs the context so it can get the transaction active when the error happened for error tracing.
async-listenerdependency refresh for better support of node 0.8.0 - 0.8.3.
async-listenerdependency refresh.
- Relax the requirement that CLS contexts be pushed and popped from a stack,
instead treating them as a set. This allows context interleaving (i.e.
using the lower-level
namespace.enter()andnamespace.exit()API without any strict ordering dependencies). Everything works, but this still makes me a little uneasy. - EEs can now be bound to multiple namespaces, although this is likely to be slow.
- Even if you use an EE bound to a namespace outside a continuation chain, it shouldn't explode.
async-listenerdependency refresh.
- More tweaks for
async-listenererror handlers (just a dependency refresh).
async-listenererror listeners have gotten lots of tweaks. Update to newest API.- Only exit namespace context on error if a continuation chain is active.
async-listenernow supports error listeners. Update to newest API.- Namespace context should be exited on asynchronous errors.
- When EEs are in the middle of emitting, make sure that calls to
emitter.removeListenerare testing against non-monkeypatched versions of the event handlers (necessary so certain Connect middleware functions, such asconnect.limit, run correctly).
- Ensure handler rebinding gets called even in case of errors.
- Be consistent about making sure contexts are kept in a sane state when errors are thrown in EEs.
- Guard
on/addListenerremonkeypatching innamespace.bindEmitter()so thatshimmeris only called to rebind if the monkeypatched versions have actually been replaced. - Don't try to call emit if there are no listeners on a bound EE.
- Don't use
setImmediatein tests, because it's not available in Node 0.8.x.
- Update to newest version of
async-listener. - Fix typo.
- EventEmitters can now be bound to CLS namespaces. Because EEs act as coupling points between asynchronous domains, it's necessary for the EE binding to capture the CLS context both when the listener is added, and when a matching handler is firing because of a matching event being emitted.
- More tweaks to conform with
asyncListenerAPI changes. - Many more test cases to ensure
asyncListenerstuff is working with Node 0.8.x.
- Square up with latest
async-listener/ node PR #6011 changes.
- Document
namespace.createContext(). - Fix issue where a value was always being returned from
namespace.run(), even on error.
- Clean up minor typo in docs.
- Incorporate documentation from failed CLS PR.
namespace.bind()now also always exits the domain, even on error.- Namespaces can be destroyed.
cls.reset()allows tests to nuke all existing namespaces (use with care obviously).
- Use
async-listenerpolyfill instead ofcls-glue. - Incorporate tests from
cls-glue.
- Namespace exits context even on error.
- Split createContext so it's part of the namespace API.
- Tweak error message to be more informative.
- Correct Tim's email address.
- Each application of CLS is allocated its own "namespace", which bind data to
continuation chains, either using
.run()or.bind()to create a new nested context. These nested contexts are prototype chains that point back to a "default" / "global" context, with the default context for each namespace being a prototype-free "data bag" created withObject.create(null).
- Document progress thus far.
- First attempt: basic API, docs, and tests.