docs: sync API_DOCS type blocks with source interfaces - #580
Conversation
DatabaseConnection and QueryResult had drifted behind src/lib/types.ts; a field-name guard on all four Data Types blocks fails until the docs follow. Fixes libredb#567.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
Welcome, and thanks for picking this up. The two blocks now match src/lib/types.ts field for field and in order, and the guard bites: I removed seedId from the doc block locally and the DatabaseConnection case failed as it should. Two changes before merge.
Not blockers. Your test plan left bun run test unchecked; the local gate in CONTRIBUTING step 4 would have caught this in twenty seconds. If your environment cannot run it, say so and we read CI together. And #567 was claimed by @shashank-sn seventy minutes before your comment; check the thread before claiming. This PR stays, since it is here |
|
Hi @shashank-sn, can you review this PR and write a small notes |
|
One thing the update will not clear: Please take current main before the next round. From a fork: Why now rather than at merge time: the chart version sync guard is the first step of |
|
Updated PR #580 and pushed commit Changes:
Validation:
The full local suite previously reached 10,387 passing tests but had 166 unrelated chart/infrastructure hook-timeout failures; CI has been triggered again by this push. |
Summary
DatabaseConnectionandQueryResultTypeScript blocks indocs/API_DOCS.mdfield-for-field withsrc/lib/types.ts, carrying the interface comments and noting which connection fields the server reads versus client-side bookkeeping (color,environment,group,managed,seedId).DatabaseConnection,QueryResult,TableSchema,HealthInfo) and from the matching interfaces, and asserts they are equal. Written first, it failed on the two drifted blocks and passed on the other two.Fixes #567.
Test plan
tests/unit/api-docs-types.test.tsfailed onDatabaseConnectionandQueryResultbefore the doc edit;TableSchemaandHealthInfoalready matched.bun run test(100% line-coverage gate) on this PR.