indexzero/node-pkginfo — pull request #4 by DamonOehlman (2012-05-03 13:34:02+00:00)
Title: Tweaked `pkginfo.find` behaviour

This is a small change which allows the `pkginfo.find` method to work correctly when using the `dir` option.

From inspecting the code I noticed the dir option but when I tried to use it pkginfo would fail. In the first instance it failed because it was always firing `path.dirname` on the supplied directory. While this is right behaviour when extracting the directory from the module.filename it does mean the directory that was initially specified is skipped in the search.

After implementing this functionality, I wrote a test to ensure the functionality was working correctly and noticed that no defaults for the `includes` option were specified if I provided the `dir` option, so this has been adjusted as well.

If I've missed anything, then please let me know and I'll be happy to fix it up appropriately.

Cheers,
Damon.