{"action":"closed","number":207,"pull_request":{"url":"https://api.github.com/repos/metabrainz/musicbrainz-server/pulls/207","id":55557324,"html_url":"https://github.com/metabrainz/musicbrainz-server/pull/207","diff_url":"https://github.com/metabrainz/musicbrainz-server/pull/207.diff","patch_url":"https://github.com/metabrainz/musicbrainz-server/pull/207.patch","issue_url":"https://api.github.com/repos/metabrainz/musicbrainz-server/issues/207","number":207,"state":"closed","locked":false,"title":"Consistent JS imports","user":{"login":"mwiencek","id":1056556,"avatar_url":"https://avatars.githubusercontent.com/u/1056556?v=3","gravatar_id":"","url":"https://api.github.com/users/mwiencek","html_url":"https://github.com/mwiencek","followers_url":"https://api.github.com/users/mwiencek/followers","following_url":"https://api.github.com/users/mwiencek/following{/other_user}","gists_url":"https://api.github.com/users/mwiencek/gists{/gist_id}","starred_url":"https://api.github.com/users/mwiencek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mwiencek/subscriptions","organizations_url":"https://api.github.com/users/mwiencek/orgs","repos_url":"https://api.github.com/users/mwiencek/repos","events_url":"https://api.github.com/users/mwiencek/events{/privacy}","received_events_url":"https://api.github.com/users/mwiencek/received_events","type":"User","site_admin":false},"body":"I guess I've flip-flopped on this, but I think we should avoid using ES6 import/export statements until they're supported natively in Node.js and https://github.com/whatwg/loader is standardized.\r\n\r\nRight now we have a mishmash of require expressions and import statements. There are some cases where we *must* use `require` or `module.exports`, though, because we don't know what we're importing or exporting at compile time. So if we want consistent imports, we have to use CommonJS everywhere.\r\n\r\nThe import/export statements are compiled into CommonJS expressions anyway, but it can be confusing how they work together, e.g. see 3b2cbed. Using the natively-supported syntax directly makes it easier to see what's actually going on.\r\n\r\nSome other changes I made, for consistency:\r\n\r\n * Prefixed all imports with `const`\r\n * Separated external imports from local imports\r\n * Sorted imports by module name/path\r\n * Removed files extensions where they aren't needed (pretty much everywhere)","created_at":"2016-01-10T03:59:37Z","updated_at":"2016-01-15T02:33:23Z","closed_at":"2016-01-15T02:33:23Z","merged_at":"2016-01-15T02:33:23Z","merge_commit_sha":"a4af76d26661c3ca0e6fd7a25bccb6660a289970","assignee":{"login":"gentlecat","id":460525,"avatar_url":"https://avatars.githubusercontent.com/u/460525?v=3","gravatar_id":"","url":"https://api.github.com/users/gentlecat","html_url":"https://github.com/gentlecat","followers_url":"https://api.github.com/users/gentlecat/followers","following_url":"https://api.github.com/users/gentlecat/following{/other_user}","gists_url":"https://api.github.com/users/gentlecat/gists{/gist_id}","starred_url":"https://api.github.com/users/gentlecat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gentlecat/subscriptions","organizations_url":"https://api.github.com/users/gentlecat/orgs","repos_url":"https://api.github.com/users/gentlecat/repos","events_url":"https://api.github.com/users/gentlecat/events{/privacy}","received_events_url":"https://api.github.com/users/gentlecat/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/metabrainz/musicbrainz-server/pulls/207/commits","review_comments_url":"https://api.github.com/repos/metabrainz/musicbrainz-server/pulls/207/comments","review_comment_url":"https://api.github.com/repos/metabrainz/musicbrainz-server/pulls/comments{/number}","comments_url":"https://api.github.com/repos/metabrainz/musicbrainz-server/issues/207/comments","statuses_url":"https://api.github.com/repos/metabrainz/musicbrainz-server/statuses/49aac578be698ce47f86e17439f10f5131febe9e","head":{"label":"mwiencek:consistent-js-imports","ref":"consistent-js-imports","sha":"49aac578be698ce47f86e17439f10f5131febe9e","user":{"login":"mwiencek","id":1056556,"avatar_url":"https://avatars.githubusercontent.com/u/1056556?v=3","gravatar_id":"","url":"https://api.github.com/users/mwiencek","html_url":"https://github.com/mwiencek","followers_url":"https://api.github.com/users/mwiencek/followers","following_url":"https://api.github.com/users/mwiencek/following{/other_user}","gists_url":"https://api.github.com/users/mwiencek/gists{/gist_id}","starred_url":"https://api.github.com/users/mwiencek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mwiencek/subscriptions","organizations_url":"https://api.github.com/users/mwiencek/orgs","repos_url":"https://api.github.com/users/mwiencek/repos","events_url":"https://api.github.com/users/mwiencek/events{/privacy}","received_events_url":"https://api.github.com/users/mwiencek/received_events","type":"User","site_admin":false},"repo":{"id":5002261,"name":"musicbrainz-server","full_name":"mwiencek/musicbrainz-server","owner":{"login":"mwiencek","id":1056556,"avatar_url":"https://avatars.githubusercontent.com/u/1056556?v=3","gravatar_id":"","url":"https://api.github.com/users/mwiencek","html_url":"https://github.com/mwiencek","followers_url":"https://api.github.com/users/mwiencek/followers","following_url":"https://api.github.com/users/mwiencek/following{/other_user}","gists_url":"https://api.github.com/users/mwiencek/gists{/gist_id}","starred_url":"https://api.github.com/users/mwiencek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mwiencek/subscriptions","organizations_url":"https://api.github.com/users/mwiencek/orgs","repos_url":"https://api.github.com/users/mwiencek/repos","events_url":"https://api.github.com/users/mwiencek/events{/privacy}","received_events_url":"https://api.github.com/users/mwiencek/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mwiencek/musicbrainz-server","description":"A mirror of git.musicbrainz.org/musicbrainz-server.git","fork":true,"url":"https://api.github.com/repos/mwiencek/musicbrainz-server","forks_url":"https://api.github.com/repos/mwiencek/musicbrainz-server/forks","keys_url":"https://api.github.com/repos/mwiencek/musicbrainz-server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mwiencek/musicbrainz-server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mwiencek/musicbrainz-server/teams","hooks_url":"https://api.github.com/repos/mwiencek/musicbrainz-server/hooks","issue_events_url":"https://api.github.com/repos/mwiencek/musicbrainz-server/issues/events{/number}","events_url":"https://api.github.com/repos/mwiencek/musicbrainz-server/events","assignees_url":"https://api.github.com/repos/mwiencek/musicbrainz-server/assignees{/user}","branches_url":"https://api.github.com/repos/mwiencek/musicbrainz-server/branches{/branch}","tags_url":"https://api.github.com/repos/mwiencek/musicbrainz-server/tags","blobs_url":"https://api.github.com/repos/mwiencek/musicbrainz-server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mwiencek/musicbrainz-server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mwiencek/musicbrainz-server/git/refs{/sha}","trees_url":"https://api.github.com/repos/mwiencek/musicbrainz-server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mwiencek/musicbrainz-server/statuses/{sha}","languages_url":"https://api.github.com/repos/mwiencek/musicbrainz-server/languages","stargazers_url":"https://api.github.com/repos/mwiencek/musicbrainz-server/stargazers","contributors_url":"https://api.github.com/repos/mwiencek/musicbrainz-server/contributors","subscribers_url":"https://api.github.com/repos/mwiencek/musicbrainz-server/subscribers","subscription_url":"https://api.github.com/repos/mwiencek/musicbrainz-server/subscription","commits_url":"https://api.github.com/repos/mwiencek/musicbrainz-server/commits{/sha}","git_commits_url":"https://api.github.com/repos/mwiencek/musicbrainz-server/git/commits{/sha}","comments_url":"https://api.github.com/repos/mwiencek/musicbrainz-server/comments{/number}","issue_comment_url":"https://api.github.com/repos/mwiencek/musicbrainz-server/issues/comments{/number}","contents_url":"https://api.github.com/repos/mwiencek/musicbrainz-server/contents/{+path}","compare_url":"https://api.github.com/repos/mwiencek/musicbrainz-server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mwiencek/musicbrainz-server/merges","archive_url":"https://api.github.com/repos/mwiencek/musicbrainz-server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mwiencek/musicbrainz-server/downloads","issues_url":"https://api.github.com/repos/mwiencek/musicbrainz-server/issues{/number}","pulls_url":"https://api.github.com/repos/mwiencek/musicbrainz-server/pulls{/number}","milestones_url":"https://api.github.com/repos/mwiencek/musicbrainz-server/milestones{/number}","notifications_url":"https://api.github.com/repos/mwiencek/musicbrainz-server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mwiencek/musicbrainz-server/labels{/name}","releases_url":"https://api.github.com/repos/mwiencek/musicbrainz-server/releases{/id}","created_at":"2012-07-12T10:57:07Z","updated_at":"2014-09-09T04:04:28Z","pushed_at":"2016-01-15T02:28:21Z","git_url":"git://github.com/mwiencek/musicbrainz-server.git","ssh_url":"git@github.com:mwiencek/musicbrainz-server.git","clone_url":"https://github.com/mwiencek/musicbrainz-server.git","svn_url":"https://github.com/mwiencek/musicbrainz-server","homepage":"http://musicbrainz.org/doc/MusicBrainz_Server","size":84448,"stargazers_count":0,"watchers_count":0,"language":"Perl","has_issues":false,"has_downloads":false,"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":"metabrainz:master","ref":"master","sha":"4853ef09eb953449daf730dca5c75cd0b05ddca1","user":{"login":"metabrainz","id":293421,"avatar_url":"https://avatars.githubusercontent.com/u/293421?v=3","gravatar_id":"","url":"https://api.github.com/users/metabrainz","html_url":"https://github.com/metabrainz","followers_url":"https://api.github.com/users/metabrainz/followers","following_url":"https://api.github.com/users/metabrainz/following{/other_user}","gists_url":"https://api.github.com/users/metabrainz/gists{/gist_id}","starred_url":"https://api.github.com/users/metabrainz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/metabrainz/subscriptions","organizations_url":"https://api.github.com/users/metabrainz/orgs","repos_url":"https://api.github.com/users/metabrainz/repos","events_url":"https://api.github.com/users/metabrainz/events{/privacy}","received_events_url":"https://api.github.com/users/metabrainz/received_events","type":"Organization","site_admin":false},"repo":{"id":697520,"name":"musicbrainz-server","full_name":"metabrainz/musicbrainz-server","owner":{"login":"metabrainz","id":293421,"avatar_url":"https://avatars.githubusercontent.com/u/293421?v=3","gravatar_id":"","url":"https://api.github.com/users/metabrainz","html_url":"https://github.com/metabrainz","followers_url":"https://api.github.com/users/metabrainz/followers","following_url":"https://api.github.com/users/metabrainz/following{/other_user}","gists_url":"https://api.github.com/users/metabrainz/gists{/gist_id}","starred_url":"https://api.github.com/users/metabrainz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/metabrainz/subscriptions","organizations_url":"https://api.github.com/users/metabrainz/orgs","repos_url":"https://api.github.com/users/metabrainz/repos","events_url":"https://api.github.com/users/metabrainz/events{/privacy}","received_events_url":"https://api.github.com/users/metabrainz/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/metabrainz/musicbrainz-server","description":"The official musicbrainz-server codebase","fork":false,"url":"https://api.github.com/repos/metabrainz/musicbrainz-server","forks_url":"https://api.github.com/repos/metabrainz/musicbrainz-server/forks","keys_url":"https://api.github.com/repos/metabrainz/musicbrainz-server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/metabrainz/musicbrainz-server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/metabrainz/musicbrainz-server/teams","hooks_url":"https://api.github.com/repos/metabrainz/musicbrainz-server/hooks","issue_events_url":"https://api.github.com/repos/metabrainz/musicbrainz-server/issues/events{/number}","events_url":"https://api.github.com/repos/metabrainz/musicbrainz-server/events","assignees_url":"https://api.github.com/repos/metabrainz/musicbrainz-server/assignees{/user}","branches_url":"https://api.github.com/repos/metabrainz/musicbrainz-server/branches{/branch}","tags_url":"https://api.github.com/repos/metabrainz/musicbrainz-server/tags","blobs_url":"https://api.github.com/repos/metabrainz/musicbrainz-server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/metabrainz/musicbrainz-server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/metabrainz/musicbrainz-server/git/refs{/sha}","trees_url":"https://api.github.com/repos/metabrainz/musicbrainz-server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/metabrainz/musicbrainz-server/statuses/{sha}","languages_url":"https://api.github.com/repos/metabrainz/musicbrainz-server/languages","stargazers_url":"https://api.github.com/repos/metabrainz/musicbrainz-server/stargazers","contributors_url":"https://api.github.com/repos/metabrainz/musicbrainz-server/contributors","subscribers_url":"https://api.github.com/repos/metabrainz/musicbrainz-server/subscribers","subscription_url":"https://api.github.com/repos/metabrainz/musicbrainz-server/subscription","commits_url":"https://api.github.com/repos/metabrainz/musicbrainz-server/commits{/sha}","git_commits_url":"https://api.github.com/repos/metabrainz/musicbrainz-server/git/commits{/sha}","comments_url":"https://api.github.com/repos/metabrainz/musicbrainz-server/comments{/number}","issue_comment_url":"https://api.github.com/repos/metabrainz/musicbrainz-server/issues/comments{/number}","contents_url":"https://api.github.com/repos/metabrainz/musicbrainz-server/contents/{+path}","compare_url":"https://api.github.com/repos/metabrainz/musicbrainz-server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/metabrainz/musicbrainz-server/merges","archive_url":"https://api.github.com/repos/metabrainz/musicbrainz-server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/metabrainz/musicbrainz-server/downloads","issues_url":"https://api.github.com/repos/metabrainz/musicbrainz-server/issues{/number}","pulls_url":"https://api.github.com/repos/metabrainz/musicbrainz-server/pulls{/number}","milestones_url":"https://api.github.com/repos/metabrainz/musicbrainz-server/milestones{/number}","notifications_url":"https://api.github.com/repos/metabrainz/musicbrainz-server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/metabrainz/musicbrainz-server/labels{/name}","releases_url":"https://api.github.com/repos/metabrainz/musicbrainz-server/releases{/id}","created_at":"2010-06-01T16:30:04Z","updated_at":"2016-01-15T01:50:43Z","pushed_at":"2016-01-15T02:33:23Z","git_url":"git://github.com/metabrainz/musicbrainz-server.git","ssh_url":"git@github.com:metabrainz/musicbrainz-server.git","clone_url":"https://github.com/metabrainz/musicbrainz-server.git","svn_url":"https://github.com/metabrainz/musicbrainz-server","homepage":"http://musicbrainz.org/doc/MusicBrainz_Server","size":85229,"stargazers_count":217,"watchers_count":217,"language":"Perl","has_issues":false,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":92,"mirror_url":null,"open_issues_count":4,"forks":92,"open_issues":4,"watchers":217,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/metabrainz/musicbrainz-server/pulls/207"},"html":{"href":"https://github.com/metabrainz/musicbrainz-server/pull/207"},"issue":{"href":"https://api.github.com/repos/metabrainz/musicbrainz-server/issues/207"},"comments":{"href":"https://api.github.com/repos/metabrainz/musicbrainz-server/issues/207/comments"},"review_comments":{"href":"https://api.github.com/repos/metabrainz/musicbrainz-server/pulls/207/comments"},"review_comment":{"href":"https://api.github.com/repos/metabrainz/musicbrainz-server/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/metabrainz/musicbrainz-server/pulls/207/commits"},"statuses":{"href":"https://api.github.com/repos/metabrainz/musicbrainz-server/statuses/49aac578be698ce47f86e17439f10f5131febe9e"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"mwiencek","id":1056556,"avatar_url":"https://avatars.githubusercontent.com/u/1056556?v=3","gravatar_id":"","url":"https://api.github.com/users/mwiencek","html_url":"https://github.com/mwiencek","followers_url":"https://api.github.com/users/mwiencek/followers","following_url":"https://api.github.com/users/mwiencek/following{/other_user}","gists_url":"https://api.github.com/users/mwiencek/gists{/gist_id}","starred_url":"https://api.github.com/users/mwiencek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mwiencek/subscriptions","organizations_url":"https://api.github.com/users/mwiencek/orgs","repos_url":"https://api.github.com/users/mwiencek/repos","events_url":"https://api.github.com/users/mwiencek/events{/privacy}","received_events_url":"https://api.github.com/users/mwiencek/received_events","type":"User","site_admin":false},"comments":1,"review_comments":4,"commits":1,"additions":577,"deletions":503,"changed_files":125}}