Skip to content

chore(ai-event-client): drop unused @tanstack/ai peerDependency#694

Open
valeriudev wants to merge 1 commit into
TanStack:mainfrom
valeriudev:chore/552-drop-ai-event-client-peer-dep
Open

chore(ai-event-client): drop unused @tanstack/ai peerDependency#694
valeriudev wants to merge 1 commit into
TanStack:mainfrom
valeriudev:chore/552-drop-ai-event-client-peer-dep

Conversation

@valeriudev
Copy link
Copy Markdown

@valeriudev valeriudev commented Jun 3, 2026

Closes #552.

@tanstack/ai-event-client declared @tanstack/ai as a peerDependency but imports nothing from it — the middleware/usage types are mirrored locally. The only real edge runs the other way (@tanstack/ai depends on ai-event-client), so the peer dep just manufactured a manifest cycle that had to be neutralised with a !@tanstack/ai Nx implicitDependencies hack. This drops both.

Why not linked/fixed changesets instead: the changeset config keeps both empty — independent versioning is the convention — and updateInternalDependencies: patch already bumps ai when ai-event-client changes. So straight removal; happy to revisit if you'd prefer lockstep.

Verified: pnpm install no longer warns about the cyclic workspace dependency, and build / test:types / test:lib (14 passing) / publint --strict / nx affected build all pass.

ai-event-client mirrors the middleware types it needs locally and imports
nothing from @tanstack/ai, so the peer dependency only manufactured a
package-manifest cycle (@tanstack/ai already depends on ai-event-client).
Remove it along with the matching `!@tanstack/ai` Nx implicitDependencies
workaround so the build graph stays a clean DAG.

Verified: pnpm install no longer warns about cyclic workspace
dependencies; build, test:types, test:lib, and publint --strict pass, and
nx affected build is clean across all consumers.

Closes TanStack#552
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jun 3, 2026

Review Change Stack

📝 Walkthrough

Walkthrough

The PR removes the unused @tanstack/ai peer dependency from @tanstack/ai-event-client and its corresponding Nx build-graph workaround. The package does not import from @tanstack/ai and duplicates required types locally, making the peer dependency false and its circular-edge suppression unnecessary.

Changes

Drop unused peer dependency

Layer / File(s) Summary
Remove peer dependency and Nx workaround
.changeset/ai-event-client-drop-peer-dep.md, packages/ai-event-client/package.json, packages/ai-event-client/project.json
Changeset documents removal of @tanstack/ai from peerDependencies and !@tanstack/ai`` from Nx implicitDependencies, eliminating the false circular build edge.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 A peer that was never a friend,
False cycles have come to an end,
Build DAG flows clean, devtools still sheen,
No imports to mend, just a workaround shed. ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: removing an unused @tanstack/ai peerDependency from the ai-event-client package.
Linked Issues check ✅ Passed The PR fulfills all objectives from issue #552: removes peerDependencies and implicitDependencies workaround, retains mirrored types, and provides verification that all builds and tests pass with no cyclic warnings.
Out of Scope Changes check ✅ Passed All changes are scoped to the stated objectives: only the peerDependency and implicitDependencies workaround are removed; no other modifications are present.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description check ✅ Passed The PR description comprehensively addresses the changes, rationale, and verification, covering all required aspects despite not following the exact template structure.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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.

chore(ai-event-client): drop unused peerDependency on @tanstack/ai

1 participant