mirror of
https://github.com/allankoechke/turso.git
synced 2026-11-30 11:12:58 +00:00
Adds the missing `reconnect(): void` method to the `@tursodatabase/serverless/compat` client. The method resets the closed state, closes the previous session asynchronously, and replaces it with a fresh lazy Session. Also adds regression coverage for reconnecting after `close()` and reconnecting an already active client. `@tursodatabase/serverless/compat` is intended to provide compatibility with the `@libsql/client` Client interface, but it was missing `reconnect()`. This prevented the compat client from being a complete drop-in replacement and meant a closed client could not be restored for further use. Fixes #8451 AI was used as an assistant during repository exploration, implementation planning, and test development. The implementation and resulting diff were reviewed and validated manually. Reviewed-by: Mikaël Francoeur (@LeMikaelF) Closes #8507