I was running into an issue with the -i flag, and TBH I'm not sure how it ever actually worked without causing an infinite loop
The recursive call in importProfiler() was passing the same set of files as the top call, so the set never got smaller and the recursion never stopped.
This commit also introduces a small optimization to stop looking for the node_modules dir once its been found.
I was running into an issue with the
-i
flag, and TBH I'm not sure how it ever actually worked without causing an infinite loopThe recursive call in
importProfiler()
was passing the same set of files as the top call, so the set never got smaller and the recursion never stopped.This commit also introduces a small optimization to stop looking for the
node_modules
dir once its been found.