Don't make @tanstack/db a direct dependency to avoid having multiple versions of it bundled#766
Merged
KyleAMathews merged 8 commits intomainfrom Nov 5, 2025
Conversation
Changed @tanstack/db from regular dependencies to peerDependencies in: - @tanstack/offline-transactions - @tanstack/react-db - @tanstack/query-db-collection This fixes bundling issues where multiple versions of @tanstack/db were being installed. By declaring it as a peerDependency, consumers can provide their own version, ensuring only one instance is used across the application. The @tanstack/db package is moved to devDependencies to allow local development and testing while preventing it from being installed as a transitive dependency for consumers.
🦋 Changeset detectedLatest commit: 1e97e24 The changes in this PR will be included in the next version bump. This PR includes changesets to release 4 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 |
- Removed @opentelemetry/api from @tanstack/offline-transactions dependencies - Added changeset documenting the dependency fixes for all affected packages
@tanstack/react-db is a wrapper package where users install it to get everything they need without separately installing @tanstack/db. Updated changeset to reflect that only extension packages (@tanstack/offline-transactions and @tanstack/query-db-collection) should use peerDependencies for @tanstack/db.
Removed all OpenTelemetry dependencies and usage from the codebase: - Converted tracer.ts to use no-op implementations - Removed OpenTelemetry imports from OfflineAction, OfflineTransaction, and TransactionExecutor - Removed span context serialization and propagation - Fixed prettier formatting in changeset - Fixed linting errors (unused variables, unnecessary try/catch) The package now builds successfully without @opentelemetry/api dependency.
More templates
@tanstack/angular-db
@tanstack/db
@tanstack/db-ivm
@tanstack/electric-db-collection
@tanstack/offline-transactions
@tanstack/powersync-db-collection
@tanstack/query-db-collection
@tanstack/react-db
@tanstack/rxdb-db-collection
@tanstack/solid-db
@tanstack/svelte-db
@tanstack/trailbase-db-collection
@tanstack/vue-db
commit: |
Contributor
|
Size Change: 0 B Total Size: 79.1 kB ℹ️ View Unchanged
|
Contributor
|
Size Change: 0 B Total Size: 3.34 kB ℹ️ View Unchanged
|
samwillis
requested changes
Nov 5, 2025
Collaborator
samwillis
left a comment
There was a problem hiding this comment.
There seems to be a bunch of changes for the offline-transactions package in here now, if thats intended can they be added to the changeset?
The changes to the package deps look good.
Collaborator
Author
|
The opentelemetry stuff should have been removed before the PR was merged — so it's not really a change per se as they don't do anything on main either. |
samwillis
approved these changes
Nov 5, 2025
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changed @tanstack/db from regular dependencies to peerDependencies in:
This fixes bundling issues where multiple versions of @tanstack/db were being installed. By declaring it as a peerDependency, consumers can provide their own version, ensuring only one instance is used across the application.
The @tanstack/db package is moved to devDependencies to allow local development and testing while preventing it from being installed as a transitive dependency for consumers.
🎯 Changes
✅ Checklist
pnpm test:pr.🚀 Release Impact