Add .vuepress to the hidden source-dir allowlist

Cursor Bugbot correctly noted classic VuePress keeps theme layouts,
components, and styles under .vuepress/, which the walker scanned before
the hidden-dir rule. Same treatment as .vitepress and .storybook.

Prepared with AI assistance (Claude Code), directed by @pbakaus.

Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
Paul Bakaus
2026-07-25 18:15:13 -07:00
co-authored by Claude Code
parent a1a6441ba1
commit aeacf55074
3 changed files with 7 additions and 4 deletions
+4 -3
View File
@@ -18,9 +18,10 @@ const SKIP_DIRS = new Set([
// The exceptions to the hidden-dir rule: hidden directories that
// conventionally hold real UI source rather than tooling or vendored code.
// VitePress keeps custom theme components in .vitepress/theme/*.vue, and
// Storybook keeps preview decorators/styles in .storybook/.
const HIDDEN_SOURCE_DIRS = new Set(['.vitepress', '.storybook']);
// VitePress and VuePress keep custom theme components in
// .vitepress/theme/*.vue / .vuepress/theme/, and Storybook keeps preview
// decorators/styles in .storybook/.
const HIDDEN_SOURCE_DIRS = new Set(['.vitepress', '.vuepress', '.storybook']);
const SCANNABLE_EXTENSIONS = new Set([
'.html', '.htm', '.css', '.scss', '.sass', '.less',
+1 -1
View File
@@ -168,7 +168,7 @@ function isVendoredPath(rel) {
const dirSegments = rel.split(/[\\/]/).slice(0, -1);
return dirSegments.some(
(seg) =>
(seg.startsWith('.') && seg !== '.vitepress' && seg !== '.storybook') ||
(seg.startsWith('.') && seg !== '.vitepress' && seg !== '.vuepress' && seg !== '.storybook') ||
seg === 'node_modules' || seg === 'dist' || seg === 'build' || seg === '__pycache__',
);
}
+2
View File
@@ -1850,11 +1850,13 @@ describe('walkDir', () => {
// exception: VitePress themes and Storybook preview files must keep
// being scanned (they were before the hidden-dir rule existed).
write('.vitepress/theme/Layout.vue');
write('.vuepress/theme/Layout.vue');
write('.storybook/preview.css');
const files = walkDir(tmp).sort();
expect(files).toEqual([
path.join(tmp, '.storybook', 'preview.css'),
path.join(tmp, '.vitepress', 'theme', 'Layout.vue'),
path.join(tmp, '.vuepress', 'theme', 'Layout.vue'),
path.join(tmp, 'src', 'app.css'),
]);
} finally {