Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.
Releases
@tanstack/angular-db@0.1.43
Patch Changes
f795a67,d542667,6503c09,b1cc4a7]:@tanstack/db@0.5.17
Patch Changes
Export
QueryResulthelper type for easily extracting query result types (similar to Zod'sz.infer). (#1096)Also exports
ExtractContextfor advanced use cases where you need the full context type.Add validation for where() and having() expressions to catch JavaScript operator usage (#1082)
When users accidentally use JavaScript's comparison operators (
===,!==,<,>, etc.) inwhere()orhaving()callbacks instead of query builder functions (eq,gt, etc.), the query builder now throws a helpfulInvalidWhereExpressionErrorwith clear guidance.Previously, this mistake would result in a confusing "Unknown expression type: undefined" error at query compilation time. Now users get immediate feedback with an example of the correct syntax:
Fix asymmetric behavior in
deepEqualswhen comparing different special types (Date, RegExp, Map, Set, TypedArray, Temporal, Array). Previously, comparing values likedeepEquals(Date, Temporal.Duration)could return a different result thandeepEquals(Temporal.Duration, Date). Now both directions correctly returnfalsefor mismatched types, ensuringdeepEqualsis a proper equivalence relation. (#1018)Add
wherecallback option tosubscribeChangesfor ergonomic filtering (#943)Instead of manually constructing IR with
PropRef:You can now use a callback with query builder functions:
@tanstack/electric-db-collection@0.2.21
Patch Changes
Fix orphan transactions after
must-refetchin progressive sync mode (#1069)When a
must-refetchmessage was received in progressive mode, it started a transaction withtruncate()but resethasReceivedUpToDate, causing subsequent messages to be buffered instead of written to the existing transaction. Onup-to-date, the atomic swap code would create a new transaction, leaving the first one uncommitted forever. This caused collections to become corrupted with undefined values.The fix ensures that when a transaction is already started (e.g., from must-refetch), messages are written directly to it instead of being buffered for atomic swap.
Fix duplicate key error when overlapping subset queries return the same row with different values. (#1070)
When multiple subset queries return the same row (e.g., different WHERE clauses that both match the same record), the server sends
insertoperations for each response. If the row's data changed between requests (e.g., timestamp field updated), this caused aDuplicateKeySyncError. The adapter now tracks synced keys and converts subsequent inserts to updates.Updated dependencies [
f795a67,d542667,6503c09,b1cc4a7]:@tanstack/offline-transactions@1.0.7
Patch Changes
Fix race condition that caused double replay of offline transactions on page load. The issue occurred when WebLocksLeader's async lock acquisition triggered the leadership callback after requestLeadership() had already returned, causing loadAndReplayTransactions() to be called twice. (#1046)
Updated dependencies [
f795a67,d542667,6503c09,b1cc4a7]:@tanstack/powersync-db-collection@0.1.21
Patch Changes
Added support for tracking collection operation metadata in PowerSync CrudEntry operations. (#999)
Updated dependencies [
f795a67,d542667,6503c09,b1cc4a7]:@tanstack/query-db-collection@1.0.13
Patch Changes
Fix on-demand sync behavior so the full TanStack Query lifecycle is respected. (#1007)
This patch resolves an issue where using on-demand synchronization could break the query lifecycle, including the error reported in staleTime is ignored for syncMode: "on-demand" collections — queries are reused instead of refetched #998.
Updated dependencies [
f795a67,d542667,6503c09,b1cc4a7]:@tanstack/react-db@0.1.61
Patch Changes
Improve runtime error message and documentation when
useLiveSuspenseQueryreceivesundefinedfrom query callback. (#860)Following TanStack Query's
useSuspenseQuerydesign,useLiveSuspenseQueryintentionally does not support disabled queries (when callback returnsundefinedornull). This maintains the type guarantee thatdatais alwaysT(notT | undefined), which is a core benefit of using Suspense.What changed:
Improved runtime error message with clear guidance:
useLiveSuspenseQuery does not support disabled queries (callback returned undefined/null).
The Suspense pattern requires data to always be defined (T, not T | undefined).
Solutions:
Enhanced JSDoc documentation with detailed
@remarkssection explaining the design decision, showing both incorrect (❌) and correct (✅) patternsWhy this matters:
This aligns with TanStack Query's philosophy where Suspense queries prioritize type safety and proper component composition over flexibility.
Updated dependencies [
f795a67,d542667,6503c09,b1cc4a7]:@tanstack/rxdb-db-collection@0.1.49
Patch Changes
f795a67,d542667,6503c09,b1cc4a7]:@tanstack/solid-db@0.1.60
Patch Changes
f795a67,d542667,6503c09,b1cc4a7]:@tanstack/svelte-db@0.1.60
Patch Changes
Add
findOne()/SingleResultsupport touseLiveQueryhook. (#1001)When using
.findOne()in a query, thedataproperty is now correctly typed asT | undefinedinstead ofArray<T>, matching the React implementation.Example:
This works with all query patterns:
useLiveQuery((q) => q.from(...).findOne())useLiveQuery({ query: (q) => q.from(...).findOne() })SingleResultUpdated dependencies [
f795a67,d542667,6503c09,b1cc4a7]:@tanstack/trailbase-db-collection@0.1.61
Patch Changes
f795a67,d542667,6503c09,b1cc4a7]:@tanstack/vue-db@0.0.93
Patch Changes
f795a67,d542667,6503c09,b1cc4a7]: