Currently, only available package.json file paths are cached per scanned directory. However, it would be good to all cache resolved parent package directories for when the includeParents option is enabled. This would help to avoid needless FS traversals to resolve parent package directories for repeat callers and should therefore boost performance.
I suspect that this cache should also be cleared when clearCache is called. It will probably need to be in order to meet our code coverage metrics.
Currently, only available
package.jsonfile paths are cached per scanned directory. However, it would be good to all cache resolved parent package directories for when theincludeParentsoption is enabled. This would help to avoid needless FS traversals to resolve parent package directories for repeat callers and should therefore boost performance.I suspect that this cache should also be cleared when
clearCacheis called. It will probably need to be in order to meet our code coverage metrics.