{"action":"created","comment":{"url":"https://api.github.com/repos/GoogleChrome/sw-helpers/pulls/comments/93118722","pull_request_review_id":13633227,"id":93118722,"diff_hunk":"@@ -0,0 +1,62 @@\n+import ErrorFactory from '../error-factory';\n+import BaseCacheManager from './base-manager.js';\n+import RequestPrecacheEntry from '../models/precache-entries/request-entry.js';\n+import {defaultUnrevisionedCacheName} from '../constants';\n+\n+class UnrevisionedManger extends BaseCacheManager {\n+  constructor() {\n+    super(defaultUnrevisionedCacheName);\n+  }\n+  /**\n+   * This method ensures that the file entry in the maniest is valid and\n+   * if the entry is a revisioned string path, it is converted to an object\n+   * with the desired fields.\n+   * @param {String | object} input Either a URL string or an object\n+   * with a `url`, `revision` and optional `cacheBust` parameter.\n+   * @return {object} Returns a parsed version of the file entry with absolute\n+   * URL, revision and a cacheBust value.\n+   */\n+  _parseEntry(input) {\n+    if (typeof input === 'undefined' || input === null) {\n+      throw ErrorFactory.createError('invalid-unrevisioned-entry',\n+        new Error('Invalid file entry: ' + JSON.stringify(input)));\n+    }\n+\n+    let precacheEntry;\n+    if(typeof input === 'string') {\n+        precacheEntry = new RequestPrecacheEntry(new Request(input, {\n+          credentials: 'same-origin',\n+        }));\n+    } else if (input instanceof Request) {\n+      precacheEntry = new RequestPrecacheEntry(input);\n+    } else {\n+      throw ErrorFactory.createError('invalid-unrevisioned-entry',\n+        new Error('Invalid file entry: ' +\n+          JSON.stringify(precacheEntry)));\n+    }\n+\n+    return precacheEntry;\n+  }\n+\n+  _onDuplicateEntryFound(newEntry, previous) {\n+    // NOOP. Just ignore duplication entries.","path":"packages/sw-precaching/src/lib/controllers/unrevisioned-manager.js","position":42,"original_position":42,"commit_id":"6bae80a527de55cbaf63db627c11f964b6109519","original_commit_id":"6bae80a527de55cbaf63db627c11f964b6109519","user":{"login":"jeffposnick","id":1749548,"avatar_url":"https://avatars.githubusercontent.com/u/1749548?v=3","gravatar_id":"","url":"https://api.github.com/users/jeffposnick","html_url":"https://github.com/jeffposnick","followers_url":"https://api.github.com/users/jeffposnick/followers","following_url":"https://api.github.com/users/jeffposnick/following{/other_user}","gists_url":"https://api.github.com/users/jeffposnick/gists{/gist_id}","starred_url":"https://api.github.com/users/jeffposnick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeffposnick/subscriptions","organizations_url":"https://api.github.com/users/jeffposnick/orgs","repos_url":"https://api.github.com/users/jeffposnick/repos","events_url":"https://api.github.com/users/jeffposnick/events{/privacy}","received_events_url":"https://api.github.com/users/jeffposnick/received_events","type":"User","site_admin":false},"body":"`duplication` ➡️  `duplicate`","created_at":"2016-12-19T21:02:18Z","updated_at":"2016-12-19T21:30:31Z","html_url":"https://github.com/GoogleChrome/sw-helpers/pull/91#discussion_r93118722","pull_request_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/pulls/91","_links":{"self":{"href":"https://api.github.com/repos/GoogleChrome/sw-helpers/pulls/comments/93118722"},"html":{"href":"https://github.com/GoogleChrome/sw-helpers/pull/91#discussion_r93118722"},"pull_request":{"href":"https://api.github.com/repos/GoogleChrome/sw-helpers/pulls/91"}}},"pull_request":{"url":"https://api.github.com/repos/GoogleChrome/sw-helpers/pulls/91","id":98422483,"html_url":"https://github.com/GoogleChrome/sw-helpers/pull/91","diff_url":"https://github.com/GoogleChrome/sw-helpers/pull/91.diff","patch_url":"https://github.com/GoogleChrome/sw-helpers/pull/91.patch","issue_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/issues/91","number":91,"state":"open","locked":false,"title":"Warm runtime","user":{"login":"gauntface","id":139760,"avatar_url":"https://avatars.githubusercontent.com/u/139760?v=3","gravatar_id":"","url":"https://api.github.com/users/gauntface","html_url":"https://github.com/gauntface","followers_url":"https://api.github.com/users/gauntface/followers","following_url":"https://api.github.com/users/gauntface/following{/other_user}","gists_url":"https://api.github.com/users/gauntface/gists{/gist_id}","starred_url":"https://api.github.com/users/gauntface/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gauntface/subscriptions","organizations_url":"https://api.github.com/users/gauntface/orgs","repos_url":"https://api.github.com/users/gauntface/repos","events_url":"https://api.github.com/users/gauntface/events{/privacy}","received_events_url":"https://api.github.com/users/gauntface/received_events","type":"User","site_admin":false},"body":"R: @jeffposnick @addyosmani \r\n\r\nThis delightful little wonder introduces caching of un-revisioned caching. To make use of a big chunk of the code from the \"revisioned\" caching I had to move quite a few things around but the core logic is the same.\r\n\r\n@jeffposnick I tried to move to the RequestWrapper, but due to caching being done async from the function being completed it's cause issues with my tests.","created_at":"2016-12-17T00:00:24Z","updated_at":"2016-12-19T21:30:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4c3442a9faadf4d2e57979b99247c8336da9316d","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/pulls/91/commits","review_comments_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/pulls/91/comments","review_comment_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/pulls/comments{/number}","comments_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/issues/91/comments","statuses_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/statuses/6bae80a527de55cbaf63db627c11f964b6109519","head":{"label":"GoogleChrome:warm-runtime","ref":"warm-runtime","sha":"6bae80a527de55cbaf63db627c11f964b6109519","user":{"login":"GoogleChrome","id":1778935,"avatar_url":"https://avatars.githubusercontent.com/u/1778935?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleChrome","html_url":"https://github.com/GoogleChrome","followers_url":"https://api.github.com/users/GoogleChrome/followers","following_url":"https://api.github.com/users/GoogleChrome/following{/other_user}","gists_url":"https://api.github.com/users/GoogleChrome/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleChrome/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleChrome/subscriptions","organizations_url":"https://api.github.com/users/GoogleChrome/orgs","repos_url":"https://api.github.com/users/GoogleChrome/repos","events_url":"https://api.github.com/users/GoogleChrome/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleChrome/received_events","type":"Organization","site_admin":false},"repo":{"id":55424670,"name":"sw-helpers","full_name":"GoogleChrome/sw-helpers","owner":{"login":"GoogleChrome","id":1778935,"avatar_url":"https://avatars.githubusercontent.com/u/1778935?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleChrome","html_url":"https://github.com/GoogleChrome","followers_url":"https://api.github.com/users/GoogleChrome/followers","following_url":"https://api.github.com/users/GoogleChrome/following{/other_user}","gists_url":"https://api.github.com/users/GoogleChrome/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleChrome/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleChrome/subscriptions","organizations_url":"https://api.github.com/users/GoogleChrome/orgs","repos_url":"https://api.github.com/users/GoogleChrome/repos","events_url":"https://api.github.com/users/GoogleChrome/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleChrome/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/GoogleChrome/sw-helpers","description":"Service Worker helper libraries","fork":false,"url":"https://api.github.com/repos/GoogleChrome/sw-helpers","forks_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/forks","keys_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/teams","hooks_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/hooks","issue_events_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/issues/events{/number}","events_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/events","assignees_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/assignees{/user}","branches_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/branches{/branch}","tags_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/tags","blobs_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/git/refs{/sha}","trees_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/statuses/{sha}","languages_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/languages","stargazers_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/stargazers","contributors_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/contributors","subscribers_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/subscribers","subscription_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/subscription","commits_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/commits{/sha}","git_commits_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/git/commits{/sha}","comments_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/comments{/number}","issue_comment_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/issues/comments{/number}","contents_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/contents/{+path}","compare_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/merges","archive_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/downloads","issues_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/issues{/number}","pulls_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/pulls{/number}","milestones_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/milestones{/number}","notifications_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/labels{/name}","releases_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/releases{/id}","deployments_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/deployments","created_at":"2016-04-04T15:55:19Z","updated_at":"2016-12-19T03:19:05Z","pushed_at":"2016-12-19T18:40:31Z","git_url":"git://github.com/GoogleChrome/sw-helpers.git","ssh_url":"git@github.com:GoogleChrome/sw-helpers.git","clone_url":"https://github.com/GoogleChrome/sw-helpers.git","svn_url":"https://github.com/GoogleChrome/sw-helpers","homepage":"","size":1308,"stargazers_count":182,"watchers_count":182,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":12,"mirror_url":null,"open_issues_count":14,"forks":12,"open_issues":14,"watchers":182,"default_branch":"master"}},"base":{"label":"GoogleChrome:master","ref":"master","sha":"89f370cb6eab29913f3c0f52e114a8cb344c92b3","user":{"login":"GoogleChrome","id":1778935,"avatar_url":"https://avatars.githubusercontent.com/u/1778935?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleChrome","html_url":"https://github.com/GoogleChrome","followers_url":"https://api.github.com/users/GoogleChrome/followers","following_url":"https://api.github.com/users/GoogleChrome/following{/other_user}","gists_url":"https://api.github.com/users/GoogleChrome/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleChrome/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleChrome/subscriptions","organizations_url":"https://api.github.com/users/GoogleChrome/orgs","repos_url":"https://api.github.com/users/GoogleChrome/repos","events_url":"https://api.github.com/users/GoogleChrome/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleChrome/received_events","type":"Organization","site_admin":false},"repo":{"id":55424670,"name":"sw-helpers","full_name":"GoogleChrome/sw-helpers","owner":{"login":"GoogleChrome","id":1778935,"avatar_url":"https://avatars.githubusercontent.com/u/1778935?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleChrome","html_url":"https://github.com/GoogleChrome","followers_url":"https://api.github.com/users/GoogleChrome/followers","following_url":"https://api.github.com/users/GoogleChrome/following{/other_user}","gists_url":"https://api.github.com/users/GoogleChrome/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleChrome/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleChrome/subscriptions","organizations_url":"https://api.github.com/users/GoogleChrome/orgs","repos_url":"https://api.github.com/users/GoogleChrome/repos","events_url":"https://api.github.com/users/GoogleChrome/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleChrome/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/GoogleChrome/sw-helpers","description":"Service Worker helper libraries","fork":false,"url":"https://api.github.com/repos/GoogleChrome/sw-helpers","forks_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/forks","keys_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/teams","hooks_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/hooks","issue_events_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/issues/events{/number}","events_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/events","assignees_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/assignees{/user}","branches_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/branches{/branch}","tags_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/tags","blobs_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/git/refs{/sha}","trees_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/statuses/{sha}","languages_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/languages","stargazers_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/stargazers","contributors_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/contributors","subscribers_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/subscribers","subscription_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/subscription","commits_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/commits{/sha}","git_commits_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/git/commits{/sha}","comments_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/comments{/number}","issue_comment_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/issues/comments{/number}","contents_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/contents/{+path}","compare_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/merges","archive_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/downloads","issues_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/issues{/number}","pulls_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/pulls{/number}","milestones_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/milestones{/number}","notifications_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/labels{/name}","releases_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/releases{/id}","deployments_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/deployments","created_at":"2016-04-04T15:55:19Z","updated_at":"2016-12-19T03:19:05Z","pushed_at":"2016-12-19T18:40:31Z","git_url":"git://github.com/GoogleChrome/sw-helpers.git","ssh_url":"git@github.com:GoogleChrome/sw-helpers.git","clone_url":"https://github.com/GoogleChrome/sw-helpers.git","svn_url":"https://github.com/GoogleChrome/sw-helpers","homepage":"","size":1308,"stargazers_count":182,"watchers_count":182,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":12,"mirror_url":null,"open_issues_count":14,"forks":12,"open_issues":14,"watchers":182,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/GoogleChrome/sw-helpers/pulls/91"},"html":{"href":"https://github.com/GoogleChrome/sw-helpers/pull/91"},"issue":{"href":"https://api.github.com/repos/GoogleChrome/sw-helpers/issues/91"},"comments":{"href":"https://api.github.com/repos/GoogleChrome/sw-helpers/issues/91/comments"},"review_comments":{"href":"https://api.github.com/repos/GoogleChrome/sw-helpers/pulls/91/comments"},"review_comment":{"href":"https://api.github.com/repos/GoogleChrome/sw-helpers/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/GoogleChrome/sw-helpers/pulls/91/commits"},"statuses":{"href":"https://api.github.com/repos/GoogleChrome/sw-helpers/statuses/6bae80a527de55cbaf63db627c11f964b6109519"}}}}
{"actor":{"display_login":"jeffposnick"}}