From c3591077815f98ae06689139312d6612a02f0fa2 Mon Sep 17 00:00:00 2001 From: "long.qul" Date: Wed, 23 Dec 2015 11:09:40 +0800 Subject: [PATCH 1/3] add a shared namespace --- context.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/context.js b/context.js index 659f837..66b1a26 100644 --- a/context.js +++ b/context.js @@ -196,5 +196,11 @@ module.exports = { getNamespace : get, createNamespace : create, destroyNamespace : destroy, - reset : reset + reset : reset, + getSharedNamespace: function () { + if (!process.sharedNamespace) { + process.sharedNamespace = create('shared_' + Date.now() + '_' + Math.random()); + } + return process.sharedNamespace; + } }; From 13013aa9ff429e364a1b1f937d260b9b19cfc1e0 Mon Sep 17 00:00:00 2001 From: "long.qul" Date: Wed, 23 Dec 2015 11:10:33 +0800 Subject: [PATCH 2/3] add tnpm publish config --- package.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 1b7dade..bc49228 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "continuation-local-storage", + "name": "@ali/continuation-local-storage", "version": "3.1.4", "description": "userland implementation of https://github.com/joyent/node/issues/5243", "main": "context.js", @@ -33,5 +33,8 @@ "dependencies": { "async-listener": "^0.5.0", "emitter-listener": "^1.0.1" + }, + "publishConfig": { + "registry": "http://registry.npm.alibaba-inc.com" } } From b9f45b1af53727a8ebdd5f818a8ef5ef6edd3839 Mon Sep 17 00:00:00 2001 From: "long.qul" Date: Wed, 23 Dec 2015 11:14:45 +0800 Subject: [PATCH 3/3] bump ver --- package.json | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index bc49228..c40e0a5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { - "name": "@ali/continuation-local-storage", - "version": "3.1.4", + "name": "continuation-local-storage", + "version": "3.1.5", "description": "userland implementation of https://github.com/joyent/node/issues/5243", "main": "context.js", "directories": { @@ -33,8 +33,5 @@ "dependencies": { "async-listener": "^0.5.0", "emitter-listener": "^1.0.1" - }, - "publishConfig": { - "registry": "http://registry.npm.alibaba-inc.com" } }