- fix: npm engine semver to allow node 6.10.x.
- chore: forked async-hook to updated its engine semver also
- fix: Use the correct
err
variable name in try/catch. Thanks to @enko.
- dep: update engine support ^4.7||^6.9.2||^7.3 to be same as
async-hook
's - dep: update
async-hook
to 1.7.1 - test: give
fs.watchFile
a little more time to pass on Travis CI
- feat: supports node 4.5.0 now
- test: add node 4 to travis
- dep: updated dependencies. Fix eslint issues
- feat: add runPromise
- chore: republishing to npm v4.1.2
- test: Update travis and strict npm engine to ^6.2.2
- test: Updated travis and strict npm engine to ^6.2.2
- feat: add
runAndReturn
method to get return value offunc
(from @overlookmotel).
- feat: Same API but major change to implementation. Uses unofficial AsyncWrap instead of async-listener.
- Updated to use
async-listener@0.4.7
to 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-listener
andemitter-listener
dependency refresh.
emitter-listener
has been extracted fromshimmer
into 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-listener
dependency refresh for better support of node 0.8.0 - 0.8.3.
async-listener
dependency 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-listener
dependency refresh.
- More tweaks for
async-listener
error handlers (just a dependency refresh).
async-listener
error listeners have gotten lots of tweaks. Update to newest API.- Only exit namespace context on error if a continuation chain is active.
async-listener
now 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.removeListener
are 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
/addListener
remonkeypatching innamespace.bindEmitter()
so thatshimmer
is 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
setImmediate
in 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
asyncListener
API changes. - Many more test cases to ensure
asyncListener
stuff 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-listener
polyfill 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.