{"action":"created","comment":{"url":"https://api.github.com/repos/webpack-contrib/zopfli-webpack-plugin/pulls/comments/168961433","pull_request_review_id":97412408,"id":168961433,"diff_hunk":"@@ -32,55 +32,54 @@ class ZopfliPlugin {\n   }\n \n   apply(compiler) {\n-    compiler.plugin('this-compilation', (compilation) => {\n-      compilation.plugin('optimize-assets', (assets, callback) => {\n-        async.forEach(Object.keys(assets), (file, cb) => {\n-          if (Array.isArray(this.test)) {\n-            if (this.test.every(t => !t.test(file))) {\n-              return cb();\n-            }\n-          } else if (this.test && !this.test.test(file)) {\n+    compiler.plugin('emit', (compilation, callback) => {\n+      const { assets } = compilation;\n+      async.forEach(Object.keys(assets), (file, cb) => {\n+        if (Array.isArray(this.test)) {\n+          if (this.test.every(t => !t.test(file))) {\n             return cb();\n           }\n-          const asset = assets[file];\n-          let content = asset.source();\n+        } else if (this.test && !this.test.test(file)) {\n+          return cb();\n+        }","path":"src/index.js","position":23,"original_position":23,"commit_id":"4f68b05b7a897e677c8dbf1c13ae63fe2fdda9ff","original_commit_id":"4f68b05b7a897e677c8dbf1c13ae63fe2fdda9ff","user":{"login":"michael-ciniawsky","id":5419992,"avatar_url":"https://avatars0.githubusercontent.com/u/5419992?v=4","gravatar_id":"","url":"https://api.github.com/users/michael-ciniawsky","html_url":"https://github.com/michael-ciniawsky","followers_url":"https://api.github.com/users/michael-ciniawsky/followers","following_url":"https://api.github.com/users/michael-ciniawsky/following{/other_user}","gists_url":"https://api.github.com/users/michael-ciniawsky/gists{/gist_id}","starred_url":"https://api.github.com/users/michael-ciniawsky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michael-ciniawsky/subscriptions","organizations_url":"https://api.github.com/users/michael-ciniawsky/orgs","repos_url":"https://api.github.com/users/michael-ciniawsky/repos","events_url":"https://api.github.com/users/michael-ciniawsky/events{/privacy}","received_events_url":"https://api.github.com/users/michael-ciniawsky/received_events","type":"User","site_admin":false},"body":"`\\n`","created_at":"2018-02-18T18:51:44Z","updated_at":"2018-02-18T18:56:31Z","html_url":"https://github.com/webpack-contrib/zopfli-webpack-plugin/pull/8#discussion_r168961433","pull_request_url":"https://api.github.com/repos/webpack-contrib/zopfli-webpack-plugin/pulls/8","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/webpack-contrib/zopfli-webpack-plugin/pulls/comments/168961433"},"html":{"href":"https://github.com/webpack-contrib/zopfli-webpack-plugin/pull/8#discussion_r168961433"},"pull_request":{"href":"https://api.github.com/repos/webpack-contrib/zopfli-webpack-plugin/pulls/8"}}},"pull_request":{"url":"https://api.github.com/repos/webpack-contrib/zopfli-webpack-plugin/pulls/8","id":169809078,"html_url":"https://github.com/webpack-contrib/zopfli-webpack-plugin/pull/8","diff_url":"https://github.com/webpack-contrib/zopfli-webpack-plugin/pull/8.diff","patch_url":"https://github.com/webpack-contrib/zopfli-webpack-plugin/pull/8.patch","issue_url":"https://api.github.com/repos/webpack-contrib/zopfli-webpack-plugin/issues/8","number":8,"state":"open","locked":false,"title":"fix(index): use `emit` hook instead of `this-compilation`","user":{"login":"eseliger","id":19534377,"avatar_url":"https://avatars0.githubusercontent.com/u/19534377?v=4","gravatar_id":"","url":"https://api.github.com/users/eseliger","html_url":"https://github.com/eseliger","followers_url":"https://api.github.com/users/eseliger/followers","following_url":"https://api.github.com/users/eseliger/following{/other_user}","gists_url":"https://api.github.com/users/eseliger/gists{/gist_id}","starred_url":"https://api.github.com/users/eseliger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eseliger/subscriptions","organizations_url":"https://api.github.com/users/eseliger/orgs","repos_url":"https://api.github.com/users/eseliger/repos","events_url":"https://api.github.com/users/eseliger/events{/privacy}","received_events_url":"https://api.github.com/users/eseliger/received_events","type":"User","site_admin":false},"body":"### `Issues`\r\n\r\n- Closes #7 \r\n\r\n### `Notable Changes`\r\n\r\nMade the change, as discussed in #7 ","created_at":"2018-02-18T00:47:00Z","updated_at":"2018-02-18T18:56:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0a5b4dc43f6bfdf7343646f3cf58b970a828c22d","assignee":null,"assignees":[],"requested_reviewers":[{"login":"evilebottnawi","id":4567934,"avatar_url":"https://avatars3.githubusercontent.com/u/4567934?v=4","gravatar_id":"","url":"https://api.github.com/users/evilebottnawi","html_url":"https://github.com/evilebottnawi","followers_url":"https://api.github.com/users/evilebottnawi/followers","following_url":"https://api.github.com/users/evilebottnawi/following{/other_user}","gists_url":"https://api.github.com/users/evilebottnawi/gists{/gist_id}","starred_url":"https://api.github.com/users/evilebottnawi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evilebottnawi/subscriptions","organizations_url":"https://api.github.com/users/evilebottnawi/orgs","repos_url":"https://api.github.com/users/evilebottnawi/repos","events_url":"https://api.github.com/users/evilebottnawi/events{/privacy}","received_events_url":"https://api.github.com/users/evilebottnawi/received_events","type":"User","site_admin":false},{"login":"d3viant0ne","id":8420490,"avatar_url":"https://avatars1.githubusercontent.com/u/8420490?v=4","gravatar_id":"","url":"https://api.github.com/users/d3viant0ne","html_url":"https://github.com/d3viant0ne","followers_url":"https://api.github.com/users/d3viant0ne/followers","following_url":"https://api.github.com/users/d3viant0ne/following{/other_user}","gists_url":"https://api.github.com/users/d3viant0ne/gists{/gist_id}","starred_url":"https://api.github.com/users/d3viant0ne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/d3viant0ne/subscriptions","organizations_url":"https://api.github.com/users/d3viant0ne/orgs","repos_url":"https://api.github.com/users/d3viant0ne/repos","events_url":"https://api.github.com/users/d3viant0ne/events{/privacy}","received_events_url":"https://api.github.com/users/d3viant0ne/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":596159678,"url":"https://api.github.com/repos/webpack-contrib/zopfli-webpack-plugin/labels/pr_action:%20Review","name":"pr_action: Review","color":"fbca04","default":false},{"id":596159664,"url":"https://api.github.com/repos/webpack-contrib/zopfli-webpack-plugin/labels/priority:%203%20(required)","name":"priority: 3 (required)","color":"bfdadc","default":false},{"id":596159695,"url":"https://api.github.com/repos/webpack-contrib/zopfli-webpack-plugin/labels/semver:%20Patch","name":"semver: Patch","color":"006b75","default":false},{"id":596159670,"url":"https://api.github.com/repos/webpack-contrib/zopfli-webpack-plugin/labels/severity:%203%20(broken)","name":"severity: 3 (broken)","color":"BF4133","default":false},{"id":596159693,"url":"https://api.github.com/repos/webpack-contrib/zopfli-webpack-plugin/labels/status:%20Pending","name":"status: Pending","color":"006b75","default":false},{"id":596159663,"url":"https://api.github.com/repos/webpack-contrib/zopfli-webpack-plugin/labels/type:%20Bug","name":"type: Bug","color":"FC4349","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/webpack-contrib/zopfli-webpack-plugin/pulls/8/commits","review_comments_url":"https://api.github.com/repos/webpack-contrib/zopfli-webpack-plugin/pulls/8/comments","review_comment_url":"https://api.github.com/repos/webpack-contrib/zopfli-webpack-plugin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/webpack-contrib/zopfli-webpack-plugin/issues/8/comments","statuses_url":"https://api.github.com/repos/webpack-contrib/zopfli-webpack-plugin/statuses/4f68b05b7a897e677c8dbf1c13ae63fe2fdda9ff","head":{"label":"eseliger:master","ref":"master","sha":"4f68b05b7a897e677c8dbf1c13ae63fe2fdda9ff","user":{"login":"eseliger","id":19534377,"avatar_url":"https://avatars0.githubusercontent.com/u/19534377?v=4","gravatar_id":"","url":"https://api.github.com/users/eseliger","html_url":"https://github.com/eseliger","followers_url":"https://api.github.com/users/eseliger/followers","following_url":"https://api.github.com/users/eseliger/following{/other_user}","gists_url":"https://api.github.com/users/eseliger/gists{/gist_id}","starred_url":"https://api.github.com/users/eseliger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eseliger/subscriptions","organizations_url":"https://api.github.com/users/eseliger/orgs","repos_url":"https://api.github.com/users/eseliger/repos","events_url":"https://api.github.com/users/eseliger/events{/privacy}","received_events_url":"https://api.github.com/users/eseliger/received_events","type":"User","site_admin":false},"repo":{"id":121904719,"name":"zopfli-webpack-plugin","full_name":"eseliger/zopfli-webpack-plugin","owner":{"login":"eseliger","id":19534377,"avatar_url":"https://avatars0.githubusercontent.com/u/19534377?v=4","gravatar_id":"","url":"https://api.github.com/users/eseliger","html_url":"https://github.com/eseliger","followers_url":"https://api.github.com/users/eseliger/followers","following_url":"https://api.github.com/users/eseliger/following{/other_user}","gists_url":"https://api.github.com/users/eseliger/gists{/gist_id}","starred_url":"https://api.github.com/users/eseliger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eseliger/subscriptions","organizations_url":"https://api.github.com/users/eseliger/orgs","repos_url":"https://api.github.com/users/eseliger/repos","events_url":"https://api.github.com/users/eseliger/events{/privacy}","received_events_url":"https://api.github.com/users/eseliger/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/eseliger/zopfli-webpack-plugin","description":"Prepare compressed versions of assets with node-zopfli","fork":true,"url":"https://api.github.com/repos/eseliger/zopfli-webpack-plugin","forks_url":"https://api.github.com/repos/eseliger/zopfli-webpack-plugin/forks","keys_url":"https://api.github.com/repos/eseliger/zopfli-webpack-plugin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/eseliger/zopfli-webpack-plugin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/eseliger/zopfli-webpack-plugin/teams","hooks_url":"https://api.github.com/repos/eseliger/zopfli-webpack-plugin/hooks","issue_events_url":"https://api.github.com/repos/eseliger/zopfli-webpack-plugin/issues/events{/number}","events_url":"https://api.github.com/repos/eseliger/zopfli-webpack-plugin/events","assignees_url":"https://api.github.com/repos/eseliger/zopfli-webpack-plugin/assignees{/user}","branches_url":"https://api.github.com/repos/eseliger/zopfli-webpack-plugin/branches{/branch}","tags_url":"https://api.github.com/repos/eseliger/zopfli-webpack-plugin/tags","blobs_url":"https://api.github.com/repos/eseliger/zopfli-webpack-plugin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/eseliger/zopfli-webpack-plugin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/eseliger/zopfli-webpack-plugin/git/refs{/sha}","trees_url":"https://api.github.com/repos/eseliger/zopfli-webpack-plugin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/eseliger/zopfli-webpack-plugin/statuses/{sha}","languages_url":"https://api.github.com/repos/eseliger/zopfli-webpack-plugin/languages","stargazers_url":"https://api.github.com/repos/eseliger/zopfli-webpack-plugin/stargazers","contributors_url":"https://api.github.com/repos/eseliger/zopfli-webpack-plugin/contributors","subscribers_url":"https://api.github.com/repos/eseliger/zopfli-webpack-plugin/subscribers","subscription_url":"https://api.github.com/repos/eseliger/zopfli-webpack-plugin/subscription","commits_url":"https://api.github.com/repos/eseliger/zopfli-webpack-plugin/commits{/sha}","git_commits_url":"https://api.github.com/repos/eseliger/zopfli-webpack-plugin/git/commits{/sha}","comments_url":"https://api.github.com/repos/eseliger/zopfli-webpack-plugin/comments{/number}","issue_comment_url":"https://api.github.com/repos/eseliger/zopfli-webpack-plugin/issues/comments{/number}","contents_url":"https://api.github.com/repos/eseliger/zopfli-webpack-plugin/contents/{+path}","compare_url":"https://api.github.com/repos/eseliger/zopfli-webpack-plugin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/eseliger/zopfli-webpack-plugin/merges","archive_url":"https://api.github.com/repos/eseliger/zopfli-webpack-plugin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/eseliger/zopfli-webpack-plugin/downloads","issues_url":"https://api.github.com/repos/eseliger/zopfli-webpack-plugin/issues{/number}","pulls_url":"https://api.github.com/repos/eseliger/zopfli-webpack-plugin/pulls{/number}","milestones_url":"https://api.github.com/repos/eseliger/zopfli-webpack-plugin/milestones{/number}","notifications_url":"https://api.github.com/repos/eseliger/zopfli-webpack-plugin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/eseliger/zopfli-webpack-plugin/labels{/name}","releases_url":"https://api.github.com/repos/eseliger/zopfli-webpack-plugin/releases{/id}","deployments_url":"https://api.github.com/repos/eseliger/zopfli-webpack-plugin/deployments","created_at":"2018-02-18T00:31:05Z","updated_at":"2018-02-18T00:31:06Z","pushed_at":"2018-02-18T00:45:28Z","git_url":"git://github.com/eseliger/zopfli-webpack-plugin.git","ssh_url":"git@github.com:eseliger/zopfli-webpack-plugin.git","clone_url":"https://github.com/eseliger/zopfli-webpack-plugin.git","svn_url":"https://github.com/eseliger/zopfli-webpack-plugin","homepage":"","size":140,"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":"webpack-contrib:master","ref":"master","sha":"ced262b37729098776f032d6275c0617741c9f7b","user":{"login":"webpack-contrib","id":25012217,"avatar_url":"https://avatars3.githubusercontent.com/u/25012217?v=4","gravatar_id":"","url":"https://api.github.com/users/webpack-contrib","html_url":"https://github.com/webpack-contrib","followers_url":"https://api.github.com/users/webpack-contrib/followers","following_url":"https://api.github.com/users/webpack-contrib/following{/other_user}","gists_url":"https://api.github.com/users/webpack-contrib/gists{/gist_id}","starred_url":"https://api.github.com/users/webpack-contrib/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/webpack-contrib/subscriptions","organizations_url":"https://api.github.com/users/webpack-contrib/orgs","repos_url":"https://api.github.com/users/webpack-contrib/repos","events_url":"https://api.github.com/users/webpack-contrib/events{/privacy}","received_events_url":"https://api.github.com/users/webpack-contrib/received_events","type":"Organization","site_admin":false},"repo":{"id":90007714,"name":"zopfli-webpack-plugin","full_name":"webpack-contrib/zopfli-webpack-plugin","owner":{"login":"webpack-contrib","id":25012217,"avatar_url":"https://avatars3.githubusercontent.com/u/25012217?v=4","gravatar_id":"","url":"https://api.github.com/users/webpack-contrib","html_url":"https://github.com/webpack-contrib","followers_url":"https://api.github.com/users/webpack-contrib/followers","following_url":"https://api.github.com/users/webpack-contrib/following{/other_user}","gists_url":"https://api.github.com/users/webpack-contrib/gists{/gist_id}","starred_url":"https://api.github.com/users/webpack-contrib/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/webpack-contrib/subscriptions","organizations_url":"https://api.github.com/users/webpack-contrib/orgs","repos_url":"https://api.github.com/users/webpack-contrib/repos","events_url":"https://api.github.com/users/webpack-contrib/events{/privacy}","received_events_url":"https://api.github.com/users/webpack-contrib/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/webpack-contrib/zopfli-webpack-plugin","description":"Prepare compressed versions of assets with node-zopfli","fork":false,"url":"https://api.github.com/repos/webpack-contrib/zopfli-webpack-plugin","forks_url":"https://api.github.com/repos/webpack-contrib/zopfli-webpack-plugin/forks","keys_url":"https://api.github.com/repos/webpack-contrib/zopfli-webpack-plugin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/webpack-contrib/zopfli-webpack-plugin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/webpack-contrib/zopfli-webpack-plugin/teams","hooks_url":"https://api.github.com/repos/webpack-contrib/zopfli-webpack-plugin/hooks","issue_events_url":"https://api.github.com/repos/webpack-contrib/zopfli-webpack-plugin/issues/events{/number}","events_url":"https://api.github.com/repos/webpack-contrib/zopfli-webpack-plugin/events","assignees_url":"https://api.github.com/repos/webpack-contrib/zopfli-webpack-plugin/assignees{/user}","branches_url":"https://api.github.com/repos/webpack-contrib/zopfli-webpack-plugin/branches{/branch}","tags_url":"https://api.github.com/repos/webpack-contrib/zopfli-webpack-plugin/tags","blobs_url":"https://api.github.com/repos/webpack-contrib/zopfli-webpack-plugin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/webpack-contrib/zopfli-webpack-plugin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/webpack-contrib/zopfli-webpack-plugin/git/refs{/sha}","trees_url":"https://api.github.com/repos/webpack-contrib/zopfli-webpack-plugin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/webpack-contrib/zopfli-webpack-plugin/statuses/{sha}","languages_url":"https://api.github.com/repos/webpack-contrib/zopfli-webpack-plugin/languages","stargazers_url":"https://api.github.com/repos/webpack-contrib/zopfli-webpack-plugin/stargazers","contributors_url":"https://api.github.com/repos/webpack-contrib/zopfli-webpack-plugin/contributors","subscribers_url":"https://api.github.com/repos/webpack-contrib/zopfli-webpack-plugin/subscribers","subscription_url":"https://api.github.com/repos/webpack-contrib/zopfli-webpack-plugin/subscription","commits_url":"https://api.github.com/repos/webpack-contrib/zopfli-webpack-plugin/commits{/sha}","git_commits_url":"https://api.github.com/repos/webpack-contrib/zopfli-webpack-plugin/git/commits{/sha}","comments_url":"https://api.github.com/repos/webpack-contrib/zopfli-webpack-plugin/comments{/number}","issue_comment_url":"https://api.github.com/repos/webpack-contrib/zopfli-webpack-plugin/issues/comments{/number}","contents_url":"https://api.github.com/repos/webpack-contrib/zopfli-webpack-plugin/contents/{+path}","compare_url":"https://api.github.com/repos/webpack-contrib/zopfli-webpack-plugin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/webpack-contrib/zopfli-webpack-plugin/merges","archive_url":"https://api.github.com/repos/webpack-contrib/zopfli-webpack-plugin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/webpack-contrib/zopfli-webpack-plugin/downloads","issues_url":"https://api.github.com/repos/webpack-contrib/zopfli-webpack-plugin/issues{/number}","pulls_url":"https://api.github.com/repos/webpack-contrib/zopfli-webpack-plugin/pulls{/number}","milestones_url":"https://api.github.com/repos/webpack-contrib/zopfli-webpack-plugin/milestones{/number}","notifications_url":"https://api.github.com/repos/webpack-contrib/zopfli-webpack-plugin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/webpack-contrib/zopfli-webpack-plugin/labels{/name}","releases_url":"https://api.github.com/repos/webpack-contrib/zopfli-webpack-plugin/releases{/id}","deployments_url":"https://api.github.com/repos/webpack-contrib/zopfli-webpack-plugin/deployments","created_at":"2017-05-02T08:08:25Z","updated_at":"2018-01-10T08:26:54Z","pushed_at":"2018-02-18T00:47:01Z","git_url":"git://github.com/webpack-contrib/zopfli-webpack-plugin.git","ssh_url":"git@github.com:webpack-contrib/zopfli-webpack-plugin.git","clone_url":"https://github.com/webpack-contrib/zopfli-webpack-plugin.git","svn_url":"https://github.com/webpack-contrib/zopfli-webpack-plugin","homepage":"","size":142,"stargazers_count":8,"watchers_count":8,"language":"JavaScript","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"archived":false,"open_issues_count":4,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":3,"open_issues":4,"watchers":8,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/webpack-contrib/zopfli-webpack-plugin/pulls/8"},"html":{"href":"https://github.com/webpack-contrib/zopfli-webpack-plugin/pull/8"},"issue":{"href":"https://api.github.com/repos/webpack-contrib/zopfli-webpack-plugin/issues/8"},"comments":{"href":"https://api.github.com/repos/webpack-contrib/zopfli-webpack-plugin/issues/8/comments"},"review_comments":{"href":"https://api.github.com/repos/webpack-contrib/zopfli-webpack-plugin/pulls/8/comments"},"review_comment":{"href":"https://api.github.com/repos/webpack-contrib/zopfli-webpack-plugin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/webpack-contrib/zopfli-webpack-plugin/pulls/8/commits"},"statuses":{"href":"https://api.github.com/repos/webpack-contrib/zopfli-webpack-plugin/statuses/4f68b05b7a897e677c8dbf1c13ae63fe2fdda9ff"}},"author_association":"NONE"}}
{"actor":{"display_login":"michael-ciniawsky"}}