mirror of
https://github.com/NomaDamas/k-skill.git
synced 2026-06-24 02:04:11 +00:00
The kleague-results API previously accepted regex-shaped but impossible calendar dates and treated them like empty-result queries. This change adds a regression test first, then rejects invalid YYYY-MM-DD strings during normalization so bad input never reaches the fetch layer. Constraint: Public API contract says date must be a valid Date or YYYY-MM-DD string Rejected: Let upstream return zero matches | hides invalid input as a valid no-results response Confidence: high Scope-risk: narrow Reversibility: clean Directive: Keep string-date validation in normalizeDateInput before any schedule fetch Tested: node --test packages/kleague-results/test/index.test.js; npm run ci; live smoke getKLeagueSummary(2026-03-22, K리그1, FC서울, standings); live smoke getMatchResults(2026-03-22, K리그2); invalid-date smoke getMatchResults(2026-13-40); LSP diagnostics on changed files; architect verification Not-tested: Additional leap-year and month-end invalid-date permutations |
||
|---|---|---|
| .. | ||
| fixtures | ||
| index.test.js | ||