{"action":"created","comment":{"url":"https://api.github.com/repos/pnpm/supi/pulls/comments/170447156","pull_request_review_id":99137229,"id":170447156,"diff_hunk":"@@ -52,27 +53,21 @@ export default async function removeOrphanPkgs (\n     if (notDependents.length) {\n \n       if (opts.shamefullyFlatten && opts.oldShrinkwrap.packages) {\n-        const packages = opts.oldShrinkwrap.packages\n         await Promise.all(notDependents.map(async notDependent => {\n-          const pkgShr = packages[dp.relative(opts.oldShrinkwrap.registry, notDependent)]\n-          const pkgInfo = getPkgInfoFromShr(notDependent, pkgShr)\n-          const rootLink = path.join(rootModules, pkgInfo.name)\n-          // rootLink might not exist anymore because it might have been delete earlier\n-          if (await exists(rootLink)) {\n-            const linkTarget = await resolveLinkTarget(rootLink)\n-            const notDependentDir = path.join(rootModules, `.${notDependent}`)\n-            // we only want to remove the root link if it points to a version that we are removing\n-            if (linkTarget.startsWith(notDependentDir)) {\n+          if (opts.hoistedAliases[notDependent]) {\n+            await Promise.all(opts.hoistedAliases[notDependent].map(async alias => {\n               await removeTopDependency({\n-                name: pkgInfo.name,\n+                name: alias,\n                 dev: false,\n                 optional: false,\n               }, {\n                 modules: rootModules,\n-                bin: opts.bin\n+                bin: opts.bin,\n+                skipLogs: true","path":"src/api/removeOrphanPkgs.ts","position":34,"original_position":34,"commit_id":"90acb2b89eed5ded632e2c8561e8ee97e0b00e07","original_commit_id":"90acb2b89eed5ded632e2c8561e8ee97e0b00e07","user":{"login":"zkochan","id":1927579,"avatar_url":"https://avatars0.githubusercontent.com/u/1927579?v=4","gravatar_id":"","url":"https://api.github.com/users/zkochan","html_url":"https://github.com/zkochan","followers_url":"https://api.github.com/users/zkochan/followers","following_url":"https://api.github.com/users/zkochan/following{/other_user}","gists_url":"https://api.github.com/users/zkochan/gists{/gist_id}","starred_url":"https://api.github.com/users/zkochan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zkochan/subscriptions","organizations_url":"https://api.github.com/users/zkochan/orgs","repos_url":"https://api.github.com/users/zkochan/repos","events_url":"https://api.github.com/users/zkochan/events{/privacy}","received_events_url":"https://api.github.com/users/zkochan/received_events","type":"User","site_admin":false},"body":"I suggest `muteLogs: true`","created_at":"2018-02-25T09:32:52Z","updated_at":"2018-02-25T09:55:17Z","html_url":"https://github.com/pnpm/supi/pull/47#discussion_r170447156","pull_request_url":"https://api.github.com/repos/pnpm/supi/pulls/47","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/pnpm/supi/pulls/comments/170447156"},"html":{"href":"https://github.com/pnpm/supi/pull/47#discussion_r170447156"},"pull_request":{"href":"https://api.github.com/repos/pnpm/supi/pulls/47"}}},"pull_request":{"url":"https://api.github.com/repos/pnpm/supi/pulls/47","id":171178426,"html_url":"https://github.com/pnpm/supi/pull/47","diff_url":"https://github.com/pnpm/supi/pull/47.diff","patch_url":"https://github.com/pnpm/supi/pull/47.patch","issue_url":"https://api.github.com/repos/pnpm/supi/issues/47","number":47,"state":"open","locked":false,"title":"fix: flatten by alias","user":{"login":"etamponi","id":578612,"avatar_url":"https://avatars0.githubusercontent.com/u/578612?v=4","gravatar_id":"","url":"https://api.github.com/users/etamponi","html_url":"https://github.com/etamponi","followers_url":"https://api.github.com/users/etamponi/followers","following_url":"https://api.github.com/users/etamponi/following{/other_user}","gists_url":"https://api.github.com/users/etamponi/gists{/gist_id}","starred_url":"https://api.github.com/users/etamponi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/etamponi/subscriptions","organizations_url":"https://api.github.com/users/etamponi/orgs","repos_url":"https://api.github.com/users/etamponi/repos","events_url":"https://api.github.com/users/etamponi/events{/privacy}","received_events_url":"https://api.github.com/users/etamponi/received_events","type":"User","site_admin":false},"body":"I have to wire up prune yet, and write a test for it, but everything else seems to work fine.","created_at":"2018-02-24T13:19:41Z","updated_at":"2018-02-25T09:55:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7f6c2575585ea73550d5836552cd17ffc9423e0d","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/pnpm/supi/pulls/47/commits","review_comments_url":"https://api.github.com/repos/pnpm/supi/pulls/47/comments","review_comment_url":"https://api.github.com/repos/pnpm/supi/pulls/comments{/number}","comments_url":"https://api.github.com/repos/pnpm/supi/issues/47/comments","statuses_url":"https://api.github.com/repos/pnpm/supi/statuses/90acb2b89eed5ded632e2c8561e8ee97e0b00e07","head":{"label":"pnpm:fix/flatten-by-alias","ref":"fix/flatten-by-alias","sha":"90acb2b89eed5ded632e2c8561e8ee97e0b00e07","user":{"login":"pnpm","id":21320719,"avatar_url":"https://avatars0.githubusercontent.com/u/21320719?v=4","gravatar_id":"","url":"https://api.github.com/users/pnpm","html_url":"https://github.com/pnpm","followers_url":"https://api.github.com/users/pnpm/followers","following_url":"https://api.github.com/users/pnpm/following{/other_user}","gists_url":"https://api.github.com/users/pnpm/gists{/gist_id}","starred_url":"https://api.github.com/users/pnpm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pnpm/subscriptions","organizations_url":"https://api.github.com/users/pnpm/orgs","repos_url":"https://api.github.com/users/pnpm/repos","events_url":"https://api.github.com/users/pnpm/events{/privacy}","received_events_url":"https://api.github.com/users/pnpm/received_events","type":"Organization","site_admin":false},"repo":{"id":95659008,"name":"supi","full_name":"pnpm/supi","owner":{"login":"pnpm","id":21320719,"avatar_url":"https://avatars0.githubusercontent.com/u/21320719?v=4","gravatar_id":"","url":"https://api.github.com/users/pnpm","html_url":"https://github.com/pnpm","followers_url":"https://api.github.com/users/pnpm/followers","following_url":"https://api.github.com/users/pnpm/following{/other_user}","gists_url":"https://api.github.com/users/pnpm/gists{/gist_id}","starred_url":"https://api.github.com/users/pnpm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pnpm/subscriptions","organizations_url":"https://api.github.com/users/pnpm/orgs","repos_url":"https://api.github.com/users/pnpm/repos","events_url":"https://api.github.com/users/pnpm/events{/privacy}","received_events_url":"https://api.github.com/users/pnpm/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/pnpm/supi","description":"Fast, disk space efficient installation engine. Used by pnpm","fork":false,"url":"https://api.github.com/repos/pnpm/supi","forks_url":"https://api.github.com/repos/pnpm/supi/forks","keys_url":"https://api.github.com/repos/pnpm/supi/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pnpm/supi/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pnpm/supi/teams","hooks_url":"https://api.github.com/repos/pnpm/supi/hooks","issue_events_url":"https://api.github.com/repos/pnpm/supi/issues/events{/number}","events_url":"https://api.github.com/repos/pnpm/supi/events","assignees_url":"https://api.github.com/repos/pnpm/supi/assignees{/user}","branches_url":"https://api.github.com/repos/pnpm/supi/branches{/branch}","tags_url":"https://api.github.com/repos/pnpm/supi/tags","blobs_url":"https://api.github.com/repos/pnpm/supi/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pnpm/supi/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pnpm/supi/git/refs{/sha}","trees_url":"https://api.github.com/repos/pnpm/supi/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pnpm/supi/statuses/{sha}","languages_url":"https://api.github.com/repos/pnpm/supi/languages","stargazers_url":"https://api.github.com/repos/pnpm/supi/stargazers","contributors_url":"https://api.github.com/repos/pnpm/supi/contributors","subscribers_url":"https://api.github.com/repos/pnpm/supi/subscribers","subscription_url":"https://api.github.com/repos/pnpm/supi/subscription","commits_url":"https://api.github.com/repos/pnpm/supi/commits{/sha}","git_commits_url":"https://api.github.com/repos/pnpm/supi/git/commits{/sha}","comments_url":"https://api.github.com/repos/pnpm/supi/comments{/number}","issue_comment_url":"https://api.github.com/repos/pnpm/supi/issues/comments{/number}","contents_url":"https://api.github.com/repos/pnpm/supi/contents/{+path}","compare_url":"https://api.github.com/repos/pnpm/supi/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pnpm/supi/merges","archive_url":"https://api.github.com/repos/pnpm/supi/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pnpm/supi/downloads","issues_url":"https://api.github.com/repos/pnpm/supi/issues{/number}","pulls_url":"https://api.github.com/repos/pnpm/supi/pulls{/number}","milestones_url":"https://api.github.com/repos/pnpm/supi/milestones{/number}","notifications_url":"https://api.github.com/repos/pnpm/supi/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pnpm/supi/labels{/name}","releases_url":"https://api.github.com/repos/pnpm/supi/releases{/id}","deployments_url":"https://api.github.com/repos/pnpm/supi/deployments","created_at":"2017-06-28T10:50:55Z","updated_at":"2018-01-30T17:00:18Z","pushed_at":"2018-02-25T00:37:58Z","git_url":"git://github.com/pnpm/supi.git","ssh_url":"git@github.com:pnpm/supi.git","clone_url":"https://github.com/pnpm/supi.git","svn_url":"https://github.com/pnpm/supi","homepage":"","size":3572,"stargazers_count":17,"watchers_count":17,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"archived":false,"open_issues_count":6,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":5,"open_issues":6,"watchers":17,"default_branch":"master"}},"base":{"label":"pnpm:master","ref":"master","sha":"95ff32d399e4334ebfac034ac237ff568e3ca545","user":{"login":"pnpm","id":21320719,"avatar_url":"https://avatars0.githubusercontent.com/u/21320719?v=4","gravatar_id":"","url":"https://api.github.com/users/pnpm","html_url":"https://github.com/pnpm","followers_url":"https://api.github.com/users/pnpm/followers","following_url":"https://api.github.com/users/pnpm/following{/other_user}","gists_url":"https://api.github.com/users/pnpm/gists{/gist_id}","starred_url":"https://api.github.com/users/pnpm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pnpm/subscriptions","organizations_url":"https://api.github.com/users/pnpm/orgs","repos_url":"https://api.github.com/users/pnpm/repos","events_url":"https://api.github.com/users/pnpm/events{/privacy}","received_events_url":"https://api.github.com/users/pnpm/received_events","type":"Organization","site_admin":false},"repo":{"id":95659008,"name":"supi","full_name":"pnpm/supi","owner":{"login":"pnpm","id":21320719,"avatar_url":"https://avatars0.githubusercontent.com/u/21320719?v=4","gravatar_id":"","url":"https://api.github.com/users/pnpm","html_url":"https://github.com/pnpm","followers_url":"https://api.github.com/users/pnpm/followers","following_url":"https://api.github.com/users/pnpm/following{/other_user}","gists_url":"https://api.github.com/users/pnpm/gists{/gist_id}","starred_url":"https://api.github.com/users/pnpm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pnpm/subscriptions","organizations_url":"https://api.github.com/users/pnpm/orgs","repos_url":"https://api.github.com/users/pnpm/repos","events_url":"https://api.github.com/users/pnpm/events{/privacy}","received_events_url":"https://api.github.com/users/pnpm/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/pnpm/supi","description":"Fast, disk space efficient installation engine. Used by pnpm","fork":false,"url":"https://api.github.com/repos/pnpm/supi","forks_url":"https://api.github.com/repos/pnpm/supi/forks","keys_url":"https://api.github.com/repos/pnpm/supi/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pnpm/supi/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pnpm/supi/teams","hooks_url":"https://api.github.com/repos/pnpm/supi/hooks","issue_events_url":"https://api.github.com/repos/pnpm/supi/issues/events{/number}","events_url":"https://api.github.com/repos/pnpm/supi/events","assignees_url":"https://api.github.com/repos/pnpm/supi/assignees{/user}","branches_url":"https://api.github.com/repos/pnpm/supi/branches{/branch}","tags_url":"https://api.github.com/repos/pnpm/supi/tags","blobs_url":"https://api.github.com/repos/pnpm/supi/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pnpm/supi/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pnpm/supi/git/refs{/sha}","trees_url":"https://api.github.com/repos/pnpm/supi/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pnpm/supi/statuses/{sha}","languages_url":"https://api.github.com/repos/pnpm/supi/languages","stargazers_url":"https://api.github.com/repos/pnpm/supi/stargazers","contributors_url":"https://api.github.com/repos/pnpm/supi/contributors","subscribers_url":"https://api.github.com/repos/pnpm/supi/subscribers","subscription_url":"https://api.github.com/repos/pnpm/supi/subscription","commits_url":"https://api.github.com/repos/pnpm/supi/commits{/sha}","git_commits_url":"https://api.github.com/repos/pnpm/supi/git/commits{/sha}","comments_url":"https://api.github.com/repos/pnpm/supi/comments{/number}","issue_comment_url":"https://api.github.com/repos/pnpm/supi/issues/comments{/number}","contents_url":"https://api.github.com/repos/pnpm/supi/contents/{+path}","compare_url":"https://api.github.com/repos/pnpm/supi/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pnpm/supi/merges","archive_url":"https://api.github.com/repos/pnpm/supi/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pnpm/supi/downloads","issues_url":"https://api.github.com/repos/pnpm/supi/issues{/number}","pulls_url":"https://api.github.com/repos/pnpm/supi/pulls{/number}","milestones_url":"https://api.github.com/repos/pnpm/supi/milestones{/number}","notifications_url":"https://api.github.com/repos/pnpm/supi/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pnpm/supi/labels{/name}","releases_url":"https://api.github.com/repos/pnpm/supi/releases{/id}","deployments_url":"https://api.github.com/repos/pnpm/supi/deployments","created_at":"2017-06-28T10:50:55Z","updated_at":"2018-01-30T17:00:18Z","pushed_at":"2018-02-25T00:37:58Z","git_url":"git://github.com/pnpm/supi.git","ssh_url":"git@github.com:pnpm/supi.git","clone_url":"https://github.com/pnpm/supi.git","svn_url":"https://github.com/pnpm/supi","homepage":"","size":3572,"stargazers_count":17,"watchers_count":17,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"archived":false,"open_issues_count":6,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":5,"open_issues":6,"watchers":17,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/pnpm/supi/pulls/47"},"html":{"href":"https://github.com/pnpm/supi/pull/47"},"issue":{"href":"https://api.github.com/repos/pnpm/supi/issues/47"},"comments":{"href":"https://api.github.com/repos/pnpm/supi/issues/47/comments"},"review_comments":{"href":"https://api.github.com/repos/pnpm/supi/pulls/47/comments"},"review_comment":{"href":"https://api.github.com/repos/pnpm/supi/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/pnpm/supi/pulls/47/commits"},"statuses":{"href":"https://api.github.com/repos/pnpm/supi/statuses/90acb2b89eed5ded632e2c8561e8ee97e0b00e07"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"zkochan"}}