fix(queries): allow complex types in type linking regex#814
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
PR SummaryLow Risk Overview The Release 1.3.7 is bumped in Reviewed by Cursor Bugbot for commit 503aefe. Bugbot is set up for automated code reviews on this repo. Configure here. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #814 +/- ##
=======================================
Coverage 82.86% 82.86%
=======================================
Files 171 171
Lines 14961 14961
Branches 1313 1313
=======================================
Hits 12398 12398
Misses 2554 2554
Partials 9 9 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
avivkeller
left a comment
There was a problem hiding this comment.
Can you run npm version patch?
AugustinMauroy
left a comment
There was a problem hiding this comment.
LGMT ! is there are test for that ?
Description
Currently,
doc-kitfails to parse and link complex JSDoc types that contain generics, unions and arrow functions.This happens because the regex in
src/utils/queries/index.mjsuses[^<({})>]+, which excludes<,>,(, and). When the parser encounters these characters, it ignores the entire type block, leaving it unlinked and sometimes causing Markdown parsers (Remark) to see them as HTML tags.This PR updates the regex exclusion list to
[^{}]+.Validation
Before:

After:

Related Issues
No related one.
Check List
node --run testand all tests passed.node --run format&node --run lint.