{"action":"created","comment":{"url":"https://api.github.com/repos/defunctzombie/node-browser-resolve/pulls/comments/26449431","id":26449431,"diff_hunk":"@@ -180,17 +180,17 @@ function build_resolve_opts(opts, base) {\n     \tif(mappedPath) {\n     \t\treturn mappedPath;\n     \t}\n-    \tif(!info.browser) {\n+\n+        var replacements = info[browser];\n+    \tif(!replacements) {\n     \t\treturn;\n     \t}\n \n-    \tif(typeof info.browser) {\n-    \t\tmappedPath = info.browser[relativePath];\n-    \t\tif(!mappedPath && (relativePath.lastIndexOf(\".js\") === relativePath.length-3) ) {\n-    \t\t\tmappedPath = info.browser[relativePath+\".js\"];\n-    \t\t}\n-    \t\treturn mappedPath;\n-    \t}\n+\t\tmappedPath = replacements[relativePath];\n+\t\tif(!mappedPath && (relativePath.lastIndexOf(\".js\") === relativePath.length-3) ) {\n+\t\t\tmappedPath = replacements[relativePath+\".js\"];","path":"index.js","position":20,"original_position":20,"commit_id":"b4a36d8b38fd7b08d13b45c75c035a45fe84d9d1","original_commit_id":"b4a36d8b38fd7b08d13b45c75c035a45fe84d9d1","user":{"login":"mvayngrib","id":83948,"avatar_url":"https://avatars.githubusercontent.com/u/83948?v=3","gravatar_id":"","url":"https://api.github.com/users/mvayngrib","html_url":"https://github.com/mvayngrib","followers_url":"https://api.github.com/users/mvayngrib/followers","following_url":"https://api.github.com/users/mvayngrib/following{/other_user}","gists_url":"https://api.github.com/users/mvayngrib/gists{/gist_id}","starred_url":"https://api.github.com/users/mvayngrib/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mvayngrib/subscriptions","organizations_url":"https://api.github.com/users/mvayngrib/orgs","repos_url":"https://api.github.com/users/mvayngrib/repos","events_url":"https://api.github.com/users/mvayngrib/events{/privacy}","received_events_url":"https://api.github.com/users/mvayngrib/received_events","type":"User","site_admin":false},"body":"np, thought it was your style choice","created_at":"2015-03-15T17:00:15Z","updated_at":"2015-03-15T17:00:15Z","html_url":"https://github.com/defunctzombie/node-browser-resolve/pull/58#discussion_r26449431","pull_request_url":"https://api.github.com/repos/defunctzombie/node-browser-resolve/pulls/58","_links":{"self":{"href":"https://api.github.com/repos/defunctzombie/node-browser-resolve/pulls/comments/26449431"},"html":{"href":"https://github.com/defunctzombie/node-browser-resolve/pull/58#discussion_r26449431"},"pull_request":{"href":"https://api.github.com/repos/defunctzombie/node-browser-resolve/pulls/58"}}},"pull_request":{"url":"https://api.github.com/repos/defunctzombie/node-browser-resolve/pulls/58","id":31201246,"html_url":"https://github.com/defunctzombie/node-browser-resolve/pull/58","diff_url":"https://github.com/defunctzombie/node-browser-resolve/pull/58.diff","patch_url":"https://github.com/defunctzombie/node-browser-resolve/pull/58.patch","issue_url":"https://api.github.com/repos/defunctzombie/node-browser-resolve/issues/58","number":58,"state":"open","locked":false,"title":"fix pathFilter for alt browser field","user":{"login":"mvayngrib","id":83948,"avatar_url":"https://avatars.githubusercontent.com/u/83948?v=3","gravatar_id":"","url":"https://api.github.com/users/mvayngrib","html_url":"https://github.com/mvayngrib","followers_url":"https://api.github.com/users/mvayngrib/followers","following_url":"https://api.github.com/users/mvayngrib/following{/other_user}","gists_url":"https://api.github.com/users/mvayngrib/gists{/gist_id}","starred_url":"https://api.github.com/users/mvayngrib/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mvayngrib/subscriptions","organizations_url":"https://api.github.com/users/mvayngrib/orgs","repos_url":"https://api.github.com/users/mvayngrib/repos","events_url":"https://api.github.com/users/mvayngrib/events{/privacy}","received_events_url":"https://api.github.com/users/mvayngrib/received_events","type":"User","site_admin":false},"body":"oops, missed this one the first time around. Browserify's tests unearthed it","created_at":"2015-03-15T14:47:45Z","updated_at":"2015-03-15T17:00:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b8fe60456d34114abf6f32a8a80d2c8bc2bf8e7f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/defunctzombie/node-browser-resolve/pulls/58/commits","review_comments_url":"https://api.github.com/repos/defunctzombie/node-browser-resolve/pulls/58/comments","review_comment_url":"https://api.github.com/repos/defunctzombie/node-browser-resolve/pulls/comments{/number}","comments_url":"https://api.github.com/repos/defunctzombie/node-browser-resolve/issues/58/comments","statuses_url":"https://api.github.com/repos/defunctzombie/node-browser-resolve/statuses/b4a36d8b38fd7b08d13b45c75c035a45fe84d9d1","head":{"label":"mvayngrib:alt-browser","ref":"alt-browser","sha":"b4a36d8b38fd7b08d13b45c75c035a45fe84d9d1","user":{"login":"mvayngrib","id":83948,"avatar_url":"https://avatars.githubusercontent.com/u/83948?v=3","gravatar_id":"","url":"https://api.github.com/users/mvayngrib","html_url":"https://github.com/mvayngrib","followers_url":"https://api.github.com/users/mvayngrib/followers","following_url":"https://api.github.com/users/mvayngrib/following{/other_user}","gists_url":"https://api.github.com/users/mvayngrib/gists{/gist_id}","starred_url":"https://api.github.com/users/mvayngrib/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mvayngrib/subscriptions","organizations_url":"https://api.github.com/users/mvayngrib/orgs","repos_url":"https://api.github.com/users/mvayngrib/repos","events_url":"https://api.github.com/users/mvayngrib/events{/privacy}","received_events_url":"https://api.github.com/users/mvayngrib/received_events","type":"User","site_admin":false},"repo":{"id":31608316,"name":"node-browser-resolve","full_name":"mvayngrib/node-browser-resolve","owner":{"login":"mvayngrib","id":83948,"avatar_url":"https://avatars.githubusercontent.com/u/83948?v=3","gravatar_id":"","url":"https://api.github.com/users/mvayngrib","html_url":"https://github.com/mvayngrib","followers_url":"https://api.github.com/users/mvayngrib/followers","following_url":"https://api.github.com/users/mvayngrib/following{/other_user}","gists_url":"https://api.github.com/users/mvayngrib/gists{/gist_id}","starred_url":"https://api.github.com/users/mvayngrib/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mvayngrib/subscriptions","organizations_url":"https://api.github.com/users/mvayngrib/orgs","repos_url":"https://api.github.com/users/mvayngrib/repos","events_url":"https://api.github.com/users/mvayngrib/events{/privacy}","received_events_url":"https://api.github.com/users/mvayngrib/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mvayngrib/node-browser-resolve","description":"resolve function which support the browser field in package.json","fork":true,"url":"https://api.github.com/repos/mvayngrib/node-browser-resolve","forks_url":"https://api.github.com/repos/mvayngrib/node-browser-resolve/forks","keys_url":"https://api.github.com/repos/mvayngrib/node-browser-resolve/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mvayngrib/node-browser-resolve/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mvayngrib/node-browser-resolve/teams","hooks_url":"https://api.github.com/repos/mvayngrib/node-browser-resolve/hooks","issue_events_url":"https://api.github.com/repos/mvayngrib/node-browser-resolve/issues/events{/number}","events_url":"https://api.github.com/repos/mvayngrib/node-browser-resolve/events","assignees_url":"https://api.github.com/repos/mvayngrib/node-browser-resolve/assignees{/user}","branches_url":"https://api.github.com/repos/mvayngrib/node-browser-resolve/branches{/branch}","tags_url":"https://api.github.com/repos/mvayngrib/node-browser-resolve/tags","blobs_url":"https://api.github.com/repos/mvayngrib/node-browser-resolve/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mvayngrib/node-browser-resolve/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mvayngrib/node-browser-resolve/git/refs{/sha}","trees_url":"https://api.github.com/repos/mvayngrib/node-browser-resolve/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mvayngrib/node-browser-resolve/statuses/{sha}","languages_url":"https://api.github.com/repos/mvayngrib/node-browser-resolve/languages","stargazers_url":"https://api.github.com/repos/mvayngrib/node-browser-resolve/stargazers","contributors_url":"https://api.github.com/repos/mvayngrib/node-browser-resolve/contributors","subscribers_url":"https://api.github.com/repos/mvayngrib/node-browser-resolve/subscribers","subscription_url":"https://api.github.com/repos/mvayngrib/node-browser-resolve/subscription","commits_url":"https://api.github.com/repos/mvayngrib/node-browser-resolve/commits{/sha}","git_commits_url":"https://api.github.com/repos/mvayngrib/node-browser-resolve/git/commits{/sha}","comments_url":"https://api.github.com/repos/mvayngrib/node-browser-resolve/comments{/number}","issue_comment_url":"https://api.github.com/repos/mvayngrib/node-browser-resolve/issues/comments{/number}","contents_url":"https://api.github.com/repos/mvayngrib/node-browser-resolve/contents/{+path}","compare_url":"https://api.github.com/repos/mvayngrib/node-browser-resolve/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mvayngrib/node-browser-resolve/merges","archive_url":"https://api.github.com/repos/mvayngrib/node-browser-resolve/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mvayngrib/node-browser-resolve/downloads","issues_url":"https://api.github.com/repos/mvayngrib/node-browser-resolve/issues{/number}","pulls_url":"https://api.github.com/repos/mvayngrib/node-browser-resolve/pulls{/number}","milestones_url":"https://api.github.com/repos/mvayngrib/node-browser-resolve/milestones{/number}","notifications_url":"https://api.github.com/repos/mvayngrib/node-browser-resolve/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mvayngrib/node-browser-resolve/labels{/name}","releases_url":"https://api.github.com/repos/mvayngrib/node-browser-resolve/releases{/id}","created_at":"2015-03-03T16:24:14Z","updated_at":"2015-03-13T23:27:59Z","pushed_at":"2015-03-13T23:29:54Z","git_url":"git://github.com/mvayngrib/node-browser-resolve.git","ssh_url":"git@github.com:mvayngrib/node-browser-resolve.git","clone_url":"https://github.com/mvayngrib/node-browser-resolve.git","svn_url":"https://github.com/mvayngrib/node-browser-resolve","homepage":null,"size":175,"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":"defunctzombie:master","ref":"master","sha":"075c823c055d6b808501713007734b5e65062771","user":{"login":"defunctzombie","id":84792,"avatar_url":"https://avatars.githubusercontent.com/u/84792?v=3","gravatar_id":"","url":"https://api.github.com/users/defunctzombie","html_url":"https://github.com/defunctzombie","followers_url":"https://api.github.com/users/defunctzombie/followers","following_url":"https://api.github.com/users/defunctzombie/following{/other_user}","gists_url":"https://api.github.com/users/defunctzombie/gists{/gist_id}","starred_url":"https://api.github.com/users/defunctzombie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/defunctzombie/subscriptions","organizations_url":"https://api.github.com/users/defunctzombie/orgs","repos_url":"https://api.github.com/users/defunctzombie/repos","events_url":"https://api.github.com/users/defunctzombie/events{/privacy}","received_events_url":"https://api.github.com/users/defunctzombie/received_events","type":"User","site_admin":false},"repo":{"id":8210977,"name":"node-browser-resolve","full_name":"defunctzombie/node-browser-resolve","owner":{"login":"defunctzombie","id":84792,"avatar_url":"https://avatars.githubusercontent.com/u/84792?v=3","gravatar_id":"","url":"https://api.github.com/users/defunctzombie","html_url":"https://github.com/defunctzombie","followers_url":"https://api.github.com/users/defunctzombie/followers","following_url":"https://api.github.com/users/defunctzombie/following{/other_user}","gists_url":"https://api.github.com/users/defunctzombie/gists{/gist_id}","starred_url":"https://api.github.com/users/defunctzombie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/defunctzombie/subscriptions","organizations_url":"https://api.github.com/users/defunctzombie/orgs","repos_url":"https://api.github.com/users/defunctzombie/repos","events_url":"https://api.github.com/users/defunctzombie/events{/privacy}","received_events_url":"https://api.github.com/users/defunctzombie/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/defunctzombie/node-browser-resolve","description":"resolve function which support the browser field in package.json","fork":false,"url":"https://api.github.com/repos/defunctzombie/node-browser-resolve","forks_url":"https://api.github.com/repos/defunctzombie/node-browser-resolve/forks","keys_url":"https://api.github.com/repos/defunctzombie/node-browser-resolve/keys{/key_id}","collaborators_url":"https://api.github.com/repos/defunctzombie/node-browser-resolve/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/defunctzombie/node-browser-resolve/teams","hooks_url":"https://api.github.com/repos/defunctzombie/node-browser-resolve/hooks","issue_events_url":"https://api.github.com/repos/defunctzombie/node-browser-resolve/issues/events{/number}","events_url":"https://api.github.com/repos/defunctzombie/node-browser-resolve/events","assignees_url":"https://api.github.com/repos/defunctzombie/node-browser-resolve/assignees{/user}","branches_url":"https://api.github.com/repos/defunctzombie/node-browser-resolve/branches{/branch}","tags_url":"https://api.github.com/repos/defunctzombie/node-browser-resolve/tags","blobs_url":"https://api.github.com/repos/defunctzombie/node-browser-resolve/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/defunctzombie/node-browser-resolve/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/defunctzombie/node-browser-resolve/git/refs{/sha}","trees_url":"https://api.github.com/repos/defunctzombie/node-browser-resolve/git/trees{/sha}","statuses_url":"https://api.github.com/repos/defunctzombie/node-browser-resolve/statuses/{sha}","languages_url":"https://api.github.com/repos/defunctzombie/node-browser-resolve/languages","stargazers_url":"https://api.github.com/repos/defunctzombie/node-browser-resolve/stargazers","contributors_url":"https://api.github.com/repos/defunctzombie/node-browser-resolve/contributors","subscribers_url":"https://api.github.com/repos/defunctzombie/node-browser-resolve/subscribers","subscription_url":"https://api.github.com/repos/defunctzombie/node-browser-resolve/subscription","commits_url":"https://api.github.com/repos/defunctzombie/node-browser-resolve/commits{/sha}","git_commits_url":"https://api.github.com/repos/defunctzombie/node-browser-resolve/git/commits{/sha}","comments_url":"https://api.github.com/repos/defunctzombie/node-browser-resolve/comments{/number}","issue_comment_url":"https://api.github.com/repos/defunctzombie/node-browser-resolve/issues/comments{/number}","contents_url":"https://api.github.com/repos/defunctzombie/node-browser-resolve/contents/{+path}","compare_url":"https://api.github.com/repos/defunctzombie/node-browser-resolve/compare/{base}...{head}","merges_url":"https://api.github.com/repos/defunctzombie/node-browser-resolve/merges","archive_url":"https://api.github.com/repos/defunctzombie/node-browser-resolve/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/defunctzombie/node-browser-resolve/downloads","issues_url":"https://api.github.com/repos/defunctzombie/node-browser-resolve/issues{/number}","pulls_url":"https://api.github.com/repos/defunctzombie/node-browser-resolve/pulls{/number}","milestones_url":"https://api.github.com/repos/defunctzombie/node-browser-resolve/milestones{/number}","notifications_url":"https://api.github.com/repos/defunctzombie/node-browser-resolve/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/defunctzombie/node-browser-resolve/labels{/name}","releases_url":"https://api.github.com/repos/defunctzombie/node-browser-resolve/releases{/id}","created_at":"2013-02-15T01:07:01Z","updated_at":"2015-03-09T21:58:31Z","pushed_at":"2015-03-09T21:58:31Z","git_url":"git://github.com/defunctzombie/node-browser-resolve.git","ssh_url":"git@github.com:defunctzombie/node-browser-resolve.git","clone_url":"https://github.com/defunctzombie/node-browser-resolve.git","svn_url":"https://github.com/defunctzombie/node-browser-resolve","homepage":null,"size":652,"stargazers_count":31,"watchers_count":31,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":32,"mirror_url":null,"open_issues_count":2,"forks":32,"open_issues":2,"watchers":31,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/defunctzombie/node-browser-resolve/pulls/58"},"html":{"href":"https://github.com/defunctzombie/node-browser-resolve/pull/58"},"issue":{"href":"https://api.github.com/repos/defunctzombie/node-browser-resolve/issues/58"},"comments":{"href":"https://api.github.com/repos/defunctzombie/node-browser-resolve/issues/58/comments"},"review_comments":{"href":"https://api.github.com/repos/defunctzombie/node-browser-resolve/pulls/58/comments"},"review_comment":{"href":"https://api.github.com/repos/defunctzombie/node-browser-resolve/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/defunctzombie/node-browser-resolve/pulls/58/commits"},"statuses":{"href":"https://api.github.com/repos/defunctzombie/node-browser-resolve/statuses/b4a36d8b38fd7b08d13b45c75c035a45fe84d9d1"}}}}