Skip to content

Make file system watcher framework-agnostic #39

@jaspervdveen

Description

@jaspervdveen

Problem

The current file system watcher in the plugin uses a default StrykerJs glob pattern which can be configured in the settings. This is not framework-agnostic and risks either missing relevant file events or monitoring irrelevant ones. Since supported files, folders, and extensions can vary depending on the framework or project configuration, the watcher needs to adapt accordingly.

Considered Solutions

  1. Use glob patterns from the MSP configure response
    Pros: Matches the exact files defined by the framework.
    Cons: Glob syntax differs between tools (e.g., Stryker vs. VS Code), making translation and maintenance complex.

  2. Use supported file extensions from the MSP configure response
    Pros: Simple to implement, framework-agnostic.
    Cons: May monitor unnecessary folders/files if they contain supported extensions, which could impact performance.

Proposed Solution
Go with Option 2: watch files based on extensions returned from the configure method.

  • It avoids framework-specific glob syntax.
  • Easier to implement for both client and server.
  • While it may result in watching more files than strictly necessary, this is an acceptable tradeoff I think. Optimizing further would be premature at this stage.

Metadata

Metadata

Assignees

No one assigned

    Labels

    hacktoberfesthttps://hacktoberfest.digitalocean.com

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions