Skip to content

chore(*): remove unused 'react' packages from the root and scope the knip '@types/react' ignore to the packages that need it - #11727

Merged
sukvvon merged 1 commit into
mainfrom
chore/remove-root-react-devdependencies
Sep 29, 2026
Merged

sukvvon merged 1 commit into
mainfrom
chore/remove-root-react-devdependencies

Conversation

@sukvvon

@sukvvon sukvvon commented Sep 29, 2026 •

Copy link
Copy Markdown
Member

🎯 Changes

  • Remove react, react-dom, @types/react, and @types/react-dom from the root devDependencies. Nothing at the root imports them; the React packages declare their own.
  • In knip.ts, replace the global ignoreDependencies entries for these four packages with '@types/react!' in packages/react-query, packages/react-query-next-experimental, and packages/react-query-persist-client only, with a comment explaining why. Their built types import react, which is provided by the consumer's @types/react, and the ! limits the ignore to the strict (production) run.
  • Update pnpm-lock.yaml.

✅ Checklist

  • I have followed the steps in the Contributing guide.
  • I have tested code changes locally with pnpm run test:pr, or these tests do not apply to this pull request.
  • I have followed the AI contribution policy and fully understand the code in this pull request, including any code generated with AI assistance.

🚀 Release Impact

  • This change affects published code, and I have generated a changeset.
  • This change is docs/CI/dev-only (no release).

Summary by CodeRabbit

  • Chores
    • Updated project tooling configuration to better match package checks to workspace usage. Several React-related packages are no longer included in the root development setup. These changes affect project maintenance and validation only; they do not change the product’s user-facing features or behavior.

…knip '@types/react' ignore to the packages that need it
@sukvvon sukvvon self-assigned this Sep 29, 2026
@nx-cloud

nx-cloud Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

View your CI Pipeline Execution ↗ for commit fcbb8db

Command Status Duration Result
nx affected --targets=test:sherif,test:knip,tes... ✅ Succeeded 7m 45s View ↗
nx run-many --target=build --exclude=examples/*... ✅ Succeeded 34s View ↗

☁️ Nx Cloud last updated this comment at 2026-09-29 03:13:24 UTC

@github-actions

Copy link
Copy Markdown
Contributor

🚀 Changeset Version Preview

No changeset entries found. Merging this PR will not cause a version bump for any packages.

@pkg-pr-new

pkg-pr-new Bot commented Sep 29, 2026

Copy link
Copy Markdown
More templates

@tanstack/angular-query-experimental

npm i https://pkg.pr.new/@tanstack/angular-query-experimental@11727

@tanstack/eslint-plugin-query

npm i https://pkg.pr.new/@tanstack/eslint-plugin-query@11727

@tanstack/lit-query

npm i https://pkg.pr.new/@tanstack/lit-query@11727

@tanstack/preact-query

npm i https://pkg.pr.new/@tanstack/preact-query@11727

@tanstack/preact-query-devtools

npm i https://pkg.pr.new/@tanstack/preact-query-devtools@11727

@tanstack/preact-query-persist-client

npm i https://pkg.pr.new/@tanstack/preact-query-persist-client@11727

@tanstack/query-async-storage-persister

npm i https://pkg.pr.new/@tanstack/query-async-storage-persister@11727

@tanstack/query-broadcast-client-experimental

npm i https://pkg.pr.new/@tanstack/query-broadcast-client-experimental@11727

@tanstack/query-core

npm i https://pkg.pr.new/@tanstack/query-core@11727

@tanstack/query-devtools

npm i https://pkg.pr.new/@tanstack/query-devtools@11727

@tanstack/query-persist-client-core

npm i https://pkg.pr.new/@tanstack/query-persist-client-core@11727

@tanstack/query-sync-storage-persister

npm i https://pkg.pr.new/@tanstack/query-sync-storage-persister@11727

@tanstack/react-query

npm i https://pkg.pr.new/@tanstack/react-query@11727

@tanstack/react-query-devtools

npm i https://pkg.pr.new/@tanstack/react-query-devtools@11727

@tanstack/react-query-next-experimental

npm i https://pkg.pr.new/@tanstack/react-query-next-experimental@11727

@tanstack/react-query-persist-client

npm i https://pkg.pr.new/@tanstack/react-query-persist-client@11727

@tanstack/solid-query

npm i https://pkg.pr.new/@tanstack/solid-query@11727

@tanstack/solid-query-devtools

npm i https://pkg.pr.new/@tanstack/solid-query-devtools@11727

@tanstack/solid-query-persist-client

npm i https://pkg.pr.new/@tanstack/solid-query-persist-client@11727

@tanstack/svelte-query

npm i https://pkg.pr.new/@tanstack/svelte-query@11727

@tanstack/svelte-query-devtools

npm i https://pkg.pr.new/@tanstack/svelte-query-devtools@11727

@tanstack/svelte-query-persist-client

npm i https://pkg.pr.new/@tanstack/svelte-query-persist-client@11727

@tanstack/vue-query

npm i https://pkg.pr.new/@tanstack/vue-query@11727

@tanstack/vue-query-devtools

npm i https://pkg.pr.new/@tanstack/vue-query-devtools@11727

commit: fcbb8db

@coderabbitai

coderabbitai Bot commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: TanStack/query/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: f8def536-9274-4a73-8430-6d0fe510c414

📥 Commits

Reviewing files that changed from the base of the PR and between c51bb62 and fcbb8db.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (2)
  • knip.ts
  • package.json
💤 Files with no reviewable changes (1)
  • package.json

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.


📝 Walkthrough

Walkthrough

The root package removes four React development dependencies. The Knip configuration removes them from the global ignore list and adds workspace-specific @types/react! ignores for React Query, Next experimental, and persist-client.

Changes

React dependency scope

Layer / File(s) Summary
Update React dependency handling
knip.ts, package.json
The global Knip ignore list retains only @oxc-project/runtime. Three workspaces add @types/react! ignores. The root package removes @types/react, @types/react-dom, react, and react-dom from development dependencies.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Other

Suggested reviewers: lachlancollins

Merge Risk: ⚪ Minimal · up to fcbb8

The inspected workspace workflows retain their React dependencies, and the configured strict Knip check passes; no material merge-readiness risk is identified.

Architecture Summary

Architecture risk: 🔵 Low · up to fcbb8

The change affects 2 systems.

Changed systems: knip.ts, package.json

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed — knip.ts (service) was modified; 1 changed file maps to changed impact.
  • observed — package.json (service) was modified; 1 changed file maps to changed impact.

Before / after behavior

  • observed — Modified behavior in knip.ts: The global dependency ignore list removes @types/react, @types/react-dom, react, and react-dom, retaining only @oxc-project/runtime.
  • observed — Modified behavior in knip.ts: Adds a comment about built types importing react and adds a workspace-specific @types/react! ignore to the React Query, Next experimental, and persist-client configurations.
  • observed — Modified behavior in package.json: Removed the @types/react and @types/react-dom development dependencies, previously specified through the catalog: version.
  • observed — Modified behavior in package.json: Removed the react and react-dom development dependencies, previously specified through the catalog: version.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main changes: removing unused root React packages and scoping the Knip ignore configuration. It is specific and related to the changeset, although somewhat long.
Description check ✅ Passed The description includes the required Changes, Checklist, and Release Impact sections. It explains the motivation, lists the configuration changes, confirms testing and policy checks, and correctly id…
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

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.

@github-actions

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size
react full 11.73 KB (0%)
react minimal 8.58 KB (0%)

@sukvvon
sukvvon merged commit 1e4be4e into main Sep 29, 2026
9 checks passed
@sukvvon
sukvvon deleted the chore/remove-root-react-devdependencies branch September 29, 2026 04:55
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.

1 participant