-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
fix: add missing router-core peer dependency to ssr-query packages #6382
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?
fix: add missing router-core peer dependency to ssr-query packages #6382
Conversation
📝 WalkthroughWalkthroughThree framework-specific SSR query wrapper packages had their package manifests updated to add Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 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. Comment |
|
Hey, I'm not that familiar with tanstack but since I would also suggest tackling the other peerDependencies resolution issues in this same PR. |
|
Thanks for the feedback! Question 1: Using Question 2: The |
|
View your CI Pipeline Execution ↗ for commit 9643b7f ☁️ Nx Cloud last updated this comment at |
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: 2
🤖 Fix all issues with AI agents
In `@packages/solid-router-ssr-query/package.json`:
- Around line 76-79: Update the peerDependencies entry for the internal monorepo
package by replacing the version constraint for "@tanstack/router-core" with the
workspace protocol; locate the peerDependencies object in package.json (the
entry for "@tanstack/router-core") and change its value to "workspace:*" so it
matches other internal packages like `@tanstack/solid-router-devtools`.
In `@packages/vue-router-ssr-query/package.json`:
- Around line 70-73: Update the peerDependencies entry for the internal monorepo
package by replacing the version specifier for "@tanstack/router-core" with the
workspace protocol; edit the package.json peerDependencies block where
"@tanstack/router-core" is listed and change its value to "workspace:*" so the
package uses the monorepo workspace link instead of a hard version string.
📜 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 (3)
packages/react-router-ssr-query/package.jsonpackages/solid-router-ssr-query/package.jsonpackages/vue-router-ssr-query/package.json
🚧 Files skipped from review as they are similar to previous changes (1)
- packages/react-router-ssr-query/package.json
🧰 Additional context used
📓 Path-based instructions (1)
**/package.json
📄 CodeRabbit inference engine (AGENTS.md)
Use workspace protocol
workspace:*for internal dependencies in package.json files
Files:
packages/solid-router-ssr-query/package.jsonpackages/vue-router-ssr-query/package.json
✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.
| "peerDependencies": { | ||
| "@tanstack/query-core": ">=5.90.0", | ||
| "@tanstack/router-core": ">=1.127.0", | ||
| "@tanstack/solid-query": ">=5.90.0", |
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.
🧩 Analysis chain
🏁 Script executed:
# Find the location of `@tanstack/router-core` package
find . -type f -name "package.json" -path "*/router-core/*" | head -5Repository: TanStack/router
Length of output: 94
🏁 Script executed:
# Check the file in question and its full content
cat packages/solid-router-ssr-query/package.jsonRepository: TanStack/router
Length of output: 2472
🏁 Script executed:
# Search for how other packages define peerDependencies with internal packages
rg -A 3 '"peerDependencies"' --type json | head -100Repository: TanStack/router
Length of output: 5238
Use workspace:* for internal peer dependencies.
@tanstack/router-core is an internal monorepo package and should use the workspace protocol. This aligns with the workspace protocol requirement for package.json entries and matches the pattern used in similar packages like @tanstack/solid-router-devtools and @tanstack/vue-router-devtools.
🔧 Suggested change
- "@tanstack/router-core": ">=1.127.0",
+ "@tanstack/router-core": "workspace:*",📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| "peerDependencies": { | |
| "@tanstack/query-core": ">=5.90.0", | |
| "@tanstack/router-core": ">=1.127.0", | |
| "@tanstack/solid-query": ">=5.90.0", | |
| "peerDependencies": { | |
| "@tanstack/query-core": ">=5.90.0", | |
| "@tanstack/router-core": "workspace:*", | |
| "@tanstack/solid-query": ">=5.90.0", |
🤖 Prompt for AI Agents
In `@packages/solid-router-ssr-query/package.json` around lines 76 - 79, Update
the peerDependencies entry for the internal monorepo package by replacing the
version constraint for "@tanstack/router-core" with the workspace protocol;
locate the peerDependencies object in package.json (the entry for
"@tanstack/router-core") and change its value to "workspace:*" so it matches
other internal packages like `@tanstack/solid-router-devtools`.
| "peerDependencies": { | ||
| "@tanstack/query-core": ">=5.90.0", | ||
| "@tanstack/router-core": ">=1.127.0", | ||
| "@tanstack/vue-query": ">=5.90.0", |
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.
🛠️ Refactor suggestion | 🟠 Major
🧩 Analysis chain
🏁 Script executed:
# First, find the package.json file and see its context
find . -name "package.json" -type f | head -20Repository: TanStack/router
Length of output: 1158
🏁 Script executed:
# Check the specific file mentioned in the review
cat packages/vue-router-ssr-query/package.json | head -80Repository: TanStack/router
Length of output: 2262
🏁 Script executed:
# Look for other package.json files in the packages directory to see how internal deps are handled
find packages -name "package.json" -type f | xargs grep -l "@tanstack/router-core" | head -10Repository: TanStack/router
Length of output: 460
🏁 Script executed:
# Check if workspace:* is used for internal dependencies in other package.json files
rg '"@tanstack/[^"]+": "workspace:\*' packages --type jsonRepository: TanStack/router
Length of output: 7838
🏁 Script executed:
# Search for workspace:* in peerDependencies sections
rg -A 20 '"peerDependencies"' packages --type json | grep -E '(peerDependencies|workspace:\*|@tanstack)'Repository: TanStack/router
Length of output: 5257
🏁 Script executed:
# Check specific examples of internal packages' peerDependencies to see the pattern
cat packages/react-router-ssr-query/package.json | grep -A 10 '"peerDependencies"'Repository: TanStack/router
Length of output: 331
🏁 Script executed:
# Check vue-router's peerDependencies as well
cat packages/vue-router/package.json | grep -A 10 '"peerDependencies"'Repository: TanStack/router
Length of output: 108
🏁 Script executed:
# Check the most similar packages to vue-router-ssr-query (other devtools packages)
echo "=== Vue Router Devtools peerDependencies ===" && \
cat packages/vue-router-devtools/package.json | grep -A 5 '"peerDependencies"'
echo "=== React Router Devtools peerDependencies ===" && \
cat packages/react-router-devtools/package.json | grep -A 5 '"peerDependencies"'
echo "=== Router Devtools Core peerDependencies ===" && \
cat packages/router-devtools-core/package.json | grep -A 5 '"peerDependencies"'Repository: TanStack/router
Length of output: 699
🏁 Script executed:
# Check if there's a pattern: when was workspace:^ introduced vs version constraints
# Look at start-static-server-functions which uses workspace:* in peerDependencies
cat packages/start-static-server-functions/package.json | grep -A 10 '"peerDependencies"'Repository: TanStack/router
Length of output: 323
🏁 Script executed:
# Check if there's a distinction between how workspace:* vs workspace:^ is used
# across different types of internal packages
rg '"workspace:\^"' packages --type json | head -20Repository: TanStack/router
Length of output: 913
🏁 Script executed:
# See if there's any documentation or pattern in the repo about this choice
find . -name "CONTRIBUTING*" -o -name "README*" | xargs grep -l "workspace" 2>/dev/null | head -5Repository: TanStack/router
Length of output: 76
🏁 Script executed:
# Check CONTRIBUTING.md for workspace protocol guidance
cat CONTRIBUTING.md | grep -A 5 -B 5 "workspace"Repository: TanStack/router
Length of output: 634
Use workspace:* for the internal peer dependency.
@tanstack/router-core is an internal monorepo package and should use the workspace protocol to maintain consistency with the codebase standards and enable proper local linking.
🔧 Suggested change
- "@tanstack/router-core": ">=1.127.0",
+ "@tanstack/router-core": "workspace:*",📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| "peerDependencies": { | |
| "@tanstack/query-core": ">=5.90.0", | |
| "@tanstack/router-core": ">=1.127.0", | |
| "@tanstack/vue-query": ">=5.90.0", | |
| "peerDependencies": { | |
| "@tanstack/query-core": ">=5.90.0", | |
| "@tanstack/router-core": "workspace:*", | |
| "@tanstack/vue-query": ">=5.90.0", |
🤖 Prompt for AI Agents
In `@packages/vue-router-ssr-query/package.json` around lines 70 - 73, Update the
peerDependencies entry for the internal monorepo package by replacing the
version specifier for "@tanstack/router-core" with the workspace protocol; edit
the package.json peerDependencies block where "@tanstack/router-core" is listed
and change its value to "workspace:*" so the package uses the monorepo workspace
link instead of a hard version string.
fixes #6347
In Yarn 4 with pnpm linker, the peer dependencies from
router-ssr-query-core(@tanstack/router-core,@tanstack/query-core) are not properly resolved, causing esbuild errors during Vite's dependency optimization.This PR adds
@tanstack/router-coreas an explicit peer dependency to the ssr-query framework packages, following the same pattern used inreact-router-devtools.Changes
packages/react-router-ssr-query/package.json- add@tanstack/router-corepeer dependencypackages/solid-router-ssr-query/package.json- add@tanstack/router-corepeer dependencypackages/vue-router-ssr-query/package.json- add@tanstack/router-corepeer dependencyTesting
Verified using the reproduction repo from the issue: https://github.com/AlexanderOpran/my-app
Before:
Could not resolve "@tanstack/router-core"error onyarn devAfter: Vite dev server starts successfully
cc @tannerlinsley @schiller-manuel - Would appreciate a review when you have a chance. Thanks!
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.