-
-
Notifications
You must be signed in to change notification settings - Fork 91
fix: update peerDeps/devDeps #193
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
📝 WalkthroughWalkthroughUpdated multiple package.json manifests across examples and packages: dependency reclassifications (peer ↔ dev), added workspace dev refs for Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: defaults Review profile: CHILL Plan: Pro ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (3)
🧰 Additional context used🧠 Learnings (4)📓 Common learnings📚 Learning: 2025-12-13T17:09:09.794ZApplied to files:
📚 Learning: 2025-12-13T17:09:09.794ZApplied to files:
📚 Learning: 2025-12-13T17:09:09.794ZApplied to files:
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
🔇 Additional comments (5)
Comment |
|
View your CI Pipeline Execution ↗ for commit 440dd89
☁️ Nx Cloud last updated this comment at |
@tanstack/ai
@tanstack/ai-anthropic
@tanstack/ai-client
@tanstack/ai-devtools-core
@tanstack/ai-gemini
@tanstack/ai-ollama
@tanstack/ai-openai
@tanstack/ai-react
@tanstack/ai-react-ui
@tanstack/ai-solid
@tanstack/ai-solid-ui
@tanstack/ai-svelte
@tanstack/ai-vue
@tanstack/ai-vue-ui
@tanstack/react-ai-devtools
@tanstack/solid-ai-devtools
commit: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
packages/typescript/ai-anthropic/package.json (1)
45-52: Remove or clarify the purpose of the Zod dependency.Zod is declared in both
peerDependencies(^4.0.0) anddevDependencies(^4.2.0), but it does not appear to be imported or used anywhere in the source code. Tool schemas are already converted to JSON Schema in the ai layer (seecustom-tool.ts:30).This pattern is consistent across all four provider packages (@tanstack/ai-anthropic, @tanstack/ai-openai, @tanstack/ai-gemini, @tanstack/ai-ollama). If Zod is unnecessary, remove it. If it's a transitive dependency, it should be declared in @tanstack/ai instead.
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (14)
examples/ts-vue-chat/package.jsonpackages/typescript/ai-anthropic/package.jsonpackages/typescript/ai-gemini/package.jsonpackages/typescript/ai-ollama/package.jsonpackages/typescript/ai-openai/package.jsonpackages/typescript/ai-react-ui/package.jsonpackages/typescript/ai-react/package.jsonpackages/typescript/ai-solid-ui/package.jsonpackages/typescript/ai-solid/package.jsonpackages/typescript/ai-svelte/package.jsonpackages/typescript/ai-vue-ui/package.jsonpackages/typescript/ai-vue/package.jsonpackages/typescript/react-ai-devtools/package.jsonpackages/typescript/solid-ai-devtools/package.json
🧰 Additional context used
📓 Path-based instructions (1)
examples/**
📄 CodeRabbit inference engine (CLAUDE.md)
Examples are not built by Nx and should be run independently from their directories with
pnpm devorpnpm install && pnpm dev
Files:
examples/ts-vue-chat/package.json
🧠 Learnings (4)
📓 Common learnings
Learnt from: CR
Repo: TanStack/ai PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-13T17:09:09.794Z
Learning: Use Nx workspace with affected commands to optimize testing and building only changed packages and their dependents
Learnt from: CR
Repo: TanStack/ai PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-13T17:09:09.794Z
Learning: Applies to packages/*/package.json : Use `workspace:*` protocol for internal package dependencies in package.json (e.g., `"tanstack/ai": "workspace:*"`)
Learnt from: CR
Repo: TanStack/ai PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-13T17:09:09.794Z
Learning: Applies to packages/typescript/*/src/index.ts : Export tree-shakeable adapters with clear subpath exports in package.json (e.g., `tanstack/ai/adapters`, `tanstack/ai-openai/adapters`) to minimize bundle size
Learnt from: CR
Repo: TanStack/ai PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-13T17:09:09.794Z
Learning: Create changesets with `pnpm changeset` before making changes to prepare for release version bumping and publishing
📚 Learning: 2025-12-13T17:09:09.794Z
Learnt from: CR
Repo: TanStack/ai PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-13T17:09:09.794Z
Learning: Applies to packages/*/package.json : Use `workspace:*` protocol for internal package dependencies in package.json (e.g., `"tanstack/ai": "workspace:*"`)
Applied to files:
packages/typescript/ai-svelte/package.jsonpackages/typescript/ai-ollama/package.jsonpackages/typescript/ai-gemini/package.jsonpackages/typescript/ai-react-ui/package.jsonpackages/typescript/ai-react/package.jsonpackages/typescript/react-ai-devtools/package.jsonpackages/typescript/ai-openai/package.jsonpackages/typescript/ai-solid-ui/package.jsonpackages/typescript/ai-solid/package.jsonpackages/typescript/solid-ai-devtools/package.jsonpackages/typescript/ai-anthropic/package.jsonpackages/typescript/ai-vue/package.json
📚 Learning: 2025-12-13T17:09:09.794Z
Learnt from: CR
Repo: TanStack/ai PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-13T17:09:09.794Z
Learning: Applies to packages/typescript/*/src/index.ts : Export tree-shakeable adapters with clear subpath exports in package.json (e.g., `tanstack/ai/adapters`, `tanstack/ai-openai/adapters`) to minimize bundle size
Applied to files:
packages/typescript/ai-svelte/package.jsonpackages/typescript/ai-ollama/package.jsonpackages/typescript/ai-gemini/package.jsonpackages/typescript/ai-react-ui/package.jsonpackages/typescript/ai-react/package.jsonpackages/typescript/react-ai-devtools/package.jsonpackages/typescript/ai-openai/package.jsonpackages/typescript/ai-solid-ui/package.jsonpackages/typescript/ai-solid/package.jsonpackages/typescript/ai-anthropic/package.jsonpackages/typescript/ai-vue-ui/package.jsonpackages/typescript/ai-vue/package.json
📚 Learning: 2025-12-13T17:09:09.794Z
Learnt from: CR
Repo: TanStack/ai PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-13T17:09:09.794Z
Learning: Applies to **/*.test.ts : Write unit tests using Vitest alongside source files with `.test.ts` naming convention
Applied to files:
packages/typescript/ai-solid-ui/package.json
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: Test
- GitHub Check: Preview
🔇 Additional comments (24)
packages/typescript/solid-ai-devtools/package.json (2)
53-55: LGTM! Correct peer dependency declaration.The peer dependency correctly declares the minimum version of
solid-js(>=1.9.7) required for this Solid.js devtools package. This aligns with the PR objective to fix invalid dev and peer dependency relationships identified by manypkg.
58-58: LGTM! Dev dependency satisfies peer requirement.The dev dependency version
^1.9.10correctly satisfies the peer dependency requirement>=1.9.7, ensuring the package can be developed and tested locally while maintaining compatibility with consumer projects. This properly resolves the "invalid dev and peer dependency relationship" issue that manypkg identified.packages/typescript/ai-svelte/package.json (1)
45-63: Dependency restructuring looks correct.The changes properly address the manypkg issues mentioned in the PR:
Fixed invalid dev/peer relationship:
@tanstack/ainow appears in both peerDependencies (line 49) and devDependencies (line 55), andsveltewas already in devDependencies (line 59).Correct workspace protocol usage:
workspace:^in peerDependencies allows compatible versions when the package is publishedworkspace:*in dependencies/devDependencies pins to the exact workspace version during developmentAppropriate dependency placement:
@tanstack/ai-clientremains in dependencies as the core implementation dependencysveltecorrectly moved to peerDependencies (standard for framework bindings)- Svelte version
^5.0.0in peerDependencies allows any 5.x, while devDependencies pins to^5.20.0for testingBased on learnings, the workspace protocol usage correctly distinguishes between peer dependencies (which need version flexibility) and dev/direct dependencies (which should pin to workspace versions).
packages/typescript/ai-react/package.json (3)
52-52: LGTM! Correctly satisfies peer dependency for local development.Adding
@tanstack/aito devDependencies withworkspace:*protocol is correct. This ensures tests and local development can run while satisfying the peer dependency requirement, addressing the manypkg "invalid dev and peer dependency relationship" issue mentioned in the PR.Based on learnings.
57-57: LGTM! React dev dependency correctly satisfies peer dependency.Adding React 19.2.3 to devDependencies appropriately satisfies the peer dependency requirement (>=18.0.0) and enables local testing and development.
46-50: No changes needed. Both concerns are established patterns in this monorepo.The use of
workspace:^in peerDependencies andworkspace:*in devDependencies is consistent across all packages (ai-react, ai-react-ui, ai-openai, ai-vue, ai-svelte, ai-solid, etc.). This appears to be an intentional differentiation allowing minor/patch upgrades for peer dependencies while pinning development dependencies to exact workspace versions.Including
@types/reactin peerDependencies is the established practice across React framework packages in this monorepo, as seen in react-ai-devtools, ai-react-ui, and other React packages.Likely an incorrect or invalid review comment.
packages/typescript/ai-solid/package.json (2)
50-50: Dev dependency correctly satisfies manypkg's peer dependency rule.Adding
@tanstack/aitodevDependenciescompletes the fix for manypkg's "invalid dev and peer dependency relationship" rule. This ensures the package can be tested locally against its peer dependency using the workspace version.The
workspace:*protocol is appropriate here since devDependencies are not published and this will always resolve to the local workspace version during development.
44-47: Peer dependencies correctly declared for manypkg compliance.The addition of
@tanstack/aiandsolid-jstopeerDependenciesproperly addresses the manypkg validation rule. The use ofworkspace:^for@tanstack/aiis consistent across all adapter packages and correctly transforms to a semver range like^0.2.0on publish.packages/typescript/ai-react-ui/package.json (3)
19-21: LGTM! Good addition of the files array.Adding the
filesarray ensures only the builtdistdirectory is published to npm, which is a best practice for package distribution.
47-53: Correct workspace protocol pattern for peer dependencies.The use of
workspace:^for@tanstack/ai-clientand@tanstack/ai-reactinpeerDependenciesis correct. This pattern:
- Allows the package to work with any version >= the current workspace version when published
- Differs from
workspace:*which is used indevDependencies(lines 55-56) for exact version linking during development- Properly resolves the "invalid dev and peer dependency relationship" issue mentioned in the PR objectives
Note: Based on learnings, the
workspace:*protocol guidance applies specifically todevDependenciesfor internal packages. Theworkspace:^protocol is the correct choice forpeerDependencies.
54-62: React 19.2.3 upgrade is appropriate and compatible.The upgrade to React 19.2.3, React DOM 19.2.3, and @types/react 19.2.7 is confirmed as stable and recommended. React 19.2.3 was released December 11, 2025, with security fixes for React Server Components. The codebase contains no deprecated React 18 patterns (ReactDOM.render, hydrate, string refs, or legacy context), confirming compatibility with React 19.
packages/typescript/ai-anthropic/package.json (1)
49-51: Correct setup for peer and dev dependencies.The addition of
@tanstack/aiindevDependenciesalongside the existingpeerDependenciesentry correctly addresses the "invalid dev and peer dependency relationship" issue flagged by manypkg. Usingworkspace:*in dev andworkspace:^in peer is the appropriate pattern.Based on learnings,
workspace:*is the correct protocol for internal dev dependencies.packages/typescript/ai-ollama/package.json (2)
50-51: LGTM! Correctly fixes manypkg validation issues.Adding
@tanstack/aiandzodto devDependencies properly resolves the "invalid dev and peer dependency relationship" flagged by manypkg. This allows local development and testing against these peer dependencies.The workspace protocol usage is correct:
workspace:^in peerDependencies allows compatible workspace versions for consumersworkspace:*in devDependencies links to the current workspace version during developmentThe zod version strategy is also appropriate:
^4.0.0sets the minimum peer requirement while^4.2.0provides a specific version for testing.Based on learnings, this aligns with the workspace dependency patterns for the repository.
Also applies to: 54-54
52-53: Both [email protected] and @vitest/[email protected] are valid and recently available. No issues identified with these versions.packages/typescript/ai-gemini/package.json (2)
49-54: LGTM! Correctly addresses manypkg warnings.The additions of
@tanstack/aiandzodto devDependencies properly resolve the "invalid dev and peer dependency relationship" warnings. This ensures that during development and testing, the peer dependencies are actually installed, which is the standard pattern for packages with peer dependencies.The use of
workspace:*for the internal@tanstack/aidependency follows the established pattern for this repository.Based on learnings: "Use
workspace:*protocol for internal package dependencies in package.json"
53-53: Fix dev dependency: Zod 4.2.0 does not exist as a stable release.The
devDependenciesspecifies"zod": "^4.2.0", but Zod 4.2.0 does not exist in the stable npm registry—only canary prerelease builds (4.2.0-canary.*) are available. The stable releases jump from 4.1.x to 4.2.1 (current latest). This will cause installation to fail.Update the dev dependency to
"zod": "^4.2.1"or an equivalent compatible stable version. The peer dependency"zod": "^4.0.0"is appropriate since the code uses only basic Zod APIs (z.object, z.string) available since 4.0.0.⛔ Skipped due to learnings
Learnt from: CR Repo: TanStack/ai PR: 0 File: CLAUDE.md:0-0 Timestamp: 2025-12-13T17:09:09.794Z Learning: Applies to **/*.{ts,tsx} : Use Zod for runtime schema validation and type inference, particularly for tool input/output definitions with `toolDefinition()` and Zod schema inferencepackages/typescript/ai-vue-ui/package.json (2)
19-22: Good addition: explicit files declaration.Declaring the published files explicitly is a best practice that ensures only intended directories are included in the published package.
53-56: LGTM: Correct dependency placement.Moving
@vitejs/plugin-vueto devDependencies and addingvueto devDependencies for testing is the correct pattern. Vue remains appropriately declared as a peerDependency for consumers.packages/typescript/react-ai-devtools/package.json (1)
58-62: Verify React 19 compatibility.The devDependencies now use React 19.2.3 and @types/react 19.2.7. Based on the React 19 documentation, these versions exist. However, ensure that all devtools functionality is tested against React 19, as it includes significant changes from React 18 (new rendering primitives, ref as prop, etc.).
Based on learnings, ensure you test locally with
pnpm run test:prto verify compatibility.packages/typescript/ai-solid-ui/package.json (2)
20-22: Good addition: explicit files declaration.Declaring the published files explicitly ensures only intended directories are included in the published package.
50-60: The workspace protocol difference (workspace:^in peerDependencies andworkspace:*in devDependencies) is intentional and correct. The pnpm workspace: protocol is fully supported by manypkg, and this pattern properly declares consumer requirements (caret range in peer deps) while ensuring exact versions for development (workspace:* in dev deps). No compatibility issues with manypkg.Likely an incorrect or invalid review comment.
examples/ts-vue-chat/package.json (1)
29-29: No compatibility issues found — @vitejs/plugin-vue 6.0.2 is compatible with Vue 3.5.25 and Vite 7.2.7.@vitejs/[email protected] declares peerDependencies for vite ^5.0.0 || ^6.0.0 || ^7.0.0 and vue ^3.2.25. Both Vue 3.5.25 and Vite 7.2.7 satisfy these constraints.
packages/typescript/ai-openai/package.json (1)
45-53: Both issues identified are intentional patterns used consistently throughout the repository and do not require correction.The
@tanstack/aidependency usesworkspace:^in peerDependencies andworkspace:*in devDependencies by design—this is the standard pattern across all adapter packages (ai-openai, ai-gemini, ai-ollama, ai-anthropic, ai-react, ai-vue, ai-svelte, ai-solid). The caret protocol in peerDependencies allows consumers to reference the dependency with version constraints, while the asterisk in devDependencies pins the exact workspace version for development.Similarly, the zod version difference (
^4.0.0in peerDependencies vs^4.2.0in devDependencies) is consistent across all adapters and reflects an intentional strategy: declare broad consumer compatibility while testing against the latest version. This is a standard library practice and does not create compatibility issues—consumers declaring zod 4.0.x or 4.1.x are still supported by the peer dependency range.There is no manypkg violation here; these patterns are part of the established repository conventions.
Likely an incorrect or invalid review comment.
packages/typescript/ai-vue/package.json (1)
44-49: This configuration is intentional and consistent with the monorepo pattern. The package correctly usesworkspace:^inpeerDependencies(for semver compatibility) andworkspace:*indevDependencies(for development flexibility). This exact pattern is used across all framework integration packages in the monorepo (ai-react, ai-solid, ai-svelte, etc.) and presents no compatibility issues.Likely an incorrect or invalid review comment.
🎯 Changes
✅ Checklist
pnpm run test:pr.🚀 Release Impact
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.