{"action":"created","comment":{"url":"https://api.github.com/repos/google/protobuf/pulls/comments/52802921","id":52802921,"diff_hunk":"@@ -0,0 +1,33 @@\n+/**\n+ * @fileoverview Exports symbols needed only by tests.\n+ *\n+ * This file exports several Closure Library symbols that are only\n+ * used by tests.  It is used to generate a file\n+ * closure_asserts_commonjs.js that is only used at testing time.\n+ */\n+\n+goog.require('goog.testing.asserts');\n+\n+var global = Function('return this')();\n+\n+// All of the closure \"assert\" functions are exported at the global level.\n+//\n+// The Google Closure assert functions start with assert, eg.\n+//   assertThrows\n+//   assertNotThrows\n+//   assertTrue\n+//   ...\n+//\n+// The one exception is the \"fail\" function.\n+function shouldExport(str) {\n+  return str.lastIndexOf('assert') === 0 || str == 'fail';\n+}\n+\n+for (var key in global) {\n+  if ((typeof key == \"string\") && global.hasOwnProperty(key) &&\n+      shouldExport(key)) {\n+    exports[key] = global[key];","path":"js/commonjs/export_asserts.js","position":29,"original_position":29,"commit_id":"19f97b854d269ba13e05a605c891502975035720","original_commit_id":"19f97b854d269ba13e05a605c891502975035720","user":{"login":"joeltine","id":13138272,"avatar_url":"https://avatars.githubusercontent.com/u/13138272?v=3","gravatar_id":"","url":"https://api.github.com/users/joeltine","html_url":"https://github.com/joeltine","followers_url":"https://api.github.com/users/joeltine/followers","following_url":"https://api.github.com/users/joeltine/following{/other_user}","gists_url":"https://api.github.com/users/joeltine/gists{/gist_id}","starred_url":"https://api.github.com/users/joeltine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joeltine/subscriptions","organizations_url":"https://api.github.com/users/joeltine/orgs","repos_url":"https://api.github.com/users/joeltine/repos","events_url":"https://api.github.com/users/joeltine/events{/privacy}","received_events_url":"https://api.github.com/users/joeltine/received_events","type":"User","site_admin":false},"body":"Ugh. I wish this weren't necessary. The fact the assertions are global is ugly. Honestly what we should do is put all the assert methods on `goog.testing.asserts`. ","created_at":"2016-02-12T21:49:01Z","updated_at":"2016-02-12T21:49:01Z","html_url":"https://github.com/google/protobuf/pull/1215#discussion_r52802921","pull_request_url":"https://api.github.com/repos/google/protobuf/pulls/1215","_links":{"self":{"href":"https://api.github.com/repos/google/protobuf/pulls/comments/52802921"},"html":{"href":"https://github.com/google/protobuf/pull/1215#discussion_r52802921"},"pull_request":{"href":"https://api.github.com/repos/google/protobuf/pulls/1215"}}},"pull_request":{"url":"https://api.github.com/repos/google/protobuf/pulls/1215","id":58333944,"html_url":"https://github.com/google/protobuf/pull/1215","diff_url":"https://github.com/google/protobuf/pull/1215.diff","patch_url":"https://github.com/google/protobuf/pull/1215.patch","issue_url":"https://api.github.com/repos/google/protobuf/issues/1215","number":1215,"state":"open","locked":false,"title":"Added support for CommonJS require()","user":{"login":"haberman","id":1270,"avatar_url":"https://avatars.githubusercontent.com/u/1270?v=3","gravatar_id":"","url":"https://api.github.com/users/haberman","html_url":"https://github.com/haberman","followers_url":"https://api.github.com/users/haberman/followers","following_url":"https://api.github.com/users/haberman/following{/other_user}","gists_url":"https://api.github.com/users/haberman/gists{/gist_id}","starred_url":"https://api.github.com/users/haberman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/haberman/subscriptions","organizations_url":"https://api.github.com/users/haberman/orgs","repos_url":"https://api.github.com/users/haberman/repos","events_url":"https://api.github.com/users/haberman/events{/privacy}","received_events_url":"https://api.github.com/users/haberman/received_events","type":"User","site_admin":false},"body":"This required several codegen changes and a bunch of glue in gulp.js to test it all.","created_at":"2016-02-04T19:13:40Z","updated_at":"2016-02-12T21:49:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f5ad9a500d8938d4cffbfcec282fd57d53fef85d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/google/protobuf/pulls/1215/commits","review_comments_url":"https://api.github.com/repos/google/protobuf/pulls/1215/comments","review_comment_url":"https://api.github.com/repos/google/protobuf/pulls/comments{/number}","comments_url":"https://api.github.com/repos/google/protobuf/issues/1215/comments","statuses_url":"https://api.github.com/repos/google/protobuf/statuses/19f97b854d269ba13e05a605c891502975035720","head":{"label":"haberman:commonjs","ref":"commonjs","sha":"19f97b854d269ba13e05a605c891502975035720","user":{"login":"haberman","id":1270,"avatar_url":"https://avatars.githubusercontent.com/u/1270?v=3","gravatar_id":"","url":"https://api.github.com/users/haberman","html_url":"https://github.com/haberman","followers_url":"https://api.github.com/users/haberman/followers","following_url":"https://api.github.com/users/haberman/following{/other_user}","gists_url":"https://api.github.com/users/haberman/gists{/gist_id}","starred_url":"https://api.github.com/users/haberman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/haberman/subscriptions","organizations_url":"https://api.github.com/users/haberman/orgs","repos_url":"https://api.github.com/users/haberman/repos","events_url":"https://api.github.com/users/haberman/events{/privacy}","received_events_url":"https://api.github.com/users/haberman/received_events","type":"User","site_admin":false},"repo":{"id":29562795,"name":"protobuf","full_name":"haberman/protobuf","owner":{"login":"haberman","id":1270,"avatar_url":"https://avatars.githubusercontent.com/u/1270?v=3","gravatar_id":"","url":"https://api.github.com/users/haberman","html_url":"https://github.com/haberman","followers_url":"https://api.github.com/users/haberman/followers","following_url":"https://api.github.com/users/haberman/following{/other_user}","gists_url":"https://api.github.com/users/haberman/gists{/gist_id}","starred_url":"https://api.github.com/users/haberman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/haberman/subscriptions","organizations_url":"https://api.github.com/users/haberman/orgs","repos_url":"https://api.github.com/users/haberman/repos","events_url":"https://api.github.com/users/haberman/events{/privacy}","received_events_url":"https://api.github.com/users/haberman/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/haberman/protobuf","description":"Protocol Buffers - Google's data interchange format","fork":true,"url":"https://api.github.com/repos/haberman/protobuf","forks_url":"https://api.github.com/repos/haberman/protobuf/forks","keys_url":"https://api.github.com/repos/haberman/protobuf/keys{/key_id}","collaborators_url":"https://api.github.com/repos/haberman/protobuf/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/haberman/protobuf/teams","hooks_url":"https://api.github.com/repos/haberman/protobuf/hooks","issue_events_url":"https://api.github.com/repos/haberman/protobuf/issues/events{/number}","events_url":"https://api.github.com/repos/haberman/protobuf/events","assignees_url":"https://api.github.com/repos/haberman/protobuf/assignees{/user}","branches_url":"https://api.github.com/repos/haberman/protobuf/branches{/branch}","tags_url":"https://api.github.com/repos/haberman/protobuf/tags","blobs_url":"https://api.github.com/repos/haberman/protobuf/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/haberman/protobuf/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/haberman/protobuf/git/refs{/sha}","trees_url":"https://api.github.com/repos/haberman/protobuf/git/trees{/sha}","statuses_url":"https://api.github.com/repos/haberman/protobuf/statuses/{sha}","languages_url":"https://api.github.com/repos/haberman/protobuf/languages","stargazers_url":"https://api.github.com/repos/haberman/protobuf/stargazers","contributors_url":"https://api.github.com/repos/haberman/protobuf/contributors","subscribers_url":"https://api.github.com/repos/haberman/protobuf/subscribers","subscription_url":"https://api.github.com/repos/haberman/protobuf/subscription","commits_url":"https://api.github.com/repos/haberman/protobuf/commits{/sha}","git_commits_url":"https://api.github.com/repos/haberman/protobuf/git/commits{/sha}","comments_url":"https://api.github.com/repos/haberman/protobuf/comments{/number}","issue_comment_url":"https://api.github.com/repos/haberman/protobuf/issues/comments{/number}","contents_url":"https://api.github.com/repos/haberman/protobuf/contents/{+path}","compare_url":"https://api.github.com/repos/haberman/protobuf/compare/{base}...{head}","merges_url":"https://api.github.com/repos/haberman/protobuf/merges","archive_url":"https://api.github.com/repos/haberman/protobuf/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/haberman/protobuf/downloads","issues_url":"https://api.github.com/repos/haberman/protobuf/issues{/number}","pulls_url":"https://api.github.com/repos/haberman/protobuf/pulls{/number}","milestones_url":"https://api.github.com/repos/haberman/protobuf/milestones{/number}","notifications_url":"https://api.github.com/repos/haberman/protobuf/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/haberman/protobuf/labels{/name}","releases_url":"https://api.github.com/repos/haberman/protobuf/releases{/id}","deployments_url":"https://api.github.com/repos/haberman/protobuf/deployments","created_at":"2015-01-21T00:27:55Z","updated_at":"2015-04-15T23:31:39Z","pushed_at":"2016-02-06T02:05:26Z","git_url":"git://github.com/haberman/protobuf.git","ssh_url":"git@github.com:haberman/protobuf.git","clone_url":"https://github.com/haberman/protobuf.git","svn_url":"https://github.com/haberman/protobuf","homepage":"https://developers.google.com/protocol-buffers/","size":29584,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"google:master","ref":"master","sha":"bd8a476510d17d3841ff2509fbd67b7f4b543c1c","user":{"login":"google","id":1342004,"avatar_url":"https://avatars.githubusercontent.com/u/1342004?v=3","gravatar_id":"","url":"https://api.github.com/users/google","html_url":"https://github.com/google","followers_url":"https://api.github.com/users/google/followers","following_url":"https://api.github.com/users/google/following{/other_user}","gists_url":"https://api.github.com/users/google/gists{/gist_id}","starred_url":"https://api.github.com/users/google/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/google/subscriptions","organizations_url":"https://api.github.com/users/google/orgs","repos_url":"https://api.github.com/users/google/repos","events_url":"https://api.github.com/users/google/events{/privacy}","received_events_url":"https://api.github.com/users/google/received_events","type":"Organization","site_admin":false},"repo":{"id":23357588,"name":"protobuf","full_name":"google/protobuf","owner":{"login":"google","id":1342004,"avatar_url":"https://avatars.githubusercontent.com/u/1342004?v=3","gravatar_id":"","url":"https://api.github.com/users/google","html_url":"https://github.com/google","followers_url":"https://api.github.com/users/google/followers","following_url":"https://api.github.com/users/google/following{/other_user}","gists_url":"https://api.github.com/users/google/gists{/gist_id}","starred_url":"https://api.github.com/users/google/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/google/subscriptions","organizations_url":"https://api.github.com/users/google/orgs","repos_url":"https://api.github.com/users/google/repos","events_url":"https://api.github.com/users/google/events{/privacy}","received_events_url":"https://api.github.com/users/google/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/google/protobuf","description":"Protocol Buffers - Google's data interchange format","fork":false,"url":"https://api.github.com/repos/google/protobuf","forks_url":"https://api.github.com/repos/google/protobuf/forks","keys_url":"https://api.github.com/repos/google/protobuf/keys{/key_id}","collaborators_url":"https://api.github.com/repos/google/protobuf/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/google/protobuf/teams","hooks_url":"https://api.github.com/repos/google/protobuf/hooks","issue_events_url":"https://api.github.com/repos/google/protobuf/issues/events{/number}","events_url":"https://api.github.com/repos/google/protobuf/events","assignees_url":"https://api.github.com/repos/google/protobuf/assignees{/user}","branches_url":"https://api.github.com/repos/google/protobuf/branches{/branch}","tags_url":"https://api.github.com/repos/google/protobuf/tags","blobs_url":"https://api.github.com/repos/google/protobuf/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/google/protobuf/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/google/protobuf/git/refs{/sha}","trees_url":"https://api.github.com/repos/google/protobuf/git/trees{/sha}","statuses_url":"https://api.github.com/repos/google/protobuf/statuses/{sha}","languages_url":"https://api.github.com/repos/google/protobuf/languages","stargazers_url":"https://api.github.com/repos/google/protobuf/stargazers","contributors_url":"https://api.github.com/repos/google/protobuf/contributors","subscribers_url":"https://api.github.com/repos/google/protobuf/subscribers","subscription_url":"https://api.github.com/repos/google/protobuf/subscription","commits_url":"https://api.github.com/repos/google/protobuf/commits{/sha}","git_commits_url":"https://api.github.com/repos/google/protobuf/git/commits{/sha}","comments_url":"https://api.github.com/repos/google/protobuf/comments{/number}","issue_comment_url":"https://api.github.com/repos/google/protobuf/issues/comments{/number}","contents_url":"https://api.github.com/repos/google/protobuf/contents/{+path}","compare_url":"https://api.github.com/repos/google/protobuf/compare/{base}...{head}","merges_url":"https://api.github.com/repos/google/protobuf/merges","archive_url":"https://api.github.com/repos/google/protobuf/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/google/protobuf/downloads","issues_url":"https://api.github.com/repos/google/protobuf/issues{/number}","pulls_url":"https://api.github.com/repos/google/protobuf/pulls{/number}","milestones_url":"https://api.github.com/repos/google/protobuf/milestones{/number}","notifications_url":"https://api.github.com/repos/google/protobuf/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/google/protobuf/labels{/name}","releases_url":"https://api.github.com/repos/google/protobuf/releases{/id}","deployments_url":"https://api.github.com/repos/google/protobuf/deployments","created_at":"2014-08-26T15:52:15Z","updated_at":"2016-02-12T19:44:15Z","pushed_at":"2016-02-12T21:32:25Z","git_url":"git://github.com/google/protobuf.git","ssh_url":"git@github.com:google/protobuf.git","clone_url":"https://github.com/google/protobuf.git","svn_url":"https://github.com/google/protobuf","homepage":"https://developers.google.com/protocol-buffers/","size":56253,"stargazers_count":7366,"watchers_count":7366,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":2187,"mirror_url":null,"open_issues_count":269,"forks":2187,"open_issues":269,"watchers":7366,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/google/protobuf/pulls/1215"},"html":{"href":"https://github.com/google/protobuf/pull/1215"},"issue":{"href":"https://api.github.com/repos/google/protobuf/issues/1215"},"comments":{"href":"https://api.github.com/repos/google/protobuf/issues/1215/comments"},"review_comments":{"href":"https://api.github.com/repos/google/protobuf/pulls/1215/comments"},"review_comment":{"href":"https://api.github.com/repos/google/protobuf/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/google/protobuf/pulls/1215/commits"},"statuses":{"href":"https://api.github.com/repos/google/protobuf/statuses/19f97b854d269ba13e05a605c891502975035720"}}}}