fgnass/node-dev — pull request #38 by aseemk (2012-07-23 22:33:24+00:00)
Title: Fix main module shimming for inferred extensions

The native `node` binary, just like `require()`, allows specifying paths that aren't directly to the file; they can point to a folder or just the filename without the extension.

`node-dev` runs those files fine, but it just wasn't detecting the "main" module in those cases. Fixed by checking `module.parent` instead of using the passed-in path.

Added a simple test case; try e.g. `node-dev test/main`.