Skip to content

chore: remove extra comments - #5946

Merged
schiller-manuel merged 3 commits into
mainfrom
fix/remove-extra-comments
Dec 17, 2025
Merged

chore: remove extra comments#5946
schiller-manuel merged 3 commits into
mainfrom
fix/remove-extra-comments

Conversation

@tannerlinsley

@tannerlinsleytannerlinsley commented Nov 22, 2025

Copy link
Copy Markdown
Member

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.

@coderabbitai

coderabbitaiBot commented Nov 22, 2025

Copy link
Copy Markdown
Contributor

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

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 nameStatusExplanation
Description Check✅ PassedCheck skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage✅ PassedNo functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Title check✅ PassedThe 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.

@nx-cloud

nx-cloudBot commented Nov 22, 2025

Copy link
Copy Markdown
Contributor

View your CI Pipeline Execution ↗ for commit fdb8252

CommandStatusDurationResult
nx affected --targets=test:eslint,test:unit,tes...✅ Succeeded11m 45sView ↗
nx run-many --target=build --exclude=examples/*...✅ Succeeded36sView ↗

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

* @returns A function that accepts Route options and returns a Route instance.
* @link https://tanstack.com/router/latest/docs/framework/react/api/router/createFileRouteFunction
*/
/**

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

this still has duplicated jsdocs

@@ -292,18 +276,6 @@
}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

remove

@@ -1,4 +1,3 @@
/* eslint-disable react-hooks/rules-of-hooks */

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

dont remove this

@@ -247,4 +243,4 @@

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

still duplicate

5: number
}

/**

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

dont remove that!

return output as ParsedSegment
}

/**

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

dont remove that!

}
}

/**

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

dont remove that

>(1000)
}

/**

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

dont remove that

return result
}

/**

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

dont remove that

return path === '/' ? path : path.replace(/\/{1,}$/, '')
}

/**

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

dont remove that

cache?: LRUCache<string, string>
}

/**

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

dont remove that

export type TrailingSlashOption =
(typeof trailingSlashOptions)[keyof typeof trailingSlashOptions]

/**

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

dont remove that

TDehydrated
>

/**

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

dont remove that

return normalize(a) === normalize(b)
}

/**

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

dont remove that

return {}
}

/**

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

dont remove that

type IntegrityAlgorithm = 'sha256'
/** @internal */
type _Algorithm = EncryptionAlgorithm | IntegrityAlgorithm
/**

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

dont remove that

@pkg-pr-new

pkg-pr-newBot commented Dec 17, 2025

Copy link
Copy Markdown
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

@schiller-manuelschiller-manuel changed the title remove extra commentschore: remove extra commentsDec 17, 2025
@schiller-manuel
schiller-manuel merged commit 3c77213 into mainDec 17, 2025
6 checks passed
@schiller-manuel
schiller-manuel deleted the fix/remove-extra-comments branch December 17, 2025 12:04
Sign up for freeto 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

@tannerlinsley@schiller-manuel