Skip to content

feat(preact-query*): support Preact v11 - #11711

Open
JoviDeCroock wants to merge 2 commits into
TanStack:mainfrom
JoviDeCroock:preact-v11
Open

JoviDeCroock wants to merge 2 commits into
TanStack:mainfrom
JoviDeCroock:preact-v11

Conversation

@JoviDeCroock

@JoviDeCroock JoviDeCroock commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

🎯 Changes

This adds support for the soon to be released Preact v11

✅ 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

  • Compatibility
    • Preact Query, Devtools, and Persist Client now accept Preact 11 prerelease versions alongside Preact 10.

@coderabbitai

coderabbitai Bot commented Sep 28, 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: 58327096-58b1-4e25-b791-53e15b104146

📥 Commits

Reviewing files that changed from the base of the PR and between 2e1ad64 and efd928f.

📒 Files selected for processing (11)
  • .changeset/preact-v11-peer-dependency.md
  • packages/preact-query-devtools/package.json
  • packages/preact-query-devtools/src/__tests__/PreactQueryDevtools.test.tsx
  • packages/preact-query-devtools/src/__tests__/PreactQueryDevtoolsPanel.test.tsx
  • packages/preact-query-devtools/test-setup.ts
  • packages/preact-query-persist-client/package.json
  • packages/preact-query-persist-client/test-setup.ts
  • packages/preact-query/package.json
  • packages/preact-query/src/__tests__/useQuery.test.tsx
  • packages/preact-query/src/utils.ts
  • packages/preact-query/test-setup.ts

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


📝 Walkthrough

Walkthrough

The three Preact Query packages now accept Preact 11 prereleases in their peer dependency ranges. Test cleanup and selected unmount calls run inside act, and one ref is initialized explicitly with undefined.

Changes

Preact compatibility

Layer / File(s) Summary
Peer dependency ranges and release note
.changeset/preact-v11-peer-dependency.md, packages/preact-query*/package.json
The three package manifests add ^11.0.0-0 to the Preact peer dependency range. The changeset records the package updates.
Test cleanup and unmount handling
packages/preact-query*/test-setup.ts, packages/preact-query*/src/__tests__/*
Test cleanup and selected unmount calls are wrapped in act. The selected snapshot ref is initialized with undefined.

Priority: ⬇️ Low

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

Change: Feature

Suggested reviewers: sukvvon

Merge Risk: ⚪ Minimal · up to efd92

The peer ranges and test cleanup changes align with the repository’s supported contracts, with no actionable merge-blocking risk identified.

Architecture Summary

Architecture risk: 🔵 Low · up to efd92

The change affects 3 systems.

Changed systems: packages/preact-query, packages/preact-query-devtools, packages/preact-query-persist-client

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed — packages/preact-query (library) was modified; 4 changed files map to changed impact.
  • observed — packages/preact-query-devtools (library) was modified; 4 changed files map to changed impact.
  • observed — packages/preact-query-persist-client (library) was modified; 2 changed files map to changed impact.

Before / after behavior

  • observed — Modified behavior in packages/preact-query-devtools/package.json: The preact peer dependency range now includes ^11.0.0-0 in addition to ^10.0.0; previously, only ^10.0.0 was accepted.
  • observed — Modified behavior in packages/preact-query-devtools/src/tests/PreactQueryDevtools.test.tsx: The Testing Library import adds act alongside render.
  • observed — Modified behavior in packages/preact-query-devtools/src/tests/PreactQueryDevtools.test.tsx: The unmount test now invokes unmount() inside act; its existing assertion that the devtools instance’s unmount mock was called is unchanged.
  • observed — Modified behavior in packages/preact-query-devtools/src/tests/PreactQueryDevtoolsPanel.test.tsx: The testing-library import now includes act in addition to render.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ 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%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 7 files. (4 skipped: 4 … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the main change: adding Preact v11 support across the preact-query packages.
Description check ✅ Passed The description includes the required Changes, Checklist, and Release Impact sections. It explains the change, confirms local testing, and records the changeset. The AI contribution policy checklist i…
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.
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 7 files. (4 skipped: 4 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • 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.

This branch has not been deployed

No deployments
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