Repository navigation
Prepare first TanStack DB 1.0 release candidate - #2171
KyleAMathews wants to merge 19 commits into
Conversation
🦋 Changeset detectedLatest commit: e7d8446 The changes in this PR will be included in the next version bump. This PR includes changesets to release 36 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Important Review skippedToo many files! This PR contains 356 files, which is 56 over the limit of 300. To get a review, reduce the PR to 300 files or fewer by splitting it into smaller PRs or changing its base branch. Usage-priced reviews support at most 300 files. ⚙️ Run configuration
⛔ Files ignored due to path filters: 1
📒 Files selected for processing: 356
You can disable this status message by setting the
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Size Change: -695 B (-0.32%) Total Size: 219 kB 📦 View Changed
ℹ️ View Unchanged
|
Incremental update benchmarkComparing Overall median write time vs base: 1.00× · cold hydrate time: 0.99× (geometric mean of per-case ratios; lower is faster). Writes: 1 regression(s), 2 improvement(s) (threshold: ±20% and >0.05ms). Cold hydrate: 0 regression(s), 1 improvement(s) (threshold: ±50% and >5ms). Per-case flags are noisy on shared runners. Read the geometric means first. Writes
Cold hydrate
Each row aggregates the 14.4 scale/index/write-mode configurations of that query; per-configuration tables below. 100 rows/collection | source indexes: none | synced writes — geomean 1.04×, cold 1.08×
100 rows/collection | source indexes: none | optimistic writes — geomean 1.04×, cold 0.98×
100 rows/collection | source indexes: manual | synced writes — geomean 0.90×, cold 1.09×
100 rows/collection | source indexes: manual | optimistic writes — geomean 1.04×, cold 1.03×
1,000 rows/collection | source indexes: none | synced writes — geomean 0.92×, cold 1.22×, 2 change(s)
1,000 rows/collection | source indexes: none | optimistic writes — geomean 0.95×, cold 0.83×
1,000 rows/collection | source indexes: manual | synced writes — geomean 1.03×, cold 0.94×
1,000 rows/collection | source indexes: manual | optimistic writes — geomean 1.00×, cold 0.94×
10,000 rows/collection | source indexes: none | synced writes — geomean 1.03×, cold 1.03×, 1 change(s)
10,000 rows/collection | source indexes: none | optimistic writes — geomean 1.07×, cold 0.89×, 1 change(s)
10,000 rows/collection | source indexes: manual | synced writes — geomean 0.95×, cold 0.95×
10,000 rows/collection | source indexes: manual | optimistic writes — geomean 1.01×, cold 0.97×
Runner: node v24.8.0, linux 7.0.0-1017-azure, AMD EPYC 9V74 80-Core Processor. Timings on shared CI runners are noisy; treat small deltas as indicative only. |
More templates
@tanstack/angular-db
@tanstack/browser-db-sqlite-persistence
@tanstack/capacitor-db-sqlite-persistence
@tanstack/cloudflare-durable-objects-db-sqlite-persistence
@tanstack/db
@tanstack/db-ivm
@tanstack/db-sqlite-persistence-core
@tanstack/electric-db-collection
@tanstack/electron-db-sqlite-persistence
@tanstack/expo-db-sqlite-persistence
@tanstack/node-db-sqlite-persistence
@tanstack/offline-transactions
@tanstack/powersync-db-collection
@tanstack/query-db-collection
@tanstack/react-db
@tanstack/react-native-db-sqlite-persistence
@tanstack/react-router-with-db
@tanstack/rxdb-db-collection
@tanstack/solid-db
@tanstack/svelte-db
@tanstack/tauri-db-sqlite-persistence
@tanstack/trailbase-db-collection
@tanstack/vue-db
commit: |
# Conflicts: # docs/contributing/oracle-coverage.md
Summary
Prepare TanStack DB for its first 1.0 release candidate. Remove the deprecated APIs in #1319 and document recent migration steps.
This PR also keeps virtual metadata tied to the selected source row. The release scripts support ordinary Changesets throughout the RC period.
API and migration
Replace
$syncedwith$hasPendingWrites. Replacetransaction.isPersistedwithtransaction.when('settled').Remove deprecated handler return values, React hook dependency arrays, and Solid query
.dataaccess. Electric mutation handlers now reject returned values. Awaitcollection.utils.awaitTxId(txid)orawaitMatch()inside the handler.Query Collection's accompanying 1.x minor release removes automatic refetch after mutation handlers. Handlers return
Promise<void>and explicitly refresh confirmed data:Handlers can instead await direct writes with the confirmed server response. Without either step, optimistic changes revert to the previous synced rows at settlement. Remove
{ refetch: false }from existing handlers. Polling, focus, reconnect, and external invalidation still operate independently.A live query protects
$hasPendingWrites,$origin,$key, and$collectionIdon published Collection rows. A selected joined row keeps its source metadata. With multiple source spreads, the last spread supplies that metadata. Collection-valued includes follow the same rule. Inline query values keep their selected shape.Client renders can use
getKeyorschemawithout a ReactqueryKey. Keep those option references stable across renders. SSR streaming still needs an explicit, serializablequeryKey.The migration guide covers these removals and changes since
@tanstack/db@0.9.2in September. It includes Query Collection writes, IndexedDB imports, sync and persistence contracts, query windows, and adapter requirements.Release process
The first Changeset versions all 21 public packages below 1.0 as
1.0.0-rc.1.Query Collection and Offline Transactions accidentally reached 1.x before this RC. They stay on 1.x. Query Collection receives a minor release. Offline Transactions receives a compatibility patch. Both packages now accept
@tanstack/dbthrough the peer range^0.15.0 || ^1.0.0-rc.0.During the RC, maintainers can add ordinary Changesets:
1.0.0-rc.1to1.0.0-rc.1.1, then to1.0.0-rc.1.2.1.0.0-rc.1.2to1.0.0-rc.2.The publish command sends stable releases to npm's
latesttag first. It then sends candidate packages to therctag. Both passes use the existing publish authentication.For the final 1.0 release, commit the result of
pnpm changeset pre exit. The next Version Packages PR promotes candidates to1.0.0. Exit applies only pending Changesets. It also includes dependent bumps when an exact workspace dependency must change.Verification
After merging
origin/mainat621833269, the explicit-refetch change is in70a26277c:when('settled')./docs. The new migration and evidence links resolve.The explicit-refresh evidence records the contract, checkpoints, and test limits.
Before this follow-up, all executable PR jobs passed on
fa5a48a6d. These included both DB shards and browser, desktop, and cloud/mobile E2E. CodeRabbit skipped that review because 335 changed files exceeded its 300-file limit.That earlier verification also covered React and Electric tests, the affected DB oracles, a frozen lockfile install, and packed stable-package peer dependencies. The current follow-up retains the DB peer range. Native Chromium and Electron reload drivers did not run locally for the mechanical wait migration.
Closes #1319.