fix: don't diff install size with first version#2175
Conversation
Most initial versions are empty or unfinished, so generally show up as a large bump in file size to the 2nd version. This is misleading so we should just skip those.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
|
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 (1)
📝 WalkthroughWalkthroughThe change modifies the Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 1✅ Passed checks (1 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 Tip CodeRabbit can scan for known vulnerabilities in your dependencies using OSV Scanner.OSV Scanner will automatically detect and report security vulnerabilities in your project's dependencies. No additional configuration is required. |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
app/composables/useInstallSizeDiff.ts (1)
38-38: Consider removing the non-null assertion for strict type safety.The non-null assertion operator bypasses TypeScript's type checking. Whilst the guard ensures the array access is logically safe, a defensive check would better align with the strict type-safety guideline.
🛡️ Proposed fix to add explicit bounds checking
- return stableVersions[currentIdx - 1]! + const prevVersion = stableVersions[currentIdx - 1] + if (!prevVersion) return null + return prevVersionAs per coding guidelines: "Ensure you write strictly type-safe code, for example by ensuring you always check when accessing an array value by index"
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: b223cee3-93cd-450d-9784-a20ca2248579
📒 Files selected for processing (1)
app/composables/useInstallSizeDiff.ts
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Most initial versions are empty or unfinished, so generally show up as a
large bump in file size to the 2nd version.
This is misleading so we should just skip those.
🔗 Linked issue
🧭 Context
📚 Description