Skip to content

feat: add Vue support#66

Open
abhijeetj100 wants to merge 1 commit intocolbymchenry:mainfrom
abhijeetj100:feat/support-vue
Open

feat: add Vue support#66
abhijeetj100 wants to merge 1 commit intocolbymchenry:mainfrom
abhijeetj100:feat/support-vue

Conversation

@abhijeetj100
Copy link
Copy Markdown

@abhijeetj100 abhijeetj100 commented Mar 25, 2026

This pull request adds comprehensive support for Vue Single-File Components (SFCs) to the code extraction and analysis pipeline. It introduces a new VueExtractor class that can parse .vue files, extract component and function nodes from both standard and <script setup> blocks, and integrate them into the existing code relationship graph. Additionally, the PR updates language detection, grammar support, and framework resolution to recognize and process Vue files throughout the system. Extensive tests are included to verify correct extraction behavior for various Vue SFC patterns.

The most important changes are:

Vue Extraction Support

  • Added a new VueExtractor class to parse .vue files, extract component nodes, delegate script parsing to the TypeScript/JavaScript extractor, and create containment edges between components and their script nodes. This enables accurate modeling of Vue SFCs in the code graph.
  • Updated extractFromSource to use the new VueExtractor when a .vue file is detected, ensuring all Vue files are processed with the appropriate logic.

Language and Grammar Integration

  • Updated language detection, extension mapping, and grammar support to recognize .vue files as the vue language, and ensured all relevant utility functions (e.g., isLanguageSupported, isGrammarLoaded, getSupportedLanguages, getLanguageDisplayName) include vue. [1] [2] [3] [4] [5]

Framework Resolution

  • Added a vueResolver to the framework resolution system and included it in the list of available framework resolvers, enabling Vue-specific relationship resolution. [1] [2] [3]

Testing

  • Added a comprehensive suite of tests for Vue extraction, covering detection, extraction from different script block types, template-only components, and containment relationships between component and script/function nodes.

PS: This is my first contribution to the project. Please let me know if any part of this PR deviates from your established standards—I’m happy to make any necessary adjustments to align with the codebase.

CC: @colbymchenry

Related issue: #51

@abhijeetj100 abhijeetj100 mentioned this pull request Mar 26, 2026
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.

1 participant