{"action":"created","comment":{"url":"https://api.github.com/repos/scinos/webpack-plugin-hash-output/pulls/comments/172070543","pull_request_review_id":100312887,"id":172070543,"diff_hunk":"@@ -128,23 +128,28 @@ OutputHash.prototype.apply = function apply(compiler) {\n             const nonManifestChunks = this.chunks.filter(\n                 chunk => !this.manifestFiles.includes(chunk.name)\n             );\n+\n             const chunksByDependency = [];\n \n             while (nonManifestChunks.length) {\n                 let i = 0;\n \n                 while (i < nonManifestChunks.length) {\n-                    const current = nonManifestChunks[i];\n-\n-                    if (\n-                        !current.parents\n-                        || current.parents.length === 0\n-                        || current.parents.every(p =>\n-                            chunksByDependency.indexOf(p) !== -1\n-                            || nonManifestChunks.indexOf(p) === -1\n-                        )\n-                    ) {\n-                        chunksByDependency.push(current);\n+                    const cur = nonManifestChunks[i];\n+                    const parents = Array.from(cur.groupsIterable).reduce((acc, group) =>\n+                        [...acc, ...group.getParents()], []","path":"src/OutputHash.js","position":24,"original_position":24,"commit_id":"e63e6c3fcfb4a79a902b3bbfe82db28844579cd1","original_commit_id":"e63e6c3fcfb4a79a902b3bbfe82db28844579cd1","user":{"login":"scinos","id":975703,"avatar_url":"https://avatars2.githubusercontent.com/u/975703?v=4","gravatar_id":"","url":"https://api.github.com/users/scinos","html_url":"https://github.com/scinos","followers_url":"https://api.github.com/users/scinos/followers","following_url":"https://api.github.com/users/scinos/following{/other_user}","gists_url":"https://api.github.com/users/scinos/gists{/gist_id}","starred_url":"https://api.github.com/users/scinos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scinos/subscriptions","organizations_url":"https://api.github.com/users/scinos/orgs","repos_url":"https://api.github.com/users/scinos/repos","events_url":"https://api.github.com/users/scinos/events{/privacy}","received_events_url":"https://api.github.com/users/scinos/received_events","type":"User","site_admin":false},"body":"/nit: We can use `acc.concat(group.getParents())` to avoid creating new arrays.","created_at":"2018-03-04T23:47:04Z","updated_at":"2018-03-04T23:50:37Z","html_url":"https://github.com/scinos/webpack-plugin-hash-output/pull/12#discussion_r172070543","pull_request_url":"https://api.github.com/repos/scinos/webpack-plugin-hash-output/pulls/12","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/scinos/webpack-plugin-hash-output/pulls/comments/172070543"},"html":{"href":"https://github.com/scinos/webpack-plugin-hash-output/pull/12#discussion_r172070543"},"pull_request":{"href":"https://api.github.com/repos/scinos/webpack-plugin-hash-output/pulls/12"}}},"pull_request":{"url":"https://api.github.com/repos/scinos/webpack-plugin-hash-output/pulls/12","id":172135152,"html_url":"https://github.com/scinos/webpack-plugin-hash-output/pull/12","diff_url":"https://github.com/scinos/webpack-plugin-hash-output/pull/12.diff","patch_url":"https://github.com/scinos/webpack-plugin-hash-output/pull/12.patch","issue_url":"https://api.github.com/repos/scinos/webpack-plugin-hash-output/issues/12","number":12,"state":"open","locked":false,"title":"Webpack 4 compatibility","user":{"login":"chaoyzeng","id":36943406,"avatar_url":"https://avatars1.githubusercontent.com/u/36943406?v=4","gravatar_id":"","url":"https://api.github.com/users/chaoyzeng","html_url":"https://github.com/chaoyzeng","followers_url":"https://api.github.com/users/chaoyzeng/followers","following_url":"https://api.github.com/users/chaoyzeng/following{/other_user}","gists_url":"https://api.github.com/users/chaoyzeng/gists{/gist_id}","starred_url":"https://api.github.com/users/chaoyzeng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chaoyzeng/subscriptions","organizations_url":"https://api.github.com/users/chaoyzeng/orgs","repos_url":"https://api.github.com/users/chaoyzeng/repos","events_url":"https://api.github.com/users/chaoyzeng/events{/privacy}","received_events_url":"https://api.github.com/users/chaoyzeng/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-03-01T03:33:21Z","updated_at":"2018-03-04T23:50:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5a648a53734ec9e031a795901c58f186f9a004fc","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/scinos/webpack-plugin-hash-output/pulls/12/commits","review_comments_url":"https://api.github.com/repos/scinos/webpack-plugin-hash-output/pulls/12/comments","review_comment_url":"https://api.github.com/repos/scinos/webpack-plugin-hash-output/pulls/comments{/number}","comments_url":"https://api.github.com/repos/scinos/webpack-plugin-hash-output/issues/12/comments","statuses_url":"https://api.github.com/repos/scinos/webpack-plugin-hash-output/statuses/e63e6c3fcfb4a79a902b3bbfe82db28844579cd1","head":{"label":"chaoyzeng:webpack-4-compat","ref":"webpack-4-compat","sha":"e63e6c3fcfb4a79a902b3bbfe82db28844579cd1","user":{"login":"chaoyzeng","id":36943406,"avatar_url":"https://avatars1.githubusercontent.com/u/36943406?v=4","gravatar_id":"","url":"https://api.github.com/users/chaoyzeng","html_url":"https://github.com/chaoyzeng","followers_url":"https://api.github.com/users/chaoyzeng/followers","following_url":"https://api.github.com/users/chaoyzeng/following{/other_user}","gists_url":"https://api.github.com/users/chaoyzeng/gists{/gist_id}","starred_url":"https://api.github.com/users/chaoyzeng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chaoyzeng/subscriptions","organizations_url":"https://api.github.com/users/chaoyzeng/orgs","repos_url":"https://api.github.com/users/chaoyzeng/repos","events_url":"https://api.github.com/users/chaoyzeng/events{/privacy}","received_events_url":"https://api.github.com/users/chaoyzeng/received_events","type":"User","site_admin":false},"repo":{"id":123376540,"name":"webpack-plugin-hash-output","full_name":"chaoyzeng/webpack-plugin-hash-output","owner":{"login":"chaoyzeng","id":36943406,"avatar_url":"https://avatars1.githubusercontent.com/u/36943406?v=4","gravatar_id":"","url":"https://api.github.com/users/chaoyzeng","html_url":"https://github.com/chaoyzeng","followers_url":"https://api.github.com/users/chaoyzeng/followers","following_url":"https://api.github.com/users/chaoyzeng/following{/other_user}","gists_url":"https://api.github.com/users/chaoyzeng/gists{/gist_id}","starred_url":"https://api.github.com/users/chaoyzeng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chaoyzeng/subscriptions","organizations_url":"https://api.github.com/users/chaoyzeng/orgs","repos_url":"https://api.github.com/users/chaoyzeng/repos","events_url":"https://api.github.com/users/chaoyzeng/events{/privacy}","received_events_url":"https://api.github.com/users/chaoyzeng/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/chaoyzeng/webpack-plugin-hash-output","description":"Plugin to replace webpack chunkhash with an md5 hash of the final file conent.","fork":true,"url":"https://api.github.com/repos/chaoyzeng/webpack-plugin-hash-output","forks_url":"https://api.github.com/repos/chaoyzeng/webpack-plugin-hash-output/forks","keys_url":"https://api.github.com/repos/chaoyzeng/webpack-plugin-hash-output/keys{/key_id}","collaborators_url":"https://api.github.com/repos/chaoyzeng/webpack-plugin-hash-output/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/chaoyzeng/webpack-plugin-hash-output/teams","hooks_url":"https://api.github.com/repos/chaoyzeng/webpack-plugin-hash-output/hooks","issue_events_url":"https://api.github.com/repos/chaoyzeng/webpack-plugin-hash-output/issues/events{/number}","events_url":"https://api.github.com/repos/chaoyzeng/webpack-plugin-hash-output/events","assignees_url":"https://api.github.com/repos/chaoyzeng/webpack-plugin-hash-output/assignees{/user}","branches_url":"https://api.github.com/repos/chaoyzeng/webpack-plugin-hash-output/branches{/branch}","tags_url":"https://api.github.com/repos/chaoyzeng/webpack-plugin-hash-output/tags","blobs_url":"https://api.github.com/repos/chaoyzeng/webpack-plugin-hash-output/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/chaoyzeng/webpack-plugin-hash-output/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/chaoyzeng/webpack-plugin-hash-output/git/refs{/sha}","trees_url":"https://api.github.com/repos/chaoyzeng/webpack-plugin-hash-output/git/trees{/sha}","statuses_url":"https://api.github.com/repos/chaoyzeng/webpack-plugin-hash-output/statuses/{sha}","languages_url":"https://api.github.com/repos/chaoyzeng/webpack-plugin-hash-output/languages","stargazers_url":"https://api.github.com/repos/chaoyzeng/webpack-plugin-hash-output/stargazers","contributors_url":"https://api.github.com/repos/chaoyzeng/webpack-plugin-hash-output/contributors","subscribers_url":"https://api.github.com/repos/chaoyzeng/webpack-plugin-hash-output/subscribers","subscription_url":"https://api.github.com/repos/chaoyzeng/webpack-plugin-hash-output/subscription","commits_url":"https://api.github.com/repos/chaoyzeng/webpack-plugin-hash-output/commits{/sha}","git_commits_url":"https://api.github.com/repos/chaoyzeng/webpack-plugin-hash-output/git/commits{/sha}","comments_url":"https://api.github.com/repos/chaoyzeng/webpack-plugin-hash-output/comments{/number}","issue_comment_url":"https://api.github.com/repos/chaoyzeng/webpack-plugin-hash-output/issues/comments{/number}","contents_url":"https://api.github.com/repos/chaoyzeng/webpack-plugin-hash-output/contents/{+path}","compare_url":"https://api.github.com/repos/chaoyzeng/webpack-plugin-hash-output/compare/{base}...{head}","merges_url":"https://api.github.com/repos/chaoyzeng/webpack-plugin-hash-output/merges","archive_url":"https://api.github.com/repos/chaoyzeng/webpack-plugin-hash-output/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/chaoyzeng/webpack-plugin-hash-output/downloads","issues_url":"https://api.github.com/repos/chaoyzeng/webpack-plugin-hash-output/issues{/number}","pulls_url":"https://api.github.com/repos/chaoyzeng/webpack-plugin-hash-output/pulls{/number}","milestones_url":"https://api.github.com/repos/chaoyzeng/webpack-plugin-hash-output/milestones{/number}","notifications_url":"https://api.github.com/repos/chaoyzeng/webpack-plugin-hash-output/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/chaoyzeng/webpack-plugin-hash-output/labels{/name}","releases_url":"https://api.github.com/repos/chaoyzeng/webpack-plugin-hash-output/releases{/id}","deployments_url":"https://api.github.com/repos/chaoyzeng/webpack-plugin-hash-output/deployments","created_at":"2018-03-01T03:24:38Z","updated_at":"2018-03-01T03:24:39Z","pushed_at":"2018-03-01T03:33:04Z","git_url":"git://github.com/chaoyzeng/webpack-plugin-hash-output.git","ssh_url":"git@github.com:chaoyzeng/webpack-plugin-hash-output.git","clone_url":"https://github.com/chaoyzeng/webpack-plugin-hash-output.git","svn_url":"https://github.com/chaoyzeng/webpack-plugin-hash-output","homepage":"https://www.npmjs.com/package/webpack-plugin-hash-output","size":120,"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":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"scinos:master","ref":"master","sha":"5ba46bab929c0bb9dbadf94b32dd21faeddf7e37","user":{"login":"scinos","id":975703,"avatar_url":"https://avatars2.githubusercontent.com/u/975703?v=4","gravatar_id":"","url":"https://api.github.com/users/scinos","html_url":"https://github.com/scinos","followers_url":"https://api.github.com/users/scinos/followers","following_url":"https://api.github.com/users/scinos/following{/other_user}","gists_url":"https://api.github.com/users/scinos/gists{/gist_id}","starred_url":"https://api.github.com/users/scinos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scinos/subscriptions","organizations_url":"https://api.github.com/users/scinos/orgs","repos_url":"https://api.github.com/users/scinos/repos","events_url":"https://api.github.com/users/scinos/events{/privacy}","received_events_url":"https://api.github.com/users/scinos/received_events","type":"User","site_admin":false},"repo":{"id":88319181,"name":"webpack-plugin-hash-output","full_name":"scinos/webpack-plugin-hash-output","owner":{"login":"scinos","id":975703,"avatar_url":"https://avatars2.githubusercontent.com/u/975703?v=4","gravatar_id":"","url":"https://api.github.com/users/scinos","html_url":"https://github.com/scinos","followers_url":"https://api.github.com/users/scinos/followers","following_url":"https://api.github.com/users/scinos/following{/other_user}","gists_url":"https://api.github.com/users/scinos/gists{/gist_id}","starred_url":"https://api.github.com/users/scinos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scinos/subscriptions","organizations_url":"https://api.github.com/users/scinos/orgs","repos_url":"https://api.github.com/users/scinos/repos","events_url":"https://api.github.com/users/scinos/events{/privacy}","received_events_url":"https://api.github.com/users/scinos/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/scinos/webpack-plugin-hash-output","description":"Plugin to replace webpack chunkhash with an md5 hash of the final file conent.","fork":false,"url":"https://api.github.com/repos/scinos/webpack-plugin-hash-output","forks_url":"https://api.github.com/repos/scinos/webpack-plugin-hash-output/forks","keys_url":"https://api.github.com/repos/scinos/webpack-plugin-hash-output/keys{/key_id}","collaborators_url":"https://api.github.com/repos/scinos/webpack-plugin-hash-output/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/scinos/webpack-plugin-hash-output/teams","hooks_url":"https://api.github.com/repos/scinos/webpack-plugin-hash-output/hooks","issue_events_url":"https://api.github.com/repos/scinos/webpack-plugin-hash-output/issues/events{/number}","events_url":"https://api.github.com/repos/scinos/webpack-plugin-hash-output/events","assignees_url":"https://api.github.com/repos/scinos/webpack-plugin-hash-output/assignees{/user}","branches_url":"https://api.github.com/repos/scinos/webpack-plugin-hash-output/branches{/branch}","tags_url":"https://api.github.com/repos/scinos/webpack-plugin-hash-output/tags","blobs_url":"https://api.github.com/repos/scinos/webpack-plugin-hash-output/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/scinos/webpack-plugin-hash-output/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/scinos/webpack-plugin-hash-output/git/refs{/sha}","trees_url":"https://api.github.com/repos/scinos/webpack-plugin-hash-output/git/trees{/sha}","statuses_url":"https://api.github.com/repos/scinos/webpack-plugin-hash-output/statuses/{sha}","languages_url":"https://api.github.com/repos/scinos/webpack-plugin-hash-output/languages","stargazers_url":"https://api.github.com/repos/scinos/webpack-plugin-hash-output/stargazers","contributors_url":"https://api.github.com/repos/scinos/webpack-plugin-hash-output/contributors","subscribers_url":"https://api.github.com/repos/scinos/webpack-plugin-hash-output/subscribers","subscription_url":"https://api.github.com/repos/scinos/webpack-plugin-hash-output/subscription","commits_url":"https://api.github.com/repos/scinos/webpack-plugin-hash-output/commits{/sha}","git_commits_url":"https://api.github.com/repos/scinos/webpack-plugin-hash-output/git/commits{/sha}","comments_url":"https://api.github.com/repos/scinos/webpack-plugin-hash-output/comments{/number}","issue_comment_url":"https://api.github.com/repos/scinos/webpack-plugin-hash-output/issues/comments{/number}","contents_url":"https://api.github.com/repos/scinos/webpack-plugin-hash-output/contents/{+path}","compare_url":"https://api.github.com/repos/scinos/webpack-plugin-hash-output/compare/{base}...{head}","merges_url":"https://api.github.com/repos/scinos/webpack-plugin-hash-output/merges","archive_url":"https://api.github.com/repos/scinos/webpack-plugin-hash-output/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/scinos/webpack-plugin-hash-output/downloads","issues_url":"https://api.github.com/repos/scinos/webpack-plugin-hash-output/issues{/number}","pulls_url":"https://api.github.com/repos/scinos/webpack-plugin-hash-output/pulls{/number}","milestones_url":"https://api.github.com/repos/scinos/webpack-plugin-hash-output/milestones{/number}","notifications_url":"https://api.github.com/repos/scinos/webpack-plugin-hash-output/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/scinos/webpack-plugin-hash-output/labels{/name}","releases_url":"https://api.github.com/repos/scinos/webpack-plugin-hash-output/releases{/id}","deployments_url":"https://api.github.com/repos/scinos/webpack-plugin-hash-output/deployments","created_at":"2017-04-15T02:51:41Z","updated_at":"2018-03-04T05:33:21Z","pushed_at":"2018-03-01T03:33:22Z","git_url":"git://github.com/scinos/webpack-plugin-hash-output.git","ssh_url":"git@github.com:scinos/webpack-plugin-hash-output.git","clone_url":"https://github.com/scinos/webpack-plugin-hash-output.git","svn_url":"https://github.com/scinos/webpack-plugin-hash-output","homepage":"https://www.npmjs.com/package/webpack-plugin-hash-output","size":64,"stargazers_count":83,"watchers_count":83,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":8,"mirror_url":null,"archived":false,"open_issues_count":4,"license":null,"forks":8,"open_issues":4,"watchers":83,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/scinos/webpack-plugin-hash-output/pulls/12"},"html":{"href":"https://github.com/scinos/webpack-plugin-hash-output/pull/12"},"issue":{"href":"https://api.github.com/repos/scinos/webpack-plugin-hash-output/issues/12"},"comments":{"href":"https://api.github.com/repos/scinos/webpack-plugin-hash-output/issues/12/comments"},"review_comments":{"href":"https://api.github.com/repos/scinos/webpack-plugin-hash-output/pulls/12/comments"},"review_comment":{"href":"https://api.github.com/repos/scinos/webpack-plugin-hash-output/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/scinos/webpack-plugin-hash-output/pulls/12/commits"},"statuses":{"href":"https://api.github.com/repos/scinos/webpack-plugin-hash-output/statuses/e63e6c3fcfb4a79a902b3bbfe82db28844579cd1"}},"author_association":"NONE"}}
{"actor":{"display_login":"scinos"}}