Skip to content

Upgrade TanStack DB starter dependencies#4631

Open
KyleAMathews wants to merge 1 commit into
mainfrom
deps/upgrade-tanstack-db-starters
Open

Upgrade TanStack DB starter dependencies#4631
KyleAMathews wants to merge 1 commit into
mainfrom
deps/upgrade-tanstack-db-starters

Conversation

@KyleAMathews

Copy link
Copy Markdown
Contributor

Summary

Upgrade the TanStack DB web and Expo starters to current Electric, TanStack DB, TanStack Start, Expo, React, Drizzle, and supporting dependency versions.

This keeps the starters installable/buildable with current package releases and updates the Expo write-path/proxy code for the newer Electric/TanStack optimistic txid contract.

Approach

  • Upgraded dependencies in:
    • examples/tanstack-db-web-starter
    • examples/tanstack-db-expo-starter
  • Regenerated pnpm-lock.yaml after rebasing onto latest origin/main.
  • Kept generated routeTree.gen.ts out of the diff because it is autogenerated and the build succeeds without committing formatter churn.
  • Moved build/type-only packages out of runtime dependencies where appropriate:
    • drizzle-kit remains in web starter devDependencies
    • @types/cors and @types/express moved to Expo starter devDependencies
  • Used Expo-compatible fixed/tilde versions for Expo/RN-managed packages and validated with expo-doctor.
  • Updated the Expo starter write path to return numeric Electric txids from:
    SELECT pg_current_xact_id()::xid::text AS txid
    after each mutation in the same transaction.
  • Updated the Expo Electric proxy to handle missing response bodies before writing response headers.

Key invariants

  • Electric optimistic mutations must return a txid that matches Electric’s expected transaction-id handshake.
  • Expo SDK-managed dependencies should satisfy expo-doctor.
  • The PR diff should only include the two starter apps and the lockfile, not unrelated agent/runtime changes.
  • Autogenerated route-tree churn should not be committed.

Non-goals

  • No changes to Electric runtime/packages or published package APIs.
  • No native Android/iOS build was run; verification covers TypeScript, Expo doctor, and Expo web export.
  • No changeset is included because only private examples changed.

Trade-offs

  • Expo config fields rejected by expo-doctor were removed rather than preserved in their old locations. This trusts the SDK 56 schema validation over retaining stale config.
  • The one Readable.fromWeb compatibility cast remains inline; extracting a helper would add indirection for a single type mismatch.
  • TypeScript remains on ^5.9.3 in the web starter to avoid unsupported TS 6 peer ranges in the eslint tooling, while the Expo starter uses Expo’s expected ~6.0.3.

Verification

pnpm --dir packages/typescript-client build
pnpm --dir examples/tanstack-db-expo-starter exec tsc --noEmit
cd examples/tanstack-db-expo-starter && npx expo-doctor
pnpm --dir examples/tanstack-db-expo-starter exec expo export --platform web
pnpm --dir examples/tanstack-db-web-starter build
git diff --check

expo-doctor passes 21/21 checks.

The web starter build still emits this warning, but succeeds:

The plugin "vite-tsconfig-paths" is detected. Vite now supports tsconfig paths resolution natively via the resolve.tsconfigPaths option.

Files changed

  • examples/tanstack-db-web-starter/package.json
    • Upgrades web starter dependencies/devDependencies and removes duplicate runtime drizzle-kit.
  • examples/tanstack-db-expo-starter/package.json
    • Upgrades Expo starter dependencies/devDependencies, aligns Expo-managed package versions, and moves type packages to devDependencies.
  • examples/tanstack-db-expo-starter/api/index.ts
    • Updates txid generation to pg_current_xact_id()::xid::text.
    • Generates txids after mutations in the same transaction.
    • Fixes Electric proxy empty-body handling order.
  • examples/tanstack-db-expo-starter/app/index.tsx
    • Returns typed numeric txids directly from mutation handlers.
  • examples/tanstack-db-expo-starter/app.json
    • Removes config fields rejected by Expo SDK 56 schema validation.
  • pnpm-lock.yaml
    • Updates dependency resolution for the starter upgrades.

@github-actions

github-actions Bot commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Electric Agents Desktop Builds

Build artifacts for commit 1667460.

Platform Status Artifact
macOS Apple Silicon Passed DMG
macOS Intel Passed DMG
Windows x64 Passed Installer
Linux x64 Passed AppImage / deb

Workflow run

@codecov

codecov Bot commented Jun 18, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 59.62%. Comparing base (ee0da19) to head (1667460).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4631      +/-   ##
==========================================
+ Coverage   59.46%   59.62%   +0.16%     
==========================================
  Files         385      385              
  Lines       43039    43254     +215     
  Branches    12383    12381       -2     
==========================================
+ Hits        25591    25791     +200     
- Misses      17371    17387      +16     
+ Partials       77       76       -1     
Flag Coverage Δ
packages/agents 72.64% <ø> (ø)
packages/agents-mcp 78.13% <ø> (+0.42%) ⬆️
packages/agents-mobile 80.67% <ø> (ø)
packages/agents-runtime 83.57% <ø> (+0.10%) ⬆️
packages/agents-server 75.44% <ø> (-0.04%) ⬇️
packages/agents-server-ui 7.51% <ø> (ø)
packages/electric-ax 51.03% <ø> (-0.04%) ⬇️
packages/experimental 87.73% <ø> (ø)
packages/react-hooks 86.48% <ø> (ø)
packages/start 82.83% <ø> (ø)
packages/typescript-client 91.83% <ø> (+0.11%) ⬆️
packages/y-electric 56.05% <ø> (ø)
typescript 59.62% <ø> (+0.16%) ⬆️
unit-tests 59.62% <ø> (+0.16%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions

Copy link
Copy Markdown
Contributor

Electric Agents Mobile Build

Local mobile checks ran for commit 1667460.

The EAS Android preview build was skipped because the mobile-eas-build label is not present.
Add the mobile-eas-build label to this PR to produce an installable preview build.

Workflow run

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant