$ account gajus
Slonik is a production-grade, battle-tested Node.js PostgreSQL client library that emphasizes strict typing, detailed logging, and runtime assertions. It provides a type-safe SQL query interface via tagged template literals (the `sql` tag), connection pooling with configurable lifecycle management, transaction support, and an interceptor (middleware) system for extending query execution, connection handling, and result transformation. The library is structured as a monorepo with multiple packages: core `slonik`, `@slonik/sql-tag` for SQL template construction, `@slonik/driver` and `@slonik/pg-driver` for driver abstraction, `@slonik/errors` for a comprehensive error hierarchy, `@slonik/utilities` for shared utilities, and community interceptor packages for query caching, logging, field name transformation, and DataLoader integration. It integrates with Zod for optional runtime query result validation and uses Roarr for logging. The architecture is modular, with clean separation of concerns, making it suitable for both small projects and large-scale production systems.
Turbowatch is a file change detector and task orchestrator for Node.js that provides a more capable alternative to tools like Nodemon. It watches specified directories for file changes and executes user-defined tasks in response, featuring debouncing to batch rapid changes, retry logic for failed tasks, interruptible tasks to cancel ongoing operations, and graceful shutdown handling. The architecture uses a pluggable backend system for file watching (supporting native FSWatcher on macOS, falling back to Chokidar elsewhere), with an event processing pipeline that deduplicates and distributes changes to relevant subscribers. Key entry points include the CLI (bin/turbowatch.ts) and programmatic API (src/watch.ts). The system relies on dependencies like chokidar, zx for process spawning, micromatch for pattern matching, and roarr for structured logging.