{"action":"created","issue":{"url":"https://api.github.com/repos/jiahaog/Revenant/issues/2","labels_url":"https://api.github.com/repos/jiahaog/Revenant/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/jiahaog/Revenant/issues/2/comments","events_url":"https://api.github.com/repos/jiahaog/Revenant/issues/2/events","html_url":"https://github.com/jiahaog/Revenant/pull/2","id":115402136,"number":2,"title":"Use standard Promise API","user":{"login":"naholyr","id":214067,"avatar_url":"https://avatars.githubusercontent.com/u/214067?v=3","gravatar_id":"","url":"https://api.github.com/users/naholyr","html_url":"https://github.com/naholyr","followers_url":"https://api.github.com/users/naholyr/followers","following_url":"https://api.github.com/users/naholyr/following{/other_user}","gists_url":"https://api.github.com/users/naholyr/gists{/gist_id}","starred_url":"https://api.github.com/users/naholyr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/naholyr/subscriptions","organizations_url":"https://api.github.com/users/naholyr/orgs","repos_url":"https://api.github.com/users/naholyr/repos","events_url":"https://api.github.com/users/naholyr/events{/privacy}","received_events_url":"https://api.github.com/users/naholyr/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-11-05T23:47:31Z","updated_at":"2015-11-08T13:17:06Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/jiahaog/Revenant/pulls/2","html_url":"https://github.com/jiahaog/Revenant/pull/2","diff_url":"https://github.com/jiahaog/Revenant/pull/2.diff","patch_url":"https://github.com/jiahaog/Revenant/pull/2.patch"},"body":"I noticed a few flaws about Promise usage that I tried to fix here:\r\n\r\n* Using non-standard ``.fail()`` method, which I replaced with standard ``.catch()`` everywhere\r\n* Using non-standard deferred, which I replaced with standard ``Promise`` constructor\r\n* Arguably replaced ``Q`` with ``bluebird`` for performance sake, but only as a fallback if ``global.Promise`` is not found (which means, only for ``node < 0.12``). At this point, as soon as we rely only on standard API, you can use whatever polyfill feels right to you, or even reasonably **drop** support of node ``0.10`` and remove that dependency ;)"},"comment":{"url":"https://api.github.com/repos/jiahaog/Revenant/issues/comments/154826069","html_url":"https://github.com/jiahaog/Revenant/pull/2#issuecomment-154826069","issue_url":"https://api.github.com/repos/jiahaog/Revenant/issues/2","id":154826069,"user":{"login":"jiahaog","id":7111741,"avatar_url":"https://avatars.githubusercontent.com/u/7111741?v=3","gravatar_id":"","url":"https://api.github.com/users/jiahaog","html_url":"https://github.com/jiahaog","followers_url":"https://api.github.com/users/jiahaog/followers","following_url":"https://api.github.com/users/jiahaog/following{/other_user}","gists_url":"https://api.github.com/users/jiahaog/gists{/gist_id}","starred_url":"https://api.github.com/users/jiahaog/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jiahaog/subscriptions","organizations_url":"https://api.github.com/users/jiahaog/orgs","repos_url":"https://api.github.com/users/jiahaog/repos","events_url":"https://api.github.com/users/jiahaog/events{/privacy}","received_events_url":"https://api.github.com/users/jiahaog/received_events","type":"User","site_admin":false},"created_at":"2015-11-08T13:17:06Z","updated_at":"2015-11-08T13:17:06Z","body":"Thanks, I did not know that promise is a standard node api, I'm still pretty new to promises. I'm not really sure what does `setImmediate` in 216 and 221 of `lib/Revenant.js` do, is it really necessary?"}}