substack/node-resolve — pull request #31 by ef4 (2013-08-07 02:14:09+00:00)
Title: Fix default basedir calculation

Using the `require.cache` to identify which module is calling us is not reliable. It will always tell you what the *first* module to require us was, not the module that's currently calling.

This change uses the V8 stack trace API to identify the real current caller.