{"action":"created","comment":{"url":"https://api.github.com/repos/GoogleChrome/puppeteer/pulls/comments/141290037","pull_request_review_id":65478191,"id":141290037,"diff_hunk":"@@ -15,16 +15,18 @@\n  */\n const os = require('os');\n const path = require('path');\n-const removeSync = require('rimraf').sync;\n+const {helper} = require('./helper');\n+const rimrafAsync = helper.promisify(require('rimraf'));\n const childProcess = require('child_process');\n const Downloader = require('../utils/ChromiumDownloader');\n const Connection = require('./Connection');\n const Browser = require('./Browser');\n const readline = require('readline');\n const fs = require('fs');\n-const {helper} = require('./helper');\n const ChromiumRevision = require('../package.json').puppeteer.chromium_revision;\n \n+fs.mkdtempAsync = helper.promisify(fs.mkdtemp);","path":"lib/Launcher.js","position":16,"original_position":16,"commit_id":"fc34f6553fdeaea90f85e4f166bd83ccaa6696d7","original_commit_id":"fc34f6553fdeaea90f85e4f166bd83ccaa6696d7","user":{"login":"aslushnikov","id":746130,"avatar_url":"https://avatars3.githubusercontent.com/u/746130?v=4","gravatar_id":"","url":"https://api.github.com/users/aslushnikov","html_url":"https://github.com/aslushnikov","followers_url":"https://api.github.com/users/aslushnikov/followers","following_url":"https://api.github.com/users/aslushnikov/following{/other_user}","gists_url":"https://api.github.com/users/aslushnikov/gists{/gist_id}","starred_url":"https://api.github.com/users/aslushnikov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aslushnikov/subscriptions","organizations_url":"https://api.github.com/users/aslushnikov/orgs","repos_url":"https://api.github.com/users/aslushnikov/repos","events_url":"https://api.github.com/users/aslushnikov/events{/privacy}","received_events_url":"https://api.github.com/users/aslushnikov/received_events","type":"User","site_admin":false},"body":"let's not spoil the global:\r\n\r\n```js\r\nconst mkdtempAsync = helper.promisify(fs.mkdtemp);\r\n```","created_at":"2017-09-27T09:27:50Z","updated_at":"2017-09-27T09:48:22Z","html_url":"https://github.com/GoogleChrome/puppeteer/pull/879#discussion_r141290037","pull_request_url":"https://api.github.com/repos/GoogleChrome/puppeteer/pulls/879","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/GoogleChrome/puppeteer/pulls/comments/141290037"},"html":{"href":"https://github.com/GoogleChrome/puppeteer/pull/879#discussion_r141290037"},"pull_request":{"href":"https://api.github.com/repos/GoogleChrome/puppeteer/pulls/879"}}},"pull_request":{"url":"https://api.github.com/repos/GoogleChrome/puppeteer/pulls/879","id":143037850,"html_url":"https://github.com/GoogleChrome/puppeteer/pull/879","diff_url":"https://github.com/GoogleChrome/puppeteer/pull/879.diff","patch_url":"https://github.com/GoogleChrome/puppeteer/pull/879.patch","issue_url":"https://api.github.com/repos/GoogleChrome/puppeteer/issues/879","number":879,"state":"open","locked":false,"title":"[fix]: Removed synchronous operation with file system.","user":{"login":"CheerlessCloud","id":12088742,"avatar_url":"https://avatars3.githubusercontent.com/u/12088742?v=4","gravatar_id":"","url":"https://api.github.com/users/CheerlessCloud","html_url":"https://github.com/CheerlessCloud","followers_url":"https://api.github.com/users/CheerlessCloud/followers","following_url":"https://api.github.com/users/CheerlessCloud/following{/other_user}","gists_url":"https://api.github.com/users/CheerlessCloud/gists{/gist_id}","starred_url":"https://api.github.com/users/CheerlessCloud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CheerlessCloud/subscriptions","organizations_url":"https://api.github.com/users/CheerlessCloud/orgs","repos_url":"https://api.github.com/users/CheerlessCloud/repos","events_url":"https://api.github.com/users/CheerlessCloud/events{/privacy}","received_events_url":"https://api.github.com/users/CheerlessCloud/received_events","type":"User","site_admin":false},"body":"I'm completely discouraged by this code. @aslushnikov How could you write such a thing?\r\nI would somehow understand this solution if the code were written on callbacks. But you use the **async\r\n function**! And inside the asynchronous function you are happy to block the EventLoop. What for?\r\n\r\nIf someone tells me where to put this \"promisify\", I'll move it without problems. But still I recommended somehow to solve this problem in the near future.\r\n\r\nThe remaining cases use synchronous writing and reading are not as critical, but it is advisable to fix them too: [1](https://github.com/GoogleChrome/puppeteer/blob/master/lib/Launcher.js#L62), [2](https://github.com/GoogleChrome/puppeteer/blob/master/lib/Tracing.js#L69).","created_at":"2017-09-26T04:49:21Z","updated_at":"2017-09-27T09:48:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":"917ea7cb62bd0685547040aedba3dcf4bd938e7d","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/GoogleChrome/puppeteer/pulls/879/commits","review_comments_url":"https://api.github.com/repos/GoogleChrome/puppeteer/pulls/879/comments","review_comment_url":"https://api.github.com/repos/GoogleChrome/puppeteer/pulls/comments{/number}","comments_url":"https://api.github.com/repos/GoogleChrome/puppeteer/issues/879/comments","statuses_url":"https://api.github.com/repos/GoogleChrome/puppeteer/statuses/fc34f6553fdeaea90f85e4f166bd83ccaa6696d7","head":{"label":"CheerlessCloud:master","ref":"master","sha":"fc34f6553fdeaea90f85e4f166bd83ccaa6696d7","user":{"login":"CheerlessCloud","id":12088742,"avatar_url":"https://avatars3.githubusercontent.com/u/12088742?v=4","gravatar_id":"","url":"https://api.github.com/users/CheerlessCloud","html_url":"https://github.com/CheerlessCloud","followers_url":"https://api.github.com/users/CheerlessCloud/followers","following_url":"https://api.github.com/users/CheerlessCloud/following{/other_user}","gists_url":"https://api.github.com/users/CheerlessCloud/gists{/gist_id}","starred_url":"https://api.github.com/users/CheerlessCloud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CheerlessCloud/subscriptions","organizations_url":"https://api.github.com/users/CheerlessCloud/orgs","repos_url":"https://api.github.com/users/CheerlessCloud/repos","events_url":"https://api.github.com/users/CheerlessCloud/events{/privacy}","received_events_url":"https://api.github.com/users/CheerlessCloud/received_events","type":"User","site_admin":false},"repo":{"id":104832473,"name":"puppeteer","full_name":"CheerlessCloud/puppeteer","owner":{"login":"CheerlessCloud","id":12088742,"avatar_url":"https://avatars3.githubusercontent.com/u/12088742?v=4","gravatar_id":"","url":"https://api.github.com/users/CheerlessCloud","html_url":"https://github.com/CheerlessCloud","followers_url":"https://api.github.com/users/CheerlessCloud/followers","following_url":"https://api.github.com/users/CheerlessCloud/following{/other_user}","gists_url":"https://api.github.com/users/CheerlessCloud/gists{/gist_id}","starred_url":"https://api.github.com/users/CheerlessCloud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CheerlessCloud/subscriptions","organizations_url":"https://api.github.com/users/CheerlessCloud/orgs","repos_url":"https://api.github.com/users/CheerlessCloud/repos","events_url":"https://api.github.com/users/CheerlessCloud/events{/privacy}","received_events_url":"https://api.github.com/users/CheerlessCloud/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/CheerlessCloud/puppeteer","description":"Headless Chrome Node API","fork":true,"url":"https://api.github.com/repos/CheerlessCloud/puppeteer","forks_url":"https://api.github.com/repos/CheerlessCloud/puppeteer/forks","keys_url":"https://api.github.com/repos/CheerlessCloud/puppeteer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CheerlessCloud/puppeteer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CheerlessCloud/puppeteer/teams","hooks_url":"https://api.github.com/repos/CheerlessCloud/puppeteer/hooks","issue_events_url":"https://api.github.com/repos/CheerlessCloud/puppeteer/issues/events{/number}","events_url":"https://api.github.com/repos/CheerlessCloud/puppeteer/events","assignees_url":"https://api.github.com/repos/CheerlessCloud/puppeteer/assignees{/user}","branches_url":"https://api.github.com/repos/CheerlessCloud/puppeteer/branches{/branch}","tags_url":"https://api.github.com/repos/CheerlessCloud/puppeteer/tags","blobs_url":"https://api.github.com/repos/CheerlessCloud/puppeteer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CheerlessCloud/puppeteer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CheerlessCloud/puppeteer/git/refs{/sha}","trees_url":"https://api.github.com/repos/CheerlessCloud/puppeteer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CheerlessCloud/puppeteer/statuses/{sha}","languages_url":"https://api.github.com/repos/CheerlessCloud/puppeteer/languages","stargazers_url":"https://api.github.com/repos/CheerlessCloud/puppeteer/stargazers","contributors_url":"https://api.github.com/repos/CheerlessCloud/puppeteer/contributors","subscribers_url":"https://api.github.com/repos/CheerlessCloud/puppeteer/subscribers","subscription_url":"https://api.github.com/repos/CheerlessCloud/puppeteer/subscription","commits_url":"https://api.github.com/repos/CheerlessCloud/puppeteer/commits{/sha}","git_commits_url":"https://api.github.com/repos/CheerlessCloud/puppeteer/git/commits{/sha}","comments_url":"https://api.github.com/repos/CheerlessCloud/puppeteer/comments{/number}","issue_comment_url":"https://api.github.com/repos/CheerlessCloud/puppeteer/issues/comments{/number}","contents_url":"https://api.github.com/repos/CheerlessCloud/puppeteer/contents/{+path}","compare_url":"https://api.github.com/repos/CheerlessCloud/puppeteer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CheerlessCloud/puppeteer/merges","archive_url":"https://api.github.com/repos/CheerlessCloud/puppeteer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CheerlessCloud/puppeteer/downloads","issues_url":"https://api.github.com/repos/CheerlessCloud/puppeteer/issues{/number}","pulls_url":"https://api.github.com/repos/CheerlessCloud/puppeteer/pulls{/number}","milestones_url":"https://api.github.com/repos/CheerlessCloud/puppeteer/milestones{/number}","notifications_url":"https://api.github.com/repos/CheerlessCloud/puppeteer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CheerlessCloud/puppeteer/labels{/name}","releases_url":"https://api.github.com/repos/CheerlessCloud/puppeteer/releases{/id}","deployments_url":"https://api.github.com/repos/CheerlessCloud/puppeteer/deployments","created_at":"2017-09-26T03:39:34Z","updated_at":"2017-09-26T03:39:35Z","pushed_at":"2017-09-27T08:23:14Z","git_url":"git://github.com/CheerlessCloud/puppeteer.git","ssh_url":"git@github.com:CheerlessCloud/puppeteer.git","clone_url":"https://github.com/CheerlessCloud/puppeteer.git","svn_url":"https://github.com/CheerlessCloud/puppeteer","homepage":"https://try-puppeteer.appspot.com/","size":1868,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"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":"GoogleChrome:master","ref":"master","sha":"72161c475d62a8223dc6da8b89f4a3d65a9df48b","user":{"login":"GoogleChrome","id":1778935,"avatar_url":"https://avatars3.githubusercontent.com/u/1778935?v=4","gravatar_id":"","url":"https://api.github.com/users/GoogleChrome","html_url":"https://github.com/GoogleChrome","followers_url":"https://api.github.com/users/GoogleChrome/followers","following_url":"https://api.github.com/users/GoogleChrome/following{/other_user}","gists_url":"https://api.github.com/users/GoogleChrome/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleChrome/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleChrome/subscriptions","organizations_url":"https://api.github.com/users/GoogleChrome/orgs","repos_url":"https://api.github.com/users/GoogleChrome/repos","events_url":"https://api.github.com/users/GoogleChrome/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleChrome/received_events","type":"Organization","site_admin":false},"repo":{"id":90796663,"name":"puppeteer","full_name":"GoogleChrome/puppeteer","owner":{"login":"GoogleChrome","id":1778935,"avatar_url":"https://avatars3.githubusercontent.com/u/1778935?v=4","gravatar_id":"","url":"https://api.github.com/users/GoogleChrome","html_url":"https://github.com/GoogleChrome","followers_url":"https://api.github.com/users/GoogleChrome/followers","following_url":"https://api.github.com/users/GoogleChrome/following{/other_user}","gists_url":"https://api.github.com/users/GoogleChrome/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleChrome/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleChrome/subscriptions","organizations_url":"https://api.github.com/users/GoogleChrome/orgs","repos_url":"https://api.github.com/users/GoogleChrome/repos","events_url":"https://api.github.com/users/GoogleChrome/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleChrome/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/GoogleChrome/puppeteer","description":"Headless Chrome Node API","fork":false,"url":"https://api.github.com/repos/GoogleChrome/puppeteer","forks_url":"https://api.github.com/repos/GoogleChrome/puppeteer/forks","keys_url":"https://api.github.com/repos/GoogleChrome/puppeteer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GoogleChrome/puppeteer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GoogleChrome/puppeteer/teams","hooks_url":"https://api.github.com/repos/GoogleChrome/puppeteer/hooks","issue_events_url":"https://api.github.com/repos/GoogleChrome/puppeteer/issues/events{/number}","events_url":"https://api.github.com/repos/GoogleChrome/puppeteer/events","assignees_url":"https://api.github.com/repos/GoogleChrome/puppeteer/assignees{/user}","branches_url":"https://api.github.com/repos/GoogleChrome/puppeteer/branches{/branch}","tags_url":"https://api.github.com/repos/GoogleChrome/puppeteer/tags","blobs_url":"https://api.github.com/repos/GoogleChrome/puppeteer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GoogleChrome/puppeteer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GoogleChrome/puppeteer/git/refs{/sha}","trees_url":"https://api.github.com/repos/GoogleChrome/puppeteer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GoogleChrome/puppeteer/statuses/{sha}","languages_url":"https://api.github.com/repos/GoogleChrome/puppeteer/languages","stargazers_url":"https://api.github.com/repos/GoogleChrome/puppeteer/stargazers","contributors_url":"https://api.github.com/repos/GoogleChrome/puppeteer/contributors","subscribers_url":"https://api.github.com/repos/GoogleChrome/puppeteer/subscribers","subscription_url":"https://api.github.com/repos/GoogleChrome/puppeteer/subscription","commits_url":"https://api.github.com/repos/GoogleChrome/puppeteer/commits{/sha}","git_commits_url":"https://api.github.com/repos/GoogleChrome/puppeteer/git/commits{/sha}","comments_url":"https://api.github.com/repos/GoogleChrome/puppeteer/comments{/number}","issue_comment_url":"https://api.github.com/repos/GoogleChrome/puppeteer/issues/comments{/number}","contents_url":"https://api.github.com/repos/GoogleChrome/puppeteer/contents/{+path}","compare_url":"https://api.github.com/repos/GoogleChrome/puppeteer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GoogleChrome/puppeteer/merges","archive_url":"https://api.github.com/repos/GoogleChrome/puppeteer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GoogleChrome/puppeteer/downloads","issues_url":"https://api.github.com/repos/GoogleChrome/puppeteer/issues{/number}","pulls_url":"https://api.github.com/repos/GoogleChrome/puppeteer/pulls{/number}","milestones_url":"https://api.github.com/repos/GoogleChrome/puppeteer/milestones{/number}","notifications_url":"https://api.github.com/repos/GoogleChrome/puppeteer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GoogleChrome/puppeteer/labels{/name}","releases_url":"https://api.github.com/repos/GoogleChrome/puppeteer/releases{/id}","deployments_url":"https://api.github.com/repos/GoogleChrome/puppeteer/deployments","created_at":"2017-05-09T22:16:13Z","updated_at":"2017-09-27T09:45:11Z","pushed_at":"2017-09-27T08:23:16Z","git_url":"git://github.com/GoogleChrome/puppeteer.git","ssh_url":"git@github.com:GoogleChrome/puppeteer.git","clone_url":"https://github.com/GoogleChrome/puppeteer.git","svn_url":"https://github.com/GoogleChrome/puppeteer","homepage":"https://try-puppeteer.appspot.com/","size":1861,"stargazers_count":14716,"watchers_count":14716,"language":"JavaScript","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":533,"mirror_url":null,"open_issues_count":137,"forks":533,"open_issues":137,"watchers":14716,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/GoogleChrome/puppeteer/pulls/879"},"html":{"href":"https://github.com/GoogleChrome/puppeteer/pull/879"},"issue":{"href":"https://api.github.com/repos/GoogleChrome/puppeteer/issues/879"},"comments":{"href":"https://api.github.com/repos/GoogleChrome/puppeteer/issues/879/comments"},"review_comments":{"href":"https://api.github.com/repos/GoogleChrome/puppeteer/pulls/879/comments"},"review_comment":{"href":"https://api.github.com/repos/GoogleChrome/puppeteer/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/GoogleChrome/puppeteer/pulls/879/commits"},"statuses":{"href":"https://api.github.com/repos/GoogleChrome/puppeteer/statuses/fc34f6553fdeaea90f85e4f166bd83ccaa6696d7"}},"author_association":"NONE"}}
{"actor":{"display_login":"aslushnikov"}}