-
Notifications
You must be signed in to change notification settings - Fork 24
fix(legacy-json): fix parameter ordering
#325
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
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 fixes the argument order of the updateDepth helper so that optional parameters are tracked correctly.
- Swaps the parameter order in
updateDepthfrom(char, depth)to(depth, char) - Adjusts the function definition to match its usage
Comments suppressed due to low confidence (1)
src/generators/legacy-json/utils/parseSignature.mjs:9
- The JSDoc @param annotations weren’t updated after swapping the parameters. Update the first tag to
@param {Number} depthand the second to@param {String} charto match the new signature.
* @param {String} char
Codecov ReportAll modified and coverable lines are covered by tests ✅
✅ All tests successful. No failed tests found. Additional details and impacted files@@ Coverage Diff @@
## main #325 +/- ##
=======================================
Coverage ? 71.51%
=======================================
Files ? 117
Lines ? 9721
Branches ? 590
=======================================
Hits ? 6952
Misses ? 2766
Partials ? 3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
It's being called like: optionalDepth = [...parameterName.slice(endingIdx + 1)].reduce(
updateDepth,
optionalDepth
);
|
AugustinMauroy
left a comment
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.
LGMT !
|
(Also, |
ovflowd
left a comment
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.
|
Fast-tracking :) |

This function was being called backwards, resulting in no parameters being marked optional.