Commit 5bf19d8
committed
Fix .rooignore not working for .next folders in nested projects
Fixes #4647
The issue was that the listFiles function was using a blanket '.*' pattern
to exclude all hidden directories (directories starting with a dot) at the
ripgrep level, before the RooIgnoreController could process them.
This meant that .next folders were being filtered out during file discovery,
preventing the .rooignore patterns from working correctly for these directories.
Changes:
- Replaced the generic '.*' pattern in DIRS_TO_IGNORE with specific patterns
for common hidden directories (.git, .svn, .hg, .bzr, .vscode, .idea)
- Removed special handling for the '.*' pattern in directory filtering logic
- Added test case to verify .next folders can now be properly controlled via .rooignore
This allows users to specify patterns like 'example-nextjs/.next/' in their
.rooignore file and have them work as expected, while still filtering out
common hidden directories that should typically be ignored.1 parent ca0338a commit 5bf19d8
File tree
2 files changed
+36
-14
lines changed- src
- core/ignore/__tests__
- services/glob
2 files changed
+36
-14
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
215 | 215 | | |
216 | 216 | | |
217 | 217 | | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
218 | 245 | | |
219 | 246 | | |
220 | 247 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
30 | 35 | | |
31 | 36 | | |
32 | 37 | | |
| |||
156 | 161 | | |
157 | 162 | | |
158 | 163 | | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
167 | 167 | | |
168 | 168 | | |
169 | 169 | | |
| |||
237 | 237 | | |
238 | 238 | | |
239 | 239 | | |
240 | | - | |
241 | | - | |
242 | | - | |
243 | | - | |
244 | | - | |
245 | 240 | | |
246 | 241 | | |
247 | 242 | | |
| |||
0 commit comments