Skip to content
Closed
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
2 changes: 1 addition & 1 deletion .github/workflows/autofix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v5.0.0
uses: actions/checkout@v5.0.1
with:
fetch-depth: 0
- name: Setup Tools
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs-sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v5.0.0
uses: actions/checkout@v5.0.1
with:
fetch-depth: 0

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 10.22.0
version: 10.23.0

- name: Setup Node.js
uses: actions/setup-node@v4
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v5.0.0
uses: actions/checkout@v5.0.1
with:
fetch-depth: 0
- name: Setup Tools
Expand All @@ -39,7 +39,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v5.0.0
uses: actions/checkout@v5.0.1
with:
fetch-depth: 0
- name: Setup Tools
Expand Down Expand Up @@ -67,7 +67,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v5.0.0
uses: actions/checkout@v5.0.1
- name: Setup Tools
uses: tanstack/config/.github/setup@main
- name: Build Packages
Expand All @@ -81,7 +81,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v5.0.0
uses: actions/checkout@v5.0.1
- name: Setup Tools
uses: tanstack/config/.github/setup@main
- name: Build Packages
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v5.0.0
uses: actions/checkout@v5.0.1
with:
fetch-depth: 0
- name: Setup Tools
Expand Down Expand Up @@ -62,8 +62,6 @@ jobs:
--body "Automated documentation update from release" \
--base main \
--head "$BRANCH"

gh pr merge "$BRANCH" --auto --squash
else
echo "No changes in generated docs"
fi
Expand Down
1 change: 1 addition & 0 deletions docs/reference/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ title: "@tanstack/db"
- [SyncMode](../type-aliases/SyncMode.md)
- [TransactionState](../type-aliases/TransactionState.md)
- [TransactionWithMutations](../type-aliases/TransactionWithMutations.md)
- [UnloadSubsetFn](../type-aliases/UnloadSubsetFn.md)
- [UpdateMutationFn](../type-aliases/UpdateMutationFn.md)
- [UpdateMutationFnParams](../type-aliases/UpdateMutationFnParams.md)
- [UtilsRecord](../type-aliases/UtilsRecord.md)
Expand Down
28 changes: 14 additions & 14 deletions docs/reference/interfaces/BaseCollectionConfig.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ title: BaseCollectionConfig

# Interface: BaseCollectionConfig\<T, TKey, TSchema, TUtils, TReturn\>

Defined in: [packages/db/src/types.ts:435](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L435)
Defined in: [packages/db/src/types.ts:438](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L438)

## Extended by

Expand Down Expand Up @@ -42,7 +42,7 @@ Defined in: [packages/db/src/types.ts:435](https://github.com/TanStack/db/blob/m
optional autoIndex: "eager" | "off";
```

Defined in: [packages/db/src/types.ts:484](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L484)
Defined in: [packages/db/src/types.ts:487](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L487)

Auto-indexing mode for the collection.
When enabled, indexes will be automatically created for simple where expressions.
Expand All @@ -66,7 +66,7 @@ When enabled, indexes will be automatically created for simple where expressions
optional compare: (x, y) => number;
```

Defined in: [packages/db/src/types.ts:495](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L495)
Defined in: [packages/db/src/types.ts:498](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L498)

Optional function to compare two items.
This is used to order the items in the collection.
Expand Down Expand Up @@ -106,7 +106,7 @@ compare: (x, y) => x.createdAt.getTime() - y.createdAt.getTime()
optional defaultStringCollation: StringCollationConfig;
```

Defined in: [packages/db/src/types.ts:641](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L641)
Defined in: [packages/db/src/types.ts:644](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L644)

Specifies how to compare data in the collection.
This should be configured to match data ordering on the backend.
Expand All @@ -121,7 +121,7 @@ E.g., when using the Electric DB collection these options
optional gcTime: number;
```

Defined in: [packages/db/src/types.ts:464](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L464)
Defined in: [packages/db/src/types.ts:467](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L467)

Time in milliseconds after which the collection will be garbage collected
when it has no active subscribers. Defaults to 5 minutes (300000ms).
Expand All @@ -134,7 +134,7 @@ when it has no active subscribers. Defaults to 5 minutes (300000ms).
getKey: (item) => TKey;
```

Defined in: [packages/db/src/types.ts:459](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L459)
Defined in: [packages/db/src/types.ts:462](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L462)

Function to extract the ID from an object
This is required for update/delete operations which now only accept IDs
Expand Down Expand Up @@ -168,7 +168,7 @@ getKey: (item) => item.uuid
optional id: string;
```

Defined in: [packages/db/src/types.ts:448](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L448)
Defined in: [packages/db/src/types.ts:451](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L451)

***

Expand All @@ -178,7 +178,7 @@ Defined in: [packages/db/src/types.ts:448](https://github.com/TanStack/db/blob/m
optional onDelete: DeleteMutationFn<T, TKey, TUtils, TReturn>;
```

Defined in: [packages/db/src/types.ts:633](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L633)
Defined in: [packages/db/src/types.ts:636](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L636)

Optional asynchronous handler function called before a delete operation

Expand Down Expand Up @@ -242,7 +242,7 @@ onDelete: async ({ transaction, collection }) => {
optional onInsert: InsertMutationFn<T, TKey, TUtils, TReturn>;
```

Defined in: [packages/db/src/types.ts:546](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L546)
Defined in: [packages/db/src/types.ts:549](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L549)

Optional asynchronous handler function called before an insert operation

Expand Down Expand Up @@ -305,7 +305,7 @@ onInsert: async ({ transaction, collection }) => {
optional onUpdate: UpdateMutationFn<T, TKey, TUtils, TReturn>;
```

Defined in: [packages/db/src/types.ts:590](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L590)
Defined in: [packages/db/src/types.ts:593](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L593)

Optional asynchronous handler function called before an update operation

Expand Down Expand Up @@ -369,7 +369,7 @@ onUpdate: async ({ transaction, collection }) => {
optional schema: TSchema;
```

Defined in: [packages/db/src/types.ts:449](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L449)
Defined in: [packages/db/src/types.ts:452](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L452)

***

Expand All @@ -379,7 +379,7 @@ Defined in: [packages/db/src/types.ts:449](https://github.com/TanStack/db/blob/m
optional startSync: boolean;
```

Defined in: [packages/db/src/types.ts:475](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L475)
Defined in: [packages/db/src/types.ts:478](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L478)

Whether to eagerly start syncing on collection creation.
When true, syncing begins immediately. When false, syncing starts when the first subscriber attaches.
Expand All @@ -402,7 +402,7 @@ false
optional syncMode: SyncMode;
```

Defined in: [packages/db/src/types.ts:504](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L504)
Defined in: [packages/db/src/types.ts:507](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L507)

The mode of sync to use for the collection.

Expand All @@ -424,4 +424,4 @@ The exact implementation of the sync mode is up to the sync implementation.
optional utils: TUtils;
```

Defined in: [packages/db/src/types.ts:643](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L643)
Defined in: [packages/db/src/types.ts:646](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L646)
12 changes: 6 additions & 6 deletions docs/reference/interfaces/ChangeMessage.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ title: ChangeMessage

# Interface: ChangeMessage\<T, TKey\>

Defined in: [packages/db/src/types.ts:311](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L311)
Defined in: [packages/db/src/types.ts:314](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L314)

## Extended by

Expand All @@ -29,7 +29,7 @@ Defined in: [packages/db/src/types.ts:311](https://github.com/TanStack/db/blob/m
key: TKey;
```

Defined in: [packages/db/src/types.ts:315](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L315)
Defined in: [packages/db/src/types.ts:318](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L318)

***

Expand All @@ -39,7 +39,7 @@ Defined in: [packages/db/src/types.ts:315](https://github.com/TanStack/db/blob/m
optional metadata: Record<string, unknown>;
```

Defined in: [packages/db/src/types.ts:319](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L319)
Defined in: [packages/db/src/types.ts:322](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L322)

***

Expand All @@ -49,7 +49,7 @@ Defined in: [packages/db/src/types.ts:319](https://github.com/TanStack/db/blob/m
optional previousValue: T;
```

Defined in: [packages/db/src/types.ts:317](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L317)
Defined in: [packages/db/src/types.ts:320](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L320)

***

Expand All @@ -59,7 +59,7 @@ Defined in: [packages/db/src/types.ts:317](https://github.com/TanStack/db/blob/m
type: OperationType;
```

Defined in: [packages/db/src/types.ts:318](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L318)
Defined in: [packages/db/src/types.ts:321](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L321)

***

Expand All @@ -69,4 +69,4 @@ Defined in: [packages/db/src/types.ts:318](https://github.com/TanStack/db/blob/m
value: T;
```

Defined in: [packages/db/src/types.ts:316](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L316)
Defined in: [packages/db/src/types.ts:319](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L319)
30 changes: 15 additions & 15 deletions docs/reference/interfaces/CollectionConfig.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ title: CollectionConfig

# Interface: CollectionConfig\<T, TKey, TSchema, TUtils\>

Defined in: [packages/db/src/types.ts:646](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L646)
Defined in: [packages/db/src/types.ts:649](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L649)

## Extends

Expand Down Expand Up @@ -37,7 +37,7 @@ Defined in: [packages/db/src/types.ts:646](https://github.com/TanStack/db/blob/m
optional autoIndex: "eager" | "off";
```

Defined in: [packages/db/src/types.ts:484](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L484)
Defined in: [packages/db/src/types.ts:487](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L487)

Auto-indexing mode for the collection.
When enabled, indexes will be automatically created for simple where expressions.
Expand Down Expand Up @@ -65,7 +65,7 @@ When enabled, indexes will be automatically created for simple where expressions
optional compare: (x, y) => number;
```

Defined in: [packages/db/src/types.ts:495](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L495)
Defined in: [packages/db/src/types.ts:498](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L498)

Optional function to compare two items.
This is used to order the items in the collection.
Expand Down Expand Up @@ -109,7 +109,7 @@ compare: (x, y) => x.createdAt.getTime() - y.createdAt.getTime()
optional defaultStringCollation: StringCollationConfig;
```

Defined in: [packages/db/src/types.ts:641](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L641)
Defined in: [packages/db/src/types.ts:644](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L644)

Specifies how to compare data in the collection.
This should be configured to match data ordering on the backend.
Expand All @@ -128,7 +128,7 @@ E.g., when using the Electric DB collection these options
optional gcTime: number;
```

Defined in: [packages/db/src/types.ts:464](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L464)
Defined in: [packages/db/src/types.ts:467](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L467)

Time in milliseconds after which the collection will be garbage collected
when it has no active subscribers. Defaults to 5 minutes (300000ms).
Expand All @@ -145,7 +145,7 @@ when it has no active subscribers. Defaults to 5 minutes (300000ms).
getKey: (item) => TKey;
```

Defined in: [packages/db/src/types.ts:459](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L459)
Defined in: [packages/db/src/types.ts:462](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L462)

Function to extract the ID from an object
This is required for update/delete operations which now only accept IDs
Expand Down Expand Up @@ -183,7 +183,7 @@ getKey: (item) => item.uuid
optional id: string;
```

Defined in: [packages/db/src/types.ts:448](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L448)
Defined in: [packages/db/src/types.ts:451](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L451)

#### Inherited from

Expand All @@ -197,7 +197,7 @@ Defined in: [packages/db/src/types.ts:448](https://github.com/TanStack/db/blob/m
optional onDelete: DeleteMutationFn<T, TKey, TUtils, any>;
```

Defined in: [packages/db/src/types.ts:633](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L633)
Defined in: [packages/db/src/types.ts:636](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L636)

Optional asynchronous handler function called before a delete operation

Expand Down Expand Up @@ -265,7 +265,7 @@ onDelete: async ({ transaction, collection }) => {
optional onInsert: InsertMutationFn<T, TKey, TUtils, any>;
```

Defined in: [packages/db/src/types.ts:546](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L546)
Defined in: [packages/db/src/types.ts:549](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L549)

Optional asynchronous handler function called before an insert operation

Expand Down Expand Up @@ -332,7 +332,7 @@ onInsert: async ({ transaction, collection }) => {
optional onUpdate: UpdateMutationFn<T, TKey, TUtils, any>;
```

Defined in: [packages/db/src/types.ts:590](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L590)
Defined in: [packages/db/src/types.ts:593](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L593)

Optional asynchronous handler function called before an update operation

Expand Down Expand Up @@ -400,7 +400,7 @@ onUpdate: async ({ transaction, collection }) => {
optional schema: TSchema;
```

Defined in: [packages/db/src/types.ts:449](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L449)
Defined in: [packages/db/src/types.ts:452](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L452)

#### Inherited from

Expand All @@ -414,7 +414,7 @@ Defined in: [packages/db/src/types.ts:449](https://github.com/TanStack/db/blob/m
optional startSync: boolean;
```

Defined in: [packages/db/src/types.ts:475](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L475)
Defined in: [packages/db/src/types.ts:478](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L478)

Whether to eagerly start syncing on collection creation.
When true, syncing begins immediately. When false, syncing starts when the first subscriber attaches.
Expand All @@ -441,7 +441,7 @@ false
sync: SyncConfig<T, TKey>;
```

Defined in: [packages/db/src/types.ts:652](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L652)
Defined in: [packages/db/src/types.ts:655](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L655)

***

Expand All @@ -451,7 +451,7 @@ Defined in: [packages/db/src/types.ts:652](https://github.com/TanStack/db/blob/m
optional syncMode: SyncMode;
```

Defined in: [packages/db/src/types.ts:504](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L504)
Defined in: [packages/db/src/types.ts:507](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L507)

The mode of sync to use for the collection.

Expand All @@ -477,7 +477,7 @@ The exact implementation of the sync mode is up to the sync implementation.
optional utils: TUtils;
```

Defined in: [packages/db/src/types.ts:643](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L643)
Defined in: [packages/db/src/types.ts:646](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L646)

#### Inherited from

Expand Down
Loading