Skip to content

fix(vue-query): replace deprecated isServer with environmentManager.isServer()#10826

Open
spandzgit wants to merge 2 commits into
TanStack:mainfrom
spandzgit:fix/vue-query-environment-manager
Open

fix(vue-query): replace deprecated isServer with environmentManager.isServer()#10826
spandzgit wants to merge 2 commits into
TanStack:mainfrom
spandzgit:fix/vue-query-environment-manager

Conversation

@spandzgit
Copy link
Copy Markdown

@spandzgit spandzgit commented May 29, 2026

Summary

Fixes defect - #10821
Migrates vue-query from the deprecated isServer export to environmentManager.isServer(), matching the migration done for react-query and preact-query in #10199.

🎯 Changes

  • Updated packages/vue-query/src/vueQueryPlugin.ts to import and use environmentManager

✅ Checklist

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

Verification

  • npx nx run @tanstack/vue-query:test:lib passes
  • pnpm run test:pr passes
  • npx nx run @tanstack/vue-query:test:eslint passes
  • npx nx run @tanstack/vue-query:test:libs passes
  • npx nx run @tanstack/vue-query:test:types passes
  • No behavior change; this is a pure API migration

🚀 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

  • Refactor

    • Improved internal server-environment detection logic to use the updated mechanism.
  • Chores

    • Updated an internal dependency to a patch release and removed a deprecated reference.

Review Change Stack

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 29, 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: 7ce9987b-51c8-466c-b5e3-ef3df552c961

📥 Commits

Reviewing files that changed from the base of the PR and between 6a91ea6 and d89b667.

📒 Files selected for processing (1)
  • .changeset/tired-crews-pull.md
✅ Files skipped from review due to trivial changes (1)
  • .changeset/tired-crews-pull.md

📝 Walkthrough

Walkthrough

The Vue Query plugin now uses environmentManager.isServer() instead of the deprecated isServer export to decide whether to call client.mount(). The changeset note is updated to reference the new API and a patch bump for @tanstack/vue-query.

Changes

Server Environment Detection Migration

Layer / File(s) Summary
Update server detection to environmentManager API
packages/vue-query/src/vueQueryPlugin.ts, .changeset/tired-crews-pull.md
Import replaces isServer with environmentManager, server check changes from !isServer to !environmentManager.isServer() to gate client.mount(), and the changeset description is updated to reference environmentManager.isServer().

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related issues

  • #10821: Same migration of isServer -> environmentManager.isServer() in packages/vue-query/src/vueQueryPlugin.ts.

Poem

🐰 I swapped an old import for a brighter sun,
environmentManager said the job is done.
Client mounts only when servers sleep,
A tidy change, humble and neat.
Hooray — a patch released, hop hop, fun!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: replacing deprecated isServer with environmentManager.isServer() in vue-query.
Description check ✅ Passed The description includes all required template sections with detailed information: summary with issue reference, changes made, completed checklist items, verification steps, and release impact declaration with changeset confirmation.
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 unit tests (beta)
  • Create PR with unit tests

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 and usage tips.

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