Commit 8ace3f5
Prevent unnecessary outer directory searches (#1082)
* Prevent unnecessary outer directory searches
Without the added checks, every directory in a source path would be scanned even when the project files have already been found. This can cause avoidable permission errors and thus typedoc to break on out-of-the-box builds for the simplest of projects.
* Stops the search when readme.md and package.json are found.
* Stops the search when `--readme = none` and package.json is found.
* simplify logic
While this commit was taken from the pro-src/master branch, I've
made some changes as appropriate:
- Dropped the specs changes as it seemed unrelated to the test failures
- Fixed bug in `reachedTopDirectory` where it appeared to be
accidentally inversed
- Fixed merge issues1 parent 73a13dd commit 8ace3f5
1 file changed
+11
-15
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
86 | 90 | | |
87 | 91 | | |
88 | 92 | | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | 93 | | |
93 | 94 | | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
| 95 | + | |
| 96 | + | |
101 | 97 | | |
102 | | - | |
103 | | - | |
| 98 | + | |
| 99 | + | |
104 | 100 | | |
105 | 101 | | |
106 | 102 | | |
107 | | - | |
| 103 | + | |
108 | 104 | | |
109 | 105 | | |
110 | 106 | | |
111 | 107 | | |
112 | 108 | | |
113 | | - | |
114 | | - | |
| 109 | + | |
| 110 | + | |
115 | 111 | | |
116 | 112 | | |
117 | 113 | | |
| |||
0 commit comments