Add support for JavaScript JSX files (.jsx)#674
Open
redlotusaustin wants to merge 2 commits intoCodeGraphContext:mainfrom
Open
Add support for JavaScript JSX files (.jsx)#674redlotusaustin wants to merge 2 commits intoCodeGraphContext:mainfrom
redlotusaustin wants to merge 2 commits intoCodeGraphContext:mainfrom
Conversation
Fixes CodeGraphContext#468 - Add .jsx extension support using JavaScript parser (already handles JSX syntax) - Add TSX language support using dedicated tsx parser (fixes JSX parsing errors) - Add tsx to LANGUAGE_ALIASES in tree_sitter_manager.py - Register TypescriptJSXTreeSitterParser for .tsx files in graph_builder.py - Fix import ordering in typescriptjsx.py (imports must be at top of file) - Optimize typescriptjsx.py: combine 6 queries into 1 in pre_scan_typescript - Optimize typescriptjsx.py: combine 4 queries into 1 in _find_react_components - Add comprehensive sample_jsx.jsx test fixture - Add 7 unit tests for JSX parser (test_jsx_parser.py) - Update sample_project_javascript/README.md with JSX documentation
|
Someone is attempting to deploy a commit to the shashankss1205's projects Team on Vercel. A member of the Team first needs to authorize it. |
Resolved conflicts in graph_builder.py: - Kept elixir support from upstream - Added tsx parser registration - Changed .tsx to use tsx parser instead of typescript
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
.jsxextension support using JavaScript parser (tree-sitter's JavaScript parser natively handles JSX syntax)tsxparser (fixes JSX parsing errors in.tsxfiles)typescriptjsx.py(imports must be at top of file)pre_scan_typescript: combine 6 queries into 1 (6x faster tree traversal)_find_react_components: combine 4 queries into 1 (4x faster tree traversal)sample_jsx.jsxtest fixture with React patternstest_jsx_parser.pysample_project_javascript/README.mdTesting
All tests pass:
Verification
.jsx.tsxFixes #468