Skip to content
Source
Sign inSign up
TanStack/query

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

Mergedspandzgit(GitHub profile, opens in a new tab)merged 3 commits intomain fromrefs/pull/10826/headmerged by TkDodo View on GitHub

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

    1. 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 6a91ea6966f2df9a014019032e34180cd89d37e6 and d89b667e8a3040b14d527c50a528e05c3dac1904.

      📒 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

      • #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 nameStatusExplanation
      Title check✅ PassedThe title clearly and specifically describes the main change: replacing deprecated isServer with environmentManager.isServer() in vue-query.
      Description check✅ PassedThe 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✅ PassedNo functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
      Linked Issues check✅ PassedCheck skipped because no linked issues were found for this pull request.
      Out of Scope Changes check✅ PassedCheck 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.
    2. TkDodo approved these changes

    3. View your CI Pipeline Execution ↗ for commit 6d47153d9beb7416b0cfb138bacbc5a7fd25bc1b

      CommandStatusDurationResult
      nx run-many --target=build --exclude=examples/*...✅ Succeeded18sView ↗
      nx affected --targets=test:sherif,test:knip,tes...✅ Succeeded2m 8sView ↗

      ☁️ Nx Cloud last updated this comment at 2026-06-01 14:15:57 UTC

    4. More templates

      @tanstack/angular-query-experimental

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

      @tanstack/eslint-plugin-query

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

      @tanstack/lit-query

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

      @tanstack/preact-query

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

      @tanstack/preact-query-devtools

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

      @tanstack/preact-query-persist-client

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

      @tanstack/query-async-storage-persister

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

      @tanstack/query-broadcast-client-experimental

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

      @tanstack/query-core

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

      @tanstack/query-devtools

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

      @tanstack/query-persist-client-core

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

      @tanstack/query-sync-storage-persister

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

      @tanstack/react-query

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

      @tanstack/react-query-devtools

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

      @tanstack/react-query-next-experimental

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

      @tanstack/react-query-persist-client

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

      @tanstack/solid-query

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

      @tanstack/solid-query-devtools

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

      @tanstack/solid-query-persist-client

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

      @tanstack/svelte-query

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

      @tanstack/svelte-query-devtools

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

      @tanstack/svelte-query-persist-client

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

      @tanstack/vue-query

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

      @tanstack/vue-query-devtools

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

      commit: 6d47153

    5. TkDodo merged this1348095

    6. TkDodo closed this

Sign in to join this conversation.