{"action":"created","issue":{"url":"https://api.github.com/repos/firebase/firepad/issues/251","repository_url":"https://api.github.com/repos/firebase/firepad","labels_url":"https://api.github.com/repos/firebase/firepad/issues/251/labels{/name}","comments_url":"https://api.github.com/repos/firebase/firepad/issues/251/comments","events_url":"https://api.github.com/repos/firebase/firepad/issues/251/events","html_url":"https://github.com/firebase/firepad/issues/251","id":161221463,"number":251,"title":"1.4.0 broken in node.js","user":{"login":"mikelehen","id":206364,"avatar_url":"https://avatars.githubusercontent.com/u/206364?v=3","gravatar_id":"","url":"https://api.github.com/users/mikelehen","html_url":"https://github.com/mikelehen","followers_url":"https://api.github.com/users/mikelehen/followers","following_url":"https://api.github.com/users/mikelehen/following{/other_user}","gists_url":"https://api.github.com/users/mikelehen/gists{/gist_id}","starred_url":"https://api.github.com/users/mikelehen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikelehen/subscriptions","organizations_url":"https://api.github.com/users/mikelehen/orgs","repos_url":"https://api.github.com/users/mikelehen/repos","events_url":"https://api.github.com/users/mikelehen/events{/privacy}","received_events_url":"https://api.github.com/users/mikelehen/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2016-06-20T15:19:31Z","updated_at":"2016-09-18T09:47:02Z","closed_at":null,"body":"Looks like somehow a dependency on 'window' snuck in.\r\n\r\n~/tmp/fp  $ npm install firepad@1.4.0\r\nfirepad@1.4.0 node_modules/firepad\r\n├── jsdom@9.2.1 (acorn-globals@1.0.9, webidl-conversions@3.0.1, array-equal@1.0.0, sax@1.2.1, abab@1.0.3, xml-name-validator@2.0.1, symbol-tree@3.1.4, tough-cookie@2.2.2, nwmatcher@1.3.8, cssom@0.3.1, iconv-lite@0.4.13, parse5@1.5.1, acorn@2.7.0, whatwg-url@3.0.0, escodegen@1.8.0, request@2.72.0, cssstyle@0.2.36)\r\n└── firebase@3.0.5 (rsvp@3.2.1, faye-websocket@0.9.3, jsonwebtoken@5.7.0)\r\n\r\n~/tmp/fp  $ node -e \"require('firepad')\"\r\n/Users/mikelehen/tmp/fp/node_modules/firepad/dist/firepad.min.js:13\r\n!function(a,b,c){\"undefined\"!=typeof module&&module.exports?module.exports=b():\"function\"==typeof c.define&&c.define.amd?define(b):c[a]=b()}(\"Firepad\",function(){var a=a||{};a.utils={},a.utils.makeEventEmitter=function(a,b){a.prototype.allowedEvents_=b,a.prototype.on=function(a,b,c){this.validateEventType_(a),this.eventListeners_=this.eventListeners_||{},this.eventListeners_[a]=this.eventListeners_[a]||[],this.eventListeners_[a].push({callback:b,context:c})},a.prototype.off=function(a,b){this.validateEventType_(a),this.eventListeners_=this.eventListeners_||{};for(var c=this.eventListeners_[a]||[],d=0;d<c.length;d++)if(c[d].callback===b)return void c.splice(d,1)},a.prototype.trigger=function(a){this.eventListeners_=this.eventListeners_||{};for(var b=this.eventListeners_[a]||[],c=0;c<b.length;c++)b[c].callback.apply(b[c].context,Array.prototype.slice.call(arguments,1))},a.prototype.validateEventType_=function(a){if(this.allowedEvents_){for(va\r\n\r\nReferenceError: window is not defined\r\n    at /Users/mikelehen/tmp/fp/node_modules/firepad/dist/firepad.min.js:13:17964\r\n    at /Users/mikelehen/tmp/fp/node_modules/firepad/dist/firepad.min.js:13:23320\r\n    at a (/Users/mikelehen/tmp/fp/node_modules/firepad/dist/firepad.min.js:13:76)\r\n    at Object.<anonymous> (/Users/mikelehen/tmp/fp/node_modules/firepad/dist/firepad.min.js:13:141)\r\n    at Module._compile (module.js:435:26)\r\n    at Object.Module._extensions..js (module.js:442:10)\r\n    at Module.load (module.js:356:32)\r\n    at Function.Module._load (module.js:311:12)\r\n    at Module.require (module.js:366:17)\r\n    at require (module.js:385:17)"},"comment":{"url":"https://api.github.com/repos/firebase/firepad/issues/comments/247838001","html_url":"https://github.com/firebase/firepad/issues/251#issuecomment-247838001","issue_url":"https://api.github.com/repos/firebase/firepad/issues/251","id":247838001,"user":{"login":"prescottprue","id":2992224,"avatar_url":"https://avatars.githubusercontent.com/u/2992224?v=3","gravatar_id":"","url":"https://api.github.com/users/prescottprue","html_url":"https://github.com/prescottprue","followers_url":"https://api.github.com/users/prescottprue/followers","following_url":"https://api.github.com/users/prescottprue/following{/other_user}","gists_url":"https://api.github.com/users/prescottprue/gists{/gist_id}","starred_url":"https://api.github.com/users/prescottprue/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prescottprue/subscriptions","organizations_url":"https://api.github.com/users/prescottprue/orgs","repos_url":"https://api.github.com/users/prescottprue/repos","events_url":"https://api.github.com/users/prescottprue/events{/privacy}","received_events_url":"https://api.github.com/users/prescottprue/received_events","type":"User","site_admin":false},"created_at":"2016-09-18T09:47:02Z","updated_at":"2016-09-18T09:47:02Z","body":"Created [this PR](https://github.com/firebase/firepad/pull/262). All it took was a removing a reference to `window.firebase` (not sure why this was added).\r\n\r\nUsing this code everything appears to be working on NodeJS and in Browser, but not sure if there is some unforeseen reason this code was needed."}}
{"actor":{"display_login":"prescottprue"}}