This repository was archived by the owner on Oct 3, 2023. It is now read-only.
Use cls-hooked instead of continuation-local-storage#793
Open
oleg-codaio wants to merge 3 commits intocensus-instrumentation:masterfrom
Open
Use cls-hooked instead of continuation-local-storage#793oleg-codaio wants to merge 3 commits intocensus-instrumentation:masterfrom
oleg-codaio wants to merge 3 commits intocensus-instrumentation:masterfrom
Conversation
oleg-codaio
commented
Apr 11, 2020
| @@ -1,174 +0,0 @@ | |||
| /** | |||
Author
There was a problem hiding this comment.
cls-hooked already handles different versions of Node, so I don't think we need this.
oleg-codaio
commented
Apr 11, 2020
| ? require('./cls-ah') | ||
| : require('continuation-local-storage'); | ||
| // eslint-disable-next-line no-any | ||
| export type Func<T> = (...args: any[]) => T; |
Author
There was a problem hiding this comment.
Not a huge fan of the no-any bypass here, but I just took this definition from the original continuation-local-storage package. Open to suggestions, though.
Author
|
Yikes, tests failed and looks this needs more work. Could be that this project or a dependency is interfering with queuing (https://github.com/nodejs/diagnostics/blob/master/tracing/AsyncHooks/problematic-modules.md), though I'm not at all familiar with this library and probably won't get to debugging in the near future. If anyone else with more familiarity has any ideas and a motivation to tackle this, please do. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #792.
Would appreciate a maintainer to verify that this PR works, as I'm not familiar with this package: just trying to fix a deprecation warning a few levels deep into dependencies.