Skip to content

Conversation

@avivkeller
Copy link
Member

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

Copilot AI review requested due to automatic review settings June 27, 2025 16:29
@avivkeller avivkeller requested a review from a team as a code owner June 27, 2025 16:29
Copy link
Contributor

Copilot AI left a 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 updateDepth from (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} depth and the second to @param {String} char to match the new signature.
 * @param {String} char

@codecov
Copy link

codecov bot commented Jun 27, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Please upload report for BASE (main@580bc4d). Learn more about missing BASE report.
Report is 2 commits behind head on main.

✅ 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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@avivkeller
Copy link
Member Author

It's being called like:

  optionalDepth = [...parameterName.slice(endingIdx + 1)].reduce(
    updateDepth,
    optionalDepth
  );

optionalDepth is being passed as "a", not "b".

Copy link
Member

@AugustinMauroy AugustinMauroy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGMT !

@avivkeller
Copy link
Member Author

(Also, OPTIONAL_LEVEL_CHANGES[' '] || 0 is equal to 0 || 0, so that's been removed)

Copy link
Member

@ovflowd ovflowd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LG Logo LegalVision Logo

@ovflowd
Copy link
Member

ovflowd commented Jun 28, 2025

Fast-tracking :)

@ovflowd ovflowd merged commit 5d380a0 into main Jun 28, 2025
10 checks passed
@ovflowd ovflowd deleted the fix/legacy-json/updateDepth branch June 28, 2025 13:18
@ovflowd ovflowd added the fast track This PR can land before the typical review time, with a :+1: from collaborators label Jun 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fast track This PR can land before the typical review time, with a :+1: from collaborators

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants