docs: correct decode function name for getRouterParam helpers#1419
Conversation
The JSDoc for getRouterParam and getValidatedRouterParams said the decode option uses decodeURI, but both delegate to getRouterParams, which decodes with decodeURIComponent (see line 178). The two differ on reserved characters like %2F, so the docs were misleading. Aligned the JSDoc, and the generated request.md docs, with the implementation and with getRouterParams' own JSDoc.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughTwo JSDoc comments in ChangesDecode function documentation correction
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
pi0x
left a comment
There was a problem hiding this comment.
Note: this review was performed by AI agents (Claude Code) on behalf of the maintainer, in two independent passes.
Pass 1 reviewed the diff for correctness, edge cases, and test coverage. Pass 2 (a fresh agent, adversarial by design) independently re-read the diff, checked for merge conflicts/CI status, and tried to find a reason to block approval before this review was posted. Both passes agree this change is correct, adequately tested, and safe to merge.
Caveat: this repo's real CI workflow (lint + build + vitest) requires maintainer approval to run on fork PRs and has not executed on this PR yet — only automated third-party checks (CodeRabbit, Socket Security) have run. Please trigger/approve the CI workflow before merging.
The JSDoc for
getRouterParamandgetValidatedRouterParamssays thedecodeoption decodes params withdecodeURI, but both functions delegate togetRouterParams, which decodes withdecodeURIComponent:getRouterParams' own JSDoc (line 161) already saysdecodeURIComponent, so the two sibling helpers contradicted it. The distinction matters becausedecodeURIleaves reserved characters like%2F,%23and%3Fencoded, whiledecodeURIComponentdecodes them, so a reader following the docs would expect the wrong result.Fixed the JSDoc on both helpers and regenerated the
docs/2.utils/1.request.mdautomd block that is built from it. Comment-only change, no behavior change.Summary by CodeRabbit