Description
Hi Node Core Team!
First of all, Thanks so much for making such an awesome thing!
Second, I'm currently working on developing something to make hooking require easier, it's called pirates. (I think very strongly that the node core should have an official way of hooking require, as it's a rather common thing to do, and very frequently done wrong, and maybe even worth bending the rules for 😉, but I know the module system is locked and off limits, so...).
As of right now, I'm trying to improve the tests (see danez/pirates#5). I wanted to do this with mock-fs
, which overrides some methods of the fs module to be backed by a memory-based file system.
However, I discovered that module.js uses the fs binding directly to detect if file exist, despite using fs to actually read the file. I'm sure there's a good reason behind this that I'm just not smart enough to figure out, but for learning purposes, what is it? If there's no reason, would anyone object to me switching it (assuming the tests pass, of course)?
Thanks!
Activity