From e9a9ccbf90f22a3ecd691b6a3fa1066c4ec543c2 Mon Sep 17 00:00:00 2001 From: Jacob Maynard Date: Tue, 15 Sep 2026 18:13:40 -0500 Subject: [PATCH 1/2] =?UTF-8?q?client:=20peer=20on=20@tanstack/db=20^0.8?= =?UTF-8?q?=20||=20^0.9,=20dev=20and=20demo=20on=20the=200.9.0=20pair=20?= =?UTF-8?q?=E2=80=94=200.3.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit TanStack DB 0.9.0 ships the fix for the same-key congruence race (TanStack/db#1797) that corates carried as a pnpm patch on 0.8.7. The client only uses public APIs (createCollection, createTransaction and types) so the peer range widens rather than moves. react-db admits 0.4.x because 0.4.1 is the pair for db 0.9.2, which the db range already allows. Dedupe collapsed the client's auto-installed react-db peer from 0.3.7, which dragged a second copy of db 0.8.7 into the client's tree. --- apps/demo/package.json | 2 +- packages/client/package.json | 8 ++++---- pnpm-lock.yaml | 34 +++++++++++++++++----------------- 3 files changed, 22 insertions(+), 22 deletions(-) diff --git a/apps/demo/package.json b/apps/demo/package.json index 699364f..70abe59 100644 --- a/apps/demo/package.json +++ b/apps/demo/package.json @@ -15,7 +15,7 @@ "@cf-sync/protocol": "workspace:*", "@cf-sync/server": "workspace:*", "@cf-sync/yjs": "workspace:*", - "@tanstack/react-db": "^0.3.7", + "@tanstack/react-db": "^0.3.8", "react": "^19.0.0", "react-dom": "^19.0.0", "ulidx": "^2.4.0", diff --git a/packages/client/package.json b/packages/client/package.json index ca6904a..2b46dd0 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -1,6 +1,6 @@ { "name": "@cf-sync/client", - "version": "0.3.0", + "version": "0.3.1", "description": "Browser client for cf-sync: SyncClient (optimistic mutations, offline outbox, IndexedDB mirror, presence) and a TanStack DB collection adapter, with React hooks", "license": "MIT", "repository": { @@ -54,8 +54,8 @@ "@cf-sync/protocol": "workspace:^" }, "peerDependencies": { - "@tanstack/db": "^0.8.0", - "@tanstack/react-db": "^0.3.0", + "@tanstack/db": "^0.8.0 || ^0.9.0", + "@tanstack/react-db": "^0.3.0 || ^0.4.0", "react": ">=18" }, "peerDependenciesMeta": { @@ -68,7 +68,7 @@ }, "devDependencies": { "@cf-sync/yjs": "workspace:*", - "@tanstack/db": "^0.8.7", + "@tanstack/db": "^0.9.0", "@types/react": "^19.0.0", "@types/react-dom": "^19.2.3", "fake-indexeddb": "^6.2.5", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index ca6a1fd..7aa9eb5 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -39,8 +39,8 @@ importers: specifier: workspace:* version: link:../../packages/yjs '@tanstack/react-db': - specifier: ^0.3.7 - version: 0.3.7(react@19.2.7)(typescript@5.9.3) + specifier: ^0.3.8 + version: 0.3.8(react@19.2.7)(typescript@5.9.3) react: specifier: ^19.0.0 version: 19.2.7 @@ -97,15 +97,15 @@ importers: specifier: workspace:^ version: link:../protocol '@tanstack/react-db': - specifier: ^0.3.0 - version: 0.3.7(react@19.2.7)(typescript@5.9.3) + specifier: ^0.3.0 || ^0.4.0 + version: 0.3.8(react@19.2.7)(typescript@5.9.3) devDependencies: '@cf-sync/yjs': specifier: workspace:* version: link:../yjs '@tanstack/db': - specifier: ^0.8.7 - version: 0.8.7(typescript@5.9.3) + specifier: ^0.9.0 + version: 0.9.0(typescript@5.9.3) '@types/react': specifier: ^19.0.0 version: 19.2.17 @@ -1517,13 +1517,13 @@ packages: peerDependencies: vite: ^5.2.0 || ^6 || ^7 || ^8 - '@tanstack/db-ivm@0.1.19': - resolution: {integrity: sha512-3VGvgNXAPSVqny/pL8Y6n/txnaZzV49WmgSQ9N5eyCQNgMtuOEOJHKDatqqCy3gDxVu6pkhSHDKxcNFOtxMouw==} + '@tanstack/db-ivm@0.1.20': + resolution: {integrity: sha512-Rpol77pI6JgVO4CtuKXZ/SQAzK4+BuiTSebRsIBo5qiiswtHKrvmiLNfbMXSHpXUF2xJkohFrJq9ndsMP1jAuA==} peerDependencies: typescript: '>=4.7' - '@tanstack/db@0.8.7': - resolution: {integrity: sha512-NIocfK737qPvkE1Ot2iM5PXN6CSBZY5cw1ovAwo0RvQDc/iinyr3x7v+kavoiWxClbkul98J/wRzr0KLanMxOA==} + '@tanstack/db@0.9.0': + resolution: {integrity: sha512-wV8ln5zqTSM0Cn9eu+ePHExvzCa3A3cS+kxgRGryeBjDbMuLHrcTU1uGE8/6Etp+60LSfJFbhlojOZgj/kH/eQ==} peerDependencies: typescript: '>=4.7' @@ -1531,8 +1531,8 @@ packages: resolution: {integrity: sha512-eQ1MyLKCHyXiH7NbdmB80W77OhiMgGBUb+qDx/8WMGbwg5Lf/NlfD0TfNYAqY77i8V3AxoDoYdICrQE5ADw4Yw==} engines: {node: '>=18'} - '@tanstack/react-db@0.3.7': - resolution: {integrity: sha512-u0AmiKNyyZoYcTVWEFJ5NG+6mQ6mFKzxwQNeljW8mLPzM7vIBZMVfD5QxUDg7j/54ggsVNkp+MIFisaWEXxVug==} + '@tanstack/react-db@0.3.8': + resolution: {integrity: sha512-RzsjljPjICaBeBZ9OvnIqXK4JN1f7JC75Nokl9bc0mhTh3VURwDqIoUHI06PGTBnJ0Bx2NPrW2fPXbx9JwZOwQ==} peerDependencies: react: '>=16.8.0' @@ -3902,24 +3902,24 @@ snapshots: tailwindcss: 4.3.3 vite: 8.1.5(@types/node@26.1.1)(esbuild@0.28.1)(jiti@2.7.0)(yaml@2.9.0) - '@tanstack/db-ivm@0.1.19(typescript@5.9.3)': + '@tanstack/db-ivm@0.1.20(typescript@5.9.3)': dependencies: fractional-indexing: 3.4.0 sorted-btree: 1.8.1 typescript: 5.9.3 - '@tanstack/db@0.8.7(typescript@5.9.3)': + '@tanstack/db@0.9.0(typescript@5.9.3)': dependencies: '@standard-schema/spec': 1.1.0 - '@tanstack/db-ivm': 0.1.19(typescript@5.9.3) + '@tanstack/db-ivm': 0.1.20(typescript@5.9.3) '@tanstack/pacer-lite': 0.2.2 typescript: 5.9.3 '@tanstack/pacer-lite@0.2.2': {} - '@tanstack/react-db@0.3.7(react@19.2.7)(typescript@5.9.3)': + '@tanstack/react-db@0.3.8(react@19.2.7)(typescript@5.9.3)': dependencies: - '@tanstack/db': 0.8.7(typescript@5.9.3) + '@tanstack/db': 0.9.0(typescript@5.9.3) react: 19.2.7 use-sync-external-store: 1.6.0(react@19.2.7) transitivePeerDependencies: From 02accc872e3298a900cac1da2a05ac1638ac354c Mon Sep 17 00:00:00 2001 From: Jacob Maynard Date: Tue, 15 Sep 2026 18:13:40 -0500 Subject: [PATCH 2/2] repo: record the publish recipe in CLAUDE.md The command lived only in a per-project agent memory that other repos' sessions never load, so it kept being reconstructed wrong. --- CLAUDE.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/CLAUDE.md b/CLAUDE.md index 1dad265..fa22dd0 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -21,3 +21,15 @@ Invariants that must never break (see ARCHITECTURE.md#invariants): 1. A mutation's data effects and the client's `last_mutation_id` advance commit in the same SQLite transaction. 2. Permanent app errors still advance `last_mutation_id`. 3. All DO WebSocket handlers stay synchronous — no `await` between reading state and sending frames. + +## Releasing + +No release workflow, changesets, or tags: bump `version` in the package's package.json, commit, then from the repo root: + +```bash +npm login # only if `npm whoami` fails; the token in ~/.npmrc expires +pnpm build +pnpm -r --filter './packages/*' publish --access public --no-git-checks +``` + +Recursive publish skips packages whose version is already on the registry, so it is safe to run for the whole workspace after bumping one package. `--no-git-checks` is required because the untracked `packages/yjs/reference/` clones dirty the tree. `prepack` only syncs docs, so run `pnpm build` first; `publishConfig` swaps exports to `dist/` at pack time. Then `pnpm --filter @cf-sync/demo deploy` if the demo should pick the release up. Consumers on pnpm hold new versions for the release-age window unless they exclude `@cf-sync/*` (corates does).