[New] Add isDirectory; use to speed up node_modules lookups#192
Conversation
Backport of 698a3e1 to 1.x without the breaking change. See browserify#154.
This is a backport of 4cf8928 and fa11d48 (browserify#190 and browserify#191) to the 1.x branch. This offers a small but useful performance improvement by avoiding unnecessary stat calls.
|
698a3e1 was a breaking change, which is why it wasn't backported; it seems strange to have an |
|
Yes, I had realised that the checking of basedir was a breaking change. We can remove the The readme does not allude to why this module needs these options, it just specifies what they do; therefore it seems to me they are a power-user feature and so users would need to read the code to see how they're used anyway. It would perhaps violate the principle of least surprise to see it used in more places from the jump from 1.x to 2.x but... semver major, caveat emptor. |
7b166f2 to
d2816d8
Compare
This is a backport of 4cf8928 and fa11d48 (#190 and #191) to the 1.x branch.
This adds the
isDirectoryoption which is needed to drive the directory lookups.This offers a small but useful performance improvement by avoiding unnecessary stat calls.
Because of the added option this is a MINOR change.
Refs #116