nodejitsu/require-analyzer — pull request #39 by mmalecki (2011-10-17 12:50:52+00:00)
Title: Fix native dependency detection

Using `process.binding('natives')` lists *real* native packages - like `tty_uv` and `net_uv`, but doesn't list aliases like `net`. Using `require.resolve` instead fixes that - for built-in packages `require.resolve(builtIn) == builtIn`, while for external dependencies it returns path or throws (if resolve failed).

Test included.