{"action":"opened","number":39,"pull_request":{"url":"https://api.github.com/repos/duojs/pack/pulls/39","id":32059085,"html_url":"https://github.com/duojs/pack/pull/39","diff_url":"https://github.com/duojs/pack/pull/39.diff","patch_url":"https://github.com/duojs/pack/pull/39.patch","issue_url":"https://api.github.com/repos/duojs/pack/issues/39","number":39,"state":"open","locked":false,"title":"Improving source-maps internally","user":{"login":"dominicbarnes","id":160197,"avatar_url":"https://avatars.githubusercontent.com/u/160197?v=3","gravatar_id":"","url":"https://api.github.com/users/dominicbarnes","html_url":"https://github.com/dominicbarnes","followers_url":"https://api.github.com/users/dominicbarnes/followers","following_url":"https://api.github.com/users/dominicbarnes/following{/other_user}","gists_url":"https://api.github.com/users/dominicbarnes/gists{/gist_id}","starred_url":"https://api.github.com/users/dominicbarnes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dominicbarnes/subscriptions","organizations_url":"https://api.github.com/users/dominicbarnes/orgs","repos_url":"https://api.github.com/users/dominicbarnes/repos","events_url":"https://api.github.com/users/dominicbarnes/events{/privacy}","received_events_url":"https://api.github.com/users/dominicbarnes/received_events","type":"User","site_admin":false},"body":"This makes a few changes to make dealing with source-maps easier for duo upstream and likely plugin authors and other people using the JS API.\r\n\r\nFirst, when source-maps is set to `inline`, the comment is directly appended to `results.code`. This prevents upstream from needing to care about inline vs external when writing files. It's also what I would expect, since that's what babel does when you set `sourceMap: 'inline'` in their config.\r\n\r\nSecond, when source-maps is set to `true`, (ie: external) then `results.map` is just the string that would be written to `entry.js.map`. This also spares upstream from needing to care about the format of the source maps, if it sees `results.map` it just proceeds and pipes it directly to a file.\r\n\r\nThird, in the context of the previous step, it also appends the appropriate comment to `results.code`. (ie: `//# sourceMappingURL={entry}.map`)\r\n\r\nThese are all breaking changes unfortunately, but I think these are necessary as we try to migrate to the plugin hooks, not to mention improving the interoperability for things like gulp. (lots of this logic is currently in `Duo#write()`, so people using `Duo#run()` have to worry about source-maps all over the place. :(","created_at":"2015-03-26T20:49:41Z","updated_at":"2015-03-26T20:49:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/duojs/pack/pulls/39/commits","review_comments_url":"https://api.github.com/repos/duojs/pack/pulls/39/comments","review_comment_url":"https://api.github.com/repos/duojs/pack/pulls/comments{/number}","comments_url":"https://api.github.com/repos/duojs/pack/issues/39/comments","statuses_url":"https://api.github.com/repos/duojs/pack/statuses/bd160cbb04781cfe78055baf922157b458757f44","head":{"label":"duojs:source-map-enhancements","ref":"source-map-enhancements","sha":"bd160cbb04781cfe78055baf922157b458757f44","user":{"login":"duojs","id":7105268,"avatar_url":"https://avatars.githubusercontent.com/u/7105268?v=3","gravatar_id":"","url":"https://api.github.com/users/duojs","html_url":"https://github.com/duojs","followers_url":"https://api.github.com/users/duojs/followers","following_url":"https://api.github.com/users/duojs/following{/other_user}","gists_url":"https://api.github.com/users/duojs/gists{/gist_id}","starred_url":"https://api.github.com/users/duojs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/duojs/subscriptions","organizations_url":"https://api.github.com/users/duojs/orgs","repos_url":"https://api.github.com/users/duojs/repos","events_url":"https://api.github.com/users/duojs/events{/privacy}","received_events_url":"https://api.github.com/users/duojs/received_events","type":"Organization","site_admin":false},"repo":{"id":18609773,"name":"pack","full_name":"duojs/pack","owner":{"login":"duojs","id":7105268,"avatar_url":"https://avatars.githubusercontent.com/u/7105268?v=3","gravatar_id":"","url":"https://api.github.com/users/duojs","html_url":"https://github.com/duojs","followers_url":"https://api.github.com/users/duojs/followers","following_url":"https://api.github.com/users/duojs/following{/other_user}","gists_url":"https://api.github.com/users/duojs/gists{/gist_id}","starred_url":"https://api.github.com/users/duojs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/duojs/subscriptions","organizations_url":"https://api.github.com/users/duojs/orgs","repos_url":"https://api.github.com/users/duojs/repos","events_url":"https://api.github.com/users/duojs/events{/privacy}","received_events_url":"https://api.github.com/users/duojs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/duojs/pack","description":"Browser packing algorithm for duo. Based off of Browserify's browser-pack","fork":false,"url":"https://api.github.com/repos/duojs/pack","forks_url":"https://api.github.com/repos/duojs/pack/forks","keys_url":"https://api.github.com/repos/duojs/pack/keys{/key_id}","collaborators_url":"https://api.github.com/repos/duojs/pack/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/duojs/pack/teams","hooks_url":"https://api.github.com/repos/duojs/pack/hooks","issue_events_url":"https://api.github.com/repos/duojs/pack/issues/events{/number}","events_url":"https://api.github.com/repos/duojs/pack/events","assignees_url":"https://api.github.com/repos/duojs/pack/assignees{/user}","branches_url":"https://api.github.com/repos/duojs/pack/branches{/branch}","tags_url":"https://api.github.com/repos/duojs/pack/tags","blobs_url":"https://api.github.com/repos/duojs/pack/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/duojs/pack/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/duojs/pack/git/refs{/sha}","trees_url":"https://api.github.com/repos/duojs/pack/git/trees{/sha}","statuses_url":"https://api.github.com/repos/duojs/pack/statuses/{sha}","languages_url":"https://api.github.com/repos/duojs/pack/languages","stargazers_url":"https://api.github.com/repos/duojs/pack/stargazers","contributors_url":"https://api.github.com/repos/duojs/pack/contributors","subscribers_url":"https://api.github.com/repos/duojs/pack/subscribers","subscription_url":"https://api.github.com/repos/duojs/pack/subscription","commits_url":"https://api.github.com/repos/duojs/pack/commits{/sha}","git_commits_url":"https://api.github.com/repos/duojs/pack/git/commits{/sha}","comments_url":"https://api.github.com/repos/duojs/pack/comments{/number}","issue_comment_url":"https://api.github.com/repos/duojs/pack/issues/comments{/number}","contents_url":"https://api.github.com/repos/duojs/pack/contents/{+path}","compare_url":"https://api.github.com/repos/duojs/pack/compare/{base}...{head}","merges_url":"https://api.github.com/repos/duojs/pack/merges","archive_url":"https://api.github.com/repos/duojs/pack/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/duojs/pack/downloads","issues_url":"https://api.github.com/repos/duojs/pack/issues{/number}","pulls_url":"https://api.github.com/repos/duojs/pack/pulls{/number}","milestones_url":"https://api.github.com/repos/duojs/pack/milestones{/number}","notifications_url":"https://api.github.com/repos/duojs/pack/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/duojs/pack/labels{/name}","releases_url":"https://api.github.com/repos/duojs/pack/releases{/id}","created_at":"2014-04-09T19:15:56Z","updated_at":"2015-03-02T17:36:18Z","pushed_at":"2015-03-26T20:44:39Z","git_url":"git://github.com/duojs/pack.git","ssh_url":"git@github.com:duojs/pack.git","clone_url":"https://github.com/duojs/pack.git","svn_url":"https://github.com/duojs/pack","homepage":null,"size":699,"stargazers_count":6,"watchers_count":6,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":9,"forks":6,"open_issues":9,"watchers":6,"default_branch":"master"}},"base":{"label":"duojs:master","ref":"master","sha":"d194ea777858570e9fa8ae071ebcd969164e44a2","user":{"login":"duojs","id":7105268,"avatar_url":"https://avatars.githubusercontent.com/u/7105268?v=3","gravatar_id":"","url":"https://api.github.com/users/duojs","html_url":"https://github.com/duojs","followers_url":"https://api.github.com/users/duojs/followers","following_url":"https://api.github.com/users/duojs/following{/other_user}","gists_url":"https://api.github.com/users/duojs/gists{/gist_id}","starred_url":"https://api.github.com/users/duojs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/duojs/subscriptions","organizations_url":"https://api.github.com/users/duojs/orgs","repos_url":"https://api.github.com/users/duojs/repos","events_url":"https://api.github.com/users/duojs/events{/privacy}","received_events_url":"https://api.github.com/users/duojs/received_events","type":"Organization","site_admin":false},"repo":{"id":18609773,"name":"pack","full_name":"duojs/pack","owner":{"login":"duojs","id":7105268,"avatar_url":"https://avatars.githubusercontent.com/u/7105268?v=3","gravatar_id":"","url":"https://api.github.com/users/duojs","html_url":"https://github.com/duojs","followers_url":"https://api.github.com/users/duojs/followers","following_url":"https://api.github.com/users/duojs/following{/other_user}","gists_url":"https://api.github.com/users/duojs/gists{/gist_id}","starred_url":"https://api.github.com/users/duojs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/duojs/subscriptions","organizations_url":"https://api.github.com/users/duojs/orgs","repos_url":"https://api.github.com/users/duojs/repos","events_url":"https://api.github.com/users/duojs/events{/privacy}","received_events_url":"https://api.github.com/users/duojs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/duojs/pack","description":"Browser packing algorithm for duo. Based off of Browserify's browser-pack","fork":false,"url":"https://api.github.com/repos/duojs/pack","forks_url":"https://api.github.com/repos/duojs/pack/forks","keys_url":"https://api.github.com/repos/duojs/pack/keys{/key_id}","collaborators_url":"https://api.github.com/repos/duojs/pack/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/duojs/pack/teams","hooks_url":"https://api.github.com/repos/duojs/pack/hooks","issue_events_url":"https://api.github.com/repos/duojs/pack/issues/events{/number}","events_url":"https://api.github.com/repos/duojs/pack/events","assignees_url":"https://api.github.com/repos/duojs/pack/assignees{/user}","branches_url":"https://api.github.com/repos/duojs/pack/branches{/branch}","tags_url":"https://api.github.com/repos/duojs/pack/tags","blobs_url":"https://api.github.com/repos/duojs/pack/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/duojs/pack/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/duojs/pack/git/refs{/sha}","trees_url":"https://api.github.com/repos/duojs/pack/git/trees{/sha}","statuses_url":"https://api.github.com/repos/duojs/pack/statuses/{sha}","languages_url":"https://api.github.com/repos/duojs/pack/languages","stargazers_url":"https://api.github.com/repos/duojs/pack/stargazers","contributors_url":"https://api.github.com/repos/duojs/pack/contributors","subscribers_url":"https://api.github.com/repos/duojs/pack/subscribers","subscription_url":"https://api.github.com/repos/duojs/pack/subscription","commits_url":"https://api.github.com/repos/duojs/pack/commits{/sha}","git_commits_url":"https://api.github.com/repos/duojs/pack/git/commits{/sha}","comments_url":"https://api.github.com/repos/duojs/pack/comments{/number}","issue_comment_url":"https://api.github.com/repos/duojs/pack/issues/comments{/number}","contents_url":"https://api.github.com/repos/duojs/pack/contents/{+path}","compare_url":"https://api.github.com/repos/duojs/pack/compare/{base}...{head}","merges_url":"https://api.github.com/repos/duojs/pack/merges","archive_url":"https://api.github.com/repos/duojs/pack/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/duojs/pack/downloads","issues_url":"https://api.github.com/repos/duojs/pack/issues{/number}","pulls_url":"https://api.github.com/repos/duojs/pack/pulls{/number}","milestones_url":"https://api.github.com/repos/duojs/pack/milestones{/number}","notifications_url":"https://api.github.com/repos/duojs/pack/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/duojs/pack/labels{/name}","releases_url":"https://api.github.com/repos/duojs/pack/releases{/id}","created_at":"2014-04-09T19:15:56Z","updated_at":"2015-03-02T17:36:18Z","pushed_at":"2015-03-26T20:44:39Z","git_url":"git://github.com/duojs/pack.git","ssh_url":"git@github.com:duojs/pack.git","clone_url":"https://github.com/duojs/pack.git","svn_url":"https://github.com/duojs/pack","homepage":null,"size":699,"stargazers_count":6,"watchers_count":6,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":9,"forks":6,"open_issues":9,"watchers":6,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/duojs/pack/pulls/39"},"html":{"href":"https://github.com/duojs/pack/pull/39"},"issue":{"href":"https://api.github.com/repos/duojs/pack/issues/39"},"comments":{"href":"https://api.github.com/repos/duojs/pack/issues/39/comments"},"review_comments":{"href":"https://api.github.com/repos/duojs/pack/pulls/39/comments"},"review_comment":{"href":"https://api.github.com/repos/duojs/pack/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/duojs/pack/pulls/39/commits"},"statuses":{"href":"https://api.github.com/repos/duojs/pack/statuses/bd160cbb04781cfe78055baf922157b458757f44"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":3,"additions":51,"deletions":12,"changed_files":4}}