Jeff-Lewis / cls-hooked

cls-hooked : CLS using AsynWrap or async_hooks instead of async-listener for node 4.7+

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Experimental issue of Async-hooks in Nodejs docs.

hadirsa opened this issue · comments

Hi, community. We are deciding to use a package that has this cls-hooked in its dependencies.
We know that this package uses async_hooks which has marked as Experimental in Nodejs docs:
https://nodejs.org/api/async_hooks.html#async_hooks_async_hooks

The question is:
Is there any plan for the depreciation of async_hooks in the Node Js new versions?
I mean that what we will do if async_hooks gets deprecated.

I appreciate any recommendations.

commented

@hadirsa The async_hooks API is finally out of experimental and is now part of the stable Node v14 APIs.

@hadirsa The async_hooks API is finally out of experimental and is now part of the stable Node v14 APIs.

Got a source for this? The node docs for v14 still claim it is experimental: https://nodejs.org/docs/latest-v14.x/api/async_hooks.html

Newer versions of 13 and 14 does add AsyncLocalStorage though, which actually has a very similar api to CLS. I believe it is just syntax sugar on top of async hooks though, so it is experimental as well.