Use cls-hooked instead of continuation-local-storage,

as suggested by @raymondfeng
in strongloop/loopback-context PR #1 comment #235931961
This commit is contained in:
josieusa 2016-07-29 17:49:32 +02:00
parent 71585a2395
commit 518aedc89f
3 changed files with 4 additions and 4 deletions

View File

@ -1,7 +1,7 @@
# loopback-context
Current context for LoopBack applications, based on
node-continuation-local-storage.
cls-hooked.
## Usage

View File

@ -1,7 +1,7 @@
{
"name": "loopback-context",
"version": "1.0.0",
"description": "Current context for LoopBack applications, based on node-continuation-local-storage",
"description": "Current context for LoopBack applications, based on cls-hooked",
"keywords": [
"StrongLoop",
"LoopBack",
@ -20,7 +20,7 @@
},
"license": "MIT",
"dependencies": {
"continuation-local-storage": "^3.1.7"
"cls-hooked": "^4.0.1"
},
"devDependencies": {
"chai": "^3.5.0",

View File

@ -16,7 +16,7 @@ var domain = require('domain');
// https://github.com/othiym23/async-listener/issues/57
// It all goes away when instrumentation is disabled.
var cls = function() {
return require('continuation-local-storage');
return require('cls-hooked');
};
var LoopBackContext = module.exports;