mirror of
https://github.com/colbymchenry/codegraph.git
synced 2026-10-26 12:30:04 +08:00
fix(astro): the component name heuristic applies to .astro files only (#2245)
Astro components are used in Astro markup; a .ts / .d.ts type name sharing a component's name (Playwright's Page, a declaration file's Image) is no component. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
000c986276
commit
b2afa75f08
@@ -74,7 +74,10 @@ export const astroResolver: FrameworkResolver = {
|
||||
// Pattern 3: Component references (PascalCase) — resolve to component
|
||||
// nodes. Template tags arrive as `references`, frontmatter expression
|
||||
// usages as `calls`.
|
||||
// Only from Astro markup: a `.ts` file's `Page` (Playwright's) or a
|
||||
// declaration file's `image?: Image` is no `Page.astro` / `Image.astro`.
|
||||
if (
|
||||
ref.filePath.endsWith('.astro') &&
|
||||
isPascalCase(ref.referenceName) &&
|
||||
(ref.referenceKind === 'references' || ref.referenceKind === 'calls')
|
||||
) {
|
||||
|
||||
Reference in New Issue
Block a user