-
Notifications
You must be signed in to change notification settings - Fork 19
feat(types): support type index #463
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
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
💡 Enable Vercel Agent with $100 free credit for automated AI reviews |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds support for custom type mapping by allowing users to pass a --type-map argument while maintaining backward compatibility with the predefined type mappings. The implementation threads a typeMap parameter through the API documentation parsing pipeline to enable custom type-to-link transformations.
- Added
typeMapparameter to key functions in the parsing and generation pipeline - Modified
transformTypeToReferenceLinkto accept an optional custom type mapping record - Added test coverage for the custom type mapping functionality
Reviewed Changes
Copilot reviewed 5 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/utils/queries/index.mjs | Updated createQueries to accept and pass through typeMap parameter |
| src/utils/parser/index.mjs | Modified transformTypeToReferenceLink to accept optional custom type mapping |
| src/utils/parser/tests/index.test.mjs | Added test case for custom type mapping functionality |
| src/generators/metadata/utils/parse.mjs | Updated parseApiDoc to accept and pass through typeMap parameter |
| src/generators/metadata/index.mjs | Modified generator to accept typeMap from options and pass to parser |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #463 +/- ##
==========================================
- Coverage 74.55% 74.01% -0.55%
==========================================
Files 107 108 +1
Lines 10466 10316 -150
Branches 684 685 +1
==========================================
- Hits 7803 7635 -168
- Misses 2661 2678 +17
- Partials 2 3 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Bump @nodejs/web-infra |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SGTM, left a few comments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SGTM, left one final nit 😅
Ref: #462
This PR allows the user to pass a custom
--type-mapargument, while falling back to the predefined one.