Skip to content

fix: match build watch ignore by path segment - #925

Open
AyobamiH wants to merge 1 commit into
fastify:mainfrom
AyobamiH:fix/717-watch-build-directory
Open

AyobamiH wants to merge 1 commit into
fastify:mainfrom
AyobamiH:fix/717-watch-build-directory

Conversation

@AyobamiH

@AyobamiH AyobamiH commented Oct 5, 2026

Copy link
Copy Markdown

Fixes #717.

The watcher currently compiles the default ignore entries into a single regular expression. Because build is included as an unbounded alternative, it matches the substring anywhere in a watched path. This causes projects with names such as any-builder, as well as directories such as builders, to be ignored.

This change treats the literal build ignore entry as a path segment instead.

With this change:

  • build/app.js remains ignored
  • src/build/app.js remains ignored
  • Windows build directory paths remain ignored
  • any-builder/app.js is watched
  • builders/app.js is watched

The change is deliberately limited to the build token. Existing custom --ignore-watch expressions retain their current behaviour.

Regression coverage includes both POSIX and Windows path separators.

Checklist

  • run npm run test && npm run benchmark --if-present
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message and code follows the Developer's Certification of Origin and Code of Conduct

Documentation is not changed because this fixes the matching semantics of an existing documented default rather than changing the CLI interface or its documented default value.

Signed-off-by: Ayobami Haastrup <47716486+AyobamiH@users.noreply.github.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Watcher is not working on builders

1 participant