You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 128035e
Browse filesBrowse the repository at this point in the historyBrowse files
fix(filesystem): match a bare exclude name at any depth in search_files
`search_files` matched `excludePatterns` with a single `minimatch` against the
path relative to the searched root, while `directory_tree` also matches a bare
name at any depth (`**/<name>`) and the subtree below it (`**/<name>/**`). A
caller that passed `["node_modules"]` therefore pruned a top-level
`node_modules` but still walked into `packages/a/node_modules` and returned the
files inside it, and the two tools disagreed about the same argument.
The predicate now lives in `isExcludedPath` in lib.ts and both tools use it, so
`search_files` and `directory_tree` read `excludePatterns` the same way.
Wildcard patterns keep their existing meaning: they are matched against the
relative path exactly as written.
Signed-off-by: xubenqiang <[email protected]>
`search_files` now reads `excludePatterns` the same way `directory_tree` does: a bare name such as `"node_modules"` also excludes an entry with that name at any depth and the whole subtree below it, instead of only matching it at the searched root. Previously `excludePatterns: ["node_modules"]` pruned a top-level `node_modules` but still descended into `packages/a/node_modules` and returned its files.
0 commit comments