Skip to content

fix: add @tanstack/start-client-core to stub packages#6589

Open
Yash-Singh1 wants to merge 1 commit intoTanStack:mainfrom
Yash-Singh1:patch-1
Open

fix: add @tanstack/start-client-core to stub packages#6589
Yash-Singh1 wants to merge 1 commit intoTanStack:mainfrom
Yash-Singh1:patch-1

Conversation

@Yash-Singh1
Copy link

@Yash-Singh1 Yash-Singh1 commented Feb 3, 2026

Fixes #6583

Summary by CodeRabbit

  • Chores
    • Optimized compiler import resolution for TanStack Start client-core library functions.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 3, 2026

📝 Walkthrough

Walkthrough

The change adds support for the @tanstack/start-client-core library to the compiler's fast-path root-import resolution mechanism. Three functions—createIsomorphicFn, createServerOnlyFn, and createClientOnlyFn—are now registered as known root imports, enabling them to be properly transformed when imported from this library alias.

Changes

Cohort / File(s) Summary
Root Import Resolution
packages/start-plugin-core/src/start-compiler-plugin/compiler.ts
Added fast-path mappings for @tanstack/start-client-core exports (createIsomorphicFn → IsomorphicFn, createServerOnlyFn → ServerOnlyFn, createClientOnlyFn → ClientOnlyFn) to enable O(1) resolution and proper transformation of framework-agnostic stub functions.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~5 minutes

Possibly related PRs

Suggested labels

package: start-plugin-core

Suggested reviewers

  • schiller-manuel
  • birkskyum

Poem

🐰 A compiler's heart learns a new trick today,
Fast-path imports light the stubborn function's way,
Three transformations now dance in harmony,
Framework-agnostic code, finally free!
The Start compiler hops with delight! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title accurately describes the main change: adding @tanstack/start-client-core to stub packages for proper compilation.
Linked Issues check ✅ Passed The PR adds @tanstack/start-client-core to knownRootImports, directly addressing the issue #6583 requirement for these imports to be transformed by the compiler.
Out of Scope Changes check ✅ Passed The changes are narrowly focused on adding the new library alias to the compiler configuration, with no extraneous modifications beyond the scope of fixing the reported issue.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Important

Action Needed: IP Allowlist Update

If your organization protects your Git platform with IP whitelisting, please add the new CodeRabbit IP address to your allowlist:

  • 136.113.208.247/32 (new)
  • 34.170.211.100/32
  • 35.222.179.152/32

Reviews will stop working after February 8, 2026 if the new IP is not added to your allowlist.


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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: framework agnostic createXXX compilation is not transformed

1 participant