Skip to content

Conversation

@schiller-manuel
Copy link
Contributor

@schiller-manuel schiller-manuel commented Oct 31, 2025

Summary by CodeRabbit

  • Improvements
    • Expanded package compatibility detection logic to recognize additional compatible packages.
    • Optimized framework package handling to ensure excluded packages are properly skipped during dependency processing.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 31, 2025

Walkthrough

A single file modification in the plugin core that broadens peer dependency compatibility checks to include @tanstack/start-client-core and propagates excluded framework packages from crawl results into client environment dependency optimization configuration.

Changes

Cohort / File(s) Summary
Plugin Configuration Enhancement
packages/start-plugin-core/src/plugin.ts
Enhanced peerDependencies check to accept either current start package or @tanstack/start-client-core, and propagated exclude list from crawlFrameworkPkgsResult into client optimizeDeps.exclude.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Single file modified with two focused logic updates
  • Straightforward conditional expansion for peer dependency validation
  • Direct configuration propagation from one object to another

Possibly related PRs

Poem

🐰 A rabbit hops through deps with care,
Checking peers that now appear,
Client cores are welcome here,
Excludes flow through—crystal clear!
Optimization's now aware. 🌟

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title "fix: package crawling include start-client-core" directly addresses the primary change in the pull request—the enhanced peerDependencies check that now includes @tanstack/start-client-core in the set of compatible packages. The title is specific and clear, accurately describing the core fix without vague terminology. While the changeset also includes a secondary change about propagating exclude rules to client optimizeDeps, the title captures the main focus of the fix as highlighted in the summary. The phrasing is concise and a teammate reviewing history would understand that this PR modifies package crawling logic to properly account for start-client-core.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix-crawl

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1728e5d and e5b2bd8.

📒 Files selected for processing (1)
  • packages/start-plugin-core/src/plugin.ts (2 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

Use TypeScript in strict mode with extensive type safety across the codebase

Files:

  • packages/start-plugin-core/src/plugin.ts
packages/{*-start,start-*}/**

📄 CodeRabbit inference engine (AGENTS.md)

Name and place Start framework packages under packages/-start/ or packages/start-/

Files:

  • packages/start-plugin-core/src/plugin.ts
🧠 Learnings (2)
📓 Common learnings
Learnt from: CR
Repo: TanStack/router PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-09-23T17:36:12.598Z
Learning: Applies to packages/router-core/** : Keep framework-agnostic core router logic in packages/router-core/
📚 Learning: 2025-09-23T17:36:12.598Z
Learnt from: CR
Repo: TanStack/router PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-09-23T17:36:12.598Z
Learning: Applies to packages/{router-cli,router-generator,router-plugin,virtual-file-routes}/** : Keep CLI, generators, bundler plugins, and virtual file routing utilities in their dedicated tooling package directories

Applied to files:

  • packages/start-plugin-core/src/plugin.ts
⏰ 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: Preview
  • GitHub Check: Test
🔇 Additional comments (2)
packages/start-plugin-core/src/plugin.ts (2)

227-232: LGTM! Broadens framework package detection to include client-core dependents.

The enhanced check correctly identifies packages that depend on either the framework-specific start package or the shared @tanstack/start-client-core package. This architectural improvement allows packages to depend on the client-core without requiring a specific framework adapter.


255-255: LGTM! Properly excludes detected framework packages from client optimization.

This correctly propagates the excluded framework packages from the crawl results into the client environment's dependency optimization configuration. This completes the fix by ensuring packages detected by the enhanced peer dependency check (lines 227-232) are not pre-bundled by Vite's optimizer, which is essential for proper framework package handling.


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

@nx-cloud
Copy link

nx-cloud bot commented Nov 1, 2025

View your CI Pipeline Execution ↗ for commit e5b2bd8

Command Status Duration Result
nx affected --targets=test:eslint,test:unit,tes... ✅ Succeeded 5m 15s View ↗
nx run-many --target=build --exclude=examples/*... ✅ Succeeded 25s View ↗

☁️ Nx Cloud last updated this comment at 2025-11-01 00:05:53 UTC

@pkg-pr-new
Copy link

pkg-pr-new bot commented Nov 1, 2025

More templates

@tanstack/arktype-adapter

npm i https://pkg.pr.new/TanStack/router/@tanstack/arktype-adapter@5715

@tanstack/directive-functions-plugin

npm i https://pkg.pr.new/TanStack/router/@tanstack/directive-functions-plugin@5715

@tanstack/eslint-plugin-router

npm i https://pkg.pr.new/TanStack/router/@tanstack/eslint-plugin-router@5715

@tanstack/history

npm i https://pkg.pr.new/TanStack/router/@tanstack/history@5715

@tanstack/nitro-v2-vite-plugin

npm i https://pkg.pr.new/TanStack/router/@tanstack/nitro-v2-vite-plugin@5715

@tanstack/react-router

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-router@5715

@tanstack/react-router-devtools

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-router-devtools@5715

@tanstack/react-router-ssr-query

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-router-ssr-query@5715

@tanstack/react-start

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-start@5715

@tanstack/react-start-client

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-start-client@5715

@tanstack/react-start-server

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-start-server@5715

@tanstack/router-cli

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-cli@5715

@tanstack/router-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-core@5715

@tanstack/router-devtools

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-devtools@5715

@tanstack/router-devtools-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-devtools-core@5715

@tanstack/router-generator

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-generator@5715

@tanstack/router-plugin

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-plugin@5715

@tanstack/router-ssr-query-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-ssr-query-core@5715

@tanstack/router-utils

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-utils@5715

@tanstack/router-vite-plugin

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-vite-plugin@5715

@tanstack/server-functions-plugin

npm i https://pkg.pr.new/TanStack/router/@tanstack/server-functions-plugin@5715

@tanstack/solid-router

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-router@5715

@tanstack/solid-router-devtools

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-router-devtools@5715

@tanstack/solid-router-ssr-query

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-router-ssr-query@5715

@tanstack/solid-start

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-start@5715

@tanstack/solid-start-client

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-start-client@5715

@tanstack/solid-start-server

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-start-server@5715

@tanstack/start-client-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-client-core@5715

@tanstack/start-plugin-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-plugin-core@5715

@tanstack/start-server-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-server-core@5715

@tanstack/start-static-server-functions

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-static-server-functions@5715

@tanstack/start-storage-context

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-storage-context@5715

@tanstack/valibot-adapter

npm i https://pkg.pr.new/TanStack/router/@tanstack/valibot-adapter@5715

@tanstack/virtual-file-routes

npm i https://pkg.pr.new/TanStack/router/@tanstack/virtual-file-routes@5715

@tanstack/zod-adapter

npm i https://pkg.pr.new/TanStack/router/@tanstack/zod-adapter@5715

commit: e5b2bd8

@schiller-manuel schiller-manuel merged commit 4a34fcf into main Nov 1, 2025
6 checks passed
@schiller-manuel schiller-manuel deleted the fix-crawl branch November 1, 2025 00:07
outDir: getClientOutputDirectory(viteConfig),
},
optimizeDeps: {
exclude: crawlFrameworkPkgsResult.optimizeDeps.exclude,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This causes a bug with tanstack forms loading use-sync-external-store:

SyntaxError: The requested module '/@fs/home/my-proj/node_modules/.pnpm/use-sync-external-store@1.6.0_react@19.1.0/node_modules/use-sync-external-store/shim/with-selector.js?v=c5ef6809' does not provide an export named 'useSyncExternalStoreWithSelector' (at index.js?v=c5ef6809:1:10)

The above error occurred in the <Lazy> component.

React will try to recreate this component tree from scratch using the error boundary you provided, CatchBoundaryImpl.

overrideMethod @ hook.js:608
defaultOnCaughtError @ react-dom-client.development.js:8331
...
(anonymous) @ client.tsx:9
exports.startTransition @ react.development.js:1124
(anonymous) @ client.tsx:5Understand this warning
hook.js:608 Warning: The requested module '/@fs/home/my-proj/node_modules/.pnpm/use-sync-external-store@1.6.0_react@19.1.0/node_modules/use-sync-external-store/shim/with-selector.js?v=c5ef6809' does not provide an export named 'useSyncExternalStoreWithSelector'

I reliably do get this bug when on
"@tanstack/react-start": "1.134.7",
and its fixed on "@tanstack/react-start": "1.134.6",

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you please create a new issue including a complete reproducer ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants