Skip to content

fix(react-query-next-experimental): replace deprecated 'isServer' with 'environmentManager.isServer()'#10857

Merged
TkDodo merged 1 commit into
mainfrom
fix/react-query-next-experimental-environment-manager-isserver
Jun 2, 2026
Merged

fix(react-query-next-experimental): replace deprecated 'isServer' with 'environmentManager.isServer()'#10857
TkDodo merged 1 commit into
mainfrom
fix/react-query-next-experimental-environment-manager-isserver

Conversation

@sukvvon
Copy link
Copy Markdown
Collaborator

@sukvvon sukvvon commented Jun 2, 2026

🎯 Changes

Migrate react-query-next-experimental from the deprecated isServer export to environmentManager.isServer(), matching the migration already done for react-query/preact-query in #10199 and for vue-query in #10826.

Updated files:

  • packages/react-query-next-experimental/src/HydrationStreamProvider.tsx
  • packages/react-query-next-experimental/src/ReactQueryStreamedHydration.tsx

No behavior change — environmentManager.isServer() calls the same underlying check by default while allowing host environments (frameworks, SSR runtimes, tests) to override the server detection.

✅ Checklist

  • I have followed the steps in the Contributing guide.
  • I have tested this code locally with `pnpm run test:pr`.

🚀 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 @tanstack/react-query-next-experimental to use the current environment detection method instead of the deprecated approach, ensuring better long-term compatibility and alignment with package standards.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jun 2, 2026

Review Change Stack

📝 Walkthrough

Walkthrough

This PR migrates server environment detection in @tanstack/react-query-next-experimental from a deprecated isServer flag to the environmentManager.isServer() API. The changeset documents the patch release, and two provider files update their imports and conditionals to use the new method.

Changes

Deprecation Migration: isServer → environmentManager.isServer()

Layer / File(s) Summary
Migrate server detection to environmentManager
.changeset/react-query-next-experimental-environment-manager-isserver.md, packages/react-query-next-experimental/src/HydrationStreamProvider.tsx, packages/react-query-next-experimental/src/ReactQueryStreamedHydration.tsx
Changeset documents patch bump for deprecation replacement. HydrationStreamProvider and ReactQueryStreamedHydration replace isServer import with environmentManager and update three server-detection conditionals across both files.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Possibly related issues

Possibly related PRs

  • TanStack/query#10826: Concurrent migration replacing deprecated isServer usage with environmentManager.isServer() in the Vue integration.

Suggested reviewers

  • TkDodo

Poem

🐰 The server-side sleuth hops with glee,
As isServer makes its decree,
Now environmentManager knows the way,
A cleaner check to start the day! 🌞

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 66.67% which is insufficient. The required threshold is 80.00%. 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 accurately summarizes the main change: replacing deprecated 'isServer' with 'environmentManager.isServer()' in the react-query-next-experimental package.
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.
Description check ✅ Passed The PR description follows the template structure with all required sections completed: Changes section explains the migration and rationale, Checklist items are marked as completed, and Release Impact indicates a changeset was generated.

✏️ 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 fix/react-query-next-experimental-environment-manager-isserver

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

@nx-cloud
Copy link
Copy Markdown

nx-cloud Bot commented Jun 2, 2026

View your CI Pipeline Execution ↗ for commit 79db658

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

☁️ Nx Cloud last updated this comment at 2026-06-02 00:55:09 UTC

@sukvvon sukvvon self-assigned this Jun 2, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 2, 2026

🚀 Changeset Version Preview

4 package(s) bumped directly, 21 bumped as dependents.

🟩 Patch bumps

Package Version Reason
@tanstack/lit-query 0.2.6 → 0.2.7 Changeset
@tanstack/query-devtools 5.100.14 → 5.100.15 Changeset
@tanstack/react-query-next-experimental 5.100.14 → 5.100.15 Changeset
@tanstack/vue-query 5.100.14 → 5.100.15 Changeset
@tanstack/angular-query-experimental 5.100.14 → 5.100.15 Dependent
@tanstack/angular-query-persist-client 5.100.14 → 5.100.15 Dependent
@tanstack/eslint-plugin-query 5.100.14 → 5.100.15 Dependent
@tanstack/preact-query 5.100.14 → 5.100.15 Dependent
@tanstack/preact-query-devtools 5.100.14 → 5.100.15 Dependent
@tanstack/preact-query-persist-client 5.100.14 → 5.100.15 Dependent
@tanstack/query-async-storage-persister 5.100.14 → 5.100.15 Dependent
@tanstack/query-broadcast-client-experimental 5.100.14 → 5.100.15 Dependent
@tanstack/query-core 5.100.14 → 5.100.15 Dependent
@tanstack/query-persist-client-core 5.100.14 → 5.100.15 Dependent
@tanstack/query-sync-storage-persister 5.100.14 → 5.100.15 Dependent
@tanstack/react-query 5.100.14 → 5.100.15 Dependent
@tanstack/react-query-devtools 5.100.14 → 5.100.15 Dependent
@tanstack/react-query-persist-client 5.100.14 → 5.100.15 Dependent
@tanstack/solid-query 5.100.14 → 5.100.15 Dependent
@tanstack/solid-query-devtools 5.100.14 → 5.100.15 Dependent
@tanstack/solid-query-persist-client 5.100.14 → 5.100.15 Dependent
@tanstack/svelte-query 6.1.33 → 6.1.34 Dependent
@tanstack/svelte-query-devtools 6.1.33 → 6.1.34 Dependent
@tanstack/svelte-query-persist-client 6.1.33 → 6.1.34 Dependent
@tanstack/vue-query-devtools 6.1.33 → 6.1.34 Dependent

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Jun 2, 2026

More templates

@tanstack/angular-query-experimental

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

@tanstack/eslint-plugin-query

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

@tanstack/lit-query

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

@tanstack/preact-query

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

@tanstack/preact-query-devtools

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

@tanstack/preact-query-persist-client

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

@tanstack/query-async-storage-persister

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

@tanstack/query-broadcast-client-experimental

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

@tanstack/query-core

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

@tanstack/query-devtools

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

@tanstack/query-persist-client-core

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

@tanstack/query-sync-storage-persister

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

@tanstack/react-query

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

@tanstack/react-query-devtools

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

@tanstack/react-query-next-experimental

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

@tanstack/react-query-persist-client

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

@tanstack/solid-query

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

@tanstack/solid-query-devtools

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

@tanstack/solid-query-persist-client

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

@tanstack/svelte-query

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

@tanstack/svelte-query-devtools

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

@tanstack/svelte-query-persist-client

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

@tanstack/vue-query

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

@tanstack/vue-query-devtools

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

commit: 79db658

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 2, 2026

size-limit report 📦

Path Size
react full 12.11 KB (0%)
react minimal 9.08 KB (0%)

@TkDodo TkDodo merged commit 7cf5923 into main Jun 2, 2026
9 checks passed
@TkDodo TkDodo deleted the fix/react-query-next-experimental-environment-manager-isserver branch June 2, 2026 11:53
@github-actions github-actions Bot mentioned this pull request Jun 2, 2026
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.

2 participants