{"action":"created","issue":{"url":"https://api.github.com/repos/strongloop/loopback-context/issues/11","repository_url":"https://api.github.com/repos/strongloop/loopback-context","labels_url":"https://api.github.com/repos/strongloop/loopback-context/issues/11/labels{/name}","comments_url":"https://api.github.com/repos/strongloop/loopback-context/issues/11/comments","events_url":"https://api.github.com/repos/strongloop/loopback-context/issues/11/events","html_url":"https://github.com/strongloop/loopback-context/pull/11","id":176007762,"number":11,"title":"[SEMVER-MAJOR] Replace continuation-local-storage with cls-hooked","user":{"login":"josieusa","id":9404635,"avatar_url":"https://avatars.githubusercontent.com/u/9404635?v=3","gravatar_id":"","url":"https://api.github.com/users/josieusa","html_url":"https://github.com/josieusa","followers_url":"https://api.github.com/users/josieusa/followers","following_url":"https://api.github.com/users/josieusa/following{/other_user}","gists_url":"https://api.github.com/users/josieusa/gists{/gist_id}","starred_url":"https://api.github.com/users/josieusa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/josieusa/subscriptions","organizations_url":"https://api.github.com/users/josieusa/orgs","repos_url":"https://api.github.com/users/josieusa/repos","events_url":"https://api.github.com/users/josieusa/events{/privacy}","received_events_url":"https://api.github.com/users/josieusa/received_events","type":"User","site_admin":false},"labels":[{"id":416321201,"url":"https://api.github.com/repos/strongloop/loopback-context/labels/%23community%20contribution","name":"#community contribution","color":"eb6420","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":14,"created_at":"2016-09-09T13:21:15Z","updated_at":"2016-12-28T07:46:05Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/strongloop/loopback-context/pulls/11","html_url":"https://github.com/strongloop/loopback-context/pull/11","diff_url":"https://github.com/strongloop/loopback-context/pull/11.diff","patch_url":"https://github.com/strongloop/loopback-context/pull/11.patch"},"body":"Hello, this is a quick and (not so) dirty alternative to PR #2.\n\nRationale:\n- Personally, I still like more the approach I used in PR #2, but I just realized it needs further analysis, because I initially forgot to take into account issue [async-listener#57](https://github.com/othiym23/async-listener/issues/57).\n- The quickest and most obvious way to address this is, of course, to get rid of `async-listener`, which already was the long-term goal of my previous PR, anyway. Here it just turned into an immediate goal, that's all.\n- One trivial way to reach this goal immediately is to completely replace `continuation-local-storage` with `cls-hooked` **quitting any attempt to keep backward compatibility with the former**, which is exactly what I did in this PR and is the difference with my previous PR. This should make the commit `df60f13`no longer necessary, so I reverted it.\n- `cls-hooked`, however (maybe `continuation-local-storage` too, I don't care), needs to be required before everything else, in order to not fail silently and catastrophically. So, I also gave proper and detailed instructions about how to do this in the README.md\n\nAnyway, given the very short time I dedicated to this PR, I would consider this a **work-in-progress** for now.\n\nTODO:\n- Bump version to 2.0.0-alpha.1 when it's more ready for alpha release.\n\nPS\nFor now, in order to make tests work, after deleting `node_modules` folder and running `npm i`, I had to run (NPM v3):\n\n```\nnpm r strong-remoting\nnpm i strong-remoting@3.0.0-alpha.5\n```\n\nI suppose this is because [loopback PR #2696](https://github.com/strongloop/loopback/pull/2696/commits/6e1defcb1805176867fdf0101e9d5ae64a80ba75) maybe hasn't landed in `loopback-context` yet.\n\nAlso, for the same reason, if you test this branch from inside a Loopback app, make sure that `loopback-context` uses the same version of `strong-remoting` as the app.\n"},"comment":{"url":"https://api.github.com/repos/strongloop/loopback-context/issues/comments/269439642","html_url":"https://github.com/strongloop/loopback-context/pull/11#issuecomment-269439642","issue_url":"https://api.github.com/repos/strongloop/loopback-context/issues/11","id":269439642,"user":{"login":"josieusa","id":9404635,"avatar_url":"https://avatars.githubusercontent.com/u/9404635?v=3","gravatar_id":"","url":"https://api.github.com/users/josieusa","html_url":"https://github.com/josieusa","followers_url":"https://api.github.com/users/josieusa/followers","following_url":"https://api.github.com/users/josieusa/following{/other_user}","gists_url":"https://api.github.com/users/josieusa/gists{/gist_id}","starred_url":"https://api.github.com/users/josieusa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/josieusa/subscriptions","organizations_url":"https://api.github.com/users/josieusa/orgs","repos_url":"https://api.github.com/users/josieusa/repos","events_url":"https://api.github.com/users/josieusa/events{/privacy}","received_events_url":"https://api.github.com/users/josieusa/received_events","type":"User","site_admin":false},"created_at":"2016-12-28T07:46:05Z","updated_at":"2016-12-28T07:46:05Z","body":"@dehypnosis If you want to use this in your app before it gets merged, you can do like this in `package.json` if your NPM version is recent enough:\r\n```\r\n...\r\n\"dependencies\": {\r\n...\r\n    \"loopback-context\": \"github:josieusa/loopback-context#feature/cls-hooked-3\",\r\n...\r\n},\r\n...\r\n\r\n```\r\nIf you do this, I strongly recommend to edit `package.json` again afterwards, as soon as this PR gets merged."}}
{"actor":{"display_login":"josieusa"}}