{"action":"created","comment":{"url":"https://api.github.com/repos/systemjs/builder/pulls/comments/30032403","id":30032403,"diff_hunk":"@@ -71,27 +73,28 @@ exports.concatenateSourceMaps = function(sourceFilename, mapsWithOffsets, source\n \n   // convert from library internals format to canonical\n   var normalized = JSON.parse(JSON.stringify(generated));\n+  var sourcePath;\n \n   if (includeSourcesContent) {\n     normalized.sourcesContent = normalized.sources.map(function(source) {\n     //if (contentsBySource[source])\n       //return contentsBySource[source];\n \n-    if (source.substr(0, 6) === 'file:/')\n-      return fs.readFileSync(source.replace(/^file:\\/+/, '/')).toString();\n+    sourcePath = filePath(source);\n+    if (sourcePath)\n+      return fs.readFileSync(sourcePath).toString();","path":"lib/sourcemaps.js","position":24,"original_position":24,"commit_id":"c3c0607a397852a200a063b5c7042ac465df4308","original_commit_id":"c3c0607a397852a200a063b5c7042ac465df4308","user":{"login":"crisptrutski","id":881351,"avatar_url":"https://avatars.githubusercontent.com/u/881351?v=3","gravatar_id":"","url":"https://api.github.com/users/crisptrutski","html_url":"https://github.com/crisptrutski","followers_url":"https://api.github.com/users/crisptrutski/followers","following_url":"https://api.github.com/users/crisptrutski/following{/other_user}","gists_url":"https://api.github.com/users/crisptrutski/gists{/gist_id}","starred_url":"https://api.github.com/users/crisptrutski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crisptrutski/subscriptions","organizations_url":"https://api.github.com/users/crisptrutski/orgs","repos_url":"https://api.github.com/users/crisptrutski/repos","events_url":"https://api.github.com/users/crisptrutski/events{/privacy}","received_events_url":"https://api.github.com/users/crisptrutski/received_events","type":"User","site_admin":false},"body":"Yes we should.","created_at":"2015-05-11T12:08:17Z","updated_at":"2015-05-11T12:08:17Z","html_url":"https://github.com/systemjs/builder/pull/158#discussion_r30032403","pull_request_url":"https://api.github.com/repos/systemjs/builder/pulls/158","_links":{"self":{"href":"https://api.github.com/repos/systemjs/builder/pulls/comments/30032403"},"html":{"href":"https://github.com/systemjs/builder/pull/158#discussion_r30032403"},"pull_request":{"href":"https://api.github.com/repos/systemjs/builder/pulls/158"}}},"pull_request":{"url":"https://api.github.com/repos/systemjs/builder/pulls/158","id":34445656,"html_url":"https://github.com/systemjs/builder/pull/158","diff_url":"https://github.com/systemjs/builder/pull/158.diff","patch_url":"https://github.com/systemjs/builder/pull/158.patch","issue_url":"https://api.github.com/repos/systemjs/builder/issues/158","number":158,"state":"open","locked":false,"title":"URL hygiene","user":{"login":"crisptrutski","id":881351,"avatar_url":"https://avatars.githubusercontent.com/u/881351?v=3","gravatar_id":"","url":"https://api.github.com/users/crisptrutski","html_url":"https://github.com/crisptrutski","followers_url":"https://api.github.com/users/crisptrutski/followers","following_url":"https://api.github.com/users/crisptrutski/following{/other_user}","gists_url":"https://api.github.com/users/crisptrutski/gists{/gist_id}","starred_url":"https://api.github.com/users/crisptrutski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crisptrutski/subscriptions","organizations_url":"https://api.github.com/users/crisptrutski/orgs","repos_url":"https://api.github.com/users/crisptrutski/repos","events_url":"https://api.github.com/users/crisptrutski/events{/privacy}","received_events_url":"https://api.github.com/users/crisptrutski/received_events","type":"User","site_admin":false},"body":"@guybedford \r\n\r\nThis cleans up sticky tape around `file:`, which could go horribly wrong (see #157) and for example rebase absolute URLs against a relative baseURL.\r\n\r\nPresenting two approaches: strict (see after first commit) and permissive (see after last commit)\r\n\r\nIf we decide to go with either of these I'll add some tests.","created_at":"2015-04-30T10:11:37Z","updated_at":"2015-05-11T12:08:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"92637865057bcaa200895af94beccab2060859ca","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/systemjs/builder/pulls/158/commits","review_comments_url":"https://api.github.com/repos/systemjs/builder/pulls/158/comments","review_comment_url":"https://api.github.com/repos/systemjs/builder/pulls/comments{/number}","comments_url":"https://api.github.com/repos/systemjs/builder/issues/158/comments","statuses_url":"https://api.github.com/repos/systemjs/builder/statuses/c3c0607a397852a200a063b5c7042ac465df4308","head":{"label":"systemjs:url-hygiene","ref":"url-hygiene","sha":"c3c0607a397852a200a063b5c7042ac465df4308","user":{"login":"systemjs","id":6577368,"avatar_url":"https://avatars.githubusercontent.com/u/6577368?v=3","gravatar_id":"","url":"https://api.github.com/users/systemjs","html_url":"https://github.com/systemjs","followers_url":"https://api.github.com/users/systemjs/followers","following_url":"https://api.github.com/users/systemjs/following{/other_user}","gists_url":"https://api.github.com/users/systemjs/gists{/gist_id}","starred_url":"https://api.github.com/users/systemjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/systemjs/subscriptions","organizations_url":"https://api.github.com/users/systemjs/orgs","repos_url":"https://api.github.com/users/systemjs/repos","events_url":"https://api.github.com/users/systemjs/events{/privacy}","received_events_url":"https://api.github.com/users/systemjs/received_events","type":"Organization","site_admin":false},"repo":{"id":19843509,"name":"builder","full_name":"systemjs/builder","owner":{"login":"systemjs","id":6577368,"avatar_url":"https://avatars.githubusercontent.com/u/6577368?v=3","gravatar_id":"","url":"https://api.github.com/users/systemjs","html_url":"https://github.com/systemjs","followers_url":"https://api.github.com/users/systemjs/followers","following_url":"https://api.github.com/users/systemjs/following{/other_user}","gists_url":"https://api.github.com/users/systemjs/gists{/gist_id}","starred_url":"https://api.github.com/users/systemjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/systemjs/subscriptions","organizations_url":"https://api.github.com/users/systemjs/orgs","repos_url":"https://api.github.com/users/systemjs/repos","events_url":"https://api.github.com/users/systemjs/events{/privacy}","received_events_url":"https://api.github.com/users/systemjs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/systemjs/builder","description":"SystemJS build tool","fork":false,"url":"https://api.github.com/repos/systemjs/builder","forks_url":"https://api.github.com/repos/systemjs/builder/forks","keys_url":"https://api.github.com/repos/systemjs/builder/keys{/key_id}","collaborators_url":"https://api.github.com/repos/systemjs/builder/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/systemjs/builder/teams","hooks_url":"https://api.github.com/repos/systemjs/builder/hooks","issue_events_url":"https://api.github.com/repos/systemjs/builder/issues/events{/number}","events_url":"https://api.github.com/repos/systemjs/builder/events","assignees_url":"https://api.github.com/repos/systemjs/builder/assignees{/user}","branches_url":"https://api.github.com/repos/systemjs/builder/branches{/branch}","tags_url":"https://api.github.com/repos/systemjs/builder/tags","blobs_url":"https://api.github.com/repos/systemjs/builder/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/systemjs/builder/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/systemjs/builder/git/refs{/sha}","trees_url":"https://api.github.com/repos/systemjs/builder/git/trees{/sha}","statuses_url":"https://api.github.com/repos/systemjs/builder/statuses/{sha}","languages_url":"https://api.github.com/repos/systemjs/builder/languages","stargazers_url":"https://api.github.com/repos/systemjs/builder/stargazers","contributors_url":"https://api.github.com/repos/systemjs/builder/contributors","subscribers_url":"https://api.github.com/repos/systemjs/builder/subscribers","subscription_url":"https://api.github.com/repos/systemjs/builder/subscription","commits_url":"https://api.github.com/repos/systemjs/builder/commits{/sha}","git_commits_url":"https://api.github.com/repos/systemjs/builder/git/commits{/sha}","comments_url":"https://api.github.com/repos/systemjs/builder/comments{/number}","issue_comment_url":"https://api.github.com/repos/systemjs/builder/issues/comments{/number}","contents_url":"https://api.github.com/repos/systemjs/builder/contents/{+path}","compare_url":"https://api.github.com/repos/systemjs/builder/compare/{base}...{head}","merges_url":"https://api.github.com/repos/systemjs/builder/merges","archive_url":"https://api.github.com/repos/systemjs/builder/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/systemjs/builder/downloads","issues_url":"https://api.github.com/repos/systemjs/builder/issues{/number}","pulls_url":"https://api.github.com/repos/systemjs/builder/pulls{/number}","milestones_url":"https://api.github.com/repos/systemjs/builder/milestones{/number}","notifications_url":"https://api.github.com/repos/systemjs/builder/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/systemjs/builder/labels{/name}","releases_url":"https://api.github.com/repos/systemjs/builder/releases{/id}","created_at":"2014-05-16T03:26:53Z","updated_at":"2015-05-09T11:18:13Z","pushed_at":"2015-05-11T10:42:42Z","git_url":"git://github.com/systemjs/builder.git","ssh_url":"git@github.com:systemjs/builder.git","clone_url":"https://github.com/systemjs/builder.git","svn_url":"https://github.com/systemjs/builder","homepage":null,"size":2189,"stargazers_count":70,"watchers_count":70,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":24,"mirror_url":null,"open_issues_count":21,"forks":24,"open_issues":21,"watchers":70,"default_branch":"master"}},"base":{"label":"systemjs:master","ref":"master","sha":"c48d87b23b34ebdfc03b677f0cb12bdd6af8590d","user":{"login":"systemjs","id":6577368,"avatar_url":"https://avatars.githubusercontent.com/u/6577368?v=3","gravatar_id":"","url":"https://api.github.com/users/systemjs","html_url":"https://github.com/systemjs","followers_url":"https://api.github.com/users/systemjs/followers","following_url":"https://api.github.com/users/systemjs/following{/other_user}","gists_url":"https://api.github.com/users/systemjs/gists{/gist_id}","starred_url":"https://api.github.com/users/systemjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/systemjs/subscriptions","organizations_url":"https://api.github.com/users/systemjs/orgs","repos_url":"https://api.github.com/users/systemjs/repos","events_url":"https://api.github.com/users/systemjs/events{/privacy}","received_events_url":"https://api.github.com/users/systemjs/received_events","type":"Organization","site_admin":false},"repo":{"id":19843509,"name":"builder","full_name":"systemjs/builder","owner":{"login":"systemjs","id":6577368,"avatar_url":"https://avatars.githubusercontent.com/u/6577368?v=3","gravatar_id":"","url":"https://api.github.com/users/systemjs","html_url":"https://github.com/systemjs","followers_url":"https://api.github.com/users/systemjs/followers","following_url":"https://api.github.com/users/systemjs/following{/other_user}","gists_url":"https://api.github.com/users/systemjs/gists{/gist_id}","starred_url":"https://api.github.com/users/systemjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/systemjs/subscriptions","organizations_url":"https://api.github.com/users/systemjs/orgs","repos_url":"https://api.github.com/users/systemjs/repos","events_url":"https://api.github.com/users/systemjs/events{/privacy}","received_events_url":"https://api.github.com/users/systemjs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/systemjs/builder","description":"SystemJS build tool","fork":false,"url":"https://api.github.com/repos/systemjs/builder","forks_url":"https://api.github.com/repos/systemjs/builder/forks","keys_url":"https://api.github.com/repos/systemjs/builder/keys{/key_id}","collaborators_url":"https://api.github.com/repos/systemjs/builder/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/systemjs/builder/teams","hooks_url":"https://api.github.com/repos/systemjs/builder/hooks","issue_events_url":"https://api.github.com/repos/systemjs/builder/issues/events{/number}","events_url":"https://api.github.com/repos/systemjs/builder/events","assignees_url":"https://api.github.com/repos/systemjs/builder/assignees{/user}","branches_url":"https://api.github.com/repos/systemjs/builder/branches{/branch}","tags_url":"https://api.github.com/repos/systemjs/builder/tags","blobs_url":"https://api.github.com/repos/systemjs/builder/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/systemjs/builder/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/systemjs/builder/git/refs{/sha}","trees_url":"https://api.github.com/repos/systemjs/builder/git/trees{/sha}","statuses_url":"https://api.github.com/repos/systemjs/builder/statuses/{sha}","languages_url":"https://api.github.com/repos/systemjs/builder/languages","stargazers_url":"https://api.github.com/repos/systemjs/builder/stargazers","contributors_url":"https://api.github.com/repos/systemjs/builder/contributors","subscribers_url":"https://api.github.com/repos/systemjs/builder/subscribers","subscription_url":"https://api.github.com/repos/systemjs/builder/subscription","commits_url":"https://api.github.com/repos/systemjs/builder/commits{/sha}","git_commits_url":"https://api.github.com/repos/systemjs/builder/git/commits{/sha}","comments_url":"https://api.github.com/repos/systemjs/builder/comments{/number}","issue_comment_url":"https://api.github.com/repos/systemjs/builder/issues/comments{/number}","contents_url":"https://api.github.com/repos/systemjs/builder/contents/{+path}","compare_url":"https://api.github.com/repos/systemjs/builder/compare/{base}...{head}","merges_url":"https://api.github.com/repos/systemjs/builder/merges","archive_url":"https://api.github.com/repos/systemjs/builder/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/systemjs/builder/downloads","issues_url":"https://api.github.com/repos/systemjs/builder/issues{/number}","pulls_url":"https://api.github.com/repos/systemjs/builder/pulls{/number}","milestones_url":"https://api.github.com/repos/systemjs/builder/milestones{/number}","notifications_url":"https://api.github.com/repos/systemjs/builder/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/systemjs/builder/labels{/name}","releases_url":"https://api.github.com/repos/systemjs/builder/releases{/id}","created_at":"2014-05-16T03:26:53Z","updated_at":"2015-05-09T11:18:13Z","pushed_at":"2015-05-11T10:42:42Z","git_url":"git://github.com/systemjs/builder.git","ssh_url":"git@github.com:systemjs/builder.git","clone_url":"https://github.com/systemjs/builder.git","svn_url":"https://github.com/systemjs/builder","homepage":null,"size":2189,"stargazers_count":70,"watchers_count":70,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":24,"mirror_url":null,"open_issues_count":21,"forks":24,"open_issues":21,"watchers":70,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/systemjs/builder/pulls/158"},"html":{"href":"https://github.com/systemjs/builder/pull/158"},"issue":{"href":"https://api.github.com/repos/systemjs/builder/issues/158"},"comments":{"href":"https://api.github.com/repos/systemjs/builder/issues/158/comments"},"review_comments":{"href":"https://api.github.com/repos/systemjs/builder/pulls/158/comments"},"review_comment":{"href":"https://api.github.com/repos/systemjs/builder/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/systemjs/builder/pulls/158/commits"},"statuses":{"href":"https://api.github.com/repos/systemjs/builder/statuses/c3c0607a397852a200a063b5c7042ac465df4308"}}}}