feat: support restart when project config changed#514
Merged
Conversation
✅ Deploy Preview for rstest-dev ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds support for restarting the test runner when project configuration files change. The changes introduce tracking of configuration file paths at both the main and project levels, and extend the file watching mechanism to monitor multiple config files for changes.
- Adds
configFilePathproperty toProjectContexttype to track individual project config files - Updates restart functionality to watch multiple config files and display relative file paths in restart messages
- Modifies the entry plugin to use project-specific config file paths for watch exclusions
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| packages/core/src/types/core.ts | Adds optional configFilePath property to ProjectContext type |
| packages/core/src/core/rstest.ts | Populates configFilePath in project contexts for both multi-project and single-project scenarios |
| packages/core/src/core/rsbuild.ts | Updates plugin call to pass full context instead of just config file path |
| packages/core/src/core/restart.ts | Enhances restart logic to watch multiple config files and show relative paths in messages |
| packages/core/src/core/plugins/entry.ts | Updates entry plugin to find project-specific config file paths for watch exclusions |
Comments suppressed due to low confidence (1)
packages/core/src/core/plugins/entry.ts:34
- The
configFilePathparameter is no longer used in the function implementation but remains in the type definition. This should be removed to avoid confusion and maintain API consistency.
export const pluginEntryWatch: (params: {
context: RstestContext;
globTestSourceEntries: (name: string) => Promise<Record<string, string>>;
setupFiles: Record<string, Record<string, string>>;
isWatch: boolean;
configFilePath?: string;
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
support restart when project config changed
Related Links
Checklist