next major#671
Conversation
psteinroe
commented
Jan 5, 2026
- refactor(postgrest-core): start ripping out complexity
- refactor: next major
|
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #671 +/- ##
==========================================
- Coverage 92.63% 91.17% -1.47%
==========================================
Files 151 158 +7
Lines 2390 2674 +284
Branches 751 867 +116
==========================================
+ Hits 2214 2438 +224
- Misses 145 192 +47
- Partials 31 44 +13
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
623dc71 to
487d1c2
Compare
- Add proper dependencies to useEffect in use-subscription.ts files - Add proper dependencies to useEffect in use-subscription-query.ts files - Fix useCallback patterns in storage mutation hooks - Fix formatting in test files 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add unit tests for useSubscription hooks in both postgrest-swr and postgrest-react-query packages to improve test coverage. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Extract useRealtimeSubscription as base hook for both packages - Reduce type parameters from 7 to 2 in useSubscriptionQuery - Remove complex GetResult inference that caused TypeScript heap issues - Use useCallback with ref pattern to avoid unnecessary re-subscriptions - Compose useSubscription and useSubscriptionQuery on top of base hook 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Remove queriesForTable requirement from delete fetcher since delete revalidation only needs primary keys (not filter columns like upsert) - Skip auto-query in buildDeleteFetcher by passing empty queriesForTable - Always return primary keys from delete operations - Fix TypeScript errors in use-realtime-subscription by using switch statement to match specific .on() overloads for each event type - Update delete mutation hooks to remove queriesForTable usage - Update delete-fetcher tests for new API 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add comprehensive unit tests for the useRealtimeSubscription hook in both SWR and React Query packages. Tests cover: - Initial state - Channel subscription on mount - Status updates - All event types (ALL, INSERT, UPDATE, DELETE) - Filter expressions - Default schema handling - Payload callback invocation 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>