Skip to content

feat: support restart when project config changed#514

Merged
9aoy merged 1 commit intomainfrom
projects-restart
Aug 27, 2025
Merged

feat: support restart when project config changed#514
9aoy merged 1 commit intomainfrom
projects-restart

Conversation

@9aoy
Copy link
Copy Markdown
Collaborator

@9aoy 9aoy commented Aug 27, 2025

Summary

support restart when project config changed

image

Related Links

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

Copilot AI review requested due to automatic review settings August 27, 2025 07:52
@netlify
Copy link
Copy Markdown

netlify bot commented Aug 27, 2025

Deploy Preview for rstest-dev ready!

Name Link
🔨 Latest commit 6127c2c
🔍 Latest deploy log https://app.netlify.com/projects/rstest-dev/deploys/68aeb95a0324670008eb6354
😎 Deploy Preview https://deploy-preview-514--rstest-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 configFilePath property to ProjectContext type 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 configFilePath parameter 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.

@9aoy 9aoy merged commit cac00c7 into main Aug 27, 2025
17 checks passed
@9aoy 9aoy deleted the projects-restart branch August 27, 2025 08:40
@9aoy 9aoy mentioned this pull request Aug 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants