toboid / correlation-id

Correlation id for node.js
MIT License
47 stars 8 forks source link

Replace cls dependency with cls-hooked to support async-await #19

Closed rubanour closed 6 years ago

rubanour commented 6 years ago

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.

coveralls commented 6 years ago

Coverage Status

Coverage remained the same at 100.0% when pulling 0954f348da79993e777d213475d04461b8aaeaea on rubanour:cls-hook-for-async-await into a6e6715d8603f2a20bf3324ef788a8c3d27835d3 on toboid:master.

santi8ago8 commented 6 years ago

+1

toboid commented 6 years ago

published as version @2.1.1