Skip to content

Add tree sitter to auto api #984

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Oct 10, 2024

Conversation

TheMcnafaha
Copy link
Member

@TheMcnafaha TheMcnafaha commented Oct 8, 2024

What is it?

  • Feature / enhancement
  • Bug

Why is it needed?

Current auto api cannot handle nested object-like structures.

The solution does add two new dependencies: tree-sitter and tree-sitter-typescript

Checklist:

  • My code follows the developer guidelines of this project
  • I have performed a self-review of my own code
  • I have ran pnpm change and documented my changes
  • I have add necessary docs (if needed)
  • Added new tests to cover the fix / functionality

working tree-sitter instance and finally figured out how to query
Adds better comments and rms console logs
Adds tree-sitter to parse and query the file's AST instead of relying on
regex. Unfortunately, because type declarations are object-like and
type declarations can have have objects, regex cannot handle the
recursive nature of TS types. An oversight that has been corrected.
Copy link

changeset-bot bot commented Oct 8, 2024

⚠️ No Changeset found

Latest commit: aedb443

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@TheMcnafaha TheMcnafaha force-pushed the add-tree-sitter-to-auto-api branch 2 times, most recently from 919eada to 218e302 Compare October 9, 2024 04:46
@TheMcnafaha TheMcnafaha force-pushed the add-tree-sitter-to-auto-api branch from 218e302 to aedb443 Compare October 9, 2024 19:24
Copy link

pkg-pr-new bot commented Oct 9, 2024

Open in Stackblitz

pnpm add https://pkg.pr.new/qwikifiers/qwik-ui@984
pnpm add https://pkg.pr.new/qwikifiers/qwik-ui/@qwik-ui/headless@984
pnpm add https://pkg.pr.new/qwikifiers/qwik-ui/@qwik-ui/styled@984
pnpm add https://pkg.pr.new/qwikifiers/qwik-ui/@qwik-ui/utils@984

commit: aedb443

@maiieul
Copy link
Contributor

maiieul commented Oct 10, 2024

Okay I'm merging as is, I'll make a follow up PR to cleanup a bit.

@maiieul maiieul merged commit f366873 into qwikifiers:main Oct 10, 2024
6 checks passed
cwoolum pushed a commit to cwoolum/qwik-ui that referenced this pull request Oct 11, 2024
* feat(auto-api): adds tree sitter & query

working tree-sitter instance and finally figured out how to query

* feat(auto-api): saves tree-sitter query as obj

* fix(auto-api): general minor improvements

Adds better comments and rms console logs

* feat(auto api): use AST instead of regex

Adds tree-sitter to parse and query the file's AST instead of relying on
regex. Unfortunately, because type declarations are object-like and
type declarations can have have objects, regex cannot handle the
recursive nature of TS types. An oversight that has been corrected.

* fix(auto api): removes comment syntax from table text

* fix(auto api): adds dependencies
cwoolum pushed a commit to cwoolum/qwik-ui that referenced this pull request Oct 11, 2024
* feat(auto-api): adds tree sitter & query

working tree-sitter instance and finally figured out how to query

* feat(auto-api): saves tree-sitter query as obj

* fix(auto-api): general minor improvements

Adds better comments and rms console logs

* feat(auto api): use AST instead of regex

Adds tree-sitter to parse and query the file's AST instead of relying on
regex. Unfortunately, because type declarations are object-like and
type declarations can have have objects, regex cannot handle the
recursive nature of TS types. An oversight that has been corrected.

* fix(auto api): removes comment syntax from table text

* fix(auto api): adds dependencies
maiieul added a commit that referenced this pull request Oct 12, 2024
… by the Github API (#987)

* feat: Convert from  to a dedicated docs page driven by the Gthub API

* Add tree sitter to auto api (#984)

* feat(auto-api): adds tree sitter & query

working tree-sitter instance and finally figured out how to query

* feat(auto-api): saves tree-sitter query as obj

* fix(auto-api): general minor improvements

Adds better comments and rms console logs

* feat(auto api): use AST instead of regex

Adds tree-sitter to parse and query the file's AST instead of relying on
regex. Unfortunately, because type declarations are object-like and
type declarations can have have objects, regex cannot handle the
recursive nature of TS types. An oversight that has been corrected.

* fix(auto api): removes comment syntax from table text

* fix(auto api): adds dependencies

* feat: Convert from  to a dedicated docs page driven by the Gthub API

* fix: preview

---------

Co-authored-by: TheMcnafaha <102767512+TheMcnafaha@users.noreply.github.com>
Co-authored-by: maiieul <maieul.chevalier@gmail.com>
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