{"action":"closed","number":3321,"pull_request":{"url":"https://api.github.com/repos/jquery/jquery/pulls/3321","id":85731694,"html_url":"https://github.com/jquery/jquery/pull/3321","diff_url":"https://github.com/jquery/jquery/pull/3321.diff","patch_url":"https://github.com/jquery/jquery/pull/3321.patch","issue_url":"https://api.github.com/repos/jquery/jquery/issues/3321","number":3321,"state":"closed","locked":false,"title":"Build: Make sourcemap updates in two .replace() passes","user":{"login":"dmethvin","id":157858,"avatar_url":"https://avatars.githubusercontent.com/u/157858?v=3","gravatar_id":"","url":"https://api.github.com/users/dmethvin","html_url":"https://github.com/dmethvin","followers_url":"https://api.github.com/users/dmethvin/followers","following_url":"https://api.github.com/users/dmethvin/following{/other_user}","gists_url":"https://api.github.com/users/dmethvin/gists{/gist_id}","starred_url":"https://api.github.com/users/dmethvin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmethvin/subscriptions","organizations_url":"https://api.github.com/users/dmethvin/orgs","repos_url":"https://api.github.com/users/dmethvin/repos","events_url":"https://api.github.com/users/dmethvin/events{/privacy}","received_events_url":"https://api.github.com/users/dmethvin/received_events","type":"User","site_admin":false},"body":"### Summary ###\r\n\r\nFixes gh-3260\r\n\r\nThe problem was that the [current regexp](https://github.com/jquery/jquery/blob/3bbcce68d7b8b8a7a2164a0f7a280ae9daf70b5c/build/release/cdn.js#L41-L48) assumes that the two fields to be changed are adjacent. At some point that's the way uglify generated them but now the \"file\" field is at the very end. The solution is simple, make the changes with two separate regexp passes.\r\n\r\nTesting this *in situ* with a jquery-release run is super painful because of the safety checks that go on before we get to the CDN creation which is at the tail end of the whole long complicated process, but I tested the regexp replace with this script:\r\n\r\n```js\r\nvar fs = require(\"fs\");\r\n\r\nvar unpathedFile = \"jquery-3.1.0.min.map\";\r\nvar text;\r\n\r\ntext = fs.readFileSync( unpathedFile, \"utf8\" )\r\n\t.replace( /\"file\":\"([^\"]+)\"/,\r\n\t\t\"\\\"file\\\":\\\"\" + unpathedFile.replace( /\\.min\\.map/, \".min.js\" ) )\r\n\t.replace( /\"sources\":\\[\"([^\"]+)\"\\]/,\r\n\t\t\"\\\",\\\"sources\\\":[\\\"\" + unpathedFile.replace( /\\.min\\.map/, \".js\" ) + \"\\\"]\" );\r\n\t\t\r\nfs.writeFileSync( \"result.txt\", text );\r\n```\r\n### Checklist ###\r\nMark an `[x]` for completed items, if you're not sure leave them unchecked and we can assist.\r\n\r\n* [x] All authors have signed the CLA at https://contribute.jquery.com/CLA/\r\n* [ ] ~~New tests have been added to show the fix or feature works~~ (see above)\r\n* [x] Grunt build and unit tests pass locally with these changes\r\n* [ ] ~~If needed, a docs issue/PR was created at https://github.com/jquery/api.jquery.com~~\r\n\r\nThanks! Bots and humans will be around shortly to check it out.\r\n","created_at":"2016-09-19T02:15:49Z","updated_at":"2016-09-19T17:04:22Z","closed_at":"2016-09-19T17:04:22Z","merged_at":null,"merge_commit_sha":"e8912aeef7d54e6dd572d52c91cb250da09cddfb","assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/jquery/jquery/milestones/15","html_url":"https://github.com/jquery/jquery/milestones/3.1.1","labels_url":"https://api.github.com/repos/jquery/jquery/milestones/15/labels","id":1857939,"number":15,"title":"3.1.1","description":"","creator":{"login":"timmywil","id":192451,"avatar_url":"https://avatars.githubusercontent.com/u/192451?v=3","gravatar_id":"","url":"https://api.github.com/users/timmywil","html_url":"https://github.com/timmywil","followers_url":"https://api.github.com/users/timmywil/followers","following_url":"https://api.github.com/users/timmywil/following{/other_user}","gists_url":"https://api.github.com/users/timmywil/gists{/gist_id}","starred_url":"https://api.github.com/users/timmywil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timmywil/subscriptions","organizations_url":"https://api.github.com/users/timmywil/orgs","repos_url":"https://api.github.com/users/timmywil/repos","events_url":"https://api.github.com/users/timmywil/events{/privacy}","received_events_url":"https://api.github.com/users/timmywil/received_events","type":"User","site_admin":false},"open_issues":1,"closed_issues":16,"state":"open","created_at":"2016-06-30T16:42:40Z","updated_at":"2016-09-19T17:04:22Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/jquery/jquery/pulls/3321/commits","review_comments_url":"https://api.github.com/repos/jquery/jquery/pulls/3321/comments","review_comment_url":"https://api.github.com/repos/jquery/jquery/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jquery/jquery/issues/3321/comments","statuses_url":"https://api.github.com/repos/jquery/jquery/statuses/de24653d6f018afa05e7f84d132b731fe392d056","head":{"label":"dmethvin:3260-mapfile","ref":"3260-mapfile","sha":"de24653d6f018afa05e7f84d132b731fe392d056","user":{"login":"dmethvin","id":157858,"avatar_url":"https://avatars.githubusercontent.com/u/157858?v=3","gravatar_id":"","url":"https://api.github.com/users/dmethvin","html_url":"https://github.com/dmethvin","followers_url":"https://api.github.com/users/dmethvin/followers","following_url":"https://api.github.com/users/dmethvin/following{/other_user}","gists_url":"https://api.github.com/users/dmethvin/gists{/gist_id}","starred_url":"https://api.github.com/users/dmethvin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmethvin/subscriptions","organizations_url":"https://api.github.com/users/dmethvin/orgs","repos_url":"https://api.github.com/users/dmethvin/repos","events_url":"https://api.github.com/users/dmethvin/events{/privacy}","received_events_url":"https://api.github.com/users/dmethvin/received_events","type":"User","site_admin":false},"repo":{"id":1148694,"name":"jquery","full_name":"dmethvin/jquery","owner":{"login":"dmethvin","id":157858,"avatar_url":"https://avatars.githubusercontent.com/u/157858?v=3","gravatar_id":"","url":"https://api.github.com/users/dmethvin","html_url":"https://github.com/dmethvin","followers_url":"https://api.github.com/users/dmethvin/followers","following_url":"https://api.github.com/users/dmethvin/following{/other_user}","gists_url":"https://api.github.com/users/dmethvin/gists{/gist_id}","starred_url":"https://api.github.com/users/dmethvin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmethvin/subscriptions","organizations_url":"https://api.github.com/users/dmethvin/orgs","repos_url":"https://api.github.com/users/dmethvin/repos","events_url":"https://api.github.com/users/dmethvin/events{/privacy}","received_events_url":"https://api.github.com/users/dmethvin/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dmethvin/jquery","description":"jQuery JavaScript Library","fork":true,"url":"https://api.github.com/repos/dmethvin/jquery","forks_url":"https://api.github.com/repos/dmethvin/jquery/forks","keys_url":"https://api.github.com/repos/dmethvin/jquery/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dmethvin/jquery/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dmethvin/jquery/teams","hooks_url":"https://api.github.com/repos/dmethvin/jquery/hooks","issue_events_url":"https://api.github.com/repos/dmethvin/jquery/issues/events{/number}","events_url":"https://api.github.com/repos/dmethvin/jquery/events","assignees_url":"https://api.github.com/repos/dmethvin/jquery/assignees{/user}","branches_url":"https://api.github.com/repos/dmethvin/jquery/branches{/branch}","tags_url":"https://api.github.com/repos/dmethvin/jquery/tags","blobs_url":"https://api.github.com/repos/dmethvin/jquery/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dmethvin/jquery/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dmethvin/jquery/git/refs{/sha}","trees_url":"https://api.github.com/repos/dmethvin/jquery/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dmethvin/jquery/statuses/{sha}","languages_url":"https://api.github.com/repos/dmethvin/jquery/languages","stargazers_url":"https://api.github.com/repos/dmethvin/jquery/stargazers","contributors_url":"https://api.github.com/repos/dmethvin/jquery/contributors","subscribers_url":"https://api.github.com/repos/dmethvin/jquery/subscribers","subscription_url":"https://api.github.com/repos/dmethvin/jquery/subscription","commits_url":"https://api.github.com/repos/dmethvin/jquery/commits{/sha}","git_commits_url":"https://api.github.com/repos/dmethvin/jquery/git/commits{/sha}","comments_url":"https://api.github.com/repos/dmethvin/jquery/comments{/number}","issue_comment_url":"https://api.github.com/repos/dmethvin/jquery/issues/comments{/number}","contents_url":"https://api.github.com/repos/dmethvin/jquery/contents/{+path}","compare_url":"https://api.github.com/repos/dmethvin/jquery/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dmethvin/jquery/merges","archive_url":"https://api.github.com/repos/dmethvin/jquery/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dmethvin/jquery/downloads","issues_url":"https://api.github.com/repos/dmethvin/jquery/issues{/number}","pulls_url":"https://api.github.com/repos/dmethvin/jquery/pulls{/number}","milestones_url":"https://api.github.com/repos/dmethvin/jquery/milestones{/number}","notifications_url":"https://api.github.com/repos/dmethvin/jquery/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dmethvin/jquery/labels{/name}","releases_url":"https://api.github.com/repos/dmethvin/jquery/releases{/id}","deployments_url":"https://api.github.com/repos/dmethvin/jquery/deployments","created_at":"2010-12-08T03:37:21Z","updated_at":"2016-09-19T01:33:37Z","pushed_at":"2016-09-19T16:51:41Z","git_url":"git://github.com/dmethvin/jquery.git","ssh_url":"git@github.com:dmethvin/jquery.git","clone_url":"https://github.com/dmethvin/jquery.git","svn_url":"https://github.com/dmethvin/jquery","homepage":"http://jquery.com/","size":20521,"stargazers_count":4,"watchers_count":4,"language":"JavaScript","has_issues":false,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":4,"default_branch":"master"}},"base":{"label":"jquery:master","ref":"master","sha":"3bbcce68d7b8b8a7a2164a0f7a280ae9daf70b5c","user":{"login":"jquery","id":70142,"avatar_url":"https://avatars.githubusercontent.com/u/70142?v=3","gravatar_id":"","url":"https://api.github.com/users/jquery","html_url":"https://github.com/jquery","followers_url":"https://api.github.com/users/jquery/followers","following_url":"https://api.github.com/users/jquery/following{/other_user}","gists_url":"https://api.github.com/users/jquery/gists{/gist_id}","starred_url":"https://api.github.com/users/jquery/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jquery/subscriptions","organizations_url":"https://api.github.com/users/jquery/orgs","repos_url":"https://api.github.com/users/jquery/repos","events_url":"https://api.github.com/users/jquery/events{/privacy}","received_events_url":"https://api.github.com/users/jquery/received_events","type":"Organization","site_admin":false},"repo":{"id":167174,"name":"jquery","full_name":"jquery/jquery","owner":{"login":"jquery","id":70142,"avatar_url":"https://avatars.githubusercontent.com/u/70142?v=3","gravatar_id":"","url":"https://api.github.com/users/jquery","html_url":"https://github.com/jquery","followers_url":"https://api.github.com/users/jquery/followers","following_url":"https://api.github.com/users/jquery/following{/other_user}","gists_url":"https://api.github.com/users/jquery/gists{/gist_id}","starred_url":"https://api.github.com/users/jquery/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jquery/subscriptions","organizations_url":"https://api.github.com/users/jquery/orgs","repos_url":"https://api.github.com/users/jquery/repos","events_url":"https://api.github.com/users/jquery/events{/privacy}","received_events_url":"https://api.github.com/users/jquery/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/jquery/jquery","description":"jQuery JavaScript Library","fork":false,"url":"https://api.github.com/repos/jquery/jquery","forks_url":"https://api.github.com/repos/jquery/jquery/forks","keys_url":"https://api.github.com/repos/jquery/jquery/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jquery/jquery/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jquery/jquery/teams","hooks_url":"https://api.github.com/repos/jquery/jquery/hooks","issue_events_url":"https://api.github.com/repos/jquery/jquery/issues/events{/number}","events_url":"https://api.github.com/repos/jquery/jquery/events","assignees_url":"https://api.github.com/repos/jquery/jquery/assignees{/user}","branches_url":"https://api.github.com/repos/jquery/jquery/branches{/branch}","tags_url":"https://api.github.com/repos/jquery/jquery/tags","blobs_url":"https://api.github.com/repos/jquery/jquery/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jquery/jquery/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jquery/jquery/git/refs{/sha}","trees_url":"https://api.github.com/repos/jquery/jquery/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jquery/jquery/statuses/{sha}","languages_url":"https://api.github.com/repos/jquery/jquery/languages","stargazers_url":"https://api.github.com/repos/jquery/jquery/stargazers","contributors_url":"https://api.github.com/repos/jquery/jquery/contributors","subscribers_url":"https://api.github.com/repos/jquery/jquery/subscribers","subscription_url":"https://api.github.com/repos/jquery/jquery/subscription","commits_url":"https://api.github.com/repos/jquery/jquery/commits{/sha}","git_commits_url":"https://api.github.com/repos/jquery/jquery/git/commits{/sha}","comments_url":"https://api.github.com/repos/jquery/jquery/comments{/number}","issue_comment_url":"https://api.github.com/repos/jquery/jquery/issues/comments{/number}","contents_url":"https://api.github.com/repos/jquery/jquery/contents/{+path}","compare_url":"https://api.github.com/repos/jquery/jquery/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jquery/jquery/merges","archive_url":"https://api.github.com/repos/jquery/jquery/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jquery/jquery/downloads","issues_url":"https://api.github.com/repos/jquery/jquery/issues{/number}","pulls_url":"https://api.github.com/repos/jquery/jquery/pulls{/number}","milestones_url":"https://api.github.com/repos/jquery/jquery/milestones{/number}","notifications_url":"https://api.github.com/repos/jquery/jquery/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jquery/jquery/labels{/name}","releases_url":"https://api.github.com/repos/jquery/jquery/releases{/id}","deployments_url":"https://api.github.com/repos/jquery/jquery/deployments","created_at":"2009-04-03T15:20:14Z","updated_at":"2016-09-19T15:20:57Z","pushed_at":"2016-09-19T17:04:10Z","git_url":"git://github.com/jquery/jquery.git","ssh_url":"git@github.com:jquery/jquery.git","clone_url":"https://github.com/jquery/jquery.git","svn_url":"https://github.com/jquery/jquery","homepage":"https://jquery.com/","size":45513,"stargazers_count":41426,"watchers_count":41426,"language":"JavaScript","has_issues":true,"has_downloads":false,"has_wiki":true,"has_pages":false,"forks_count":11270,"mirror_url":null,"open_issues_count":66,"forks":11270,"open_issues":66,"watchers":41426,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jquery/jquery/pulls/3321"},"html":{"href":"https://github.com/jquery/jquery/pull/3321"},"issue":{"href":"https://api.github.com/repos/jquery/jquery/issues/3321"},"comments":{"href":"https://api.github.com/repos/jquery/jquery/issues/3321/comments"},"review_comments":{"href":"https://api.github.com/repos/jquery/jquery/pulls/3321/comments"},"review_comment":{"href":"https://api.github.com/repos/jquery/jquery/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jquery/jquery/pulls/3321/commits"},"statuses":{"href":"https://api.github.com/repos/jquery/jquery/statuses/de24653d6f018afa05e7f84d132b731fe392d056"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":4,"review_comments":0,"commits":2,"additions":5,"deletions":4,"changed_files":1}}
{"actor":{"display_login":"dmethvin"}}