{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/jest/issues/411","labels_url":"https://api.github.com/repos/facebook/jest/issues/411/labels{/name}","comments_url":"https://api.github.com/repos/facebook/jest/issues/411/comments","events_url":"https://api.github.com/repos/facebook/jest/issues/411/events","html_url":"https://github.com/facebook/jest/issues/411","id":90255356,"number":411,"title":"HasteModuleLoader only implements a small subset of the Module properties","user":{"login":"bgw","id":180404,"avatar_url":"https://avatars.githubusercontent.com/u/180404?v=3","gravatar_id":"","url":"https://api.github.com/users/bgw","html_url":"https://github.com/bgw","followers_url":"https://api.github.com/users/bgw/followers","following_url":"https://api.github.com/users/bgw/following{/other_user}","gists_url":"https://api.github.com/users/bgw/gists{/gist_id}","starred_url":"https://api.github.com/users/bgw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bgw/subscriptions","organizations_url":"https://api.github.com/users/bgw/orgs","repos_url":"https://api.github.com/users/bgw/repos","events_url":"https://api.github.com/users/bgw/events{/privacy}","received_events_url":"https://api.github.com/users/bgw/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-06-23T01:06:19Z","updated_at":"2015-11-18T06:32:38Z","closed_at":"2015-11-18T06:32:38Z","body":"From https://github.com/joyent/node/blob/c146855f06f7c6ed41b53329a5d814e89b6eaa15/lib/module.js#L40-L52 :\r\n\r\n```js\r\nfunction Module(id, parent) {\r\n  this.id = id;\r\n  this.exports = {};\r\n  this.parent = parent;\r\n  if (parent && parent.children) {\r\n    parent.children.push(this);\r\n  }\r\n\r\n  this.filename = null;\r\n  this.loaded = false;\r\n  this.children = [];\r\n}\r\nmodule.exports = Module;\r\n```\r\n\r\nBut HasteModuleLoader [only seems to set `__filename` and `exports`](https://github.com/facebook/jest/blob/3afa11b04041644b61f882c849dbaaeba6b227c8/src/HasteModuleLoader/HasteModuleLoader.js#L892-L898):\r\n\r\n```js\r\nmoduleObj = {\r\n  __filename: modulePath,\r\n  exports: {}\r\n};\r\n```"},"comment":{"url":"https://api.github.com/repos/facebook/jest/issues/comments/157618258","html_url":"https://github.com/facebook/jest/issues/411#issuecomment-157618258","issue_url":"https://api.github.com/repos/facebook/jest/issues/411","id":157618258,"user":{"login":"cpojer","id":13352,"avatar_url":"https://avatars.githubusercontent.com/u/13352?v=3","gravatar_id":"","url":"https://api.github.com/users/cpojer","html_url":"https://github.com/cpojer","followers_url":"https://api.github.com/users/cpojer/followers","following_url":"https://api.github.com/users/cpojer/following{/other_user}","gists_url":"https://api.github.com/users/cpojer/gists{/gist_id}","starred_url":"https://api.github.com/users/cpojer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cpojer/subscriptions","organizations_url":"https://api.github.com/users/cpojer/orgs","repos_url":"https://api.github.com/users/cpojer/repos","events_url":"https://api.github.com/users/cpojer/events{/privacy}","received_events_url":"https://api.github.com/users/cpojer/received_events","type":"User","site_admin":false},"created_at":"2015-11-18T06:32:38Z","updated_at":"2015-11-18T06:32:38Z","body":"We actually add more stuff than just those two fields and we should have all the info that we need there. I recently added `parent` but it is only a stub module. `module.parent` sucks."}}