Skip to content

Conversation

@schiller-manuel
Copy link
Contributor

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

this allows writing framework agnostic code that e.g. uses createIsomorphicFn

Summary by CodeRabbit

  • Improvements
    • Broadened compiler import recognition to accept multiple valid import sources for tanstack start libraries.
    • Improves compatibility with varied import patterns and project configurations, reducing false negatives during import handling and giving developers more flexibility when managing imports.

@nx-cloud
Copy link

nx-cloud bot commented Oct 30, 2025

View your CI Pipeline Execution ↗ for commit 0593b0f

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

☁️ Nx Cloud last updated this comment at 2025-10-30 21:51:15 UTC

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 30, 2025

Walkthrough

Replaces a single-string import source check with a whitelist array (validImportSources) and uses inclusion testing when processing ImportDeclaration nodes in the Start compiler plugin.

Changes

Cohort / File(s) Summary
Import source validation whitelist
packages/start-plugin-core/src/start-compiler-plugin/compilers.ts
Added validImportSources array to enumerate multiple allowed TanStack Start import paths; replaced exact equality check on ImportDeclaration.source with an inclusion (.includes) check against the whitelist.

Sequence Diagram(s)

sequenceDiagram
    participant AST as AST Traversal
    participant Plugin as Start Compiler Plugin
    rect rgba(135,206,235,0.12)
    Note right of Plugin: New behavior uses whitelist array
    end
    AST->>Plugin: visit ImportDeclaration(node)
    Plugin->>Plugin: extract import source (string)
    alt source in validImportSources
        Plugin->>Plugin: treat as allowed import (skip transform)
        Plugin-->>AST: continue traversal
    else not in whitelist
        Plugin->>Plugin: apply transformation/validation
        Plugin-->>AST: continue traversal
    end
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Single-file, focused change (import-source check → whitelist inclusion).
  • Verify whitelist contents and ensure behavior unchanged for non-whitelisted imports.

Suggested reviewers

  • birkskyum
  • Insik-Han

Poem

🐰 I nibble through imports new and old,

A tiny list of paths I hold.
From single line to options wide,
I hop and let the sources guide.
Happy builds — a carrot for the tide.

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 pull request title "fix: run start compiler on imports from @tanstack/start-client-core" directly and clearly reflects the primary objective of the changeset. The title accurately describes the functional outcome—enabling the start compiler to process imports from the specified package—which aligns with the implementation details of broadening the set of allowed import sources through a whitelist mechanism. The title is concise, specific, and uses the conventional commit format, making it clear to teammates what the core change accomplishes without unnecessary verbosity.
✨ 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 start-compile

📜 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 8d95814 and 0593b0f.

📒 Files selected for processing (1)
  • packages/start-plugin-core/src/start-compiler-plugin/compilers.ts (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/start-plugin-core/src/start-compiler-plugin/compilers.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: Test
  • GitHub Check: Preview

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

this allows writing framework agnostic code that e.g. uses `createIsomorphicFn`
@pkg-pr-new
Copy link

pkg-pr-new bot commented Oct 30, 2025

More templates

@tanstack/arktype-adapter

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

@tanstack/directive-functions-plugin

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

@tanstack/eslint-plugin-router

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

@tanstack/history

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

@tanstack/nitro-v2-vite-plugin

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

@tanstack/react-router

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

@tanstack/react-router-devtools

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

@tanstack/react-router-ssr-query

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

@tanstack/react-start

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

@tanstack/react-start-client

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

@tanstack/react-start-server

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

@tanstack/router-cli

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

@tanstack/router-core

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

@tanstack/router-devtools

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

@tanstack/router-devtools-core

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

@tanstack/router-generator

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

@tanstack/router-plugin

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

@tanstack/router-ssr-query-core

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

@tanstack/router-utils

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

@tanstack/router-vite-plugin

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

@tanstack/server-functions-plugin

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

@tanstack/solid-router

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

@tanstack/solid-router-devtools

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

@tanstack/solid-router-ssr-query

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

@tanstack/solid-start

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

@tanstack/solid-start-client

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

@tanstack/solid-start-server

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

@tanstack/start-client-core

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

@tanstack/start-plugin-core

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

@tanstack/start-server-core

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

@tanstack/start-static-server-functions

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

@tanstack/start-storage-context

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

@tanstack/valibot-adapter

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

@tanstack/virtual-file-routes

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

@tanstack/zod-adapter

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

commit: 0593b0f

@schiller-manuel schiller-manuel merged commit bf23694 into main Oct 30, 2025
6 checks passed
@schiller-manuel schiller-manuel deleted the start-compile branch October 30, 2025 21:58
roduyemi pushed a commit to roduyemi/oss-router that referenced this pull request Nov 19, 2025
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.

2 participants