{"action":"created","comment":{"url":"https://api.github.com/repos/PolymerLabs/polyserve/pulls/comments/92008724","pull_request_review_id":12516927,"id":92008724,"diff_hunk":"@@ -100,10 +111,14 @@ export function babelCompile(forceCompile: boolean): RequestHandler {\n               console.warn(`Error compiling script in ${request.path}: ${e}`);\n             }\n           }\n-          return parse5.serialize(document);\n+          const compiledHtml = parse5.serialize(document);\n+          babelCompileCache.set(body, compiledHtml);\n+          return compiledHtml;\n         } else if (javaScriptMimeTypes.indexOf(contentType) >= 0) {","path":"src/compile-middleware.ts","position":42,"original_position":42,"commit_id":"a75a450bf932f1d7ec9adf8abadca06292431bb9","original_commit_id":"a75a450bf932f1d7ec9adf8abadca06292431bb9","user":{"login":"FredKSchott","id":622227,"avatar_url":"https://avatars.githubusercontent.com/u/622227?v=3","gravatar_id":"","url":"https://api.github.com/users/FredKSchott","html_url":"https://github.com/FredKSchott","followers_url":"https://api.github.com/users/FredKSchott/followers","following_url":"https://api.github.com/users/FredKSchott/following{/other_user}","gists_url":"https://api.github.com/users/FredKSchott/gists{/gist_id}","starred_url":"https://api.github.com/users/FredKSchott/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FredKSchott/subscriptions","organizations_url":"https://api.github.com/users/FredKSchott/orgs","repos_url":"https://api.github.com/users/FredKSchott/repos","events_url":"https://api.github.com/users/FredKSchott/events{/privacy}","received_events_url":"https://api.github.com/users/FredKSchott/received_events","type":"User","site_admin":false},"body":"likewise, else is unnecessary here with return statement above","created_at":"2016-12-12T18:30:32Z","updated_at":"2016-12-12T18:32:50Z","html_url":"https://github.com/PolymerLabs/polyserve/pull/144#discussion_r92008724","pull_request_url":"https://api.github.com/repos/PolymerLabs/polyserve/pulls/144","_links":{"self":{"href":"https://api.github.com/repos/PolymerLabs/polyserve/pulls/comments/92008724"},"html":{"href":"https://github.com/PolymerLabs/polyserve/pull/144#discussion_r92008724"},"pull_request":{"href":"https://api.github.com/repos/PolymerLabs/polyserve/pulls/144"}}},"pull_request":{"url":"https://api.github.com/repos/PolymerLabs/polyserve/pulls/144","id":97403687,"html_url":"https://github.com/PolymerLabs/polyserve/pull/144","diff_url":"https://github.com/PolymerLabs/polyserve/pull/144.diff","patch_url":"https://github.com/PolymerLabs/polyserve/pull/144.patch","issue_url":"https://api.github.com/repos/PolymerLabs/polyserve/issues/144","number":144,"state":"open","locked":false,"title":"Added an LRU cache for babel compilation.  With tests!","user":{"login":"usergenic","id":578,"avatar_url":"https://avatars.githubusercontent.com/u/578?v=3","gravatar_id":"","url":"https://api.github.com/users/usergenic","html_url":"https://github.com/usergenic","followers_url":"https://api.github.com/users/usergenic/followers","following_url":"https://api.github.com/users/usergenic/following{/other_user}","gists_url":"https://api.github.com/users/usergenic/gists{/gist_id}","starred_url":"https://api.github.com/users/usergenic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/usergenic/subscriptions","organizations_url":"https://api.github.com/users/usergenic/orgs","repos_url":"https://api.github.com/users/usergenic/repos","events_url":"https://api.github.com/users/usergenic/events{/privacy}","received_events_url":"https://api.github.com/users/usergenic/received_events","type":"User","site_admin":false},"body":"When polyserve compiles, it uses a cache to store the compiled output, hopefully making things faster for people.","created_at":"2016-12-10T00:30:14Z","updated_at":"2016-12-12T18:32:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"daead2847f0842acaa129843c2ffc1459e529760","assignee":{"login":"justinfagnani","id":522948,"avatar_url":"https://avatars.githubusercontent.com/u/522948?v=3","gravatar_id":"","url":"https://api.github.com/users/justinfagnani","html_url":"https://github.com/justinfagnani","followers_url":"https://api.github.com/users/justinfagnani/followers","following_url":"https://api.github.com/users/justinfagnani/following{/other_user}","gists_url":"https://api.github.com/users/justinfagnani/gists{/gist_id}","starred_url":"https://api.github.com/users/justinfagnani/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/justinfagnani/subscriptions","organizations_url":"https://api.github.com/users/justinfagnani/orgs","repos_url":"https://api.github.com/users/justinfagnani/repos","events_url":"https://api.github.com/users/justinfagnani/events{/privacy}","received_events_url":"https://api.github.com/users/justinfagnani/received_events","type":"User","site_admin":false},"assignees":[{"login":"justinfagnani","id":522948,"avatar_url":"https://avatars.githubusercontent.com/u/522948?v=3","gravatar_id":"","url":"https://api.github.com/users/justinfagnani","html_url":"https://github.com/justinfagnani","followers_url":"https://api.github.com/users/justinfagnani/followers","following_url":"https://api.github.com/users/justinfagnani/following{/other_user}","gists_url":"https://api.github.com/users/justinfagnani/gists{/gist_id}","starred_url":"https://api.github.com/users/justinfagnani/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/justinfagnani/subscriptions","organizations_url":"https://api.github.com/users/justinfagnani/orgs","repos_url":"https://api.github.com/users/justinfagnani/repos","events_url":"https://api.github.com/users/justinfagnani/events{/privacy}","received_events_url":"https://api.github.com/users/justinfagnani/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/PolymerLabs/polyserve/pulls/144/commits","review_comments_url":"https://api.github.com/repos/PolymerLabs/polyserve/pulls/144/comments","review_comment_url":"https://api.github.com/repos/PolymerLabs/polyserve/pulls/comments{/number}","comments_url":"https://api.github.com/repos/PolymerLabs/polyserve/issues/144/comments","statuses_url":"https://api.github.com/repos/PolymerLabs/polyserve/statuses/a75a450bf932f1d7ec9adf8abadca06292431bb9","head":{"label":"PolymerLabs:compile-cache","ref":"compile-cache","sha":"a75a450bf932f1d7ec9adf8abadca06292431bb9","user":{"login":"PolymerLabs","id":5912903,"avatar_url":"https://avatars.githubusercontent.com/u/5912903?v=3","gravatar_id":"","url":"https://api.github.com/users/PolymerLabs","html_url":"https://github.com/PolymerLabs","followers_url":"https://api.github.com/users/PolymerLabs/followers","following_url":"https://api.github.com/users/PolymerLabs/following{/other_user}","gists_url":"https://api.github.com/users/PolymerLabs/gists{/gist_id}","starred_url":"https://api.github.com/users/PolymerLabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PolymerLabs/subscriptions","organizations_url":"https://api.github.com/users/PolymerLabs/orgs","repos_url":"https://api.github.com/users/PolymerLabs/repos","events_url":"https://api.github.com/users/PolymerLabs/events{/privacy}","received_events_url":"https://api.github.com/users/PolymerLabs/received_events","type":"Organization","site_admin":false},"repo":{"id":32489037,"name":"polyserve","full_name":"PolymerLabs/polyserve","owner":{"login":"PolymerLabs","id":5912903,"avatar_url":"https://avatars.githubusercontent.com/u/5912903?v=3","gravatar_id":"","url":"https://api.github.com/users/PolymerLabs","html_url":"https://github.com/PolymerLabs","followers_url":"https://api.github.com/users/PolymerLabs/followers","following_url":"https://api.github.com/users/PolymerLabs/following{/other_user}","gists_url":"https://api.github.com/users/PolymerLabs/gists{/gist_id}","starred_url":"https://api.github.com/users/PolymerLabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PolymerLabs/subscriptions","organizations_url":"https://api.github.com/users/PolymerLabs/orgs","repos_url":"https://api.github.com/users/PolymerLabs/repos","events_url":"https://api.github.com/users/PolymerLabs/events{/privacy}","received_events_url":"https://api.github.com/users/PolymerLabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/PolymerLabs/polyserve","description":"A simple web server for using components locally","fork":false,"url":"https://api.github.com/repos/PolymerLabs/polyserve","forks_url":"https://api.github.com/repos/PolymerLabs/polyserve/forks","keys_url":"https://api.github.com/repos/PolymerLabs/polyserve/keys{/key_id}","collaborators_url":"https://api.github.com/repos/PolymerLabs/polyserve/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/PolymerLabs/polyserve/teams","hooks_url":"https://api.github.com/repos/PolymerLabs/polyserve/hooks","issue_events_url":"https://api.github.com/repos/PolymerLabs/polyserve/issues/events{/number}","events_url":"https://api.github.com/repos/PolymerLabs/polyserve/events","assignees_url":"https://api.github.com/repos/PolymerLabs/polyserve/assignees{/user}","branches_url":"https://api.github.com/repos/PolymerLabs/polyserve/branches{/branch}","tags_url":"https://api.github.com/repos/PolymerLabs/polyserve/tags","blobs_url":"https://api.github.com/repos/PolymerLabs/polyserve/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/PolymerLabs/polyserve/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/PolymerLabs/polyserve/git/refs{/sha}","trees_url":"https://api.github.com/repos/PolymerLabs/polyserve/git/trees{/sha}","statuses_url":"https://api.github.com/repos/PolymerLabs/polyserve/statuses/{sha}","languages_url":"https://api.github.com/repos/PolymerLabs/polyserve/languages","stargazers_url":"https://api.github.com/repos/PolymerLabs/polyserve/stargazers","contributors_url":"https://api.github.com/repos/PolymerLabs/polyserve/contributors","subscribers_url":"https://api.github.com/repos/PolymerLabs/polyserve/subscribers","subscription_url":"https://api.github.com/repos/PolymerLabs/polyserve/subscription","commits_url":"https://api.github.com/repos/PolymerLabs/polyserve/commits{/sha}","git_commits_url":"https://api.github.com/repos/PolymerLabs/polyserve/git/commits{/sha}","comments_url":"https://api.github.com/repos/PolymerLabs/polyserve/comments{/number}","issue_comment_url":"https://api.github.com/repos/PolymerLabs/polyserve/issues/comments{/number}","contents_url":"https://api.github.com/repos/PolymerLabs/polyserve/contents/{+path}","compare_url":"https://api.github.com/repos/PolymerLabs/polyserve/compare/{base}...{head}","merges_url":"https://api.github.com/repos/PolymerLabs/polyserve/merges","archive_url":"https://api.github.com/repos/PolymerLabs/polyserve/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/PolymerLabs/polyserve/downloads","issues_url":"https://api.github.com/repos/PolymerLabs/polyserve/issues{/number}","pulls_url":"https://api.github.com/repos/PolymerLabs/polyserve/pulls{/number}","milestones_url":"https://api.github.com/repos/PolymerLabs/polyserve/milestones{/number}","notifications_url":"https://api.github.com/repos/PolymerLabs/polyserve/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/PolymerLabs/polyserve/labels{/name}","releases_url":"https://api.github.com/repos/PolymerLabs/polyserve/releases{/id}","deployments_url":"https://api.github.com/repos/PolymerLabs/polyserve/deployments","created_at":"2015-03-18T23:04:44Z","updated_at":"2016-12-08T20:42:10Z","pushed_at":"2016-12-10T01:15:51Z","git_url":"git://github.com/PolymerLabs/polyserve.git","ssh_url":"git@github.com:PolymerLabs/polyserve.git","clone_url":"https://github.com/PolymerLabs/polyserve.git","svn_url":"https://github.com/PolymerLabs/polyserve","homepage":"https://www.npmjs.com/package/polyserve","size":262,"stargazers_count":140,"watchers_count":140,"language":"TypeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":37,"mirror_url":null,"open_issues_count":26,"forks":37,"open_issues":26,"watchers":140,"default_branch":"master"}},"base":{"label":"PolymerLabs:master","ref":"master","sha":"b7f3b02f97ef3a6096845c3fa1bb30f7bb0d92ed","user":{"login":"PolymerLabs","id":5912903,"avatar_url":"https://avatars.githubusercontent.com/u/5912903?v=3","gravatar_id":"","url":"https://api.github.com/users/PolymerLabs","html_url":"https://github.com/PolymerLabs","followers_url":"https://api.github.com/users/PolymerLabs/followers","following_url":"https://api.github.com/users/PolymerLabs/following{/other_user}","gists_url":"https://api.github.com/users/PolymerLabs/gists{/gist_id}","starred_url":"https://api.github.com/users/PolymerLabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PolymerLabs/subscriptions","organizations_url":"https://api.github.com/users/PolymerLabs/orgs","repos_url":"https://api.github.com/users/PolymerLabs/repos","events_url":"https://api.github.com/users/PolymerLabs/events{/privacy}","received_events_url":"https://api.github.com/users/PolymerLabs/received_events","type":"Organization","site_admin":false},"repo":{"id":32489037,"name":"polyserve","full_name":"PolymerLabs/polyserve","owner":{"login":"PolymerLabs","id":5912903,"avatar_url":"https://avatars.githubusercontent.com/u/5912903?v=3","gravatar_id":"","url":"https://api.github.com/users/PolymerLabs","html_url":"https://github.com/PolymerLabs","followers_url":"https://api.github.com/users/PolymerLabs/followers","following_url":"https://api.github.com/users/PolymerLabs/following{/other_user}","gists_url":"https://api.github.com/users/PolymerLabs/gists{/gist_id}","starred_url":"https://api.github.com/users/PolymerLabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PolymerLabs/subscriptions","organizations_url":"https://api.github.com/users/PolymerLabs/orgs","repos_url":"https://api.github.com/users/PolymerLabs/repos","events_url":"https://api.github.com/users/PolymerLabs/events{/privacy}","received_events_url":"https://api.github.com/users/PolymerLabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/PolymerLabs/polyserve","description":"A simple web server for using components locally","fork":false,"url":"https://api.github.com/repos/PolymerLabs/polyserve","forks_url":"https://api.github.com/repos/PolymerLabs/polyserve/forks","keys_url":"https://api.github.com/repos/PolymerLabs/polyserve/keys{/key_id}","collaborators_url":"https://api.github.com/repos/PolymerLabs/polyserve/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/PolymerLabs/polyserve/teams","hooks_url":"https://api.github.com/repos/PolymerLabs/polyserve/hooks","issue_events_url":"https://api.github.com/repos/PolymerLabs/polyserve/issues/events{/number}","events_url":"https://api.github.com/repos/PolymerLabs/polyserve/events","assignees_url":"https://api.github.com/repos/PolymerLabs/polyserve/assignees{/user}","branches_url":"https://api.github.com/repos/PolymerLabs/polyserve/branches{/branch}","tags_url":"https://api.github.com/repos/PolymerLabs/polyserve/tags","blobs_url":"https://api.github.com/repos/PolymerLabs/polyserve/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/PolymerLabs/polyserve/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/PolymerLabs/polyserve/git/refs{/sha}","trees_url":"https://api.github.com/repos/PolymerLabs/polyserve/git/trees{/sha}","statuses_url":"https://api.github.com/repos/PolymerLabs/polyserve/statuses/{sha}","languages_url":"https://api.github.com/repos/PolymerLabs/polyserve/languages","stargazers_url":"https://api.github.com/repos/PolymerLabs/polyserve/stargazers","contributors_url":"https://api.github.com/repos/PolymerLabs/polyserve/contributors","subscribers_url":"https://api.github.com/repos/PolymerLabs/polyserve/subscribers","subscription_url":"https://api.github.com/repos/PolymerLabs/polyserve/subscription","commits_url":"https://api.github.com/repos/PolymerLabs/polyserve/commits{/sha}","git_commits_url":"https://api.github.com/repos/PolymerLabs/polyserve/git/commits{/sha}","comments_url":"https://api.github.com/repos/PolymerLabs/polyserve/comments{/number}","issue_comment_url":"https://api.github.com/repos/PolymerLabs/polyserve/issues/comments{/number}","contents_url":"https://api.github.com/repos/PolymerLabs/polyserve/contents/{+path}","compare_url":"https://api.github.com/repos/PolymerLabs/polyserve/compare/{base}...{head}","merges_url":"https://api.github.com/repos/PolymerLabs/polyserve/merges","archive_url":"https://api.github.com/repos/PolymerLabs/polyserve/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/PolymerLabs/polyserve/downloads","issues_url":"https://api.github.com/repos/PolymerLabs/polyserve/issues{/number}","pulls_url":"https://api.github.com/repos/PolymerLabs/polyserve/pulls{/number}","milestones_url":"https://api.github.com/repos/PolymerLabs/polyserve/milestones{/number}","notifications_url":"https://api.github.com/repos/PolymerLabs/polyserve/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/PolymerLabs/polyserve/labels{/name}","releases_url":"https://api.github.com/repos/PolymerLabs/polyserve/releases{/id}","deployments_url":"https://api.github.com/repos/PolymerLabs/polyserve/deployments","created_at":"2015-03-18T23:04:44Z","updated_at":"2016-12-08T20:42:10Z","pushed_at":"2016-12-10T01:15:51Z","git_url":"git://github.com/PolymerLabs/polyserve.git","ssh_url":"git@github.com:PolymerLabs/polyserve.git","clone_url":"https://github.com/PolymerLabs/polyserve.git","svn_url":"https://github.com/PolymerLabs/polyserve","homepage":"https://www.npmjs.com/package/polyserve","size":262,"stargazers_count":140,"watchers_count":140,"language":"TypeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":37,"mirror_url":null,"open_issues_count":26,"forks":37,"open_issues":26,"watchers":140,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/PolymerLabs/polyserve/pulls/144"},"html":{"href":"https://github.com/PolymerLabs/polyserve/pull/144"},"issue":{"href":"https://api.github.com/repos/PolymerLabs/polyserve/issues/144"},"comments":{"href":"https://api.github.com/repos/PolymerLabs/polyserve/issues/144/comments"},"review_comments":{"href":"https://api.github.com/repos/PolymerLabs/polyserve/pulls/144/comments"},"review_comment":{"href":"https://api.github.com/repos/PolymerLabs/polyserve/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/PolymerLabs/polyserve/pulls/144/commits"},"statuses":{"href":"https://api.github.com/repos/PolymerLabs/polyserve/statuses/a75a450bf932f1d7ec9adf8abadca06292431bb9"}}}}
{"actor":{"display_login":"FredKSchott"}}