Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 0 additions & 20 deletions .changeset/fix-array-iteration-proxy.md

This file was deleted.

2 changes: 1 addition & 1 deletion examples/react/offline-transactions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"dependencies": {
"@tanstack/offline-transactions": ">=1.0.0",
"@tanstack/query-db-collection": ">=1.0.5",
"@tanstack/react-db": ">=0.1.50",
"@tanstack/react-db": ">=0.1.51",
"@tanstack/react-query": "^5.90.10",
"@tanstack/react-router": "^1.139.3",
"@tanstack/react-router-devtools": "^1.139.3",
Expand Down
2 changes: 1 addition & 1 deletion examples/react/projects/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"@tailwindcss/vite": "^4.1.17",
"@tanstack/query-core": "^5.90.10",
"@tanstack/query-db-collection": ">=1.0.5",
"@tanstack/react-db": ">=0.1.50",
"@tanstack/react-db": ">=0.1.51",
"@tanstack/react-router": "^1.139.3",
"@tanstack/react-router-devtools": "^1.139.3",
"@tanstack/react-router-with-query": "^1.130.17",
Expand Down
7 changes: 7 additions & 0 deletions packages/angular-db/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @tanstack/angular-db

## 0.1.33

### Patch Changes

- Updated dependencies [[`295cb45`](https://github.com/TanStack/db/commit/295cb45797572b232650eddd3d62ffa937fa2fd7)]:
- @tanstack/db@0.5.7

## 0.1.32

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/angular-db/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@tanstack/angular-db",
"description": "Angular integration for @tanstack/db",
"version": "0.1.32",
"version": "0.1.33",
"author": "Ethan McDaniel",
"license": "MIT",
"repository": {
Expand Down
9 changes: 9 additions & 0 deletions packages/db-collection-e2e/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# @tanstack/db-collection-e2e

## 0.0.9

### Patch Changes

- Updated dependencies [[`295cb45`](https://github.com/TanStack/db/commit/295cb45797572b232650eddd3d62ffa937fa2fd7)]:
- @tanstack/db@0.5.7
- @tanstack/electric-db-collection@0.2.7
- @tanstack/query-db-collection@1.0.5

## 0.0.8

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/db-collection-e2e/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tanstack/db-collection-e2e",
"version": "0.0.8",
"version": "0.0.9",
"private": true,
"description": "End-to-end test suite for TanStack DB collections",
"type": "module",
Expand Down
21 changes: 21 additions & 0 deletions packages/db/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,26 @@
# @tanstack/db

## 0.5.7

### Patch Changes

- Fix change tracking for array items accessed via iteration methods (find, forEach, for...of, etc.) ([#910](https://github.com/TanStack/db/pull/910))

Previously, modifications to array items retrieved via iteration methods were not tracked by the change proxy because these methods returned raw array elements instead of proxied versions. This caused `getChanges()` to return an empty object, which in turn caused `createOptimisticAction`'s `mutationFn` to never be called when using patterns like:

```ts
collection.update(id, (draft) => {
const item = draft.items.find((x) => x.id === targetId)
if (item) {
item.value = newValue // This change was not tracked!
}
})
```

The fix adds proxy handling for array iteration methods similar to how Map/Set iteration is already handled, ensuring that callbacks receive proxied elements and returned elements are properly proxied.

Also refactors proxy.ts for improved readability by extracting helper functions and hoisting constants to module scope.

## 0.5.6

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/db/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@tanstack/db",
"description": "A reactive client store for building super fast apps on sync",
"version": "0.5.6",
"version": "0.5.7",
"dependencies": {
"@standard-schema/spec": "^1.0.0",
"@tanstack/db-ivm": "workspace:*",
Expand Down
7 changes: 7 additions & 0 deletions packages/electric-db-collection/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @tanstack/electric-db-collection

## 0.2.7

### Patch Changes

- Updated dependencies [[`295cb45`](https://github.com/TanStack/db/commit/295cb45797572b232650eddd3d62ffa937fa2fd7)]:
- @tanstack/db@0.5.7

## 0.2.6

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/electric-db-collection/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@tanstack/electric-db-collection",
"description": "ElectricSQL collection for TanStack DB",
"version": "0.2.6",
"version": "0.2.7",
"dependencies": {
"@electric-sql/client": "^1.1.5",
"@standard-schema/spec": "^1.0.0",
Expand Down
7 changes: 7 additions & 0 deletions packages/powersync-db-collection/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @tanstack/powersync-db-collection

## 0.1.11

### Patch Changes

- Updated dependencies [[`295cb45`](https://github.com/TanStack/db/commit/295cb45797572b232650eddd3d62ffa937fa2fd7)]:
- @tanstack/db@0.5.7

## 0.1.10

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/powersync-db-collection/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@tanstack/powersync-db-collection",
"description": "PowerSync collection for TanStack DB",
"version": "0.1.10",
"version": "0.1.11",
"dependencies": {
"@standard-schema/spec": "^1.0.0",
"@tanstack/db": "workspace:*",
Expand Down
7 changes: 7 additions & 0 deletions packages/react-db/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @tanstack/react-db

## 0.1.51

### Patch Changes

- Updated dependencies [[`295cb45`](https://github.com/TanStack/db/commit/295cb45797572b232650eddd3d62ffa937fa2fd7)]:
- @tanstack/db@0.5.7

## 0.1.50

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/react-db/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@tanstack/react-db",
"description": "React integration for @tanstack/db",
"version": "0.1.50",
"version": "0.1.51",
"author": "Kyle Mathews",
"license": "MIT",
"repository": {
Expand Down
7 changes: 7 additions & 0 deletions packages/rxdb-db-collection/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @tanstack/rxdb-db-collection

## 0.1.39

### Patch Changes

- Updated dependencies [[`295cb45`](https://github.com/TanStack/db/commit/295cb45797572b232650eddd3d62ffa937fa2fd7)]:
- @tanstack/db@0.5.7

## 0.1.38

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/rxdb-db-collection/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@tanstack/rxdb-db-collection",
"description": "RxDB collection for TanStack DB",
"version": "0.1.38",
"version": "0.1.39",
"dependencies": {
"rxdb": "16.20.0",
"@standard-schema/spec": "^1.0.0",
Expand Down
7 changes: 7 additions & 0 deletions packages/solid-db/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @tanstack/react-db

## 0.1.50

### Patch Changes

- Updated dependencies [[`295cb45`](https://github.com/TanStack/db/commit/295cb45797572b232650eddd3d62ffa937fa2fd7)]:
- @tanstack/db@0.5.7

## 0.1.49

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/solid-db/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@tanstack/solid-db",
"description": "Solid integration for @tanstack/db",
"version": "0.1.49",
"version": "0.1.50",
"author": "Kyle Mathews",
"license": "MIT",
"repository": {
Expand Down
7 changes: 7 additions & 0 deletions packages/svelte-db/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @tanstack/svelte-db

## 0.1.50

### Patch Changes

- Updated dependencies [[`295cb45`](https://github.com/TanStack/db/commit/295cb45797572b232650eddd3d62ffa937fa2fd7)]:
- @tanstack/db@0.5.7

## 0.1.49

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/svelte-db/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@tanstack/svelte-db",
"description": "Svelte integration for @tanstack/db",
"version": "0.1.49",
"version": "0.1.50",
"dependencies": {
"@tanstack/db": "workspace:*"
},
Expand Down
7 changes: 7 additions & 0 deletions packages/trailbase-db-collection/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @tanstack/trailbase-db-collection

## 0.1.51

### Patch Changes

- Updated dependencies [[`295cb45`](https://github.com/TanStack/db/commit/295cb45797572b232650eddd3d62ffa937fa2fd7)]:
- @tanstack/db@0.5.7

## 0.1.50

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/trailbase-db-collection/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@tanstack/trailbase-db-collection",
"description": "TrailBase collection for TanStack DB",
"version": "0.1.50",
"version": "0.1.51",
"dependencies": {
"@standard-schema/spec": "^1.0.0",
"@tanstack/db": "workspace:*",
Expand Down
7 changes: 7 additions & 0 deletions packages/vue-db/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @tanstack/vue-db

## 0.0.83

### Patch Changes

- Updated dependencies [[`295cb45`](https://github.com/TanStack/db/commit/295cb45797572b232650eddd3d62ffa937fa2fd7)]:
- @tanstack/db@0.5.7

## 0.0.82

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/vue-db/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@tanstack/vue-db",
"description": "Vue integration for @tanstack/db",
"version": "0.0.82",
"version": "0.0.83",
"author": "Kyle Mathews",
"license": "MIT",
"repository": {
Expand Down