{"action":"closed","number":1,"pull_request":{"url":"https://api.github.com/repos/mongodb-js/hadron-package-manager/pulls/1","id":86696439,"html_url":"https://github.com/mongodb-js/hadron-package-manager/pull/1","diff_url":"https://github.com/mongodb-js/hadron-package-manager/pull/1.diff","patch_url":"https://github.com/mongodb-js/hadron-package-manager/pull/1.patch","issue_url":"https://api.github.com/repos/mongodb-js/hadron-package-manager/issues/1","number":1,"state":"closed","locked":false,"title":"Call packageActivationCompleted only once at the end","user":{"login":"rueckstiess","id":99221,"avatar_url":"https://avatars.githubusercontent.com/u/99221?v=3","gravatar_id":"","url":"https://api.github.com/users/rueckstiess","html_url":"https://github.com/rueckstiess","followers_url":"https://api.github.com/users/rueckstiess/followers","following_url":"https://api.github.com/users/rueckstiess/following{/other_user}","gists_url":"https://api.github.com/users/rueckstiess/gists{/gist_id}","starred_url":"https://api.github.com/users/rueckstiess/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rueckstiess/subscriptions","organizations_url":"https://api.github.com/users/rueckstiess/orgs","repos_url":"https://api.github.com/users/rueckstiess/repos","events_url":"https://api.github.com/users/rueckstiess/events{/privacy}","received_events_url":"https://api.github.com/users/rueckstiess/received_events","type":"User","site_admin":false},"body":"The reflux actions used here were asynchronous by default, and their execution was deferred until after all packages were loaded. Inside `_completeActivation()` the condition `this._isReadingComplete()` was therefore always __true__, so the `packageActivationCompleted()` triggered once for each package loaded. Making the actions synchronous fixes this problem. \r\n\r\nAlso, after loading is complete, the listeners need to be unregistered again. Otherwise there are issues when multiple managers are being used at once.\r\n\r\nTests included.\r\n\r\n","created_at":"2016-09-26T07:57:51Z","updated_at":"2016-09-26T09:02:57Z","closed_at":"2016-09-26T09:02:57Z","merged_at":"2016-09-26T09:02:57Z","merge_commit_sha":"7cc86f7d93298fdd4035b1e931d644f7fc30857c","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/mongodb-js/hadron-package-manager/pulls/1/commits","review_comments_url":"https://api.github.com/repos/mongodb-js/hadron-package-manager/pulls/1/comments","review_comment_url":"https://api.github.com/repos/mongodb-js/hadron-package-manager/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mongodb-js/hadron-package-manager/issues/1/comments","statuses_url":"https://api.github.com/repos/mongodb-js/hadron-package-manager/statuses/94dcd4f19c8f974fd3d4ef988de0324dce487ca9","head":{"label":"mongodb-js:call-complete-action-once","ref":"call-complete-action-once","sha":"94dcd4f19c8f974fd3d4ef988de0324dce487ca9","user":{"login":"mongodb-js","id":11214950,"avatar_url":"https://avatars.githubusercontent.com/u/11214950?v=3","gravatar_id":"","url":"https://api.github.com/users/mongodb-js","html_url":"https://github.com/mongodb-js","followers_url":"https://api.github.com/users/mongodb-js/followers","following_url":"https://api.github.com/users/mongodb-js/following{/other_user}","gists_url":"https://api.github.com/users/mongodb-js/gists{/gist_id}","starred_url":"https://api.github.com/users/mongodb-js/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mongodb-js/subscriptions","organizations_url":"https://api.github.com/users/mongodb-js/orgs","repos_url":"https://api.github.com/users/mongodb-js/repos","events_url":"https://api.github.com/users/mongodb-js/events{/privacy}","received_events_url":"https://api.github.com/users/mongodb-js/received_events","type":"Organization","site_admin":false},"repo":{"id":55160539,"name":"hadron-package-manager","full_name":"mongodb-js/hadron-package-manager","owner":{"login":"mongodb-js","id":11214950,"avatar_url":"https://avatars.githubusercontent.com/u/11214950?v=3","gravatar_id":"","url":"https://api.github.com/users/mongodb-js","html_url":"https://github.com/mongodb-js","followers_url":"https://api.github.com/users/mongodb-js/followers","following_url":"https://api.github.com/users/mongodb-js/following{/other_user}","gists_url":"https://api.github.com/users/mongodb-js/gists{/gist_id}","starred_url":"https://api.github.com/users/mongodb-js/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mongodb-js/subscriptions","organizations_url":"https://api.github.com/users/mongodb-js/orgs","repos_url":"https://api.github.com/users/mongodb-js/repos","events_url":"https://api.github.com/users/mongodb-js/events{/privacy}","received_events_url":"https://api.github.com/users/mongodb-js/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mongodb-js/hadron-package-manager","description":"Simple package manager for composable MongoDB applications.","fork":false,"url":"https://api.github.com/repos/mongodb-js/hadron-package-manager","forks_url":"https://api.github.com/repos/mongodb-js/hadron-package-manager/forks","keys_url":"https://api.github.com/repos/mongodb-js/hadron-package-manager/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mongodb-js/hadron-package-manager/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mongodb-js/hadron-package-manager/teams","hooks_url":"https://api.github.com/repos/mongodb-js/hadron-package-manager/hooks","issue_events_url":"https://api.github.com/repos/mongodb-js/hadron-package-manager/issues/events{/number}","events_url":"https://api.github.com/repos/mongodb-js/hadron-package-manager/events","assignees_url":"https://api.github.com/repos/mongodb-js/hadron-package-manager/assignees{/user}","branches_url":"https://api.github.com/repos/mongodb-js/hadron-package-manager/branches{/branch}","tags_url":"https://api.github.com/repos/mongodb-js/hadron-package-manager/tags","blobs_url":"https://api.github.com/repos/mongodb-js/hadron-package-manager/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mongodb-js/hadron-package-manager/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mongodb-js/hadron-package-manager/git/refs{/sha}","trees_url":"https://api.github.com/repos/mongodb-js/hadron-package-manager/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mongodb-js/hadron-package-manager/statuses/{sha}","languages_url":"https://api.github.com/repos/mongodb-js/hadron-package-manager/languages","stargazers_url":"https://api.github.com/repos/mongodb-js/hadron-package-manager/stargazers","contributors_url":"https://api.github.com/repos/mongodb-js/hadron-package-manager/contributors","subscribers_url":"https://api.github.com/repos/mongodb-js/hadron-package-manager/subscribers","subscription_url":"https://api.github.com/repos/mongodb-js/hadron-package-manager/subscription","commits_url":"https://api.github.com/repos/mongodb-js/hadron-package-manager/commits{/sha}","git_commits_url":"https://api.github.com/repos/mongodb-js/hadron-package-manager/git/commits{/sha}","comments_url":"https://api.github.com/repos/mongodb-js/hadron-package-manager/comments{/number}","issue_comment_url":"https://api.github.com/repos/mongodb-js/hadron-package-manager/issues/comments{/number}","contents_url":"https://api.github.com/repos/mongodb-js/hadron-package-manager/contents/{+path}","compare_url":"https://api.github.com/repos/mongodb-js/hadron-package-manager/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mongodb-js/hadron-package-manager/merges","archive_url":"https://api.github.com/repos/mongodb-js/hadron-package-manager/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mongodb-js/hadron-package-manager/downloads","issues_url":"https://api.github.com/repos/mongodb-js/hadron-package-manager/issues{/number}","pulls_url":"https://api.github.com/repos/mongodb-js/hadron-package-manager/pulls{/number}","milestones_url":"https://api.github.com/repos/mongodb-js/hadron-package-manager/milestones{/number}","notifications_url":"https://api.github.com/repos/mongodb-js/hadron-package-manager/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mongodb-js/hadron-package-manager/labels{/name}","releases_url":"https://api.github.com/repos/mongodb-js/hadron-package-manager/releases{/id}","deployments_url":"https://api.github.com/repos/mongodb-js/hadron-package-manager/deployments","created_at":"2016-03-31T15:16:26Z","updated_at":"2016-05-03T14:09:40Z","pushed_at":"2016-09-26T09:02:57Z","git_url":"git://github.com/mongodb-js/hadron-package-manager.git","ssh_url":"git@github.com:mongodb-js/hadron-package-manager.git","clone_url":"https://github.com/mongodb-js/hadron-package-manager.git","svn_url":"https://github.com/mongodb-js/hadron-package-manager","homepage":"","size":17,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"mongodb-js:master","ref":"master","sha":"3e85a302091522fa350188fa7fac3885a5879626","user":{"login":"mongodb-js","id":11214950,"avatar_url":"https://avatars.githubusercontent.com/u/11214950?v=3","gravatar_id":"","url":"https://api.github.com/users/mongodb-js","html_url":"https://github.com/mongodb-js","followers_url":"https://api.github.com/users/mongodb-js/followers","following_url":"https://api.github.com/users/mongodb-js/following{/other_user}","gists_url":"https://api.github.com/users/mongodb-js/gists{/gist_id}","starred_url":"https://api.github.com/users/mongodb-js/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mongodb-js/subscriptions","organizations_url":"https://api.github.com/users/mongodb-js/orgs","repos_url":"https://api.github.com/users/mongodb-js/repos","events_url":"https://api.github.com/users/mongodb-js/events{/privacy}","received_events_url":"https://api.github.com/users/mongodb-js/received_events","type":"Organization","site_admin":false},"repo":{"id":55160539,"name":"hadron-package-manager","full_name":"mongodb-js/hadron-package-manager","owner":{"login":"mongodb-js","id":11214950,"avatar_url":"https://avatars.githubusercontent.com/u/11214950?v=3","gravatar_id":"","url":"https://api.github.com/users/mongodb-js","html_url":"https://github.com/mongodb-js","followers_url":"https://api.github.com/users/mongodb-js/followers","following_url":"https://api.github.com/users/mongodb-js/following{/other_user}","gists_url":"https://api.github.com/users/mongodb-js/gists{/gist_id}","starred_url":"https://api.github.com/users/mongodb-js/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mongodb-js/subscriptions","organizations_url":"https://api.github.com/users/mongodb-js/orgs","repos_url":"https://api.github.com/users/mongodb-js/repos","events_url":"https://api.github.com/users/mongodb-js/events{/privacy}","received_events_url":"https://api.github.com/users/mongodb-js/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mongodb-js/hadron-package-manager","description":"Simple package manager for composable MongoDB applications.","fork":false,"url":"https://api.github.com/repos/mongodb-js/hadron-package-manager","forks_url":"https://api.github.com/repos/mongodb-js/hadron-package-manager/forks","keys_url":"https://api.github.com/repos/mongodb-js/hadron-package-manager/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mongodb-js/hadron-package-manager/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mongodb-js/hadron-package-manager/teams","hooks_url":"https://api.github.com/repos/mongodb-js/hadron-package-manager/hooks","issue_events_url":"https://api.github.com/repos/mongodb-js/hadron-package-manager/issues/events{/number}","events_url":"https://api.github.com/repos/mongodb-js/hadron-package-manager/events","assignees_url":"https://api.github.com/repos/mongodb-js/hadron-package-manager/assignees{/user}","branches_url":"https://api.github.com/repos/mongodb-js/hadron-package-manager/branches{/branch}","tags_url":"https://api.github.com/repos/mongodb-js/hadron-package-manager/tags","blobs_url":"https://api.github.com/repos/mongodb-js/hadron-package-manager/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mongodb-js/hadron-package-manager/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mongodb-js/hadron-package-manager/git/refs{/sha}","trees_url":"https://api.github.com/repos/mongodb-js/hadron-package-manager/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mongodb-js/hadron-package-manager/statuses/{sha}","languages_url":"https://api.github.com/repos/mongodb-js/hadron-package-manager/languages","stargazers_url":"https://api.github.com/repos/mongodb-js/hadron-package-manager/stargazers","contributors_url":"https://api.github.com/repos/mongodb-js/hadron-package-manager/contributors","subscribers_url":"https://api.github.com/repos/mongodb-js/hadron-package-manager/subscribers","subscription_url":"https://api.github.com/repos/mongodb-js/hadron-package-manager/subscription","commits_url":"https://api.github.com/repos/mongodb-js/hadron-package-manager/commits{/sha}","git_commits_url":"https://api.github.com/repos/mongodb-js/hadron-package-manager/git/commits{/sha}","comments_url":"https://api.github.com/repos/mongodb-js/hadron-package-manager/comments{/number}","issue_comment_url":"https://api.github.com/repos/mongodb-js/hadron-package-manager/issues/comments{/number}","contents_url":"https://api.github.com/repos/mongodb-js/hadron-package-manager/contents/{+path}","compare_url":"https://api.github.com/repos/mongodb-js/hadron-package-manager/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mongodb-js/hadron-package-manager/merges","archive_url":"https://api.github.com/repos/mongodb-js/hadron-package-manager/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mongodb-js/hadron-package-manager/downloads","issues_url":"https://api.github.com/repos/mongodb-js/hadron-package-manager/issues{/number}","pulls_url":"https://api.github.com/repos/mongodb-js/hadron-package-manager/pulls{/number}","milestones_url":"https://api.github.com/repos/mongodb-js/hadron-package-manager/milestones{/number}","notifications_url":"https://api.github.com/repos/mongodb-js/hadron-package-manager/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mongodb-js/hadron-package-manager/labels{/name}","releases_url":"https://api.github.com/repos/mongodb-js/hadron-package-manager/releases{/id}","deployments_url":"https://api.github.com/repos/mongodb-js/hadron-package-manager/deployments","created_at":"2016-03-31T15:16:26Z","updated_at":"2016-05-03T14:09:40Z","pushed_at":"2016-09-26T09:02:57Z","git_url":"git://github.com/mongodb-js/hadron-package-manager.git","ssh_url":"git@github.com:mongodb-js/hadron-package-manager.git","clone_url":"https://github.com/mongodb-js/hadron-package-manager.git","svn_url":"https://github.com/mongodb-js/hadron-package-manager","homepage":"","size":17,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mongodb-js/hadron-package-manager/pulls/1"},"html":{"href":"https://github.com/mongodb-js/hadron-package-manager/pull/1"},"issue":{"href":"https://api.github.com/repos/mongodb-js/hadron-package-manager/issues/1"},"comments":{"href":"https://api.github.com/repos/mongodb-js/hadron-package-manager/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/mongodb-js/hadron-package-manager/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/mongodb-js/hadron-package-manager/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mongodb-js/hadron-package-manager/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/mongodb-js/hadron-package-manager/statuses/94dcd4f19c8f974fd3d4ef988de0324dce487ca9"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"durran","id":9030,"avatar_url":"https://avatars.githubusercontent.com/u/9030?v=3","gravatar_id":"","url":"https://api.github.com/users/durran","html_url":"https://github.com/durran","followers_url":"https://api.github.com/users/durran/followers","following_url":"https://api.github.com/users/durran/following{/other_user}","gists_url":"https://api.github.com/users/durran/gists{/gist_id}","starred_url":"https://api.github.com/users/durran/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/durran/subscriptions","organizations_url":"https://api.github.com/users/durran/orgs","repos_url":"https://api.github.com/users/durran/repos","events_url":"https://api.github.com/users/durran/events{/privacy}","received_events_url":"https://api.github.com/users/durran/received_events","type":"User","site_admin":false},"comments":1,"review_comments":0,"commits":3,"additions":39,"deletions":5,"changed_files":6}}
{"actor":{"display_login":"durran"}}