TanStack/query

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

Chiusa

#10.821 aperta il 28 mag 2026

 (4 commenti) (0 reazioni) (0 assegnatari)TypeScript (3817 fork)batch import
good first issuepackage: vue-query

Metriche repository

Star
 (49.427 stelle)
Metriche merge PR
 (Merge medio 4g 12h) (100 PR mergiate in 30 g)

Descrizione

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/vue-query@5.100.14 (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.

Guida contributor