-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Mboum - fix prop types #18170
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
Mboum - fix prop types #18170
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 2 Skipped Deployments
|
WalkthroughVersion bumps applied to three mboum actions and the package. In each action, the props schema changes priceMin type from number to string; run flows and parameter mappings remain unchanged. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
Tip 🔌 Remote MCP (Model Context Protocol) integration is now available!Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats. ✨ Finishing Touches
🧪 Generate unit tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 0
🧹 Nitpick comments (3)
components/mboum/actions/get-iv-rank-percentile/get-iv-rank-percentile.mjs (1)
21-26: SwitchingpriceMinto string: add lightweight runtime validation and omit empty valuesChanging the prop to
stringprevents numeric UI validation and could forward invalid values (e.g., "abc") to the API. Recommend normalizing to a trimmed string, validating numeric shape, and conditionally includingprice_minonly when valid/non-empty.Suggested patch to apply in
run(outside the edited lines):// normalize + validate const priceMin = this.priceMin?.toString().trim(); if (priceMin && !/^\d+(\.\d+)?$/.test(priceMin)) { throw new Error('priceMin must be numeric (e.g., "10" or "10.5").'); } const params = { type: this.type, page: this.page, ...(priceMin ? { price_min: priceMin } : {}), }; const response = await this.mboum.getIvRankPercentile({ $, params });If the API truly requires a string type for numeric values, the above keeps it as a string while ensuring it’s numeric.
components/mboum/actions/get-iv-change/get-iv-change.mjs (1)
31-36: GuardpriceMinas a numeric string and avoid sending undefined/blank valuesSame rationale as the other action: with
type: "string", add minimal validation and only includeprice_minwhen non-empty and numeric. While here, consider conditionally includingdirectiononly when set.Suggested
runchanges (outside the edited lines):const priceMin = this.priceMin?.toString().trim(); if (priceMin && !/^\d+(\.\d+)?$/.test(priceMin)) { throw new Error('priceMin must be numeric (e.g., "10" or "10.5").'); } const params = { type: this.type, ...(this.direction ? { direction: this.direction } : {}), ...(priceMin ? { price_min: priceMin } : {}), page: this.page, }; const response = await this.mboum.getIvChange({ $, params });components/mboum/actions/get-earnings/get-earnings.mjs (1)
21-26:priceMinas string: validate and include conditionallyTo avoid passing invalid strings to the API, normalize and validate as a numeric string, and omit
price_minif blank. This keeps behavior predictable for users.Proposed
runadjustments (outside the edited lines):const priceMin = this.priceMin?.toString().trim(); if (priceMin && !/^\d+(\.\d+)?$/.test(priceMin)) { throw new Error('priceMin must be numeric (e.g., "10" or "10.5").'); } const params = { start_date: this.startDate, end_date: this.endDate, ...(priceMin ? { price_min: priceMin } : {}), ...(this.optionable !== undefined ? { optionable: this.optionable } : {}), page: this.page, }; const response = await this.mboum.getEarnings({ $, params });
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (4)
components/mboum/actions/get-earnings/get-earnings.mjs(2 hunks)components/mboum/actions/get-iv-change/get-iv-change.mjs(2 hunks)components/mboum/actions/get-iv-rank-percentile/get-iv-rank-percentile.mjs(2 hunks)components/mboum/package.json(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
- GitHub Check: pnpm publish
- GitHub Check: Lint Code Base
- GitHub Check: Publish TypeScript components
- GitHub Check: Verify TypeScript components
🔇 Additional comments (5)
components/mboum/package.json (1)
3-3: Patch bump looks good0.1.0 → 0.1.1 aligns with a non-breaking prop type fix across actions.
components/mboum/actions/get-iv-rank-percentile/get-iv-rank-percentile.mjs (1)
7-7: Action version bump is appropriate0.0.1 → 0.0.2 is the right scope for a prop type change.
components/mboum/actions/get-iv-change/get-iv-change.mjs (1)
7-7: Action version bump is appropriate0.0.1 → 0.0.2 matches a backward-compatible prop type tweak.
components/mboum/actions/get-earnings/get-earnings.mjs (2)
7-7: Action version bump looks right0.0.1 → 0.0.2 is consistent with the prop type change.
21-26: priceMin cross-action consistency verifiedAll
components/mboum/actions/*now declarepriceMinwithtype: "string"and each action maps it asprice_min: this.priceMinin their request parameters. No remaining inconsistencies found.
Summary by CodeRabbit
New Features
Chores