Skip to content

fix(cli): fix page files watching and add .git as default for monorepos#1685

Open
Mister-Hope wants to merge 1 commit intomainfrom
page-watcher
Open

fix(cli): fix page files watching and add .git as default for monorepos#1685
Mister-Hope wants to merge 1 commit intomainfrom
page-watcher

Conversation

@Mister-Hope
Copy link
Member

No description provided.

Copilot AI review requested due to automatic review settings March 11, 2026 09:38
@Mister-Hope
Copy link
Member Author

Adding .git to default is necessary if users are using a git submodule as a docs directory.

The page watcher will walk completely throught .git/indexes.

Copy link

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

Updates VuePress defaults and dev-mode file watching to better handle monorepos by ignoring .git, and refines the chokidar ignored-path matching logic to avoid unnecessary directory traversal.

Changes:

  • Add !.git to the default pagePatterns in core app options.
  • Update core test expectations for the new default pagePatterns.
  • Adjust CLI dev page-file watcher ignore logic to match ignore patterns against relative paths.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
packages/core/tests/app/resolveAppOptions.spec.ts Updates the default options test to expect !.git in pagePatterns.
packages/core/src/app/resolveAppOptions.ts Adds !.git to the runtime default pagePatterns.
packages/cli/src/commands/dev/watchPageFiles.ts Refines ignored matching to use a consistent relative path for ignore/page matchers.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +44 to 45
pagePatterns = ['**/*.md', '!.vuepress', '!node_modules', '!.git'],
permalinkPattern = null,
Copy link

Copilot AI Mar 11, 2026

Choose a reason for hiding this comment

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

The default pagePatterns has been updated here to include !.git, but the AppConfigCommon.pagePatterns JSDoc still documents the old default (missing !.git). Please update the JSDoc default in packages/core/src/types/app/options.ts to keep the public type docs consistent with runtime defaults.

Copilot uses AI. Check for mistakes.
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.

2 participants