{"action":"created","comment":{"url":"https://api.github.com/repos/flow-typed/flow-typed/pulls/comments/220745006","pull_request_review_id":159184423,"id":220745006,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyMDc0NTAwNg==","diff_hunk":"@@ -431,49 +409,6 @@ function writeVerbose(stream, msg, writeNewline = true) {\n   }\n }\n \n-const NAMESPACE_DIR_EXCEPTIONS = [\n-  '.cli-metadata.json',\n-  'node_modules',\n-  'package.json',\n-  '.eslintrc',\n-];\n-async function getLibDefNamespaces(defsDirPath: string) {","path":"cli/src/lib/libDefs.js","position":244,"original_position":244,"commit_id":"bf42ef330557523486377304bf658793b9bec301","original_commit_id":"bf42ef330557523486377304bf658793b9bec301","user":{"login":"GAntoine","id":3247106,"node_id":"MDQ6VXNlcjMyNDcxMDY=","avatar_url":"https://avatars2.githubusercontent.com/u/3247106?v=4","gravatar_id":"","url":"https://api.github.com/users/GAntoine","html_url":"https://github.com/GAntoine","followers_url":"https://api.github.com/users/GAntoine/followers","following_url":"https://api.github.com/users/GAntoine/following{/other_user}","gists_url":"https://api.github.com/users/GAntoine/gists{/gist_id}","starred_url":"https://api.github.com/users/GAntoine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GAntoine/subscriptions","organizations_url":"https://api.github.com/users/GAntoine/orgs","repos_url":"https://api.github.com/users/GAntoine/repos","events_url":"https://api.github.com/users/GAntoine/events{/privacy}","received_events_url":"https://api.github.com/users/GAntoine/received_events","type":"User","site_admin":false},"body":"Why where these methods removed?","created_at":"2018-09-26T22:38:35Z","updated_at":"2018-09-26T22:46:49Z","html_url":"https://github.com/flow-typed/flow-typed/pull/2749#discussion_r220745006","pull_request_url":"https://api.github.com/repos/flow-typed/flow-typed/pulls/2749","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/flow-typed/flow-typed/pulls/comments/220745006"},"html":{"href":"https://github.com/flow-typed/flow-typed/pull/2749#discussion_r220745006"},"pull_request":{"href":"https://api.github.com/repos/flow-typed/flow-typed/pulls/2749"}}},"pull_request":{"url":"https://api.github.com/repos/flow-typed/flow-typed/pulls/2749","id":217476480,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE3NDc2NDgw","html_url":"https://github.com/flow-typed/flow-typed/pull/2749","diff_url":"https://github.com/flow-typed/flow-typed/pull/2749.diff","patch_url":"https://github.com/flow-typed/flow-typed/pull/2749.patch","issue_url":"https://api.github.com/repos/flow-typed/flow-typed/issues/2749","number":2749,"state":"open","locked":false,"title":"Refactor validation error handling","user":{"login":"villesau","id":2647016,"node_id":"MDQ6VXNlcjI2NDcwMTY=","avatar_url":"https://avatars1.githubusercontent.com/u/2647016?v=4","gravatar_id":"","url":"https://api.github.com/users/villesau","html_url":"https://github.com/villesau","followers_url":"https://api.github.com/users/villesau/followers","following_url":"https://api.github.com/users/villesau/following{/other_user}","gists_url":"https://api.github.com/users/villesau/gists{/gist_id}","starred_url":"https://api.github.com/users/villesau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/villesau/subscriptions","organizations_url":"https://api.github.com/users/villesau/orgs","repos_url":"https://api.github.com/users/villesau/repos","events_url":"https://api.github.com/users/villesau/events{/privacy}","received_events_url":"https://api.github.com/users/villesau/received_events","type":"User","site_admin":false},"body":"Before the CLI has passed all the validation errors all over the place, and by pushing into this array accumulated the errors. I changed the cli to rather just simply throw in case of (validation) error. This reduces cross-dependencies and variables passed to different functions, and we get rid of mutable array which ties everything together and context variable. In overall most of the function signatures became much simpler.\r\n\r\nWhat this means in practice? Before you might have got multiple errors at the same time, but now the execution stops when ever error occurs. Usability wise this is IMO very minor downside compared to upside of cleaner code. Same behaviour can be achieved with exception approach as well later if we find it useful: We can catch errors, store them and re-throw accumulated errors. I didn't think this is wort effort at this point though. E: Ended up to collect getNpmLibDefs errors and throw them all at once.\r\n\r\nWhy I did this? Well, cleaner code is always cleaner code. This is also works as a bit of ground work towards dependency support in runTests.\r\n\r\nI also removed some dead code.","created_at":"2018-09-22T20:19:48Z","updated_at":"2018-09-26T22:46:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"27cc9df42633fd8751b86da006bd28d4a9b29583","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":874821631,"node_id":"MDU6TGFiZWw4NzQ4MjE2MzE=","url":"https://api.github.com/repos/flow-typed/flow-typed/labels/cli","name":"cli","color":"bfd4f2","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/flow-typed/flow-typed/pulls/2749/commits","review_comments_url":"https://api.github.com/repos/flow-typed/flow-typed/pulls/2749/comments","review_comment_url":"https://api.github.com/repos/flow-typed/flow-typed/pulls/comments{/number}","comments_url":"https://api.github.com/repos/flow-typed/flow-typed/issues/2749/comments","statuses_url":"https://api.github.com/repos/flow-typed/flow-typed/statuses/bf42ef330557523486377304bf658793b9bec301","head":{"label":"villesau:refactor-error-handling","ref":"refactor-error-handling","sha":"bf42ef330557523486377304bf658793b9bec301","user":{"login":"villesau","id":2647016,"node_id":"MDQ6VXNlcjI2NDcwMTY=","avatar_url":"https://avatars1.githubusercontent.com/u/2647016?v=4","gravatar_id":"","url":"https://api.github.com/users/villesau","html_url":"https://github.com/villesau","followers_url":"https://api.github.com/users/villesau/followers","following_url":"https://api.github.com/users/villesau/following{/other_user}","gists_url":"https://api.github.com/users/villesau/gists{/gist_id}","starred_url":"https://api.github.com/users/villesau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/villesau/subscriptions","organizations_url":"https://api.github.com/users/villesau/orgs","repos_url":"https://api.github.com/users/villesau/repos","events_url":"https://api.github.com/users/villesau/events{/privacy}","received_events_url":"https://api.github.com/users/villesau/received_events","type":"User","site_admin":false},"repo":{"id":108422525,"node_id":"MDEwOlJlcG9zaXRvcnkxMDg0MjI1MjU=","name":"flow-typed","full_name":"villesau/flow-typed","private":false,"owner":{"login":"villesau","id":2647016,"node_id":"MDQ6VXNlcjI2NDcwMTY=","avatar_url":"https://avatars1.githubusercontent.com/u/2647016?v=4","gravatar_id":"","url":"https://api.github.com/users/villesau","html_url":"https://github.com/villesau","followers_url":"https://api.github.com/users/villesau/followers","following_url":"https://api.github.com/users/villesau/following{/other_user}","gists_url":"https://api.github.com/users/villesau/gists{/gist_id}","starred_url":"https://api.github.com/users/villesau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/villesau/subscriptions","organizations_url":"https://api.github.com/users/villesau/orgs","repos_url":"https://api.github.com/users/villesau/repos","events_url":"https://api.github.com/users/villesau/events{/privacy}","received_events_url":"https://api.github.com/users/villesau/received_events","type":"User","site_admin":false},"html_url":"https://github.com/villesau/flow-typed","description":"A central repository for Flow library definitions","fork":true,"url":"https://api.github.com/repos/villesau/flow-typed","forks_url":"https://api.github.com/repos/villesau/flow-typed/forks","keys_url":"https://api.github.com/repos/villesau/flow-typed/keys{/key_id}","collaborators_url":"https://api.github.com/repos/villesau/flow-typed/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/villesau/flow-typed/teams","hooks_url":"https://api.github.com/repos/villesau/flow-typed/hooks","issue_events_url":"https://api.github.com/repos/villesau/flow-typed/issues/events{/number}","events_url":"https://api.github.com/repos/villesau/flow-typed/events","assignees_url":"https://api.github.com/repos/villesau/flow-typed/assignees{/user}","branches_url":"https://api.github.com/repos/villesau/flow-typed/branches{/branch}","tags_url":"https://api.github.com/repos/villesau/flow-typed/tags","blobs_url":"https://api.github.com/repos/villesau/flow-typed/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/villesau/flow-typed/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/villesau/flow-typed/git/refs{/sha}","trees_url":"https://api.github.com/repos/villesau/flow-typed/git/trees{/sha}","statuses_url":"https://api.github.com/repos/villesau/flow-typed/statuses/{sha}","languages_url":"https://api.github.com/repos/villesau/flow-typed/languages","stargazers_url":"https://api.github.com/repos/villesau/flow-typed/stargazers","contributors_url":"https://api.github.com/repos/villesau/flow-typed/contributors","subscribers_url":"https://api.github.com/repos/villesau/flow-typed/subscribers","subscription_url":"https://api.github.com/repos/villesau/flow-typed/subscription","commits_url":"https://api.github.com/repos/villesau/flow-typed/commits{/sha}","git_commits_url":"https://api.github.com/repos/villesau/flow-typed/git/commits{/sha}","comments_url":"https://api.github.com/repos/villesau/flow-typed/comments{/number}","issue_comment_url":"https://api.github.com/repos/villesau/flow-typed/issues/comments{/number}","contents_url":"https://api.github.com/repos/villesau/flow-typed/contents/{+path}","compare_url":"https://api.github.com/repos/villesau/flow-typed/compare/{base}...{head}","merges_url":"https://api.github.com/repos/villesau/flow-typed/merges","archive_url":"https://api.github.com/repos/villesau/flow-typed/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/villesau/flow-typed/downloads","issues_url":"https://api.github.com/repos/villesau/flow-typed/issues{/number}","pulls_url":"https://api.github.com/repos/villesau/flow-typed/pulls{/number}","milestones_url":"https://api.github.com/repos/villesau/flow-typed/milestones{/number}","notifications_url":"https://api.github.com/repos/villesau/flow-typed/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/villesau/flow-typed/labels{/name}","releases_url":"https://api.github.com/repos/villesau/flow-typed/releases{/id}","deployments_url":"https://api.github.com/repos/villesau/flow-typed/deployments","created_at":"2017-10-26T14:27:29Z","updated_at":"2018-08-15T21:03:44Z","pushed_at":"2018-09-22T23:24:41Z","git_url":"git://github.com/villesau/flow-typed.git","ssh_url":"git@github.com:villesau/flow-typed.git","clone_url":"https://github.com/villesau/flow-typed.git","svn_url":"https://github.com/villesau/flow-typed","homepage":"","size":5662,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"flow-typed:master","ref":"master","sha":"e34c0018b1f06240230ba6f4496783e30c997ac6","user":{"login":"flow-typed","id":40805164,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQwODA1MTY0","avatar_url":"https://avatars2.githubusercontent.com/u/40805164?v=4","gravatar_id":"","url":"https://api.github.com/users/flow-typed","html_url":"https://github.com/flow-typed","followers_url":"https://api.github.com/users/flow-typed/followers","following_url":"https://api.github.com/users/flow-typed/following{/other_user}","gists_url":"https://api.github.com/users/flow-typed/gists{/gist_id}","starred_url":"https://api.github.com/users/flow-typed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flow-typed/subscriptions","organizations_url":"https://api.github.com/users/flow-typed/orgs","repos_url":"https://api.github.com/users/flow-typed/repos","events_url":"https://api.github.com/users/flow-typed/events{/privacy}","received_events_url":"https://api.github.com/users/flow-typed/received_events","type":"Organization","site_admin":false},"repo":{"id":42698429,"node_id":"MDEwOlJlcG9zaXRvcnk0MjY5ODQyOQ==","name":"flow-typed","full_name":"flow-typed/flow-typed","private":false,"owner":{"login":"flow-typed","id":40805164,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQwODA1MTY0","avatar_url":"https://avatars2.githubusercontent.com/u/40805164?v=4","gravatar_id":"","url":"https://api.github.com/users/flow-typed","html_url":"https://github.com/flow-typed","followers_url":"https://api.github.com/users/flow-typed/followers","following_url":"https://api.github.com/users/flow-typed/following{/other_user}","gists_url":"https://api.github.com/users/flow-typed/gists{/gist_id}","starred_url":"https://api.github.com/users/flow-typed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flow-typed/subscriptions","organizations_url":"https://api.github.com/users/flow-typed/orgs","repos_url":"https://api.github.com/users/flow-typed/repos","events_url":"https://api.github.com/users/flow-typed/events{/privacy}","received_events_url":"https://api.github.com/users/flow-typed/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/flow-typed/flow-typed","description":"A central repository for Flow library definitions","fork":false,"url":"https://api.github.com/repos/flow-typed/flow-typed","forks_url":"https://api.github.com/repos/flow-typed/flow-typed/forks","keys_url":"https://api.github.com/repos/flow-typed/flow-typed/keys{/key_id}","collaborators_url":"https://api.github.com/repos/flow-typed/flow-typed/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/flow-typed/flow-typed/teams","hooks_url":"https://api.github.com/repos/flow-typed/flow-typed/hooks","issue_events_url":"https://api.github.com/repos/flow-typed/flow-typed/issues/events{/number}","events_url":"https://api.github.com/repos/flow-typed/flow-typed/events","assignees_url":"https://api.github.com/repos/flow-typed/flow-typed/assignees{/user}","branches_url":"https://api.github.com/repos/flow-typed/flow-typed/branches{/branch}","tags_url":"https://api.github.com/repos/flow-typed/flow-typed/tags","blobs_url":"https://api.github.com/repos/flow-typed/flow-typed/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/flow-typed/flow-typed/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/flow-typed/flow-typed/git/refs{/sha}","trees_url":"https://api.github.com/repos/flow-typed/flow-typed/git/trees{/sha}","statuses_url":"https://api.github.com/repos/flow-typed/flow-typed/statuses/{sha}","languages_url":"https://api.github.com/repos/flow-typed/flow-typed/languages","stargazers_url":"https://api.github.com/repos/flow-typed/flow-typed/stargazers","contributors_url":"https://api.github.com/repos/flow-typed/flow-typed/contributors","subscribers_url":"https://api.github.com/repos/flow-typed/flow-typed/subscribers","subscription_url":"https://api.github.com/repos/flow-typed/flow-typed/subscription","commits_url":"https://api.github.com/repos/flow-typed/flow-typed/commits{/sha}","git_commits_url":"https://api.github.com/repos/flow-typed/flow-typed/git/commits{/sha}","comments_url":"https://api.github.com/repos/flow-typed/flow-typed/comments{/number}","issue_comment_url":"https://api.github.com/repos/flow-typed/flow-typed/issues/comments{/number}","contents_url":"https://api.github.com/repos/flow-typed/flow-typed/contents/{+path}","compare_url":"https://api.github.com/repos/flow-typed/flow-typed/compare/{base}...{head}","merges_url":"https://api.github.com/repos/flow-typed/flow-typed/merges","archive_url":"https://api.github.com/repos/flow-typed/flow-typed/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/flow-typed/flow-typed/downloads","issues_url":"https://api.github.com/repos/flow-typed/flow-typed/issues{/number}","pulls_url":"https://api.github.com/repos/flow-typed/flow-typed/pulls{/number}","milestones_url":"https://api.github.com/repos/flow-typed/flow-typed/milestones{/number}","notifications_url":"https://api.github.com/repos/flow-typed/flow-typed/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/flow-typed/flow-typed/labels{/name}","releases_url":"https://api.github.com/repos/flow-typed/flow-typed/releases{/id}","deployments_url":"https://api.github.com/repos/flow-typed/flow-typed/deployments","created_at":"2015-09-18T03:51:49Z","updated_at":"2018-09-26T19:29:00Z","pushed_at":"2018-09-26T19:04:23Z","git_url":"git://github.com/flow-typed/flow-typed.git","ssh_url":"git@github.com:flow-typed/flow-typed.git","clone_url":"https://github.com/flow-typed/flow-typed.git","svn_url":"https://github.com/flow-typed/flow-typed","homepage":"","size":5544,"stargazers_count":2881,"watchers_count":2881,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1112,"mirror_url":null,"archived":false,"open_issues_count":320,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":1112,"open_issues":320,"watchers":2881,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/flow-typed/flow-typed/pulls/2749"},"html":{"href":"https://github.com/flow-typed/flow-typed/pull/2749"},"issue":{"href":"https://api.github.com/repos/flow-typed/flow-typed/issues/2749"},"comments":{"href":"https://api.github.com/repos/flow-typed/flow-typed/issues/2749/comments"},"review_comments":{"href":"https://api.github.com/repos/flow-typed/flow-typed/pulls/2749/comments"},"review_comment":{"href":"https://api.github.com/repos/flow-typed/flow-typed/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/flow-typed/flow-typed/pulls/2749/commits"},"statuses":{"href":"https://api.github.com/repos/flow-typed/flow-typed/statuses/bf42ef330557523486377304bf658793b9bec301"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"GAntoine"}}