From 5e17cb1ff23cc701e9700fb0e4a1eded99abddbd Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 10 Jun 2025 20:14:30 +0000 Subject: [PATCH] ci: Version Packages --- .changeset/floppy-berries-enjoy.md | 5 ----- .changeset/full-steaks-wait.md | 5 ----- .changeset/light-hands-love.md | 26 ------------------------- examples/react/todo/CHANGELOG.md | 29 ++++++++++++++++++++++++++++ examples/react/todo/package.json | 6 +++--- packages/db-collections/CHANGELOG.md | 28 +++++++++++++++++++++++++++ packages/db-collections/package.json | 2 +- packages/db/CHANGELOG.md | 29 ++++++++++++++++++++++++++++ packages/db/package.json | 2 +- packages/react-db/CHANGELOG.md | 7 +++++++ packages/react-db/package.json | 2 +- packages/vue-db/CHANGELOG.md | 7 +++++++ packages/vue-db/package.json | 2 +- pnpm-lock.yaml | 4 ++-- 14 files changed, 109 insertions(+), 45 deletions(-) delete mode 100644 .changeset/floppy-berries-enjoy.md delete mode 100644 .changeset/full-steaks-wait.md delete mode 100644 .changeset/light-hands-love.md diff --git a/.changeset/floppy-berries-enjoy.md b/.changeset/floppy-berries-enjoy.md deleted file mode 100644 index da0598b50..000000000 --- a/.changeset/floppy-berries-enjoy.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@tanstack/db": patch ---- - -live query where clauses can now be a callback function that receives each row as a context object allowing full javascript access to the row data for filtering diff --git a/.changeset/full-steaks-wait.md b/.changeset/full-steaks-wait.md deleted file mode 100644 index 5b25a3e0b..000000000 --- a/.changeset/full-steaks-wait.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@tanstack/db": patch ---- - -the live query select clause can now be a callback function that receives each row as a context object returning a new object with the selected fields. This also allows the for the callback to make more expressive changes to the returned data. diff --git a/.changeset/light-hands-love.md b/.changeset/light-hands-love.md deleted file mode 100644 index 5dbd98024..000000000 --- a/.changeset/light-hands-love.md +++ /dev/null @@ -1,26 +0,0 @@ ---- -"@tanstack/db-collections": patch -"@tanstack/db-example-react-todo": patch -"@tanstack/db": patch ---- - -This change introduces a more streamlined and intuitive API for handling mutations by allowing `onInsert`, `onUpdate`, and `onDelete` handlers to be defined directly on the collection configuration. - -When `collection.insert()`, `.update()`, or `.delete()` are called outside of an explicit transaction (i.e., not within `useOptimisticMutation`), the library now automatically creates a single-operation transaction and invokes the corresponding handler to persist the change. - -Key changes: - -- **`@tanstack/db`**: The `Collection` class now supports `onInsert`, `onUpdate`, and `onDelete` in its configuration. Direct calls to mutation methods will throw an error if the corresponding handler is not defined. -- **`@tanstack/db-collections`**: - - `queryCollectionOptions` now accepts the new handlers and will automatically `refetch` the collection's query after a handler successfully completes. This behavior can be disabled if the handler returns `{ refetch: false }`. - - `electricCollectionOptions` also accepts the new handlers. These handlers are now required to return an object with a transaction ID (`{ txid: string }`). The collection then automatically waits for this `txid` to be synced back before resolving the mutation, ensuring consistency. -- **Breaking Change**: Calling `collection.insert()`, `.update()`, or `.delete()` without being inside a `useOptimisticMutation` callback and without a corresponding persistence handler (`onInsert`, etc.) configured on the collection will now throw an error. - -This new pattern simplifies the most common use cases, making the code more declarative. The `useOptimisticMutation` hook remains available for more complex scenarios, such as transactions involving multiple mutations across different collections. - ---- - -The documentation and the React Todo example application have been significantly refactored to adopt the new direct persistence handler pattern as the primary way to perform mutations. - -- The `README.md` and `docs/overview.md` files have been updated to de-emphasize `useOptimisticMutation` for simple writes. They now showcase the much simpler API of calling `collection.insert()` directly and defining persistence logic in the collection's configuration. -- The React Todo example (`examples/react/todo/src/App.tsx`) has been completely overhauled. All instances of `useOptimisticMutation` have been removed and replaced with the new `onInsert`, `onUpdate`, and `onDelete` handlers, resulting in cleaner and more concise code. diff --git a/examples/react/todo/CHANGELOG.md b/examples/react/todo/CHANGELOG.md index a045fc258..496cf8cf7 100644 --- a/examples/react/todo/CHANGELOG.md +++ b/examples/react/todo/CHANGELOG.md @@ -1,5 +1,34 @@ # examples/react/todo +## 0.0.10 + +### Patch Changes + +- This change introduces a more streamlined and intuitive API for handling mutations by allowing `onInsert`, `onUpdate`, and `onDelete` handlers to be defined directly on the collection configuration. ([#156](https://github.com/TanStack/db/pull/156)) + + When `collection.insert()`, `.update()`, or `.delete()` are called outside of an explicit transaction (i.e., not within `useOptimisticMutation`), the library now automatically creates a single-operation transaction and invokes the corresponding handler to persist the change. + + Key changes: + + - **`@tanstack/db`**: The `Collection` class now supports `onInsert`, `onUpdate`, and `onDelete` in its configuration. Direct calls to mutation methods will throw an error if the corresponding handler is not defined. + - **`@tanstack/db-collections`**: + - `queryCollectionOptions` now accepts the new handlers and will automatically `refetch` the collection's query after a handler successfully completes. This behavior can be disabled if the handler returns `{ refetch: false }`. + - `electricCollectionOptions` also accepts the new handlers. These handlers are now required to return an object with a transaction ID (`{ txid: string }`). The collection then automatically waits for this `txid` to be synced back before resolving the mutation, ensuring consistency. + - **Breaking Change**: Calling `collection.insert()`, `.update()`, or `.delete()` without being inside a `useOptimisticMutation` callback and without a corresponding persistence handler (`onInsert`, etc.) configured on the collection will now throw an error. + + This new pattern simplifies the most common use cases, making the code more declarative. The `useOptimisticMutation` hook remains available for more complex scenarios, such as transactions involving multiple mutations across different collections. + + *** + + The documentation and the React Todo example application have been significantly refactored to adopt the new direct persistence handler pattern as the primary way to perform mutations. + + - The `README.md` and `docs/overview.md` files have been updated to de-emphasize `useOptimisticMutation` for simple writes. They now showcase the much simpler API of calling `collection.insert()` directly and defining persistence logic in the collection's configuration. + - The React Todo example (`examples/react/todo/src/App.tsx`) has been completely overhauled. All instances of `useOptimisticMutation` have been removed and replaced with the new `onInsert`, `onUpdate`, and `onDelete` handlers, resulting in cleaner and more concise code. + +- Updated dependencies [[`80fdac7`](https://github.com/TanStack/db/commit/80fdac76389ea741f5743bc788df375f63fb767b)]: + - @tanstack/db-collections@0.0.8 + - @tanstack/react-db@0.0.6 + ## 0.0.9 ### Patch Changes diff --git a/examples/react/todo/package.json b/examples/react/todo/package.json index 4f61c016c..9c48b5228 100644 --- a/examples/react/todo/package.json +++ b/examples/react/todo/package.json @@ -1,11 +1,11 @@ { "name": "@tanstack/db-example-react-todo", "private": true, - "version": "0.0.9", + "version": "0.0.10", "dependencies": { - "@tanstack/db-collections": "^0.0.7", + "@tanstack/db-collections": "^0.0.8", "@tanstack/query-core": "^5.75.7", - "@tanstack/react-db": "^0.0.5", + "@tanstack/react-db": "^0.0.6", "cors": "^2.8.5", "drizzle-orm": "^0.40.1", "drizzle-zod": "^0.7.0", diff --git a/packages/db-collections/CHANGELOG.md b/packages/db-collections/CHANGELOG.md index 1d7c9d542..61b4e0176 100644 --- a/packages/db-collections/CHANGELOG.md +++ b/packages/db-collections/CHANGELOG.md @@ -1,5 +1,33 @@ # @tanstack/db-collections +## 0.0.8 + +### Patch Changes + +- This change introduces a more streamlined and intuitive API for handling mutations by allowing `onInsert`, `onUpdate`, and `onDelete` handlers to be defined directly on the collection configuration. ([#156](https://github.com/TanStack/db/pull/156)) + + When `collection.insert()`, `.update()`, or `.delete()` are called outside of an explicit transaction (i.e., not within `useOptimisticMutation`), the library now automatically creates a single-operation transaction and invokes the corresponding handler to persist the change. + + Key changes: + + - **`@tanstack/db`**: The `Collection` class now supports `onInsert`, `onUpdate`, and `onDelete` in its configuration. Direct calls to mutation methods will throw an error if the corresponding handler is not defined. + - **`@tanstack/db-collections`**: + - `queryCollectionOptions` now accepts the new handlers and will automatically `refetch` the collection's query after a handler successfully completes. This behavior can be disabled if the handler returns `{ refetch: false }`. + - `electricCollectionOptions` also accepts the new handlers. These handlers are now required to return an object with a transaction ID (`{ txid: string }`). The collection then automatically waits for this `txid` to be synced back before resolving the mutation, ensuring consistency. + - **Breaking Change**: Calling `collection.insert()`, `.update()`, or `.delete()` without being inside a `useOptimisticMutation` callback and without a corresponding persistence handler (`onInsert`, etc.) configured on the collection will now throw an error. + + This new pattern simplifies the most common use cases, making the code more declarative. The `useOptimisticMutation` hook remains available for more complex scenarios, such as transactions involving multiple mutations across different collections. + + *** + + The documentation and the React Todo example application have been significantly refactored to adopt the new direct persistence handler pattern as the primary way to perform mutations. + + - The `README.md` and `docs/overview.md` files have been updated to de-emphasize `useOptimisticMutation` for simple writes. They now showcase the much simpler API of calling `collection.insert()` directly and defining persistence logic in the collection's configuration. + - The React Todo example (`examples/react/todo/src/App.tsx`) has been completely overhauled. All instances of `useOptimisticMutation` have been removed and replaced with the new `onInsert`, `onUpdate`, and `onDelete` handlers, resulting in cleaner and more concise code. + +- Updated dependencies [[`856be72`](https://github.com/TanStack/db/commit/856be725a6299374a3a97c88b50bd5d7bb94b783), [`0455e27`](https://github.com/TanStack/db/commit/0455e27f50d69b1e1887b841dc2f262f4de4c55d), [`80fdac7`](https://github.com/TanStack/db/commit/80fdac76389ea741f5743bc788df375f63fb767b)]: + - @tanstack/db@0.0.6 + ## 0.0.7 ### Patch Changes diff --git a/packages/db-collections/package.json b/packages/db-collections/package.json index a6019b0ec..53a20f53e 100644 --- a/packages/db-collections/package.json +++ b/packages/db-collections/package.json @@ -1,7 +1,7 @@ { "name": "@tanstack/db-collections", "description": "A collection for (aspirationally) every way of loading your data", - "version": "0.0.7", + "version": "0.0.8", "dependencies": { "@tanstack/db": "workspace:*", "@tanstack/query-core": "^5.75.7", diff --git a/packages/db/CHANGELOG.md b/packages/db/CHANGELOG.md index 8cefea965..0f6a987ba 100644 --- a/packages/db/CHANGELOG.md +++ b/packages/db/CHANGELOG.md @@ -1,5 +1,34 @@ # @tanstack/db +## 0.0.6 + +### Patch Changes + +- live query where clauses can now be a callback function that receives each row as a context object allowing full javascript access to the row data for filtering ([#152](https://github.com/TanStack/db/pull/152)) + +- the live query select clause can now be a callback function that receives each row as a context object returning a new object with the selected fields. This also allows the for the callback to make more expressive changes to the returned data. ([#154](https://github.com/TanStack/db/pull/154)) + +- This change introduces a more streamlined and intuitive API for handling mutations by allowing `onInsert`, `onUpdate`, and `onDelete` handlers to be defined directly on the collection configuration. ([#156](https://github.com/TanStack/db/pull/156)) + + When `collection.insert()`, `.update()`, or `.delete()` are called outside of an explicit transaction (i.e., not within `useOptimisticMutation`), the library now automatically creates a single-operation transaction and invokes the corresponding handler to persist the change. + + Key changes: + + - **`@tanstack/db`**: The `Collection` class now supports `onInsert`, `onUpdate`, and `onDelete` in its configuration. Direct calls to mutation methods will throw an error if the corresponding handler is not defined. + - **`@tanstack/db-collections`**: + - `queryCollectionOptions` now accepts the new handlers and will automatically `refetch` the collection's query after a handler successfully completes. This behavior can be disabled if the handler returns `{ refetch: false }`. + - `electricCollectionOptions` also accepts the new handlers. These handlers are now required to return an object with a transaction ID (`{ txid: string }`). The collection then automatically waits for this `txid` to be synced back before resolving the mutation, ensuring consistency. + - **Breaking Change**: Calling `collection.insert()`, `.update()`, or `.delete()` without being inside a `useOptimisticMutation` callback and without a corresponding persistence handler (`onInsert`, etc.) configured on the collection will now throw an error. + + This new pattern simplifies the most common use cases, making the code more declarative. The `useOptimisticMutation` hook remains available for more complex scenarios, such as transactions involving multiple mutations across different collections. + + *** + + The documentation and the React Todo example application have been significantly refactored to adopt the new direct persistence handler pattern as the primary way to perform mutations. + + - The `README.md` and `docs/overview.md` files have been updated to de-emphasize `useOptimisticMutation` for simple writes. They now showcase the much simpler API of calling `collection.insert()` directly and defining persistence logic in the collection's configuration. + - The React Todo example (`examples/react/todo/src/App.tsx`) has been completely overhauled. All instances of `useOptimisticMutation` have been removed and replaced with the new `onInsert`, `onUpdate`, and `onDelete` handlers, resulting in cleaner and more concise code. + ## 0.0.5 ### Patch Changes diff --git a/packages/db/package.json b/packages/db/package.json index 517d817f3..2339805e7 100644 --- a/packages/db/package.json +++ b/packages/db/package.json @@ -1,7 +1,7 @@ { "name": "@tanstack/db", "description": "A reactive client store for building super fast apps on sync", - "version": "0.0.5", + "version": "0.0.6", "dependencies": { "@electric-sql/d2ts": "^0.1.6", "@standard-schema/spec": "^1.0.0", diff --git a/packages/react-db/CHANGELOG.md b/packages/react-db/CHANGELOG.md index 751e26634..09d1c4427 100644 --- a/packages/react-db/CHANGELOG.md +++ b/packages/react-db/CHANGELOG.md @@ -1,5 +1,12 @@ # @tanstack/react-db +## 0.0.6 + +### Patch Changes + +- Updated dependencies [[`856be72`](https://github.com/TanStack/db/commit/856be725a6299374a3a97c88b50bd5d7bb94b783), [`0455e27`](https://github.com/TanStack/db/commit/0455e27f50d69b1e1887b841dc2f262f4de4c55d), [`80fdac7`](https://github.com/TanStack/db/commit/80fdac76389ea741f5743bc788df375f63fb767b)]: + - @tanstack/db@0.0.6 + ## 0.0.5 ### Patch Changes diff --git a/packages/react-db/package.json b/packages/react-db/package.json index ed0a612aa..125371902 100644 --- a/packages/react-db/package.json +++ b/packages/react-db/package.json @@ -1,7 +1,7 @@ { "name": "@tanstack/react-db", "description": "React integration for @tanstack/db", - "version": "0.0.5", + "version": "0.0.6", "author": "Kyle Mathews", "license": "MIT", "repository": { diff --git a/packages/vue-db/CHANGELOG.md b/packages/vue-db/CHANGELOG.md index 570018fa1..8b0a2b1b1 100644 --- a/packages/vue-db/CHANGELOG.md +++ b/packages/vue-db/CHANGELOG.md @@ -1,5 +1,12 @@ # @tanstack/vue-db +## 0.0.5 + +### Patch Changes + +- Updated dependencies [[`856be72`](https://github.com/TanStack/db/commit/856be725a6299374a3a97c88b50bd5d7bb94b783), [`0455e27`](https://github.com/TanStack/db/commit/0455e27f50d69b1e1887b841dc2f262f4de4c55d), [`80fdac7`](https://github.com/TanStack/db/commit/80fdac76389ea741f5743bc788df375f63fb767b)]: + - @tanstack/db@0.0.6 + ## 0.0.4 ### Patch Changes diff --git a/packages/vue-db/package.json b/packages/vue-db/package.json index ad26ee416..c3126e0be 100644 --- a/packages/vue-db/package.json +++ b/packages/vue-db/package.json @@ -1,7 +1,7 @@ { "name": "@tanstack/vue-db", "description": "Vue integration for @tanstack/db", - "version": "0.0.4", + "version": "0.0.5", "author": "Kyle Mathews", "license": "MIT", "repository": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f952fc5e2..199506364 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -103,13 +103,13 @@ importers: examples/react/todo: dependencies: '@tanstack/db-collections': - specifier: ^0.0.7 + specifier: ^0.0.8 version: link:../../../packages/db-collections '@tanstack/query-core': specifier: ^5.75.7 version: 5.75.7 '@tanstack/react-db': - specifier: ^0.0.5 + specifier: ^0.0.6 version: link:../../../packages/react-db cors: specifier: ^2.8.5