Closed bruceharris closed 6 years ago
@bruceharris good question. It was taken from othiym23/node-continuation-local-storage and not changed. There might have been a use case for it that I'm not aware of now. cls-hooked
tries to be compatible with the original fork.
What's your case for removing namespaces from global?
Got it, thanks, that's helpful. Don't have a particular case for removing it, but I was trying to wrap my head around the codebase and it seemed odd/surprising and couldn't understand the motivation for that choice. Seems invasive to mutate the process
object. Thought there might have been some reason that was necessary that I didn't understand, but seems it's just about backward compatibility here. Thanks again for the prompt reply.
Hi, I'm struggling to understand the motivation for persisting namespaces globally (by setting
process.namespaces
) (covered by tests tests here), as opposed to keeping that state local to the library (say, by defining anamespaces
object at the top ofcontext.js
).Thanks, Bruce