{"action":"opened","number":154,"pull_request":{"url":"https://api.github.com/repos/jakearchibald/es6-promise/pulls/154","id":50854013,"html_url":"https://github.com/jakearchibald/es6-promise/pull/154","diff_url":"https://github.com/jakearchibald/es6-promise/pull/154.diff","patch_url":"https://github.com/jakearchibald/es6-promise/pull/154.patch","issue_url":"https://api.github.com/repos/jakearchibald/es6-promise/issues/154","number":154,"state":"open","locked":false,"title":"check exports before amd in case mixed environment","user":{"login":"liquidg3","id":2308747,"avatar_url":"https://avatars.githubusercontent.com/u/2308747?v=3","gravatar_id":"","url":"https://api.github.com/users/liquidg3","html_url":"https://github.com/liquidg3","followers_url":"https://api.github.com/users/liquidg3/followers","following_url":"https://api.github.com/users/liquidg3/following{/other_user}","gists_url":"https://api.github.com/users/liquidg3/gists{/gist_id}","starred_url":"https://api.github.com/users/liquidg3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/liquidg3/subscriptions","organizations_url":"https://api.github.com/users/liquidg3/orgs","repos_url":"https://api.github.com/users/liquidg3/repos","events_url":"https://api.github.com/users/liquidg3/events{/privacy}","received_events_url":"https://api.github.com/users/liquidg3/received_events","type":"User","site_admin":false},"body":"I am using AMD inside of Node (not a fan of require). Unfortunately, simply requiring the mongodb module broke my app because the mongodb library tries to include the es6-promise library using require but es6-promise checks define() && AMD first.\r\n\r\nBy checking exports first (and AMD second) I make sure that the library works in mixed AMD/Require environments more reliably.\r\n\r\nNow, I know I have broken the ability to use AMD to include the library when in a mixed environment (since it's checking exports first now, which is arguably just the opposite of the problem that currently exists), but given that every library in node uses require, the situation I'm facing will happen 9 out of 10 times, which is that some 3rd party is using require to load it and it's instead trying to use define();\r\n\r\nSo, while there is no 100% solution for making it automagically determine the environment when the environment is mixed, require is more popular and so checking that first will mean the it works in the majority of cases.\r\n\r\nThoughts?","created_at":"2015-11-16T19:29:17Z","updated_at":"2015-11-16T19:29:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/jakearchibald/es6-promise/pulls/154/commits","review_comments_url":"https://api.github.com/repos/jakearchibald/es6-promise/pulls/154/comments","review_comment_url":"https://api.github.com/repos/jakearchibald/es6-promise/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jakearchibald/es6-promise/issues/154/comments","statuses_url":"https://api.github.com/repos/jakearchibald/es6-promise/statuses/13d6dee733d1c291be2eee89013832a414e04589","head":{"label":"liquidg3:master","ref":"master","sha":"13d6dee733d1c291be2eee89013832a414e04589","user":{"login":"liquidg3","id":2308747,"avatar_url":"https://avatars.githubusercontent.com/u/2308747?v=3","gravatar_id":"","url":"https://api.github.com/users/liquidg3","html_url":"https://github.com/liquidg3","followers_url":"https://api.github.com/users/liquidg3/followers","following_url":"https://api.github.com/users/liquidg3/following{/other_user}","gists_url":"https://api.github.com/users/liquidg3/gists{/gist_id}","starred_url":"https://api.github.com/users/liquidg3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/liquidg3/subscriptions","organizations_url":"https://api.github.com/users/liquidg3/orgs","repos_url":"https://api.github.com/users/liquidg3/repos","events_url":"https://api.github.com/users/liquidg3/events{/privacy}","received_events_url":"https://api.github.com/users/liquidg3/received_events","type":"User","site_admin":false},"repo":{"id":46296053,"name":"es6-promise","full_name":"liquidg3/es6-promise","owner":{"login":"liquidg3","id":2308747,"avatar_url":"https://avatars.githubusercontent.com/u/2308747?v=3","gravatar_id":"","url":"https://api.github.com/users/liquidg3","html_url":"https://github.com/liquidg3","followers_url":"https://api.github.com/users/liquidg3/followers","following_url":"https://api.github.com/users/liquidg3/following{/other_user}","gists_url":"https://api.github.com/users/liquidg3/gists{/gist_id}","starred_url":"https://api.github.com/users/liquidg3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/liquidg3/subscriptions","organizations_url":"https://api.github.com/users/liquidg3/orgs","repos_url":"https://api.github.com/users/liquidg3/repos","events_url":"https://api.github.com/users/liquidg3/events{/privacy}","received_events_url":"https://api.github.com/users/liquidg3/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/liquidg3/es6-promise","description":"A polyfill for ES6-style Promises","fork":true,"url":"https://api.github.com/repos/liquidg3/es6-promise","forks_url":"https://api.github.com/repos/liquidg3/es6-promise/forks","keys_url":"https://api.github.com/repos/liquidg3/es6-promise/keys{/key_id}","collaborators_url":"https://api.github.com/repos/liquidg3/es6-promise/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/liquidg3/es6-promise/teams","hooks_url":"https://api.github.com/repos/liquidg3/es6-promise/hooks","issue_events_url":"https://api.github.com/repos/liquidg3/es6-promise/issues/events{/number}","events_url":"https://api.github.com/repos/liquidg3/es6-promise/events","assignees_url":"https://api.github.com/repos/liquidg3/es6-promise/assignees{/user}","branches_url":"https://api.github.com/repos/liquidg3/es6-promise/branches{/branch}","tags_url":"https://api.github.com/repos/liquidg3/es6-promise/tags","blobs_url":"https://api.github.com/repos/liquidg3/es6-promise/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/liquidg3/es6-promise/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/liquidg3/es6-promise/git/refs{/sha}","trees_url":"https://api.github.com/repos/liquidg3/es6-promise/git/trees{/sha}","statuses_url":"https://api.github.com/repos/liquidg3/es6-promise/statuses/{sha}","languages_url":"https://api.github.com/repos/liquidg3/es6-promise/languages","stargazers_url":"https://api.github.com/repos/liquidg3/es6-promise/stargazers","contributors_url":"https://api.github.com/repos/liquidg3/es6-promise/contributors","subscribers_url":"https://api.github.com/repos/liquidg3/es6-promise/subscribers","subscription_url":"https://api.github.com/repos/liquidg3/es6-promise/subscription","commits_url":"https://api.github.com/repos/liquidg3/es6-promise/commits{/sha}","git_commits_url":"https://api.github.com/repos/liquidg3/es6-promise/git/commits{/sha}","comments_url":"https://api.github.com/repos/liquidg3/es6-promise/comments{/number}","issue_comment_url":"https://api.github.com/repos/liquidg3/es6-promise/issues/comments{/number}","contents_url":"https://api.github.com/repos/liquidg3/es6-promise/contents/{+path}","compare_url":"https://api.github.com/repos/liquidg3/es6-promise/compare/{base}...{head}","merges_url":"https://api.github.com/repos/liquidg3/es6-promise/merges","archive_url":"https://api.github.com/repos/liquidg3/es6-promise/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/liquidg3/es6-promise/downloads","issues_url":"https://api.github.com/repos/liquidg3/es6-promise/issues{/number}","pulls_url":"https://api.github.com/repos/liquidg3/es6-promise/pulls{/number}","milestones_url":"https://api.github.com/repos/liquidg3/es6-promise/milestones{/number}","notifications_url":"https://api.github.com/repos/liquidg3/es6-promise/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/liquidg3/es6-promise/labels{/name}","releases_url":"https://api.github.com/repos/liquidg3/es6-promise/releases{/id}","created_at":"2015-11-16T19:10:45Z","updated_at":"2015-11-16T19:10:47Z","pushed_at":"2015-11-16T19:16:57Z","git_url":"git://github.com/liquidg3/es6-promise.git","ssh_url":"git@github.com:liquidg3/es6-promise.git","clone_url":"https://github.com/liquidg3/es6-promise.git","svn_url":"https://github.com/liquidg3/es6-promise","homepage":null,"size":528,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"jakearchibald:master","ref":"master","sha":"7d90241d79d8a50e340abb3d964c47fe79a214ba","user":{"login":"jakearchibald","id":93594,"avatar_url":"https://avatars.githubusercontent.com/u/93594?v=3","gravatar_id":"","url":"https://api.github.com/users/jakearchibald","html_url":"https://github.com/jakearchibald","followers_url":"https://api.github.com/users/jakearchibald/followers","following_url":"https://api.github.com/users/jakearchibald/following{/other_user}","gists_url":"https://api.github.com/users/jakearchibald/gists{/gist_id}","starred_url":"https://api.github.com/users/jakearchibald/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jakearchibald/subscriptions","organizations_url":"https://api.github.com/users/jakearchibald/orgs","repos_url":"https://api.github.com/users/jakearchibald/repos","events_url":"https://api.github.com/users/jakearchibald/events{/privacy}","received_events_url":"https://api.github.com/users/jakearchibald/received_events","type":"User","site_admin":false},"repo":{"id":15046172,"name":"es6-promise","full_name":"jakearchibald/es6-promise","owner":{"login":"jakearchibald","id":93594,"avatar_url":"https://avatars.githubusercontent.com/u/93594?v=3","gravatar_id":"","url":"https://api.github.com/users/jakearchibald","html_url":"https://github.com/jakearchibald","followers_url":"https://api.github.com/users/jakearchibald/followers","following_url":"https://api.github.com/users/jakearchibald/following{/other_user}","gists_url":"https://api.github.com/users/jakearchibald/gists{/gist_id}","starred_url":"https://api.github.com/users/jakearchibald/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jakearchibald/subscriptions","organizations_url":"https://api.github.com/users/jakearchibald/orgs","repos_url":"https://api.github.com/users/jakearchibald/repos","events_url":"https://api.github.com/users/jakearchibald/events{/privacy}","received_events_url":"https://api.github.com/users/jakearchibald/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jakearchibald/es6-promise","description":"A polyfill for ES6-style Promises","fork":false,"url":"https://api.github.com/repos/jakearchibald/es6-promise","forks_url":"https://api.github.com/repos/jakearchibald/es6-promise/forks","keys_url":"https://api.github.com/repos/jakearchibald/es6-promise/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jakearchibald/es6-promise/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jakearchibald/es6-promise/teams","hooks_url":"https://api.github.com/repos/jakearchibald/es6-promise/hooks","issue_events_url":"https://api.github.com/repos/jakearchibald/es6-promise/issues/events{/number}","events_url":"https://api.github.com/repos/jakearchibald/es6-promise/events","assignees_url":"https://api.github.com/repos/jakearchibald/es6-promise/assignees{/user}","branches_url":"https://api.github.com/repos/jakearchibald/es6-promise/branches{/branch}","tags_url":"https://api.github.com/repos/jakearchibald/es6-promise/tags","blobs_url":"https://api.github.com/repos/jakearchibald/es6-promise/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jakearchibald/es6-promise/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jakearchibald/es6-promise/git/refs{/sha}","trees_url":"https://api.github.com/repos/jakearchibald/es6-promise/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jakearchibald/es6-promise/statuses/{sha}","languages_url":"https://api.github.com/repos/jakearchibald/es6-promise/languages","stargazers_url":"https://api.github.com/repos/jakearchibald/es6-promise/stargazers","contributors_url":"https://api.github.com/repos/jakearchibald/es6-promise/contributors","subscribers_url":"https://api.github.com/repos/jakearchibald/es6-promise/subscribers","subscription_url":"https://api.github.com/repos/jakearchibald/es6-promise/subscription","commits_url":"https://api.github.com/repos/jakearchibald/es6-promise/commits{/sha}","git_commits_url":"https://api.github.com/repos/jakearchibald/es6-promise/git/commits{/sha}","comments_url":"https://api.github.com/repos/jakearchibald/es6-promise/comments{/number}","issue_comment_url":"https://api.github.com/repos/jakearchibald/es6-promise/issues/comments{/number}","contents_url":"https://api.github.com/repos/jakearchibald/es6-promise/contents/{+path}","compare_url":"https://api.github.com/repos/jakearchibald/es6-promise/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jakearchibald/es6-promise/merges","archive_url":"https://api.github.com/repos/jakearchibald/es6-promise/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jakearchibald/es6-promise/downloads","issues_url":"https://api.github.com/repos/jakearchibald/es6-promise/issues{/number}","pulls_url":"https://api.github.com/repos/jakearchibald/es6-promise/pulls{/number}","milestones_url":"https://api.github.com/repos/jakearchibald/es6-promise/milestones{/number}","notifications_url":"https://api.github.com/repos/jakearchibald/es6-promise/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jakearchibald/es6-promise/labels{/name}","releases_url":"https://api.github.com/repos/jakearchibald/es6-promise/releases{/id}","created_at":"2013-12-09T12:04:03Z","updated_at":"2015-11-16T17:55:48Z","pushed_at":"2015-10-30T15:46:21Z","git_url":"git://github.com/jakearchibald/es6-promise.git","ssh_url":"git@github.com:jakearchibald/es6-promise.git","clone_url":"https://github.com/jakearchibald/es6-promise.git","svn_url":"https://github.com/jakearchibald/es6-promise","homepage":null,"size":1152,"stargazers_count":2233,"watchers_count":2233,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":111,"mirror_url":null,"open_issues_count":14,"forks":111,"open_issues":14,"watchers":2233,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jakearchibald/es6-promise/pulls/154"},"html":{"href":"https://github.com/jakearchibald/es6-promise/pull/154"},"issue":{"href":"https://api.github.com/repos/jakearchibald/es6-promise/issues/154"},"comments":{"href":"https://api.github.com/repos/jakearchibald/es6-promise/issues/154/comments"},"review_comments":{"href":"https://api.github.com/repos/jakearchibald/es6-promise/pulls/154/comments"},"review_comment":{"href":"https://api.github.com/repos/jakearchibald/es6-promise/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jakearchibald/es6-promise/pulls/154/commits"},"statuses":{"href":"https://api.github.com/repos/jakearchibald/es6-promise/statuses/13d6dee733d1c291be2eee89013832a414e04589"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":6,"deletions":6,"changed_files":2}}