{"action":"created","comment":{"url":"https://api.github.com/repos/Rich-Harris/magic-string/pulls/comments/196747588","pull_request_review_id":130358302,"id":196747588,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5Njc0NzU4OA==","diff_hunk":"@@ -27,12 +27,20 @@ export default class Mappings {\n \t\tlet originalCharIndex = chunk.start;\n \t\tlet first = true;\n \n+\t\tlet len = this.rawSegments.length;\n \t\twhile (originalCharIndex < chunk.end) {\n \t\t\tif (this.hires || first || sourcemapLocations[originalCharIndex]) {\n-\t\t\t\tthis.rawSegments.push([this.generatedCodeColumn, sourceIndex, loc.line, loc.column]);\n+\t\t\t\tif (len !== 0) {","path":"src/utils/Mappings.js","position":8,"original_position":8,"commit_id":"d974b80295bda91dac1c15f27a6c2863bbfa35fb","original_commit_id":"d974b80295bda91dac1c15f27a6c2863bbfa35fb","user":{"login":"guybedford","id":598730,"node_id":"MDQ6VXNlcjU5ODczMA==","avatar_url":"https://avatars1.githubusercontent.com/u/598730?v=4","gravatar_id":"","url":"https://api.github.com/users/guybedford","html_url":"https://github.com/guybedford","followers_url":"https://api.github.com/users/guybedford/followers","following_url":"https://api.github.com/users/guybedford/following{/other_user}","gists_url":"https://api.github.com/users/guybedford/gists{/gist_id}","starred_url":"https://api.github.com/users/guybedford/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guybedford/subscriptions","organizations_url":"https://api.github.com/users/guybedford/orgs","repos_url":"https://api.github.com/users/guybedford/repos","events_url":"https://api.github.com/users/guybedford/events{/privacy}","received_events_url":"https://api.github.com/users/guybedford/received_events","type":"User","site_admin":false},"body":"This would then become `if (checkDuplpicateSegmentIndex !== -1)`","created_at":"2018-06-20T12:03:25Z","updated_at":"2018-06-20T12:06:03Z","html_url":"https://github.com/Rich-Harris/magic-string/pull/147#discussion_r196747588","pull_request_url":"https://api.github.com/repos/Rich-Harris/magic-string/pulls/147","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/Rich-Harris/magic-string/pulls/comments/196747588"},"html":{"href":"https://github.com/Rich-Harris/magic-string/pull/147#discussion_r196747588"},"pull_request":{"href":"https://api.github.com/repos/Rich-Harris/magic-string/pulls/147"}}},"pull_request":{"url":"https://api.github.com/repos/Rich-Harris/magic-string/pulls/147","id":195303700,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk1MzAzNzAw","html_url":"https://github.com/Rich-Harris/magic-string/pull/147","diff_url":"https://github.com/Rich-Harris/magic-string/pull/147.diff","patch_url":"https://github.com/Rich-Harris/magic-string/pull/147.patch","issue_url":"https://api.github.com/repos/Rich-Harris/magic-string/issues/147","number":147,"state":"open","locked":false,"title":"overwrite segments for removed code","user":{"login":"aleclarson","id":1925840,"node_id":"MDQ6VXNlcjE5MjU4NDA=","avatar_url":"https://avatars2.githubusercontent.com/u/1925840?v=4","gravatar_id":"","url":"https://api.github.com/users/aleclarson","html_url":"https://github.com/aleclarson","followers_url":"https://api.github.com/users/aleclarson/followers","following_url":"https://api.github.com/users/aleclarson/following{/other_user}","gists_url":"https://api.github.com/users/aleclarson/gists{/gist_id}","starred_url":"https://api.github.com/users/aleclarson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aleclarson/subscriptions","organizations_url":"https://api.github.com/users/aleclarson/orgs","repos_url":"https://api.github.com/users/aleclarson/repos","events_url":"https://api.github.com/users/aleclarson/events{/privacy}","received_events_url":"https://api.github.com/users/aleclarson/received_events","type":"User","site_admin":false},"body":"Removed ranges create two source map segments that refer to the same generated column. I consider this bloat if there isn't a good reason behind it. Generally, there shouldn't be segments for removed code (not including the segment for the characters after, whose source column is the removed range's end column).\r\n\r\nWhat's your take on this, @mourner and/or @Rich-Harris?\r\n\r\nFigured I should get feedback before writing any tests.","created_at":"2018-06-15T23:35:33Z","updated_at":"2018-06-20T12:06:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"32a25ecb287e385d6eb6fbc555fc76ab91cf04fa","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Rich-Harris/magic-string/pulls/147/commits","review_comments_url":"https://api.github.com/repos/Rich-Harris/magic-string/pulls/147/comments","review_comment_url":"https://api.github.com/repos/Rich-Harris/magic-string/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Rich-Harris/magic-string/issues/147/comments","statuses_url":"https://api.github.com/repos/Rich-Harris/magic-string/statuses/d974b80295bda91dac1c15f27a6c2863bbfa35fb","head":{"label":"aleclarson:rem","ref":"rem","sha":"d974b80295bda91dac1c15f27a6c2863bbfa35fb","user":{"login":"aleclarson","id":1925840,"node_id":"MDQ6VXNlcjE5MjU4NDA=","avatar_url":"https://avatars2.githubusercontent.com/u/1925840?v=4","gravatar_id":"","url":"https://api.github.com/users/aleclarson","html_url":"https://github.com/aleclarson","followers_url":"https://api.github.com/users/aleclarson/followers","following_url":"https://api.github.com/users/aleclarson/following{/other_user}","gists_url":"https://api.github.com/users/aleclarson/gists{/gist_id}","starred_url":"https://api.github.com/users/aleclarson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aleclarson/subscriptions","organizations_url":"https://api.github.com/users/aleclarson/orgs","repos_url":"https://api.github.com/users/aleclarson/repos","events_url":"https://api.github.com/users/aleclarson/events{/privacy}","received_events_url":"https://api.github.com/users/aleclarson/received_events","type":"User","site_admin":false},"repo":{"id":134112621,"node_id":"MDEwOlJlcG9zaXRvcnkxMzQxMTI2MjE=","name":"magic-string","full_name":"aleclarson/magic-string","owner":{"login":"aleclarson","id":1925840,"node_id":"MDQ6VXNlcjE5MjU4NDA=","avatar_url":"https://avatars2.githubusercontent.com/u/1925840?v=4","gravatar_id":"","url":"https://api.github.com/users/aleclarson","html_url":"https://github.com/aleclarson","followers_url":"https://api.github.com/users/aleclarson/followers","following_url":"https://api.github.com/users/aleclarson/following{/other_user}","gists_url":"https://api.github.com/users/aleclarson/gists{/gist_id}","starred_url":"https://api.github.com/users/aleclarson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aleclarson/subscriptions","organizations_url":"https://api.github.com/users/aleclarson/orgs","repos_url":"https://api.github.com/users/aleclarson/repos","events_url":"https://api.github.com/users/aleclarson/events{/privacy}","received_events_url":"https://api.github.com/users/aleclarson/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/aleclarson/magic-string","description":"Manipulate strings like a wizard","fork":true,"url":"https://api.github.com/repos/aleclarson/magic-string","forks_url":"https://api.github.com/repos/aleclarson/magic-string/forks","keys_url":"https://api.github.com/repos/aleclarson/magic-string/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aleclarson/magic-string/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aleclarson/magic-string/teams","hooks_url":"https://api.github.com/repos/aleclarson/magic-string/hooks","issue_events_url":"https://api.github.com/repos/aleclarson/magic-string/issues/events{/number}","events_url":"https://api.github.com/repos/aleclarson/magic-string/events","assignees_url":"https://api.github.com/repos/aleclarson/magic-string/assignees{/user}","branches_url":"https://api.github.com/repos/aleclarson/magic-string/branches{/branch}","tags_url":"https://api.github.com/repos/aleclarson/magic-string/tags","blobs_url":"https://api.github.com/repos/aleclarson/magic-string/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aleclarson/magic-string/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aleclarson/magic-string/git/refs{/sha}","trees_url":"https://api.github.com/repos/aleclarson/magic-string/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aleclarson/magic-string/statuses/{sha}","languages_url":"https://api.github.com/repos/aleclarson/magic-string/languages","stargazers_url":"https://api.github.com/repos/aleclarson/magic-string/stargazers","contributors_url":"https://api.github.com/repos/aleclarson/magic-string/contributors","subscribers_url":"https://api.github.com/repos/aleclarson/magic-string/subscribers","subscription_url":"https://api.github.com/repos/aleclarson/magic-string/subscription","commits_url":"https://api.github.com/repos/aleclarson/magic-string/commits{/sha}","git_commits_url":"https://api.github.com/repos/aleclarson/magic-string/git/commits{/sha}","comments_url":"https://api.github.com/repos/aleclarson/magic-string/comments{/number}","issue_comment_url":"https://api.github.com/repos/aleclarson/magic-string/issues/comments{/number}","contents_url":"https://api.github.com/repos/aleclarson/magic-string/contents/{+path}","compare_url":"https://api.github.com/repos/aleclarson/magic-string/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aleclarson/magic-string/merges","archive_url":"https://api.github.com/repos/aleclarson/magic-string/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aleclarson/magic-string/downloads","issues_url":"https://api.github.com/repos/aleclarson/magic-string/issues{/number}","pulls_url":"https://api.github.com/repos/aleclarson/magic-string/pulls{/number}","milestones_url":"https://api.github.com/repos/aleclarson/magic-string/milestones{/number}","notifications_url":"https://api.github.com/repos/aleclarson/magic-string/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aleclarson/magic-string/labels{/name}","releases_url":"https://api.github.com/repos/aleclarson/magic-string/releases{/id}","deployments_url":"https://api.github.com/repos/aleclarson/magic-string/deployments","created_at":"2018-05-20T02:11:42Z","updated_at":"2018-06-15T02:06:03Z","pushed_at":"2018-06-15T23:26:55Z","git_url":"git://github.com/aleclarson/magic-string.git","ssh_url":"git@github.com:aleclarson/magic-string.git","clone_url":"https://github.com/aleclarson/magic-string.git","svn_url":"https://github.com/aleclarson/magic-string","homepage":null,"size":596,"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":"Rich-Harris:master","ref":"master","sha":"3466b0230dddc95eb378ed3e0d199e36fbd1f572","user":{"login":"Rich-Harris","id":1162160,"node_id":"MDQ6VXNlcjExNjIxNjA=","avatar_url":"https://avatars3.githubusercontent.com/u/1162160?v=4","gravatar_id":"","url":"https://api.github.com/users/Rich-Harris","html_url":"https://github.com/Rich-Harris","followers_url":"https://api.github.com/users/Rich-Harris/followers","following_url":"https://api.github.com/users/Rich-Harris/following{/other_user}","gists_url":"https://api.github.com/users/Rich-Harris/gists{/gist_id}","starred_url":"https://api.github.com/users/Rich-Harris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Rich-Harris/subscriptions","organizations_url":"https://api.github.com/users/Rich-Harris/orgs","repos_url":"https://api.github.com/users/Rich-Harris/repos","events_url":"https://api.github.com/users/Rich-Harris/events{/privacy}","received_events_url":"https://api.github.com/users/Rich-Harris/received_events","type":"User","site_admin":false},"repo":{"id":26143240,"node_id":"MDEwOlJlcG9zaXRvcnkyNjE0MzI0MA==","name":"magic-string","full_name":"Rich-Harris/magic-string","owner":{"login":"Rich-Harris","id":1162160,"node_id":"MDQ6VXNlcjExNjIxNjA=","avatar_url":"https://avatars3.githubusercontent.com/u/1162160?v=4","gravatar_id":"","url":"https://api.github.com/users/Rich-Harris","html_url":"https://github.com/Rich-Harris","followers_url":"https://api.github.com/users/Rich-Harris/followers","following_url":"https://api.github.com/users/Rich-Harris/following{/other_user}","gists_url":"https://api.github.com/users/Rich-Harris/gists{/gist_id}","starred_url":"https://api.github.com/users/Rich-Harris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Rich-Harris/subscriptions","organizations_url":"https://api.github.com/users/Rich-Harris/orgs","repos_url":"https://api.github.com/users/Rich-Harris/repos","events_url":"https://api.github.com/users/Rich-Harris/events{/privacy}","received_events_url":"https://api.github.com/users/Rich-Harris/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Rich-Harris/magic-string","description":"Manipulate strings like a wizard","fork":false,"url":"https://api.github.com/repos/Rich-Harris/magic-string","forks_url":"https://api.github.com/repos/Rich-Harris/magic-string/forks","keys_url":"https://api.github.com/repos/Rich-Harris/magic-string/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Rich-Harris/magic-string/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Rich-Harris/magic-string/teams","hooks_url":"https://api.github.com/repos/Rich-Harris/magic-string/hooks","issue_events_url":"https://api.github.com/repos/Rich-Harris/magic-string/issues/events{/number}","events_url":"https://api.github.com/repos/Rich-Harris/magic-string/events","assignees_url":"https://api.github.com/repos/Rich-Harris/magic-string/assignees{/user}","branches_url":"https://api.github.com/repos/Rich-Harris/magic-string/branches{/branch}","tags_url":"https://api.github.com/repos/Rich-Harris/magic-string/tags","blobs_url":"https://api.github.com/repos/Rich-Harris/magic-string/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Rich-Harris/magic-string/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Rich-Harris/magic-string/git/refs{/sha}","trees_url":"https://api.github.com/repos/Rich-Harris/magic-string/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Rich-Harris/magic-string/statuses/{sha}","languages_url":"https://api.github.com/repos/Rich-Harris/magic-string/languages","stargazers_url":"https://api.github.com/repos/Rich-Harris/magic-string/stargazers","contributors_url":"https://api.github.com/repos/Rich-Harris/magic-string/contributors","subscribers_url":"https://api.github.com/repos/Rich-Harris/magic-string/subscribers","subscription_url":"https://api.github.com/repos/Rich-Harris/magic-string/subscription","commits_url":"https://api.github.com/repos/Rich-Harris/magic-string/commits{/sha}","git_commits_url":"https://api.github.com/repos/Rich-Harris/magic-string/git/commits{/sha}","comments_url":"https://api.github.com/repos/Rich-Harris/magic-string/comments{/number}","issue_comment_url":"https://api.github.com/repos/Rich-Harris/magic-string/issues/comments{/number}","contents_url":"https://api.github.com/repos/Rich-Harris/magic-string/contents/{+path}","compare_url":"https://api.github.com/repos/Rich-Harris/magic-string/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Rich-Harris/magic-string/merges","archive_url":"https://api.github.com/repos/Rich-Harris/magic-string/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Rich-Harris/magic-string/downloads","issues_url":"https://api.github.com/repos/Rich-Harris/magic-string/issues{/number}","pulls_url":"https://api.github.com/repos/Rich-Harris/magic-string/pulls{/number}","milestones_url":"https://api.github.com/repos/Rich-Harris/magic-string/milestones{/number}","notifications_url":"https://api.github.com/repos/Rich-Harris/magic-string/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Rich-Harris/magic-string/labels{/name}","releases_url":"https://api.github.com/repos/Rich-Harris/magic-string/releases{/id}","deployments_url":"https://api.github.com/repos/Rich-Harris/magic-string/deployments","created_at":"2014-11-03T23:10:14Z","updated_at":"2018-06-18T21:41:17Z","pushed_at":"2018-06-15T23:35:34Z","git_url":"git://github.com/Rich-Harris/magic-string.git","ssh_url":"git@github.com:Rich-Harris/magic-string.git","clone_url":"https://github.com/Rich-Harris/magic-string.git","svn_url":"https://github.com/Rich-Harris/magic-string","homepage":null,"size":619,"stargazers_count":478,"watchers_count":478,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":32,"mirror_url":null,"archived":false,"open_issues_count":4,"license":null,"forks":32,"open_issues":4,"watchers":478,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Rich-Harris/magic-string/pulls/147"},"html":{"href":"https://github.com/Rich-Harris/magic-string/pull/147"},"issue":{"href":"https://api.github.com/repos/Rich-Harris/magic-string/issues/147"},"comments":{"href":"https://api.github.com/repos/Rich-Harris/magic-string/issues/147/comments"},"review_comments":{"href":"https://api.github.com/repos/Rich-Harris/magic-string/pulls/147/comments"},"review_comment":{"href":"https://api.github.com/repos/Rich-Harris/magic-string/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Rich-Harris/magic-string/pulls/147/commits"},"statuses":{"href":"https://api.github.com/repos/Rich-Harris/magic-string/statuses/d974b80295bda91dac1c15f27a6c2863bbfa35fb"}},"author_association":"NONE"}}
{"actor":{"display_login":"guybedford"}}