{"action":"created","comment":{"url":"https://api.github.com/repos/Polymer/vulcanize/pulls/comments/81257413","pull_request_review_id":2251194,"id":81257413,"diff_hunk":"@@ -0,0 +1,99 @@\n+/**\n+ * @license\n+ * Copyright (c) 2016 The Polymer Project Authors. All rights reserved.\n+ * This code may only be used under the BSD style license found at\n+ * http://polymer.github.io/LICENSE.txt\n+ * The complete set of authors may be found at\n+ * http://polymer.github.io/AUTHORS.txt\n+ * The complete set of contributors may be found at\n+ * http://polymer.github.io/CONTRIBUTORS.txt\n+ * Code distributed by Google as part of the polymer project is also\n+ * subject to an additional IP rights grant found at\n+ * http://polymer.github.io/PATENTS.txt\n+ */\n+import {Analyzer} from 'polymer-analyzer';\n+\n+export interface DepsIndex {\n+  // An index of dependency -> fragments that depend on it\n+  depsToFragments: Map<string, Set<string>>;\n+  // An index of fragments -> html dependencies\n+  fragmentToDeps: Map<string, Set<string>>;\n+}\n+\n+export interface BundleManifest extends Map<string, Set<string>> {}\n+\n+export interface BundleOrchestrator {\n+  (endpoints: string[], depsIndex: DepsIndex): BundleManifest\n+}\n+\n+type DependencyMapEntry = {\n+  url: string,\n+  eager: Set<string>,\n+  lazy: Set<string>\n+};\n+\n+async function _getDependencies(href: string, analyzer: Analyzer):\n+    Promise<DependencyMapEntry> {\n+      const document = await analyzer.analyzeRoot(href);\n+      const imports = document.getByKind('import');\n+      const eagerImports = new Set<string>();\n+      const lazyImports = new Set<string>();\n+      for (let htmlImport of imports) {\n+        if (!htmlImport.url) {\n+          continue;","path":"src/deps-index.ts","position":43,"original_position":43,"commit_id":"35e3f19f5e5eb8bb578f236739afc6af8e374051","original_commit_id":"866fe50acf38338c07e1c8d69438e8bcc04695b7","user":{"login":"garlicnation","id":1105965,"avatar_url":"https://avatars.githubusercontent.com/u/1105965?v=3","gravatar_id":"","url":"https://api.github.com/users/garlicnation","html_url":"https://github.com/garlicnation","followers_url":"https://api.github.com/users/garlicnation/followers","following_url":"https://api.github.com/users/garlicnation/following{/other_user}","gists_url":"https://api.github.com/users/garlicnation/gists{/gist_id}","starred_url":"https://api.github.com/users/garlicnation/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/garlicnation/subscriptions","organizations_url":"https://api.github.com/users/garlicnation/orgs","repos_url":"https://api.github.com/users/garlicnation/repos","events_url":"https://api.github.com/users/garlicnation/events{/privacy}","received_events_url":"https://api.github.com/users/garlicnation/received_events","type":"User","site_admin":false},"body":"I haven't seen this, but I want to keep it in for safety. Should I throw here?","created_at":"2016-09-29T23:44:58Z","updated_at":"2016-09-29T23:44:59Z","html_url":"https://github.com/Polymer/vulcanize/pull/373#discussion_r81257413","pull_request_url":"https://api.github.com/repos/Polymer/vulcanize/pulls/373","_links":{"self":{"href":"https://api.github.com/repos/Polymer/vulcanize/pulls/comments/81257413"},"html":{"href":"https://github.com/Polymer/vulcanize/pull/373#discussion_r81257413"},"pull_request":{"href":"https://api.github.com/repos/Polymer/vulcanize/pulls/373"}}},"pull_request":{"url":"https://api.github.com/repos/Polymer/vulcanize/pulls/373","id":85852875,"html_url":"https://github.com/Polymer/vulcanize/pull/373","diff_url":"https://github.com/Polymer/vulcanize/pull/373.diff","patch_url":"https://github.com/Polymer/vulcanize/pull/373.patch","issue_url":"https://api.github.com/repos/Polymer/vulcanize/issues/373","number":373,"state":"open","locked":false,"title":"Bundles","user":{"login":"garlicnation","id":1105965,"avatar_url":"https://avatars.githubusercontent.com/u/1105965?v=3","gravatar_id":"","url":"https://api.github.com/users/garlicnation","html_url":"https://github.com/garlicnation","followers_url":"https://api.github.com/users/garlicnation/followers","following_url":"https://api.github.com/users/garlicnation/following{/other_user}","gists_url":"https://api.github.com/users/garlicnation/gists{/gist_id}","starred_url":"https://api.github.com/users/garlicnation/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/garlicnation/subscriptions","organizations_url":"https://api.github.com/users/garlicnation/orgs","repos_url":"https://api.github.com/users/garlicnation/repos","events_url":"https://api.github.com/users/garlicnation/events{/privacy}","received_events_url":"https://api.github.com/users/garlicnation/received_events","type":"User","site_admin":false},"body":"Add basic functions for generating a depsindex, with tests.","created_at":"2016-09-19T19:20:16Z","updated_at":"2016-09-29T23:44:59Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a5528b2f1debf17251773b958429a11412ad9870","assignee":{"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},"assignees":[{"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},{"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/Polymer/vulcanize/pulls/373/commits","review_comments_url":"https://api.github.com/repos/Polymer/vulcanize/pulls/373/comments","review_comment_url":"https://api.github.com/repos/Polymer/vulcanize/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Polymer/vulcanize/issues/373/comments","statuses_url":"https://api.github.com/repos/Polymer/vulcanize/statuses/35e3f19f5e5eb8bb578f236739afc6af8e374051","head":{"label":"Polymer:bundles","ref":"bundles","sha":"35e3f19f5e5eb8bb578f236739afc6af8e374051","user":{"login":"Polymer","id":2159051,"avatar_url":"https://avatars.githubusercontent.com/u/2159051?v=3","gravatar_id":"","url":"https://api.github.com/users/Polymer","html_url":"https://github.com/Polymer","followers_url":"https://api.github.com/users/Polymer/followers","following_url":"https://api.github.com/users/Polymer/following{/other_user}","gists_url":"https://api.github.com/users/Polymer/gists{/gist_id}","starred_url":"https://api.github.com/users/Polymer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Polymer/subscriptions","organizations_url":"https://api.github.com/users/Polymer/orgs","repos_url":"https://api.github.com/users/Polymer/repos","events_url":"https://api.github.com/users/Polymer/events{/privacy}","received_events_url":"https://api.github.com/users/Polymer/received_events","type":"Organization","site_admin":false},"repo":{"id":13599100,"name":"vulcanize","full_name":"Polymer/vulcanize","owner":{"login":"Polymer","id":2159051,"avatar_url":"https://avatars.githubusercontent.com/u/2159051?v=3","gravatar_id":"","url":"https://api.github.com/users/Polymer","html_url":"https://github.com/Polymer","followers_url":"https://api.github.com/users/Polymer/followers","following_url":"https://api.github.com/users/Polymer/following{/other_user}","gists_url":"https://api.github.com/users/Polymer/gists{/gist_id}","starred_url":"https://api.github.com/users/Polymer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Polymer/subscriptions","organizations_url":"https://api.github.com/users/Polymer/orgs","repos_url":"https://api.github.com/users/Polymer/repos","events_url":"https://api.github.com/users/Polymer/events{/privacy}","received_events_url":"https://api.github.com/users/Polymer/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Polymer/vulcanize","description":"Build tool for HTMLImports and Web Components","fork":false,"url":"https://api.github.com/repos/Polymer/vulcanize","forks_url":"https://api.github.com/repos/Polymer/vulcanize/forks","keys_url":"https://api.github.com/repos/Polymer/vulcanize/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Polymer/vulcanize/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Polymer/vulcanize/teams","hooks_url":"https://api.github.com/repos/Polymer/vulcanize/hooks","issue_events_url":"https://api.github.com/repos/Polymer/vulcanize/issues/events{/number}","events_url":"https://api.github.com/repos/Polymer/vulcanize/events","assignees_url":"https://api.github.com/repos/Polymer/vulcanize/assignees{/user}","branches_url":"https://api.github.com/repos/Polymer/vulcanize/branches{/branch}","tags_url":"https://api.github.com/repos/Polymer/vulcanize/tags","blobs_url":"https://api.github.com/repos/Polymer/vulcanize/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Polymer/vulcanize/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Polymer/vulcanize/git/refs{/sha}","trees_url":"https://api.github.com/repos/Polymer/vulcanize/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Polymer/vulcanize/statuses/{sha}","languages_url":"https://api.github.com/repos/Polymer/vulcanize/languages","stargazers_url":"https://api.github.com/repos/Polymer/vulcanize/stargazers","contributors_url":"https://api.github.com/repos/Polymer/vulcanize/contributors","subscribers_url":"https://api.github.com/repos/Polymer/vulcanize/subscribers","subscription_url":"https://api.github.com/repos/Polymer/vulcanize/subscription","commits_url":"https://api.github.com/repos/Polymer/vulcanize/commits{/sha}","git_commits_url":"https://api.github.com/repos/Polymer/vulcanize/git/commits{/sha}","comments_url":"https://api.github.com/repos/Polymer/vulcanize/comments{/number}","issue_comment_url":"https://api.github.com/repos/Polymer/vulcanize/issues/comments{/number}","contents_url":"https://api.github.com/repos/Polymer/vulcanize/contents/{+path}","compare_url":"https://api.github.com/repos/Polymer/vulcanize/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Polymer/vulcanize/merges","archive_url":"https://api.github.com/repos/Polymer/vulcanize/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Polymer/vulcanize/downloads","issues_url":"https://api.github.com/repos/Polymer/vulcanize/issues{/number}","pulls_url":"https://api.github.com/repos/Polymer/vulcanize/pulls{/number}","milestones_url":"https://api.github.com/repos/Polymer/vulcanize/milestones{/number}","notifications_url":"https://api.github.com/repos/Polymer/vulcanize/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Polymer/vulcanize/labels{/name}","releases_url":"https://api.github.com/repos/Polymer/vulcanize/releases{/id}","deployments_url":"https://api.github.com/repos/Polymer/vulcanize/deployments","created_at":"2013-10-15T18:56:20Z","updated_at":"2016-09-26T07:35:18Z","pushed_at":"2016-09-29T23:22:18Z","git_url":"git://github.com/Polymer/vulcanize.git","ssh_url":"git@github.com:Polymer/vulcanize.git","clone_url":"https://github.com/Polymer/vulcanize.git","svn_url":"https://github.com/Polymer/vulcanize","homepage":"","size":1160,"stargazers_count":1113,"watchers_count":1113,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":115,"mirror_url":null,"open_issues_count":83,"forks":115,"open_issues":83,"watchers":1113,"default_branch":"master"}},"base":{"label":"Polymer:v3","ref":"v3","sha":"32c7bd4e36f4ea90f3470aeeb89b8575c97628f4","user":{"login":"Polymer","id":2159051,"avatar_url":"https://avatars.githubusercontent.com/u/2159051?v=3","gravatar_id":"","url":"https://api.github.com/users/Polymer","html_url":"https://github.com/Polymer","followers_url":"https://api.github.com/users/Polymer/followers","following_url":"https://api.github.com/users/Polymer/following{/other_user}","gists_url":"https://api.github.com/users/Polymer/gists{/gist_id}","starred_url":"https://api.github.com/users/Polymer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Polymer/subscriptions","organizations_url":"https://api.github.com/users/Polymer/orgs","repos_url":"https://api.github.com/users/Polymer/repos","events_url":"https://api.github.com/users/Polymer/events{/privacy}","received_events_url":"https://api.github.com/users/Polymer/received_events","type":"Organization","site_admin":false},"repo":{"id":13599100,"name":"vulcanize","full_name":"Polymer/vulcanize","owner":{"login":"Polymer","id":2159051,"avatar_url":"https://avatars.githubusercontent.com/u/2159051?v=3","gravatar_id":"","url":"https://api.github.com/users/Polymer","html_url":"https://github.com/Polymer","followers_url":"https://api.github.com/users/Polymer/followers","following_url":"https://api.github.com/users/Polymer/following{/other_user}","gists_url":"https://api.github.com/users/Polymer/gists{/gist_id}","starred_url":"https://api.github.com/users/Polymer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Polymer/subscriptions","organizations_url":"https://api.github.com/users/Polymer/orgs","repos_url":"https://api.github.com/users/Polymer/repos","events_url":"https://api.github.com/users/Polymer/events{/privacy}","received_events_url":"https://api.github.com/users/Polymer/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Polymer/vulcanize","description":"Build tool for HTMLImports and Web Components","fork":false,"url":"https://api.github.com/repos/Polymer/vulcanize","forks_url":"https://api.github.com/repos/Polymer/vulcanize/forks","keys_url":"https://api.github.com/repos/Polymer/vulcanize/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Polymer/vulcanize/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Polymer/vulcanize/teams","hooks_url":"https://api.github.com/repos/Polymer/vulcanize/hooks","issue_events_url":"https://api.github.com/repos/Polymer/vulcanize/issues/events{/number}","events_url":"https://api.github.com/repos/Polymer/vulcanize/events","assignees_url":"https://api.github.com/repos/Polymer/vulcanize/assignees{/user}","branches_url":"https://api.github.com/repos/Polymer/vulcanize/branches{/branch}","tags_url":"https://api.github.com/repos/Polymer/vulcanize/tags","blobs_url":"https://api.github.com/repos/Polymer/vulcanize/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Polymer/vulcanize/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Polymer/vulcanize/git/refs{/sha}","trees_url":"https://api.github.com/repos/Polymer/vulcanize/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Polymer/vulcanize/statuses/{sha}","languages_url":"https://api.github.com/repos/Polymer/vulcanize/languages","stargazers_url":"https://api.github.com/repos/Polymer/vulcanize/stargazers","contributors_url":"https://api.github.com/repos/Polymer/vulcanize/contributors","subscribers_url":"https://api.github.com/repos/Polymer/vulcanize/subscribers","subscription_url":"https://api.github.com/repos/Polymer/vulcanize/subscription","commits_url":"https://api.github.com/repos/Polymer/vulcanize/commits{/sha}","git_commits_url":"https://api.github.com/repos/Polymer/vulcanize/git/commits{/sha}","comments_url":"https://api.github.com/repos/Polymer/vulcanize/comments{/number}","issue_comment_url":"https://api.github.com/repos/Polymer/vulcanize/issues/comments{/number}","contents_url":"https://api.github.com/repos/Polymer/vulcanize/contents/{+path}","compare_url":"https://api.github.com/repos/Polymer/vulcanize/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Polymer/vulcanize/merges","archive_url":"https://api.github.com/repos/Polymer/vulcanize/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Polymer/vulcanize/downloads","issues_url":"https://api.github.com/repos/Polymer/vulcanize/issues{/number}","pulls_url":"https://api.github.com/repos/Polymer/vulcanize/pulls{/number}","milestones_url":"https://api.github.com/repos/Polymer/vulcanize/milestones{/number}","notifications_url":"https://api.github.com/repos/Polymer/vulcanize/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Polymer/vulcanize/labels{/name}","releases_url":"https://api.github.com/repos/Polymer/vulcanize/releases{/id}","deployments_url":"https://api.github.com/repos/Polymer/vulcanize/deployments","created_at":"2013-10-15T18:56:20Z","updated_at":"2016-09-26T07:35:18Z","pushed_at":"2016-09-29T23:22:18Z","git_url":"git://github.com/Polymer/vulcanize.git","ssh_url":"git@github.com:Polymer/vulcanize.git","clone_url":"https://github.com/Polymer/vulcanize.git","svn_url":"https://github.com/Polymer/vulcanize","homepage":"","size":1160,"stargazers_count":1113,"watchers_count":1113,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":115,"mirror_url":null,"open_issues_count":83,"forks":115,"open_issues":83,"watchers":1113,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Polymer/vulcanize/pulls/373"},"html":{"href":"https://github.com/Polymer/vulcanize/pull/373"},"issue":{"href":"https://api.github.com/repos/Polymer/vulcanize/issues/373"},"comments":{"href":"https://api.github.com/repos/Polymer/vulcanize/issues/373/comments"},"review_comments":{"href":"https://api.github.com/repos/Polymer/vulcanize/pulls/373/comments"},"review_comment":{"href":"https://api.github.com/repos/Polymer/vulcanize/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Polymer/vulcanize/pulls/373/commits"},"statuses":{"href":"https://api.github.com/repos/Polymer/vulcanize/statuses/35e3f19f5e5eb8bb578f236739afc6af8e374051"}}}}
{"actor":{"display_login":"garlicnation"}}