Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: change deprecation warning version to v9 #2832

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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