{"action":"opened","number":538,"pull_request":{"url":"https://api.github.com/repos/facebook/flow/pulls/538","id":38052685,"html_url":"https://github.com/facebook/flow/pull/538","diff_url":"https://github.com/facebook/flow/pull/538.diff","patch_url":"https://github.com/facebook/flow/pull/538.patch","issue_url":"https://api.github.com/repos/facebook/flow/issues/538","number":538,"state":"open","locked":false,"title":"Show a helpful error message when a package.json file can't be parsed","user":{"login":"samwgoldman","id":254842,"avatar_url":"https://avatars.githubusercontent.com/u/254842?v=3","gravatar_id":"","url":"https://api.github.com/users/samwgoldman","html_url":"https://github.com/samwgoldman","followers_url":"https://api.github.com/users/samwgoldman/followers","following_url":"https://api.github.com/users/samwgoldman/following{/other_user}","gists_url":"https://api.github.com/users/samwgoldman/gists{/gist_id}","starred_url":"https://api.github.com/users/samwgoldman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samwgoldman/subscriptions","organizations_url":"https://api.github.com/users/samwgoldman/orgs","repos_url":"https://api.github.com/users/samwgoldman/repos","events_url":"https://api.github.com/users/samwgoldman/events{/privacy}","received_events_url":"https://api.github.com/users/samwgoldman/received_events","type":"User","site_admin":false},"body":"Before this change, if there was an invalid package.json file, flow\r\nwould just error out with this unhelpful output:\r\n\r\n`Fatal error: exception Parse_error.Error(_)`\r\n\r\nNow, the user will be able to see the actual path to the file that\r\ncaused the error.\r\n\r\nThis is especially helpful because the package.json file might be hidden\r\ndeep in the node_modules directory structure. This actually happens in\r\nreal life with packages like `enhanced-resolve` that has an\r\n`invalidPackageJson` test fixture.\r\n\r\nThe \"real\" fix here is to only parse package.json files that correspond\r\nto actual imported code. This is just a small usability fix.\r\n\r\nAs a workaround, users should be able to add the appropriate entries to\r\nthe [ignore] section of the .flowconfig file. This fix will at least\r\nhelp users discover which paths need to be ignored.\r\n\r\nSee #353","created_at":"2015-06-18T21:02:41Z","updated_at":"2015-06-18T21:02:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3be09ca97c15300a422eb3e0a0d6871a5d1ddc53","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/facebook/flow/pulls/538/commits","review_comments_url":"https://api.github.com/repos/facebook/flow/pulls/538/comments","review_comment_url":"https://api.github.com/repos/facebook/flow/pulls/comments{/number}","comments_url":"https://api.github.com/repos/facebook/flow/issues/538/comments","statuses_url":"https://api.github.com/repos/facebook/flow/statuses/6404bc6ba55e0ce46ee3524c07b4c4b702019228","head":{"label":"samwgoldman:invalid-package-json-errors","ref":"invalid-package-json-errors","sha":"6404bc6ba55e0ce46ee3524c07b4c4b702019228","user":{"login":"samwgoldman","id":254842,"avatar_url":"https://avatars.githubusercontent.com/u/254842?v=3","gravatar_id":"","url":"https://api.github.com/users/samwgoldman","html_url":"https://github.com/samwgoldman","followers_url":"https://api.github.com/users/samwgoldman/followers","following_url":"https://api.github.com/users/samwgoldman/following{/other_user}","gists_url":"https://api.github.com/users/samwgoldman/gists{/gist_id}","starred_url":"https://api.github.com/users/samwgoldman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samwgoldman/subscriptions","organizations_url":"https://api.github.com/users/samwgoldman/orgs","repos_url":"https://api.github.com/users/samwgoldman/repos","events_url":"https://api.github.com/users/samwgoldman/events{/privacy}","received_events_url":"https://api.github.com/users/samwgoldman/received_events","type":"User","site_admin":false},"repo":{"id":31458997,"name":"flow","full_name":"samwgoldman/flow","owner":{"login":"samwgoldman","id":254842,"avatar_url":"https://avatars.githubusercontent.com/u/254842?v=3","gravatar_id":"","url":"https://api.github.com/users/samwgoldman","html_url":"https://github.com/samwgoldman","followers_url":"https://api.github.com/users/samwgoldman/followers","following_url":"https://api.github.com/users/samwgoldman/following{/other_user}","gists_url":"https://api.github.com/users/samwgoldman/gists{/gist_id}","starred_url":"https://api.github.com/users/samwgoldman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samwgoldman/subscriptions","organizations_url":"https://api.github.com/users/samwgoldman/orgs","repos_url":"https://api.github.com/users/samwgoldman/repos","events_url":"https://api.github.com/users/samwgoldman/events{/privacy}","received_events_url":"https://api.github.com/users/samwgoldman/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/samwgoldman/flow","description":"Adds static typing to JavaScript to improve developer productivity and code quality.","fork":true,"url":"https://api.github.com/repos/samwgoldman/flow","forks_url":"https://api.github.com/repos/samwgoldman/flow/forks","keys_url":"https://api.github.com/repos/samwgoldman/flow/keys{/key_id}","collaborators_url":"https://api.github.com/repos/samwgoldman/flow/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/samwgoldman/flow/teams","hooks_url":"https://api.github.com/repos/samwgoldman/flow/hooks","issue_events_url":"https://api.github.com/repos/samwgoldman/flow/issues/events{/number}","events_url":"https://api.github.com/repos/samwgoldman/flow/events","assignees_url":"https://api.github.com/repos/samwgoldman/flow/assignees{/user}","branches_url":"https://api.github.com/repos/samwgoldman/flow/branches{/branch}","tags_url":"https://api.github.com/repos/samwgoldman/flow/tags","blobs_url":"https://api.github.com/repos/samwgoldman/flow/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/samwgoldman/flow/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/samwgoldman/flow/git/refs{/sha}","trees_url":"https://api.github.com/repos/samwgoldman/flow/git/trees{/sha}","statuses_url":"https://api.github.com/repos/samwgoldman/flow/statuses/{sha}","languages_url":"https://api.github.com/repos/samwgoldman/flow/languages","stargazers_url":"https://api.github.com/repos/samwgoldman/flow/stargazers","contributors_url":"https://api.github.com/repos/samwgoldman/flow/contributors","subscribers_url":"https://api.github.com/repos/samwgoldman/flow/subscribers","subscription_url":"https://api.github.com/repos/samwgoldman/flow/subscription","commits_url":"https://api.github.com/repos/samwgoldman/flow/commits{/sha}","git_commits_url":"https://api.github.com/repos/samwgoldman/flow/git/commits{/sha}","comments_url":"https://api.github.com/repos/samwgoldman/flow/comments{/number}","issue_comment_url":"https://api.github.com/repos/samwgoldman/flow/issues/comments{/number}","contents_url":"https://api.github.com/repos/samwgoldman/flow/contents/{+path}","compare_url":"https://api.github.com/repos/samwgoldman/flow/compare/{base}...{head}","merges_url":"https://api.github.com/repos/samwgoldman/flow/merges","archive_url":"https://api.github.com/repos/samwgoldman/flow/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/samwgoldman/flow/downloads","issues_url":"https://api.github.com/repos/samwgoldman/flow/issues{/number}","pulls_url":"https://api.github.com/repos/samwgoldman/flow/pulls{/number}","milestones_url":"https://api.github.com/repos/samwgoldman/flow/milestones{/number}","notifications_url":"https://api.github.com/repos/samwgoldman/flow/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/samwgoldman/flow/labels{/name}","releases_url":"https://api.github.com/repos/samwgoldman/flow/releases{/id}","created_at":"2015-02-28T10:12:19Z","updated_at":"2015-05-07T21:57:52Z","pushed_at":"2015-06-18T21:02:31Z","git_url":"git://github.com/samwgoldman/flow.git","ssh_url":"git@github.com:samwgoldman/flow.git","clone_url":"https://github.com/samwgoldman/flow.git","svn_url":"https://github.com/samwgoldman/flow","homepage":"http://flowtype.org/","size":64876,"stargazers_count":0,"watchers_count":0,"language":"OCaml","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"facebook:master","ref":"master","sha":"5a70a1099cb0e1b9604d5ecfe974607f2db0e6a9","user":{"login":"facebook","id":69631,"avatar_url":"https://avatars.githubusercontent.com/u/69631?v=3","gravatar_id":"","url":"https://api.github.com/users/facebook","html_url":"https://github.com/facebook","followers_url":"https://api.github.com/users/facebook/followers","following_url":"https://api.github.com/users/facebook/following{/other_user}","gists_url":"https://api.github.com/users/facebook/gists{/gist_id}","starred_url":"https://api.github.com/users/facebook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebook/subscriptions","organizations_url":"https://api.github.com/users/facebook/orgs","repos_url":"https://api.github.com/users/facebook/repos","events_url":"https://api.github.com/users/facebook/events{/privacy}","received_events_url":"https://api.github.com/users/facebook/received_events","type":"Organization","site_admin":false},"repo":{"id":25880891,"name":"flow","full_name":"facebook/flow","owner":{"login":"facebook","id":69631,"avatar_url":"https://avatars.githubusercontent.com/u/69631?v=3","gravatar_id":"","url":"https://api.github.com/users/facebook","html_url":"https://github.com/facebook","followers_url":"https://api.github.com/users/facebook/followers","following_url":"https://api.github.com/users/facebook/following{/other_user}","gists_url":"https://api.github.com/users/facebook/gists{/gist_id}","starred_url":"https://api.github.com/users/facebook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebook/subscriptions","organizations_url":"https://api.github.com/users/facebook/orgs","repos_url":"https://api.github.com/users/facebook/repos","events_url":"https://api.github.com/users/facebook/events{/privacy}","received_events_url":"https://api.github.com/users/facebook/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/facebook/flow","description":"Adds static typing to JavaScript to improve developer productivity and code quality.","fork":false,"url":"https://api.github.com/repos/facebook/flow","forks_url":"https://api.github.com/repos/facebook/flow/forks","keys_url":"https://api.github.com/repos/facebook/flow/keys{/key_id}","collaborators_url":"https://api.github.com/repos/facebook/flow/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/facebook/flow/teams","hooks_url":"https://api.github.com/repos/facebook/flow/hooks","issue_events_url":"https://api.github.com/repos/facebook/flow/issues/events{/number}","events_url":"https://api.github.com/repos/facebook/flow/events","assignees_url":"https://api.github.com/repos/facebook/flow/assignees{/user}","branches_url":"https://api.github.com/repos/facebook/flow/branches{/branch}","tags_url":"https://api.github.com/repos/facebook/flow/tags","blobs_url":"https://api.github.com/repos/facebook/flow/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/facebook/flow/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/facebook/flow/git/refs{/sha}","trees_url":"https://api.github.com/repos/facebook/flow/git/trees{/sha}","statuses_url":"https://api.github.com/repos/facebook/flow/statuses/{sha}","languages_url":"https://api.github.com/repos/facebook/flow/languages","stargazers_url":"https://api.github.com/repos/facebook/flow/stargazers","contributors_url":"https://api.github.com/repos/facebook/flow/contributors","subscribers_url":"https://api.github.com/repos/facebook/flow/subscribers","subscription_url":"https://api.github.com/repos/facebook/flow/subscription","commits_url":"https://api.github.com/repos/facebook/flow/commits{/sha}","git_commits_url":"https://api.github.com/repos/facebook/flow/git/commits{/sha}","comments_url":"https://api.github.com/repos/facebook/flow/comments{/number}","issue_comment_url":"https://api.github.com/repos/facebook/flow/issues/comments{/number}","contents_url":"https://api.github.com/repos/facebook/flow/contents/{+path}","compare_url":"https://api.github.com/repos/facebook/flow/compare/{base}...{head}","merges_url":"https://api.github.com/repos/facebook/flow/merges","archive_url":"https://api.github.com/repos/facebook/flow/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/facebook/flow/downloads","issues_url":"https://api.github.com/repos/facebook/flow/issues{/number}","pulls_url":"https://api.github.com/repos/facebook/flow/pulls{/number}","milestones_url":"https://api.github.com/repos/facebook/flow/milestones{/number}","notifications_url":"https://api.github.com/repos/facebook/flow/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/facebook/flow/labels{/name}","releases_url":"https://api.github.com/repos/facebook/flow/releases{/id}","created_at":"2014-10-28T17:17:45Z","updated_at":"2015-06-18T16:39:27Z","pushed_at":"2015-06-18T21:02:41Z","git_url":"git://github.com/facebook/flow.git","ssh_url":"git@github.com:facebook/flow.git","clone_url":"https://github.com/facebook/flow.git","svn_url":"https://github.com/facebook/flow","homepage":"http://flowtype.org/","size":102611,"stargazers_count":4735,"watchers_count":4735,"language":"OCaml","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":236,"mirror_url":null,"open_issues_count":225,"forks":236,"open_issues":225,"watchers":4735,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/facebook/flow/pulls/538"},"html":{"href":"https://github.com/facebook/flow/pull/538"},"issue":{"href":"https://api.github.com/repos/facebook/flow/issues/538"},"comments":{"href":"https://api.github.com/repos/facebook/flow/issues/538/comments"},"review_comments":{"href":"https://api.github.com/repos/facebook/flow/pulls/538/comments"},"review_comment":{"href":"https://api.github.com/repos/facebook/flow/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/facebook/flow/pulls/538/commits"},"statuses":{"href":"https://api.github.com/repos/facebook/flow/statuses/6404bc6ba55e0ce46ee3524c07b4c4b702019228"}},"merged":false,"mergeable":true,"mergeable_state":"clean","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":4,"deletions":2,"changed_files":4}}