{"action":"created","issue":{"url":"https://api.github.com/repos/cjohansen/Sinon.JS/issues/834","labels_url":"https://api.github.com/repos/cjohansen/Sinon.JS/issues/834/labels{/name}","comments_url":"https://api.github.com/repos/cjohansen/Sinon.JS/issues/834/comments","events_url":"https://api.github.com/repos/cjohansen/Sinon.JS/issues/834/events","html_url":"https://github.com/cjohansen/Sinon.JS/issues/834","id":105857142,"number":834,"title":"Use CommonJS","user":{"login":"mroderick","id":20321,"avatar_url":"https://avatars.githubusercontent.com/u/20321?v=3","gravatar_id":"","url":"https://api.github.com/users/mroderick","html_url":"https://github.com/mroderick","followers_url":"https://api.github.com/users/mroderick/followers","following_url":"https://api.github.com/users/mroderick/following{/other_user}","gists_url":"https://api.github.com/users/mroderick/gists{/gist_id}","starred_url":"https://api.github.com/users/mroderick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mroderick/subscriptions","organizations_url":"https://api.github.com/users/mroderick/orgs","repos_url":"https://api.github.com/users/mroderick/repos","events_url":"https://api.github.com/users/mroderick/events{/privacy}","received_events_url":"https://api.github.com/users/mroderick/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/cjohansen/Sinon.JS/labels/Difficulty:%20Medium","name":"Difficulty: Medium","color":"bfdadc"},{"url":"https://api.github.com/repos/cjohansen/Sinon.JS/labels/Help%20wanted","name":"Help wanted","color":"0052cc"},{"url":"https://api.github.com/repos/cjohansen/Sinon.JS/labels/Needs%20investigation","name":"Needs investigation","color":"207de5"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-09-10T17:23:54Z","updated_at":"2015-09-15T19:53:30Z","closed_at":null,"body":"We would like to get rid of the UMD like wrapper in source files and adopt CommonJS in the entire codebase (for near future at least).\r\n\r\nFor this to happen there are are number of things that we need to do\r\n\r\n- [ ] convert all the files to use CommonJS\r\n- [ ] create UMD wrapped pre-built version(s) using Browserify / webbpack or similar\r\n- [ ] run all tests for source version in node\r\n- [ ] run all tests for built version(s) in PhantomJS (as a minimum)\r\n\r\nMaking the switch to CommonJS is not a small task, there are many dependencies to manage and the current toolchain is not very forgiving.\r\n\r\nI am probably forgetting half the complexities, so expect this issue to be expanded, when I do remember.\r\n\r\nIf you have any ideas on how we can get towards CommonJS incrementally, please speak up!"},"comment":{"url":"https://api.github.com/repos/cjohansen/Sinon.JS/issues/comments/140518114","html_url":"https://github.com/cjohansen/Sinon.JS/issues/834#issuecomment-140518114","issue_url":"https://api.github.com/repos/cjohansen/Sinon.JS/issues/834","id":140518114,"user":{"login":"cjohansen","id":32871,"avatar_url":"https://avatars.githubusercontent.com/u/32871?v=3","gravatar_id":"","url":"https://api.github.com/users/cjohansen","html_url":"https://github.com/cjohansen","followers_url":"https://api.github.com/users/cjohansen/followers","following_url":"https://api.github.com/users/cjohansen/following{/other_user}","gists_url":"https://api.github.com/users/cjohansen/gists{/gist_id}","starred_url":"https://api.github.com/users/cjohansen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cjohansen/subscriptions","organizations_url":"https://api.github.com/users/cjohansen/orgs","repos_url":"https://api.github.com/users/cjohansen/repos","events_url":"https://api.github.com/users/cjohansen/events{/privacy}","received_events_url":"https://api.github.com/users/cjohansen/received_events","type":"User","site_admin":false},"created_at":"2015-09-15T19:53:30Z","updated_at":"2015-09-15T19:53:30Z","body":"Nice to hear that you want to look at it. FYI: We've previously discussed using Browserify, and that is still what I am the most keen on, simply because I know it well, and I have zero experience with webpack. I'm not even sure if this affects the coding work, but is there any reason to prefer one over the other?\r\n\r\nThe Ruby \"build system\" is definitely going away. The sooner the better.\r\n\r\nThere's a couple things that you can currently just \"stick\" on the `sinon` object to have magic things happen. These include `sinon.config` and `sinon.log`. I'm not sure how that'll work in a CommonJS world - probably it won't work at all. `sinon.config` will not be missed. It's used to set defaults for the fake timers and fake XHR."}}