router icon indicating copy to clipboard operation
router copied to clipboard

remove extra comments

Open tannerlinsley opened this issue 1 month ago β€’ 2 comments

Summary by CodeRabbit

  • Refactor

    • Removed redundant documentation comments across router packages; no runtime behavior changes.
  • Breaking Changes

    • Removed deprecated overloads for blocking/navigation APIs; migrate to the current parameter form.
    • Several previously-exported internal utilities and a public session-type were removed, reducing the public API surface β€” update integrations to rely on remaining public APIs.

✏️ Tip: You can customize this high-level summary in your review settings.

tannerlinsley avatar Nov 22 '25 20:11 tannerlinsley

Walkthrough

This PR removes numerous JSDoc/comment blocks and deletes several exported types, interfaces, functions, and a class across react-router, router-core, solid-router, and start-server-core. No runtime logic changes were made; changes primarily reduce public API surface and clean up documentation.

Changes

Cohort / File(s) Summary
JSDoc Removal (react-router)
packages/react-router/src/ClientOnly.tsx, packages/react-router/src/HeadContent.tsx, packages/react-router/src/Matches.tsx, packages/react-router/src/RouterProvider.tsx, packages/react-router/src/Scripts.tsx, packages/react-router/src/awaited.tsx, packages/react-router/src/fileRoute.ts, packages/react-router/src/router.ts, packages/react-router/src/useLoaderData.tsx, packages/react-router/src/useLoaderDeps.tsx, packages/react-router/src/useLocation.tsx, packages/react-router/src/useParams.tsx, packages/react-router/src/useRouter.tsx, packages/react-router/src/useRouterState.tsx, packages/react-router/src/useSearch.tsx
Removed JSDoc / docblock comments above exported functions/components; implementations and signatures unchanged.
API Change (react-router)
packages/react-router/src/useBlocker.tsx
Removed deprecated positional overload `useBlocker(blockerFn?: LegacyBlockerFn, condition?: boolean
JSDoc Removal (router-core)
packages/router-core/src/qss.ts, packages/router-core/src/redirect.ts, packages/router-core/src/scroll-restoration.ts, packages/router-core/src/searchMiddleware.ts, packages/router-core/src/searchParams.ts
Removed explanatory JSDoc blocks; no behavioral or signature changes.
API Removal (router-core - types)
packages/router-core/src/Matches.ts
Deleted exported interface MatchRouteOptions.
API Removal (router-core - route processing)
packages/router-core/src/new-process-route-tree.ts
Removed exported helpers: parseSegment, parseSegments, createDynamicNode, findFlatMatch, findSingleMatch, and processRouteTree.
API Removal (router-core - path)
packages/router-core/src/path.ts
Removed exported function exactPathTest.
API Removal (router-core - core router)
packages/router-core/src/router.ts
Removed exported getLocationChangeInfo, RouterCore class, lazyFn helper, and getMatchedRoutes function.
API Consolidation (solid-router)
packages/solid-router/src/useBlocker.tsx
Collapsed two deprecated useBlocker overloads into a single unified overload accepting `UseBlockerOpts
Type Removal (start-server-core)
packages/start-server-core/src/session.ts
Removed exported type SealOptions (SealOptionsSub remains).

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

  • Areas needing extra attention:
    • packages/router-core/src/router.ts β€” removal of RouterCore, getLocationChangeInfo, getMatchedRoutes, and lazyFn.
    • packages/router-core/src/new-process-route-tree.ts β€” removal of multiple route-processing helpers.
    • Type/API compatibility for useBlocker changes in both react- and solid-router.
    • packages/start-server-core/src/session.ts β€” verify downstream type usage after SealOptions removal.

Possibly related PRs

  • TanStack/router#5722 β€” Refactor of route-processing / segment-based pipeline that overlaps removals of processRouteTree, parseSegment, and related helpers.
  • TanStack/router#5128 β€” Moves/refactors processRouteTree and related router-core functions; directly relevant to removed exports.
  • TanStack/router#5593 β€” Consolidates/removes deprecated useBlocker overloads in solid-router; closely related to the overload removals here.

Suggested reviewers

  • schiller-manuel
  • SeanCassiere

Poem

🐰 With nimble paws I cleared the lea,
Docblocks swept and types set free.
Old overloads hopped off to rest,
The router trims its vest β€” and best,
It bounds ahead, all spry and bright. ✨

Pre-merge checks and finishing touches

βœ… Passed checks (3 passed)
Check name Status Explanation
Description Check βœ… Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage βœ… Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Title check βœ… Passed The title 'remove extra comments' accurately reflects the main changeset focus of removing documentation comments, JSDoc blocks, and duplicate documentation across multiple packages.
✨ 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/remove-extra-comments

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

coderabbitai[bot] avatar Nov 22 '25 20:11 coderabbitai[bot]

View your CI Pipeline Execution β†— for commit fdb825207555f38d5ba98870ab905e7649d304fa

Command Status Duration Result
nx affected --targets=test:eslint,test:unit,tes... βœ… Succeeded 11m 45s View β†—
nx run-many --target=build --exclude=examples/*... βœ… Succeeded 36s View β†—

☁️ Nx Cloud last updated this comment at 2025-12-17 10:50:49 UTC

nx-cloud[bot] avatar Nov 22 '25 20:11 nx-cloud[bot]

More templates

@tanstack/arktype-adapter

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

npm i https://pkg.pr.new/TanStack/router/@tanstack/vue-router-devtools@5946
@tanstack/vue-router-ssr-query

npm i https://pkg.pr.new/TanStack/router/@tanstack/vue-router-ssr-query@5946
@tanstack/vue-start

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

npm i https://pkg.pr.new/TanStack/router/@tanstack/vue-start-client@5946
@tanstack/vue-start-server

npm i https://pkg.pr.new/TanStack/router/@tanstack/vue-start-server@5946
@tanstack/zod-adapter

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

commit: fdb8252

pkg-pr-new[bot] avatar Dec 17 '25 00:12 pkg-pr-new[bot]