Skip to content

Commit

Permalink
fix: change deprecation warning version to v9 (nuxt-modules#2832)
Browse files Browse the repository at this point in the history
  • Loading branch information
BobbieGoede authored Mar 9, 2024
1 parent 8e3fba7 commit 85d6f91
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/content/docs/2.guide/8.lang-switcher.md
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ route.meta.pageTransition.onBeforeEnter = async () => {
## Dynamic route parameters using `definePageMeta` (Deprecated)
::callout{type="warning"}
Dynamic route params using `nuxtI18n` on `definePageMeta` has been deprecated and will be removed in `v8.1`, use the composable [`useSetI18nParams`](/docs/api#useseti18nparams) instead.
Dynamic route params using `nuxtI18n` on `definePageMeta` has been deprecated and will be removed in `v9`, use the composable [`useSetI18nParams`](/docs/api#useseti18nparams) instead.
::
Dynamic params can be configured using `definePageMeta`. These will be merged with route params when generating lang switch routes with `switchLocalePath()`.
Expand Down
4 changes: 2 additions & 2 deletions src/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ export default defineNuxtModule<NuxtI18nOptions>({

if (options.dynamicRouteParams) {
logger.warn(
'The `dynamicRouteParams` options is deprecated and will be removed in `v8.1`, use the `useSetI18nParams` composable instead.'
'The `dynamicRouteParams` options is deprecated and will be removed in `v9`, use the `useSetI18nParams` composable instead.'
)
}

Expand Down Expand Up @@ -246,7 +246,7 @@ export default defineNuxtModule<NuxtI18nOptions>({

/**
* `PageMeta` augmentation to add `nuxtI18n` property
* TODO: Remove in v8.1, `useSetI18nParams` should be used instead
* TODO: Remove in v9, `useSetI18nParams` should be used instead
*/
if (!!options.dynamicRouteParams) {
addTypeTemplate({
Expand Down
2 changes: 1 addition & 1 deletion src/transform/meta-deprecation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export const MetaDeprecationPlugin = createUnplugin((options: MetaDeprecationPlu
if (match?.[0]) {
// prettier-ignore
logger.warn(
`Setting \`nuxtI18n\` on \`definePageMeta\` is deprecated and will be removed in \`v8.1\`, use the \`useSetI18nParams\` composable instead.\nUsage found in ${id.split('?')[0]}`
`Setting \`nuxtI18n\` on \`definePageMeta\` is deprecated and will be removed in \`v9\`, use the \`useSetI18nParams\` composable instead.\nUsage found in ${id.split('?')[0]}`
)
}

Expand Down

0 comments on commit 85d6f91

Please sign in to comment.