From 7b79d793eac65fcea3ab0ff448d54427c480ccd7 Mon Sep 17 00:00:00 2001 From: josieusa Date: Fri, 29 Jul 2016 17:49:32 +0200 Subject: [PATCH] Use cls-hooked instead of continuation-local-storage, as suggested by @raymondfeng in strongloop/loopback-context PR #1 comment #235931961 --- README.md | 2 +- package.json | 4 ++-- server/current-context.js | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 1b8bf4c..cd81ed8 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # loopback-context Current context for LoopBack applications, based on -node-continuation-local-storage. +cls-hooked. ## WARNING diff --git a/package.json b/package.json index c4f28ae..06d0407 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/server/current-context.js b/server/current-context.js index 36bec16..874f2d1 100644 --- a/server/current-context.js +++ b/server/current-context.js @@ -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;