Use properly anchored regex patterns for node_modules and .git

Co-authored-by: whyour <22700758+whyour@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot] 2026-01-29 11:36:08 +00:00
parent 3f880e6610
commit 5a66cdbf17

View File

@ -67,8 +67,8 @@ export default async (src: string = 'deps') => {
const watcher = chokidar.watch(source, {
ignored: [
/(^|[\/\\])\../, // ignore dotfiles
/node_modules/, // ignore node_modules
/\.git/, // ignore .git
/(^|[\/\\])node_modules([\/\\]|$)/, // ignore node_modules
/(^|[\/\\])\.git([\/\\]|$)/, // ignore .git
],
persistent: true,
});