query icon indicating copy to clipboard operation
query copied to clipboard

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

Open n-satoshi061 opened this issue 6 months ago • 4 comments

Description

packages/vue-query/src/vueQueryPlugin.ts still uses the deprecated isServer export from @tanstack/query-core, which was marked as deprecated in #10199 when environmentManager was introduced.

Affected version

Confirmed in @tanstack/[email protected] (latest as of 2026-05-28) and the current main branch.

Affected file

// packages/vue-query/src/vueQueryPlugin.ts
import { isServer } from '@tanstack/query-core' // ← deprecated

// ...

if (!isServer) {
  client.mount()
}

Expected fix

import { environmentManager } from '@tanstack/query-core'

// ...

if (!environmentManager.isServer()) {
  client.mount()
}

Context

PR #10199 migrated react-query and preact-query to use environmentManager.isServer() and deprecated the direct isServer export, but vue-query appears to have been missed in that migration.

Package Status
react-query āœ… migrated to environmentManager.isServer()
preact-query āœ… migrated to environmentManager.isServer()
vue-query āŒ still using deprecated isServer

Happy to submit a PR if this direction is acceptable.

n-satoshi061 avatar May 28 '26 13:05 n-satoshi061

I’d appreciate a PR for this šŸ™

TkDodo avatar May 29 '26 14:05 TkDodo

Hi @TkDodo, I'd like to take this on. I'll mirror the approach used in #10199 for the react-query and preact-query packages. Will open a PR shortly.

spandzgit avatar May 29 '26 20:05 spandzgit

@TkDodo - Created the PR - #10826

spandzgit avatar May 29 '26 21:05 spandzgit

Thanks for picking this up so quickly, @spandzgit! šŸ™

n-satoshi061 avatar May 29 '26 23:05 n-satoshi061