Skip to content

Conversation

@wobsoriano
Copy link
Contributor

@wobsoriano wobsoriano commented Nov 12, 2025

Temporarily pinning TanStack Start versions to fix TanStack/router#5738

Summary by CodeRabbit

  • Chores
    • Updated dependency version handling in project templates to conditionally pin specific package versions based on authentication configuration selections, ensuring appropriate dependency versions are installed for each setup.

@vercel
Copy link

vercel bot commented Nov 12, 2025

@wobsoriano is attempting to deploy a commit to the Better T Stack Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 12, 2025

Walkthrough

The pull request updates the package.json template for TanStack Start React frontend to conditionally pin @tanstack dependency versions. When the Clerk authentication provider is selected, specific versions are pinned (1.134.4 for most packages, 1.134.6 for @tanstack/react-start); otherwise, caret-based ranges are used.

Changes

Cohort / File(s) Summary
TanStack dependency versioning
apps/cli/templates/frontend/react/tanstack-start/package.json.hbs
Added conditional version pinning for @tanstack packages based on Clerk auth selection: pins versions 1.134.4 (1.134.6 for @tanstack/react-start) when auth == "clerk", otherwise uses existing caret ranges

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

  • Single file modification with straightforward conditional logic
  • Repetitive pattern applied consistently across five dependencies
  • No complex branching or logic density

Possibly related PRs

  • fix orpc templates #302: Modifies @tanstack dependency versioning in the same tanstack-start template file, suggesting coordinated version management efforts.

Poem

🐰 Hop skip, versions now locked tight,
Clerk users get 1.134's light,
No more bundled server dreams,
Just client-side, or so it seems!

Pre-merge checks and finishing touches

✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: pinning TanStack versions specifically for Clerk users, which directly addresses the bundling issue reported in the linked issue.
Linked Issues check ✅ Passed The PR implementation directly addresses the linked issue by pinning TanStack versions to 1.134.4/1.134.6 (avoiding 1.134.7+) where server-side module bundling issues occur, restoring correct bundling behavior.
Out of Scope Changes check ✅ Passed All changes are scoped to conditional dependency version pinning in the Clerk template configuration, directly addressing the reported bundling issue with no extraneous modifications.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

@wobsoriano wobsoriano marked this pull request as ready for review November 12, 2025 04:46
@wobsoriano wobsoriano changed the title fix: Temporarily pin TanStack versions for Clerk chore(cli): Temporarily pin TanStack versions for Clerk Nov 12, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a 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)
apps/cli/templates/frontend/react/tanstack-start/package.json.hbs (1)

15-18: Consider tracking mechanism for removing the temporary pin.

Since the PR title indicates this is a "temporary" pin, consider how you'll track when to remove it once TanStack/router#5738 is resolved. Options include:

  1. Creating a follow-up issue to revisit once the upstream bug is fixed
  2. Adding a comment in the repository's documentation or a separate tracking file
  3. Monitoring the upstream issue and updating when a fix is released

Note that adding comments directly in this template would cause them to appear in all generated package.json files, which is probably not desirable.

Also applies to: 33-33

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e583a7f and 2a2ef63.

📒 Files selected for processing (1)
  • apps/cli/templates/frontend/react/tanstack-start/package.json.hbs (2 hunks)
🔇 Additional comments (2)
apps/cli/templates/frontend/react/tanstack-start/package.json.hbs (2)

15-18: I need to verify one more detail about @tanstack/react-router-with-query to ensure it's compatible with the newer versions:

Verified: version pinning strategy is sound and compatibility is confirmed.

@tanstack/[email protected] is stable, and it only requires @tanstack/react-start as a dependency for SSR contexts, making it compatible with all router versions in use. The version mismatch you questioned—@tanstack/[email protected] alongside @tanstack/[email protected]—is intentional and compatible: the peerDependencies for @tanstack/[email protected] only require react and react-dom, not a specific @tanstack/react-router version. The 1.134.6 release includes the HMR fix your workaround addresses, while staying below the problematic 1.134.7 version. The overall approach correctly mitigates the server module leakage issue for Clerk auth users.


16-16: Verify intentionality and scope of @tanstack package pinning.

The bundling issue (TanStack router #5738) is specifically in @tanstack/[email protected]+, not in @tanstack/react-router-with-query. Since @tanstack/react-router-with-query is a thin integration layer that depends on @tanstack/react-router (which is presumably being pinned), pinning it separately may be unnecessary. However, without seeing the full conditional pinning logic in your template, it's unclear whether this is intentional or an oversight. Review the diff to confirm which @tanstack packages are conditionally pinned and verify whether react-router-with-query needs the same treatment for your specific use case.

@AmanVarshney01 AmanVarshney01 merged commit b9685e7 into AmanVarshney01:main Nov 12, 2025
1 of 2 checks passed
@AmanVarshney01
Copy link
Owner

Thanks for this @wobsoriano ❤️

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.

Some server-side modules incorrectly bundled into the client?

2 participants