{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/jest/issues/374","labels_url":"https://api.github.com/repos/facebook/jest/issues/374/labels{/name}","comments_url":"https://api.github.com/repos/facebook/jest/issues/374/comments","events_url":"https://api.github.com/repos/facebook/jest/issues/374/events","html_url":"https://github.com/facebook/jest/pull/374","id":78807708,"number":374,"title":"[io.js] Update jsdom and get jest working on io.js","user":{"login":"ide","id":379606,"avatar_url":"https://avatars.githubusercontent.com/u/379606?v=3","gravatar_id":"","url":"https://api.github.com/users/ide","html_url":"https://github.com/ide","followers_url":"https://api.github.com/users/ide/followers","following_url":"https://api.github.com/users/ide/following{/other_user}","gists_url":"https://api.github.com/users/ide/gists{/gist_id}","starred_url":"https://api.github.com/users/ide/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ide/subscriptions","organizations_url":"https://api.github.com/users/ide/orgs","repos_url":"https://api.github.com/users/ide/repos","events_url":"https://api.github.com/users/ide/events{/privacy}","received_events_url":"https://api.github.com/users/ide/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/facebook/jest/labels/CLA%20Signed","name":"CLA Signed","color":"009900"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2015-05-21T03:36:05Z","updated_at":"2015-06-02T14:36:27Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/facebook/jest/pulls/374","html_url":"https://github.com/facebook/jest/pull/374","diff_url":"https://github.com/facebook/jest/pull/374.diff","patch_url":"https://github.com/facebook/jest/pull/374.patch"},"body":"This gets jest working on io.js 1.8.x and 2.0.x. io.js is reconciling with the Node Foundation so users who are still on Node are on the upgrade path that converges with io.js anyway. What this means is the jest version probably should be bumped to 0.5.0, where 0.4.x is a maintenance branch for legacy Node (typically with semver, a major version bump is required but 0.x.x releases are considered a free-for-all).\r\n\r\nThis diff is near the minimal amount of work to bring jest up to date and pass all of its tests.\r\n\r\n - Upgraded npm dependencies. The major update is jsdom from 0.10.3 to 5.4.3. This lets us drop the indirect contextify dependency.\r\n - Removed harmonize, since io.js uses modern V8 and enables stable ES6 features by default\r\n - Removed the `--harmony` flag from the TestRunner for the same reason (trivia: i added that line once upon a time, let me delete it)\r\n - Replaced jsdom's `run` with io.js's built-in `vm` module\r\n - Added support for curried arguments in the fake `nextTick` implementation, which io.js itself relies on\r\n - Updated the HasteModuleLoader to handle Node built-in modules before `node_modules` -- this fixes an issue I was getting with graceful-fs trying to require smalloc.\r\n - Patched coffeescript to use Array.isArray instead of `instanceof Array`. Working on getting that merged upstream.\r\n\r\nFixes #267 \r\n\r\nTest Plan:\r\n```\r\nnvm install iojs-1\r\nrm -fr node_modules && npm install\r\n\r\nnvm install iojs-2\r\nrm -fr node_modules && npm install\r\n```"},"comment":{"url":"https://api.github.com/repos/facebook/jest/issues/comments/107975050","html_url":"https://github.com/facebook/jest/pull/374#issuecomment-107975050","issue_url":"https://api.github.com/repos/facebook/jest/issues/374","id":107975050,"user":{"login":"domenic","id":617481,"avatar_url":"https://avatars.githubusercontent.com/u/617481?v=3","gravatar_id":"","url":"https://api.github.com/users/domenic","html_url":"https://github.com/domenic","followers_url":"https://api.github.com/users/domenic/followers","following_url":"https://api.github.com/users/domenic/following{/other_user}","gists_url":"https://api.github.com/users/domenic/gists{/gist_id}","starred_url":"https://api.github.com/users/domenic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/domenic/subscriptions","organizations_url":"https://api.github.com/users/domenic/orgs","repos_url":"https://api.github.com/users/domenic/repos","events_url":"https://api.github.com/users/domenic/events{/privacy}","received_events_url":"https://api.github.com/users/domenic/received_events","type":"User","site_admin":false},"created_at":"2015-06-02T14:36:27Z","updated_at":"2015-06-02T14:36:27Z","body":"@ide looking at the gist, isn't it possible to avoid the stringify and eval (and maybe the trip through the resource loader)? I am not sure all of the contexts in which runSourceText is used, but I think the main place is via runContentWithLocalBindings, which always returns source text for a wrapper function. That would I think allow something like\r\n\r\n```js\r\n  var tempVariable = '_' + uuid().replace(/-/g, '_');\r\n  this._scriptToServe = 'var ' + tempVariable + ' = ' + sourceText + '()';\r\n```\r\n\r\nIt's not 100% clear to me why you need the filename either (which is why the round trip through the resource loader is necessary), but maybe it is important for stack traces or similar."}}