{"action":"closed","number":31,"pull_request":{"url":"https://api.github.com/repos/gliffy/canvas2svg/pulls/31","id":44291654,"html_url":"https://github.com/gliffy/canvas2svg/pull/31","diff_url":"https://github.com/gliffy/canvas2svg/pull/31.diff","patch_url":"https://github.com/gliffy/canvas2svg/pull/31.patch","issue_url":"https://api.github.com/repos/gliffy/canvas2svg/issues/31","number":31,"state":"closed","locked":false,"title":"Make canvas2svg work with commonjs and jsdom","user":{"login":"ConradIrwin","id":94272,"avatar_url":"https://avatars.githubusercontent.com/u/94272?v=3","gravatar_id":"","url":"https://api.github.com/users/ConradIrwin","html_url":"https://github.com/ConradIrwin","followers_url":"https://api.github.com/users/ConradIrwin/followers","following_url":"https://api.github.com/users/ConradIrwin/following{/other_user}","gists_url":"https://api.github.com/users/ConradIrwin/gists{/gist_id}","starred_url":"https://api.github.com/users/ConradIrwin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ConradIrwin/subscriptions","organizations_url":"https://api.github.com/users/ConradIrwin/orgs","repos_url":"https://api.github.com/users/ConradIrwin/repos","events_url":"https://api.github.com/users/ConradIrwin/events{/privacy}","received_events_url":"https://api.github.com/users/ConradIrwin/received_events","type":"User","site_admin":false},"body":"I'm building a webpack loader that uses canvas2svg to convert canvas\nanimations into frame-by-frame svgs. This allows the animation to\nbe offloaded to the GPU, which in turn avoids jitter.\n\nTo make this work, I've been running canvas2svg on a document created by jsdom\nversion 6.3.0.\n\nBefore this change I had to set `global.document` and `global.window` in node\nbefore requiring the library. After this change I don't need any global\nvariables to use canvas2svg from node.","created_at":"2015-09-05T22:53:42Z","updated_at":"2015-09-09T19:05:36Z","closed_at":"2015-09-09T19:05:36Z","merged_at":"2015-09-09T19:05:36Z","merge_commit_sha":"5f28b793339f86d6ce87f330c9adab440baa530a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/gliffy/canvas2svg/pulls/31/commits","review_comments_url":"https://api.github.com/repos/gliffy/canvas2svg/pulls/31/comments","review_comment_url":"https://api.github.com/repos/gliffy/canvas2svg/pulls/comments{/number}","comments_url":"https://api.github.com/repos/gliffy/canvas2svg/issues/31/comments","statuses_url":"https://api.github.com/repos/gliffy/canvas2svg/statuses/363cc72ebf6252a14764531d233a8d21b72ffeb9","head":{"label":"ConradIrwin:commonjs","ref":"commonjs","sha":"363cc72ebf6252a14764531d233a8d21b72ffeb9","user":{"login":"ConradIrwin","id":94272,"avatar_url":"https://avatars.githubusercontent.com/u/94272?v=3","gravatar_id":"","url":"https://api.github.com/users/ConradIrwin","html_url":"https://github.com/ConradIrwin","followers_url":"https://api.github.com/users/ConradIrwin/followers","following_url":"https://api.github.com/users/ConradIrwin/following{/other_user}","gists_url":"https://api.github.com/users/ConradIrwin/gists{/gist_id}","starred_url":"https://api.github.com/users/ConradIrwin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ConradIrwin/subscriptions","organizations_url":"https://api.github.com/users/ConradIrwin/orgs","repos_url":"https://api.github.com/users/ConradIrwin/repos","events_url":"https://api.github.com/users/ConradIrwin/events{/privacy}","received_events_url":"https://api.github.com/users/ConradIrwin/received_events","type":"User","site_admin":false},"repo":{"id":41974592,"name":"canvas2svg","full_name":"ConradIrwin/canvas2svg","owner":{"login":"ConradIrwin","id":94272,"avatar_url":"https://avatars.githubusercontent.com/u/94272?v=3","gravatar_id":"","url":"https://api.github.com/users/ConradIrwin","html_url":"https://github.com/ConradIrwin","followers_url":"https://api.github.com/users/ConradIrwin/followers","following_url":"https://api.github.com/users/ConradIrwin/following{/other_user}","gists_url":"https://api.github.com/users/ConradIrwin/gists{/gist_id}","starred_url":"https://api.github.com/users/ConradIrwin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ConradIrwin/subscriptions","organizations_url":"https://api.github.com/users/ConradIrwin/orgs","repos_url":"https://api.github.com/users/ConradIrwin/repos","events_url":"https://api.github.com/users/ConradIrwin/events{/privacy}","received_events_url":"https://api.github.com/users/ConradIrwin/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ConradIrwin/canvas2svg","description":"","fork":true,"url":"https://api.github.com/repos/ConradIrwin/canvas2svg","forks_url":"https://api.github.com/repos/ConradIrwin/canvas2svg/forks","keys_url":"https://api.github.com/repos/ConradIrwin/canvas2svg/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ConradIrwin/canvas2svg/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ConradIrwin/canvas2svg/teams","hooks_url":"https://api.github.com/repos/ConradIrwin/canvas2svg/hooks","issue_events_url":"https://api.github.com/repos/ConradIrwin/canvas2svg/issues/events{/number}","events_url":"https://api.github.com/repos/ConradIrwin/canvas2svg/events","assignees_url":"https://api.github.com/repos/ConradIrwin/canvas2svg/assignees{/user}","branches_url":"https://api.github.com/repos/ConradIrwin/canvas2svg/branches{/branch}","tags_url":"https://api.github.com/repos/ConradIrwin/canvas2svg/tags","blobs_url":"https://api.github.com/repos/ConradIrwin/canvas2svg/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ConradIrwin/canvas2svg/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ConradIrwin/canvas2svg/git/refs{/sha}","trees_url":"https://api.github.com/repos/ConradIrwin/canvas2svg/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ConradIrwin/canvas2svg/statuses/{sha}","languages_url":"https://api.github.com/repos/ConradIrwin/canvas2svg/languages","stargazers_url":"https://api.github.com/repos/ConradIrwin/canvas2svg/stargazers","contributors_url":"https://api.github.com/repos/ConradIrwin/canvas2svg/contributors","subscribers_url":"https://api.github.com/repos/ConradIrwin/canvas2svg/subscribers","subscription_url":"https://api.github.com/repos/ConradIrwin/canvas2svg/subscription","commits_url":"https://api.github.com/repos/ConradIrwin/canvas2svg/commits{/sha}","git_commits_url":"https://api.github.com/repos/ConradIrwin/canvas2svg/git/commits{/sha}","comments_url":"https://api.github.com/repos/ConradIrwin/canvas2svg/comments{/number}","issue_comment_url":"https://api.github.com/repos/ConradIrwin/canvas2svg/issues/comments{/number}","contents_url":"https://api.github.com/repos/ConradIrwin/canvas2svg/contents/{+path}","compare_url":"https://api.github.com/repos/ConradIrwin/canvas2svg/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ConradIrwin/canvas2svg/merges","archive_url":"https://api.github.com/repos/ConradIrwin/canvas2svg/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ConradIrwin/canvas2svg/downloads","issues_url":"https://api.github.com/repos/ConradIrwin/canvas2svg/issues{/number}","pulls_url":"https://api.github.com/repos/ConradIrwin/canvas2svg/pulls{/number}","milestones_url":"https://api.github.com/repos/ConradIrwin/canvas2svg/milestones{/number}","notifications_url":"https://api.github.com/repos/ConradIrwin/canvas2svg/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ConradIrwin/canvas2svg/labels{/name}","releases_url":"https://api.github.com/repos/ConradIrwin/canvas2svg/releases{/id}","created_at":"2015-09-05T20:29:40Z","updated_at":"2015-09-05T20:29:41Z","pushed_at":"2015-09-09T18:05:43Z","git_url":"git://github.com/ConradIrwin/canvas2svg.git","ssh_url":"git@github.com:ConradIrwin/canvas2svg.git","clone_url":"https://github.com/ConradIrwin/canvas2svg.git","svn_url":"https://github.com/ConradIrwin/canvas2svg","homepage":null,"size":454,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"gliffy:master","ref":"master","sha":"bb2aac32e0d25c3e6d7707a9da5a6bfd686f3007","user":{"login":"gliffy","id":6333244,"avatar_url":"https://avatars.githubusercontent.com/u/6333244?v=3","gravatar_id":"","url":"https://api.github.com/users/gliffy","html_url":"https://github.com/gliffy","followers_url":"https://api.github.com/users/gliffy/followers","following_url":"https://api.github.com/users/gliffy/following{/other_user}","gists_url":"https://api.github.com/users/gliffy/gists{/gist_id}","starred_url":"https://api.github.com/users/gliffy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gliffy/subscriptions","organizations_url":"https://api.github.com/users/gliffy/orgs","repos_url":"https://api.github.com/users/gliffy/repos","events_url":"https://api.github.com/users/gliffy/events{/privacy}","received_events_url":"https://api.github.com/users/gliffy/received_events","type":"Organization","site_admin":false},"repo":{"id":15689244,"name":"canvas2svg","full_name":"gliffy/canvas2svg","owner":{"login":"gliffy","id":6333244,"avatar_url":"https://avatars.githubusercontent.com/u/6333244?v=3","gravatar_id":"","url":"https://api.github.com/users/gliffy","html_url":"https://github.com/gliffy","followers_url":"https://api.github.com/users/gliffy/followers","following_url":"https://api.github.com/users/gliffy/following{/other_user}","gists_url":"https://api.github.com/users/gliffy/gists{/gist_id}","starred_url":"https://api.github.com/users/gliffy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gliffy/subscriptions","organizations_url":"https://api.github.com/users/gliffy/orgs","repos_url":"https://api.github.com/users/gliffy/repos","events_url":"https://api.github.com/users/gliffy/events{/privacy}","received_events_url":"https://api.github.com/users/gliffy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/gliffy/canvas2svg","description":"","fork":false,"url":"https://api.github.com/repos/gliffy/canvas2svg","forks_url":"https://api.github.com/repos/gliffy/canvas2svg/forks","keys_url":"https://api.github.com/repos/gliffy/canvas2svg/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gliffy/canvas2svg/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gliffy/canvas2svg/teams","hooks_url":"https://api.github.com/repos/gliffy/canvas2svg/hooks","issue_events_url":"https://api.github.com/repos/gliffy/canvas2svg/issues/events{/number}","events_url":"https://api.github.com/repos/gliffy/canvas2svg/events","assignees_url":"https://api.github.com/repos/gliffy/canvas2svg/assignees{/user}","branches_url":"https://api.github.com/repos/gliffy/canvas2svg/branches{/branch}","tags_url":"https://api.github.com/repos/gliffy/canvas2svg/tags","blobs_url":"https://api.github.com/repos/gliffy/canvas2svg/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gliffy/canvas2svg/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gliffy/canvas2svg/git/refs{/sha}","trees_url":"https://api.github.com/repos/gliffy/canvas2svg/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gliffy/canvas2svg/statuses/{sha}","languages_url":"https://api.github.com/repos/gliffy/canvas2svg/languages","stargazers_url":"https://api.github.com/repos/gliffy/canvas2svg/stargazers","contributors_url":"https://api.github.com/repos/gliffy/canvas2svg/contributors","subscribers_url":"https://api.github.com/repos/gliffy/canvas2svg/subscribers","subscription_url":"https://api.github.com/repos/gliffy/canvas2svg/subscription","commits_url":"https://api.github.com/repos/gliffy/canvas2svg/commits{/sha}","git_commits_url":"https://api.github.com/repos/gliffy/canvas2svg/git/commits{/sha}","comments_url":"https://api.github.com/repos/gliffy/canvas2svg/comments{/number}","issue_comment_url":"https://api.github.com/repos/gliffy/canvas2svg/issues/comments{/number}","contents_url":"https://api.github.com/repos/gliffy/canvas2svg/contents/{+path}","compare_url":"https://api.github.com/repos/gliffy/canvas2svg/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gliffy/canvas2svg/merges","archive_url":"https://api.github.com/repos/gliffy/canvas2svg/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gliffy/canvas2svg/downloads","issues_url":"https://api.github.com/repos/gliffy/canvas2svg/issues{/number}","pulls_url":"https://api.github.com/repos/gliffy/canvas2svg/pulls{/number}","milestones_url":"https://api.github.com/repos/gliffy/canvas2svg/milestones{/number}","notifications_url":"https://api.github.com/repos/gliffy/canvas2svg/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gliffy/canvas2svg/labels{/name}","releases_url":"https://api.github.com/repos/gliffy/canvas2svg/releases{/id}","created_at":"2014-01-06T23:18:15Z","updated_at":"2015-09-06T15:54:29Z","pushed_at":"2015-09-09T19:05:36Z","git_url":"git://github.com/gliffy/canvas2svg.git","ssh_url":"git@github.com:gliffy/canvas2svg.git","clone_url":"https://github.com/gliffy/canvas2svg.git","svn_url":"https://github.com/gliffy/canvas2svg","homepage":null,"size":732,"stargazers_count":48,"watchers_count":48,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":14,"mirror_url":null,"open_issues_count":5,"forks":14,"open_issues":5,"watchers":48,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/gliffy/canvas2svg/pulls/31"},"html":{"href":"https://github.com/gliffy/canvas2svg/pull/31"},"issue":{"href":"https://api.github.com/repos/gliffy/canvas2svg/issues/31"},"comments":{"href":"https://api.github.com/repos/gliffy/canvas2svg/issues/31/comments"},"review_comments":{"href":"https://api.github.com/repos/gliffy/canvas2svg/pulls/31/comments"},"review_comment":{"href":"https://api.github.com/repos/gliffy/canvas2svg/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/gliffy/canvas2svg/pulls/31/commits"},"statuses":{"href":"https://api.github.com/repos/gliffy/canvas2svg/statuses/363cc72ebf6252a14764531d233a8d21b72ffeb9"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"webspinner","id":265184,"avatar_url":"https://avatars.githubusercontent.com/u/265184?v=3","gravatar_id":"","url":"https://api.github.com/users/webspinner","html_url":"https://github.com/webspinner","followers_url":"https://api.github.com/users/webspinner/followers","following_url":"https://api.github.com/users/webspinner/following{/other_user}","gists_url":"https://api.github.com/users/webspinner/gists{/gist_id}","starred_url":"https://api.github.com/users/webspinner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/webspinner/subscriptions","organizations_url":"https://api.github.com/users/webspinner/orgs","repos_url":"https://api.github.com/users/webspinner/repos","events_url":"https://api.github.com/users/webspinner/events{/privacy}","received_events_url":"https://api.github.com/users/webspinner/received_events","type":"User","site_admin":false},"comments":5,"review_comments":0,"commits":6,"additions":110,"deletions":51,"changed_files":6}}