I just changed the cls dependency after reading this thread. As stated in the docs of cls-hooked, it uses the experimental async_hooks for node >= 8.2.1 and AsycnWrap for versions < 8.
I tried the changes made in this PR with node 9 with and with an updated version of express-correlation-id. The correlation id remains in the context after async/await calls.
Coverage remained the same at 100.0% when pulling 0954f348da79993e777d213475d04461b8aaeaea on rubanour:cls-hook-for-async-await into a6e6715d8603f2a20bf3324ef788a8c3d27835d3 on toboid:master.
I just changed the cls dependency after reading this thread. As stated in the docs of cls-hooked, it uses the experimental async_hooks for node >= 8.2.1 and AsycnWrap for versions < 8.
I tried the changes made in this PR with node 9 with and with an updated version of express-correlation-id. The correlation id remains in the context after async/await calls.