chore: change comment to v5

This commit is contained in:
Julien Huang 2025-01-23 23:06:51 +01:00
parent ed716bf654
commit 297d9140f5

View File

@ -24,7 +24,7 @@ export function useNuxt (): Nuxt {
if (!instance) { if (!instance) {
const fallbackInstance = nuxtCtx.tryUse() const fallbackInstance = nuxtCtx.tryUse()
if (fallbackInstance) { if (fallbackInstance) {
logger.warn('Using fallback global Nuxt instance. You may be using a @nuxt/kit composable outside of a Nuxt context, this behavior is deprecated and will be removed in v4.') logger.warn('Using fallback global Nuxt instance. You may be using a @nuxt/kit composable outside of a Nuxt context, this behavior is deprecated and will be removed in v5.')
return fallbackInstance return fallbackInstance
} }
@ -48,7 +48,7 @@ export function useNuxt (): Nuxt {
export function tryUseNuxt (): Nuxt | null { export function tryUseNuxt (): Nuxt | null {
const nuxt = getNuxtCtx().tryUse() const nuxt = getNuxtCtx().tryUse()
if (!nuxt) { if (!nuxt) {
logger.warn('Using fallback global Nuxt instance. You may be using a @nuxt/kit composable outside of a Nuxt context, this behavior is deprecated and will be removed in v4.') logger.warn('Using fallback global Nuxt instance. You may be using a @nuxt/kit composable outside of a Nuxt context, this behavior is deprecated and will be removed in v5.')
return nuxtCtx.tryUse() return nuxtCtx.tryUse()
} }
return nuxt return nuxt