Skip to content

ref(core): remove leftover setStateOptions#10574

Merged
TkDodo merged 2 commits intomainfrom
feature/ref/setstateoptions
Apr 25, 2026
Merged

ref(core): remove leftover setStateOptions#10574
TkDodo merged 2 commits intomainfrom
feature/ref/setstateoptions

Conversation

@TkDodo
Copy link
Copy Markdown
Collaborator

@TkDodo TkDodo commented Apr 25, 2026

Summary by CodeRabbit

  • Refactor
    • Simplified the state setter method by removing an unused optional parameter, streamlining the API for cleaner code.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 25, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 6f07659e-4e62-4fc5-a895-6d65a02a68d8

📥 Commits

Reviewing files that changed from the base of the PR and between d6a7bf3 and c7f1470.

📒 Files selected for processing (2)
  • .changeset/wet-lands-wait.md
  • packages/query-core/src/query.ts

📝 Walkthrough

Walkthrough

Removes the unused setStateOptions parameter and SetStateOptions interface from the Query.setState method in the query core package. A changeset entry documents this patch-level cleanup for the next release.

Changes

Cohort / File(s) Summary
Changeset Entry
.changeset/wet-lands-wait.md
Documents a patch version bump for @tanstack/query-core with a note about removing leftover setStateOptions.
Query Core Implementation
packages/query-core/src/query.ts
Removes the SetStateOptions exported interface and eliminates the optional setStateOptions parameter from the Query.setState method signature; the dispatch call now only merges state without additional metadata.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 A cleanup most divine,
No leftover clutter, just fine design,
SetStateOptions bid farewell,
The Query grows lean—all is well!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning No pull request description was provided by the author. The required template sections (Changes and Release Impact checklist) are missing entirely. Add a pull request description following the template with details about the changes and confirmation that a changeset was generated for this code change.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title directly and concisely describes the main change: removing the leftover setStateOptions parameter from the Query.setState method.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.

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

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/ref/setstateoptions

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

@TkDodo TkDodo marked this pull request as ready for review April 25, 2026 09:10
@nx-cloud
Copy link
Copy Markdown

nx-cloud Bot commented Apr 25, 2026

View your CI Pipeline Execution ↗ for commit c7f1470

Command Status Duration Result
nx affected --targets=test:sherif,test:knip,tes... ✅ Succeeded 1m 5s View ↗

☁️ Nx Cloud last updated this comment at 2026-04-25 09:23:19 UTC

@github-actions
Copy link
Copy Markdown
Contributor

🚀 Changeset Version Preview

1 package(s) bumped directly, 23 bumped as dependents.

🟩 Patch bumps

Package Version Reason
@tanstack/query-core 5.100.1 → 5.100.2 Changeset
@tanstack/angular-query-experimental 5.100.1 → 5.100.2 Dependent
@tanstack/angular-query-persist-client 5.100.1 → 5.100.2 Dependent
@tanstack/eslint-plugin-query 5.100.1 → 5.100.2 Dependent
@tanstack/preact-query 5.100.1 → 5.100.2 Dependent
@tanstack/preact-query-devtools 5.100.1 → 5.100.2 Dependent
@tanstack/preact-query-persist-client 5.100.1 → 5.100.2 Dependent
@tanstack/query-async-storage-persister 5.100.1 → 5.100.2 Dependent
@tanstack/query-broadcast-client-experimental 5.100.1 → 5.100.2 Dependent
@tanstack/query-devtools 5.100.1 → 5.100.2 Dependent
@tanstack/query-persist-client-core 5.100.1 → 5.100.2 Dependent
@tanstack/query-sync-storage-persister 5.100.1 → 5.100.2 Dependent
@tanstack/react-query 5.100.1 → 5.100.2 Dependent
@tanstack/react-query-devtools 5.100.1 → 5.100.2 Dependent
@tanstack/react-query-next-experimental 5.100.1 → 5.100.2 Dependent
@tanstack/react-query-persist-client 5.100.1 → 5.100.2 Dependent
@tanstack/solid-query 5.100.1 → 5.100.2 Dependent
@tanstack/solid-query-devtools 5.100.1 → 5.100.2 Dependent
@tanstack/solid-query-persist-client 5.100.1 → 5.100.2 Dependent
@tanstack/svelte-query 6.1.20 → 6.1.21 Dependent
@tanstack/svelte-query-devtools 6.1.20 → 6.1.21 Dependent
@tanstack/svelte-query-persist-client 6.1.20 → 6.1.21 Dependent
@tanstack/vue-query 5.100.1 → 5.100.2 Dependent
@tanstack/vue-query-devtools 6.1.20 → 6.1.21 Dependent

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Apr 25, 2026

More templates

@tanstack/angular-query-experimental

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

@tanstack/eslint-plugin-query

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

@tanstack/preact-query

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

@tanstack/preact-query-devtools

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

@tanstack/preact-query-persist-client

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

@tanstack/query-async-storage-persister

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

@tanstack/query-broadcast-client-experimental

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

@tanstack/query-core

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

@tanstack/query-devtools

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

@tanstack/query-persist-client-core

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

@tanstack/query-sync-storage-persister

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

@tanstack/react-query

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

@tanstack/react-query-devtools

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

@tanstack/react-query-next-experimental

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

@tanstack/react-query-persist-client

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

@tanstack/solid-query

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

@tanstack/solid-query-devtools

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

@tanstack/solid-query-persist-client

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

@tanstack/svelte-query

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

@tanstack/svelte-query-devtools

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

@tanstack/svelte-query-persist-client

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

@tanstack/vue-query

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

@tanstack/vue-query-devtools

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

commit: c7f1470

@github-actions
Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size
react full 12.06 KB (-0.09% 🔽)
react minimal 9.06 KB (-0.05% 🔽)

@TkDodo TkDodo merged commit 645d5d1 into main Apr 25, 2026
11 of 12 checks passed
@TkDodo TkDodo deleted the feature/ref/setstateoptions branch April 25, 2026 09:27
@github-actions github-actions Bot mentioned this pull request Apr 25, 2026
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.

1 participant