Skip to content

Commit cca7a15

Browse files
committed
v0.0.2: query bundles, defineEntity alias, new docs and tutorial
1 parent 5b32b68 commit cca7a15

15 files changed

Lines changed: 2416 additions & 98 deletions

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,20 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [0.0.2] - 2026-06-03
9+
10+
### Added
11+
12+
- `defineEntity()` object-form alias for `entity()` — named fields for larger schemas
13+
- `DbQueryBundle`, `DbQueryBundleContext`, `DbQueryBundleStage` exports for composable query pipelines
14+
- `EntityCache` and `SelectedEntityCache` type exports for optimistic cache integration
15+
- New docs: `tutorial.md`, `requests.md`, `actions-live-views.md`
16+
17+
### Changed
18+
19+
- Expanded query bundle infrastructure in `db.ts` and `react.ts`
20+
- Query collection adapter improvements
21+
822
## [0.0.1] - 2026-06-02
923

1024
### Added
@@ -24,4 +38,5 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2438
- SSR hydration with confirmed-state snapshots
2539
- Testing utilities: memory DBs, fixtures, mocks, render helpers
2640

41+
[0.0.2]: https://github.com/doeixd/tanstackstart-db/releases/tag/v0.0.2
2742
[0.0.1]: https://github.com/doeixd/tanstackstart-db/releases/tag/v0.0.1

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -727,11 +727,12 @@ expect(data.post.title).toBe("Hello");
727727
@doeixd/tanstackstart-db/sync-collection
728728
```
729729

730-
Optional peer dependencies are only needed for the entrypoints you use:
730+
Peer dependency requirements by entrypoint:
731731

732732
- `@tanstack/query-core` and `@tanstack/query-db-collection` for
733733
`query-collection`
734-
- `@tanstack/react-router` and `react` for `react`
734+
- `react` and `@tanstack/react-router` for the root package and `react`
735+
- `react-dom` for `testing`
735736

736737
## Development
737738

docs/README.md

Lines changed: 24 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -6,30 +6,36 @@ files in this folder are the deep-dives.
66

77
## Topics
88

9-
| Document | What it covers |
10-
| -------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ |
11-
| [`design.md`](./design.md) | Positioning, "not Fate", relationship to TanStack DB, escape hatches, the rationale for the API choices. |
12-
| [`views.md`](./views.md) | Defining views, field selection, nested relationship projections, deep-freeze, view-aware query specs. |
13-
| [`relationships.md`](./relationships.md) | `api.one` / `api.many` declarations, generated helpers, foldable joins, post-execute materialization. |
14-
| [`pagination.md`](./pagination.md) | `createInfiniteQuery`, the `null` / `undefined` terminator, the React hooks, route integration, SSR warming. |
15-
| [`authorization.md`](./authorization.md) | The `authorize` hook, `DbAuthError`, shared gates, ordering relative to optimistic / run. |
16-
| [`optimistic-conflict-offline.md`](./optimistic-conflict-offline.md) | Optimistic overlays, rollback, `DbConflictError`, `DbOfflineError`, recovery patterns. |
17-
| [`action-aliases.md`](./action-aliases.md) | `.with(...)`, `.extend(...)`, route-level aliasing, `actionName` preservation, generated CRUD auto-affects. |
18-
| [`query-keys.md`](./query-keys.md) | The default key shape, explicit keys, view bindings, React resource cache dedup, action-side invalidation. |
19-
| [`devtools.md`](./devtools.md) | Deferred to v0.2. Placeholder with the design intent and the open questions. |
9+
| Document | What it covers |
10+
| -------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- |
11+
| [`tutorial.md`](./tutorial.md) | A progressive refactor from a normal posts route with a like button into schema-backed DB routes and actions. |
12+
| [`design.md`](./design.md) | Positioning, "not Fate", relationship to TanStack DB, escape hatches, the rationale for the API choices. |
13+
| [`views.md`](./views.md) | Defining views, field selection, nested relationship projections, deep-freeze, view-aware query specs. |
14+
| [`requests.md`](./requests.md) | Query specs, route data contracts, request keys, cache modes, collection lifetime, SSR, and hydration. |
15+
| [`relationships.md`](./relationships.md) | `api.one` / `api.many` declarations, generated helpers, foldable joins, post-execute materialization. |
16+
| [`pagination.md`](./pagination.md) | `createInfiniteQuery`, the `null` / `undefined` terminator, the React hooks, route integration, SSR warming. |
17+
| [`authorization.md`](./authorization.md) | The `authorize` hook, `DbAuthError`, shared gates, ordering relative to optimistic / run. |
18+
| [`optimistic-conflict-offline.md`](./optimistic-conflict-offline.md) | Optimistic overlays, rollback, `DbConflictError`, `DbOfflineError`, recovery patterns. |
19+
| [`action-aliases.md`](./action-aliases.md) | `.with(...)`, `.extend(...)`, route-level aliasing, `actionName` preservation, generated CRUD auto-affects. |
20+
| [`query-keys.md`](./query-keys.md) | The default key shape, explicit keys, view bindings, React resource cache dedup, action-side invalidation. |
21+
| [`actions-live-views.md`](./actions-live-views.md) | Project-native equivalents for actions, optimistic writes, live queries, pagination, and view composition. |
22+
| [`devtools.md`](./devtools.md) | Deferred to v0.2. Placeholder with the design intent and the open questions. |
2023

2124
## Reading order
2225

2326
If you are new to the package, the suggested reading order is:
2427

2528
1. `design.md` — the positioning and the rationale for the API.
26-
2. `views.md` — the view contract is the first thing most users touch.
27-
3. `relationships.md` — the schema declaration that views depend on.
28-
4. `query-keys.md` — how the runtime identifies a query.
29-
5. `pagination.md` — only if you need infinite queries.
30-
6. `action-aliases.md` — the action chain and route-level aliasing.
31-
7. `authorization.md` — the per-action gate.
32-
8. `optimistic-conflict-offline.md` — the failure modes and recovery.
29+
2. `tutorial.md` — the practical adoption path from a normal route.
30+
3. `views.md` — the view contract is the first thing most users touch.
31+
4. `requests.md` — how reads, route data, and hydration work.
32+
5. `relationships.md` — the schema declaration that views depend on.
33+
6. `query-keys.md` — how the runtime identifies a query.
34+
7. `pagination.md` — only if you need infinite queries.
35+
8. `action-aliases.md` — the action chain and route-level aliasing.
36+
9. `authorization.md` — the per-action gate.
37+
10. `optimistic-conflict-offline.md` — the failure modes and recovery.
38+
11. `actions-live-views.md` — a cross-topic map of common app patterns.
3339

3440
The Devtools document is a placeholder; the rest of the package is the
3541
v0.1 surface.

0 commit comments

Comments
 (0)