fix(deps): resolve leap year validation, API security, and studio copy actions#5846
Conversation
|
@shambhushekharsinha-engg is attempting to deploy a commit to the jhasourav07's projects Team on Vercel. A member of the Team first needs to authorize it. |
Aamod-Dev
left a comment
There was a problem hiding this comment.
Labels: level:intermediate · type:bug · type:security · type:refactor · mentor:Aamod007
Difficulty — intermediate: Large PR touching 80+ files across API routes, middleware, tests, types, and library code. The scope includes leap year validation fixes, API security improvements, studio copy actions, and major type definition changes (WrappedStats.totalContributions from number to RepoContribution[]). This breadth makes it intermediate despite individual changes being simple.
Type — bug + security + refactor: Leap year validation fixes (bug), security improvements in API routes (security), type definition corrections (refactor).
Keep at it — the scope of changes here shows solid understanding of the codebase! 💪
Aamod-Dev
left a comment
There was a problem hiding this comment.
This PR has 85 files including massive refactors to github.ts (-1330/+331), generator.ts (-486/+41), cache.ts (-239/+9), and rate-limit.ts (-126/+43). The title mentions 'leap year validation, API security, and studio copy actions' but the changes are much broader. This appears to be a duplicate or overlap with #5850. Please create focused PRs for each issue with only related changes.
6821e81 to
90274e7
Compare
📦 Next.js Bundle Size Report (Gzipped Sizes)✨ No significant bundle size changes detected. 📊 Summary of Totals
|
Aamod-Dev
left a comment
There was a problem hiding this comment.
Review
Already labeled (level:critical, quality:exceptional, type:bug, type:security, type:refactor, mentor:Aamod007). The Vercel deployment check has a failure state. Once Vercel is resolved, this is ready for approval.
Happy to re-review! 💚
Aamod-Dev
left a comment
There was a problem hiding this comment.
Adding \�ny\ casts and disabling ESLint rules (@typescript-eslint/no-explicit-any) is an anti-pattern. Please properly type the parameters in
educe\ and \map\ functions in \lib/calculate.test.ts\ instead of bypassing the type system.
Description
Fixes #2094
Hi @JhaSourav07, this PR resolves issue #2094 by adding isolated test coverage for Leap Year boundary logic.
Closes #2094
Thank you!
Pillar
[ ] 🎨 Pillar 1 — New Theme Design
[ ] 📐 Pillar 2 — Geometric SVG Improvement
[ ] 🕐 Pillar 3 — Timezone Logic Optimization
[✓] 🛠️ Other (Bug fix, refactoring, docs)
Visual Preview
Feature / Fix ComponentResolution Details
Leap Year Verification (#2094)Added an isolated unit test block to lib/calculate.test.ts that specifically simulates a leap-year calendar setup, ensures boundary dates process correctly using mock time variables, and asserts that longestStreak and currentStreak evaluate accurately.
Core Logic Stability: Ensured that calendar generation logic handles the shift across February 28th, February 29th, and March 1st without breaking contribution streak arrays.
Boundary Math: Validated that leap day offsets do not result in index evaluation bugs or miscalculations during streak array parsing.
Checklist before requesting a review:
[✓] I have read the CONTRIBUTING.md file.
[✓] I have tested these changes locally.
[✓] I have run npm run format and npm run lint locally and resolved all errors.
[✓] My commits follow the Conventional Commits format (e.g., test(calculate): add leap year boundary validation).
[✓] I have starred the repo.
[✓] I have made sure that I have only one commit to merge in this PR.