@nuxtjs/i18n
Advanced tools
Comparing version 8.3.1 to 8.3.2
@@ -46,2 +46,3 @@ import * as _nuxt_schema from '@nuxt/schema'; | ||
} & Omit<LocaleObject, 'file' | 'files'> & { | ||
code: Locale; | ||
files: LocaleFile[]; | ||
@@ -453,3 +454,3 @@ meta?: (FileMeta & { | ||
} | ||
interface RuntimeModuleHooks { | ||
interface ModuleRuntimeHooks { | ||
'i18n:beforeLocaleSwitch': <Context = unknown>(params: { | ||
@@ -467,3 +468,3 @@ oldLocale: string; | ||
declare module '#app' { | ||
interface RuntimeNuxtHooks extends RuntimeModuleHooks { | ||
interface RuntimeNuxtHooks extends ModuleRuntimeHooks { | ||
} | ||
@@ -484,2 +485,2 @@ } | ||
export { type BaseUrlResolveHandler, type BundleOptions, type ComputedRouteOptions, type CustomBlocksOptions, type CustomRoutePages, type DetectBrowserLanguageOptions, type Directions, type ExperimentalFeatures, type FileMeta, type I18nHeadMetaInfo, type I18nHeadOptions, type LocaleFile, type LocaleInfo, type LocaleMessageCompilationOptions, type LocaleObject, type LocaleType, type MetaAttrs, type ModuleHooks, type ModuleOptions, type ModulePublicRuntimeConfig, type NuxtI18nOptions, type PrefixLocalizedRouteOptions, type PrefixableOptions, type RedirectOnOptions, type RootRedirectOptions, type RouteOptionsResolver, type RuntimeModuleHooks, type SeoAttributesOptions, type Strategies, type SwitchLocalePathIntercepter, type VueI18nConfig, type VueI18nConfigPathInfo, _default as default }; | ||
export { type BaseUrlResolveHandler, type BundleOptions, type ComputedRouteOptions, type CustomBlocksOptions, type CustomRoutePages, type DetectBrowserLanguageOptions, type Directions, type ExperimentalFeatures, type FileMeta, type I18nHeadMetaInfo, type I18nHeadOptions, type LocaleFile, type LocaleInfo, type LocaleMessageCompilationOptions, type LocaleObject, type LocaleType, type MetaAttrs, type ModuleHooks, type ModuleOptions, type ModulePublicRuntimeConfig, type ModuleRuntimeHooks, type NuxtI18nOptions, type PrefixLocalizedRouteOptions, type PrefixableOptions, type RedirectOnOptions, type RootRedirectOptions, type RouteOptionsResolver, type SeoAttributesOptions, type Strategies, type SwitchLocalePathIntercepter, type VueI18nConfig, type VueI18nConfigPathInfo, _default as default }; |
@@ -5,6 +5,10 @@ { | ||
"compatibility": { | ||
"nuxt": "^3.0.0-rc.11", | ||
"nuxt": ">=3.0.0-rc.11", | ||
"bridge": false | ||
}, | ||
"version": "8.3.1" | ||
"version": "8.3.2", | ||
"builder": { | ||
"@nuxt/module-builder": "0.6.0", | ||
"unbuild": "2.0.0" | ||
} | ||
} |
import type { NuxtLinkProps } from 'nuxt/app'; | ||
declare const _default: import("vue").DefineComponent<NuxtLinkProps & { | ||
locale?: string | undefined; | ||
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<NuxtLinkProps & { | ||
locale?: string | undefined; | ||
}>>, { | ||
[x: string]: any; | ||
[x: number]: any; | ||
[x: symbol]: any; | ||
}, {}>; | ||
locale?: string; | ||
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<NuxtLinkProps & { | ||
locale?: string; | ||
}>, {}, {}>; | ||
export default _default; |
@@ -8,3 +8,3 @@ import { type CommonComposableOptions } from './utils'; | ||
export declare function formatMessage(message: string): string; | ||
export declare function callVueI18nInterfaces(i18n: any, name: string, ...args: any[]): any; | ||
export declare function callVueI18nInterfaces<Return = any>(i18n: any, name: string, ...args: any[]): Return; | ||
export declare function getVueI18nPropertyValue<Return = any>(i18n: any, name: string): Return; | ||
@@ -46,3 +46,3 @@ export declare function defineGetter<K extends string | number | symbol, V>(obj: Record<K, V>, key: K, val: V): void; | ||
export declare function getDomainFromLocale(localeCode: Locale): string | undefined; | ||
export declare const runtimeDetectBrowserLanguage: (opts?: ModulePublicRuntimeConfig['i18n']) => false | import("../types").DetectBrowserLanguageOptions; | ||
export declare const runtimeDetectBrowserLanguage: (opts?: ModulePublicRuntimeConfig["i18n"]) => false | DetectBrowserLanguageOptions; | ||
export {}; |
@@ -1,2 +0,2 @@ | ||
import type { I18nHeadMetaInfo, LocaleObject, I18nHeadOptions } from '#build/i18n.options.mjs'; | ||
import type { I18nHeadMetaInfo, MetaAttrs, LocaleObject, I18nHeadOptions } from '#build/i18n.options.mjs'; | ||
import type { CommonComposableOptions } from '../../utils'; | ||
@@ -16,3 +16,3 @@ /** | ||
export declare function getCanonicalLink(common: CommonComposableOptions, idAttribute: NonNullable<I18nHeadOptions['identifierAttribute']>, seoAttributes: I18nHeadOptions['addSeoAttributes']): { | ||
[x: number]: string; | ||
[x: string]: string; | ||
rel: string; | ||
@@ -22,3 +22,3 @@ href: string; | ||
export declare function getOgUrl(common: CommonComposableOptions, idAttribute: NonNullable<I18nHeadOptions['identifierAttribute']>, seoAttributes: I18nHeadOptions['addSeoAttributes']): { | ||
[x: number]: string; | ||
[x: string]: string; | ||
property: string; | ||
@@ -28,3 +28,3 @@ content: string; | ||
export declare function getCurrentOgLocale(currentLocale: LocaleObject, currentIso: string | undefined, idAttribute: NonNullable<I18nHeadOptions['identifierAttribute']>): { | ||
[x: number]: string; | ||
[x: string]: string; | ||
property: string; | ||
@@ -34,5 +34,5 @@ content: string; | ||
export declare function getAlternateOgLocales(locales: LocaleObject[], currentIso: string | undefined, idAttribute: NonNullable<I18nHeadOptions['identifierAttribute']>): { | ||
[x: number]: string; | ||
[x: string]: string; | ||
property: string; | ||
content: string; | ||
}[]; |
@@ -64,3 +64,5 @@ import { type CommonComposableOptions } from '../../utils'; | ||
}) | undefined; | ||
export declare function resolveRoute(common: CommonComposableOptions, route: RouteLocationRaw, locale: Locale | undefined): any; | ||
export declare function resolveRoute(common: CommonComposableOptions, route: RouteLocationRaw, locale: Locale | undefined): (RouteLocation & { | ||
href: string; | ||
}) | null | undefined; | ||
export declare const DefaultSwitchLocalePathIntercepter: SwitchLocalePathIntercepter; | ||
@@ -67,0 +69,0 @@ /** |
@@ -28,2 +28,4 @@ import type { Locale } from 'vue-i18n'; | ||
*/ | ||
export declare function resolve({ router }: CommonComposableOptions, route: RouteLocationPathRaw, strategy: Strategies, locale: Locale): any; | ||
export declare function resolve({ router }: CommonComposableOptions, route: RouteLocationPathRaw, strategy: Strategies, locale: Locale): RouteLocationPathRaw | (import("vue-router").RouteLocation & { | ||
href: string; | ||
}); |
@@ -41,3 +41,3 @@ import type { LocaleObject, Strategies, BaseUrlResolveHandler } from '#build/i18n.options.mjs'; | ||
*/ | ||
export declare function resolveBaseUrl<Context = unknown>(baseUrl: string | BaseUrlResolveHandler<Context>, context: Context): any; | ||
export declare function resolveBaseUrl<Context = unknown>(baseUrl: string | BaseUrlResolveHandler<Context>, context: Context): string; | ||
/** | ||
@@ -107,4 +107,4 @@ * The browser locale info | ||
*/ | ||
export declare function findBrowserLocale(locales: LocaleObject[], browserLocales: string[], { matcher, comparer }?: FindBrowserLocaleOptions): string | ''; | ||
export declare function findBrowserLocale(locales: LocaleObject[], browserLocales: string[], { matcher, comparer }?: FindBrowserLocaleOptions): string; | ||
export declare function getLocalesRegex(localeCodes: string[]): RegExp; | ||
export {}; |
@@ -1,2 +0,3 @@ | ||
import { type SwitchLocalePathIntercepter, type BaseUrlResolveHandler, type LocaleObject } from '#build/i18n.options.mjs'; | ||
import { type PrefixableOptions, type SwitchLocalePathIntercepter, type BaseUrlResolveHandler, type LocaleObject } from '#build/i18n.options.mjs'; | ||
import { callVueI18nInterfaces } from './internal'; | ||
import type { I18n, Locale, Composer, VueI18n } from 'vue-i18n'; | ||
@@ -12,8 +13,8 @@ import type { NuxtApp } from '#app'; | ||
import type { ModulePublicRuntimeConfig } from '../module'; | ||
export declare function _setLocale(i18n: I18n, locale: Locale): any; | ||
export declare function setCookieLocale(i18n: I18n, locale: Locale): any; | ||
export declare function setLocaleMessage(i18n: I18n, locale: Locale, messages: Record<string, any>): any; | ||
export declare function mergeLocaleMessage(i18n: I18n, locale: Locale, messages: Record<string, any>): any; | ||
export declare function onLanguageSwitched(i18n: I18n, oldLocale: string, newLocale: string): void; | ||
export declare function finalizePendingLocaleChange(i18n: I18n): Promise<any>; | ||
export declare function _setLocale(i18n: I18n, locale: Locale): ReturnType<typeof callVueI18nInterfaces>; | ||
export declare function setCookieLocale(i18n: I18n, locale: Locale): ReturnType<typeof callVueI18nInterfaces>; | ||
export declare function setLocaleMessage(i18n: I18n, locale: Locale, messages: Record<string, any>): ReturnType<typeof callVueI18nInterfaces>; | ||
export declare function mergeLocaleMessage(i18n: I18n, locale: Locale, messages: Record<string, any>): ReturnType<typeof callVueI18nInterfaces>; | ||
export declare function onLanguageSwitched(i18n: I18n, oldLocale: string, newLocale: string): ReturnType<typeof callVueI18nInterfaces>; | ||
export declare function finalizePendingLocaleChange(i18n: I18n): Promise<ReturnType<typeof callVueI18nInterfaces>>; | ||
/** | ||
@@ -20,0 +21,0 @@ * Common options used internally by composable functions, these |
import type { ModuleOptions, ModuleHooks, RuntimeModuleHooks, ModulePublicRuntimeConfig } from './module' | ||
import type { ModuleOptions, ModuleHooks, ModuleRuntimeHooks, ModulePublicRuntimeConfig } from './module' | ||
declare module '#app' { | ||
interface RuntimeNuxtHooks extends RuntimeModuleHooks {} | ||
interface RuntimeNuxtHooks extends ModuleRuntimeHooks {} | ||
} | ||
@@ -23,2 +23,2 @@ | ||
export type { BaseUrlResolveHandler, BundleOptions, ComputedRouteOptions, CustomBlocksOptions, CustomRoutePages, DetectBrowserLanguageOptions, Directions, ExperimentalFeatures, FileMeta, I18nHeadMetaInfo, I18nHeadOptions, LocaleFile, LocaleInfo, LocaleMessageCompilationOptions, LocaleObject, LocaleType, MetaAttrs, ModuleHooks, ModuleOptions, ModulePublicRuntimeConfig, NuxtI18nOptions, PrefixLocalizedRouteOptions, PrefixableOptions, RedirectOnOptions, RootRedirectOptions, RouteOptionsResolver, RuntimeModuleHooks, SeoAttributesOptions, Strategies, SwitchLocalePathIntercepter, VueI18nConfig, VueI18nConfigPathInfo, default } from './module' | ||
export type { BaseUrlResolveHandler, BundleOptions, ComputedRouteOptions, CustomBlocksOptions, CustomRoutePages, DetectBrowserLanguageOptions, Directions, ExperimentalFeatures, FileMeta, I18nHeadMetaInfo, I18nHeadOptions, LocaleFile, LocaleInfo, LocaleMessageCompilationOptions, LocaleObject, LocaleType, MetaAttrs, ModuleHooks, ModuleOptions, ModulePublicRuntimeConfig, ModuleRuntimeHooks, NuxtI18nOptions, PrefixLocalizedRouteOptions, PrefixableOptions, RedirectOnOptions, RootRedirectOptions, RouteOptionsResolver, SeoAttributesOptions, Strategies, SwitchLocalePathIntercepter, VueI18nConfig, VueI18nConfigPathInfo, default } from './module' |
{ | ||
"name": "@nuxtjs/i18n", | ||
"description": "i18n for Nuxt", | ||
"version": "8.3.1", | ||
"version": "8.3.2", | ||
"homepage": "https://i18n.nuxtjs.org", | ||
@@ -60,7 +60,8 @@ "bugs": { | ||
"docs:preview": "nuxi preview docs", | ||
"fix": "run-p lint:fix format:fix", | ||
"format": "prettier --config .prettierrc.mjs --ignore-path .prettierignore --list-different '**/*.{js,json,html,md}'", | ||
"format:fix": "pnpm format --write", | ||
"lint": "eslint . --cache", | ||
"lint:fix": "pnpm lint --fix", | ||
"fix": "run-s \"fix:*\"", | ||
"fix:prettier": "prettier . --write", | ||
"fix:eslint": "pnpm lint:eslint --fix", | ||
"lint": "run-p \"lint:* {@}\" --", | ||
"lint:prettier": "prettier . --check", | ||
"lint:eslint": "eslint .", | ||
"test": "pnpm dev:prepare && run-s test:types test:unit test:spec", | ||
@@ -71,3 +72,3 @@ "test:types": "tsc --noEmit --project tsconfig.test.json", | ||
}, | ||
"packageManager": "pnpm@8.15.4", | ||
"packageManager": "pnpm@9.4.0", | ||
"pnpm": { | ||
@@ -90,18 +91,18 @@ "overrides": { | ||
"@intlify/utils": "^0.12.0", | ||
"@miyaneee/rollup-plugin-json5": "^1.1.2", | ||
"@miyaneee/rollup-plugin-json5": "^1.2.0", | ||
"@nuxt/kit": "^3.10.3", | ||
"@rollup/plugin-yaml": "^4.1.2", | ||
"@vue/compiler-sfc": "^3.3.4", | ||
"debug": "^4.3.4", | ||
"@vue/compiler-sfc": "^3.4.30", | ||
"debug": "^4.3.5", | ||
"defu": "^6.1.2", | ||
"estree-walker": "^3.0.3", | ||
"is-https": "^4.0.0", | ||
"knitwork": "^1.0.0", | ||
"magic-string": "^0.30.4", | ||
"mlly": "^1.4.2", | ||
"knitwork": "^1.1.0", | ||
"magic-string": "^0.30.10", | ||
"mlly": "^1.7.1", | ||
"pathe": "^1.1.1", | ||
"scule": "^1.1.1", | ||
"sucrase": "^3.34.0", | ||
"sucrase": "^3.35.0", | ||
"ufo": "^1.3.1", | ||
"unplugin": "^1.5.0", | ||
"unplugin": "^1.10.1", | ||
"vue-i18n": "^9.9.0", | ||
@@ -111,37 +112,39 @@ "vue-router": "^4.2.5" | ||
"devDependencies": { | ||
"@babel/parser": "^7.23.0", | ||
"@babel/plugin-syntax-import-assertions": "^7.22.5", | ||
"@babel/types": "^7.23.0", | ||
"@nuxt/module-builder": "^0.5.4", | ||
"@babel/parser": "^7.24.7", | ||
"@babel/plugin-syntax-import-assertions": "^7.24.7", | ||
"@babel/types": "^7.24.7", | ||
"@eslint/js": "9.5.0", | ||
"@nuxt/module-builder": "^0.6.0", | ||
"@nuxt/schema": "^3.10.3", | ||
"@types/debug": "^4.1.9", | ||
"@types/eslint": "^8.56.6", | ||
"@unhead/vue": "^1.8.8", | ||
"bumpp": "^9.2.0", | ||
"changelogithub": "^0.13.0", | ||
"bumpp": "^9.4.1", | ||
"changelogithub": "^0.13.7", | ||
"consola": "^3", | ||
"eslint": "^8.57.0", | ||
"eslint-config-prettier": "^9.0.0", | ||
"execa": "^8.0.1", | ||
"eslint": "^9.5.0", | ||
"eslint-config-prettier": "^9.1.0", | ||
"execa": "^9.3.0", | ||
"get-port-please": "^3.1.1", | ||
"gh-changelogen": "^0.2.8", | ||
"globals": "^15.0.0", | ||
"globals": "^15.6.0", | ||
"globby": "^14.0.0", | ||
"h3": "^1.10.1", | ||
"jiti": "^1.20.0", | ||
"jsdom": "^24.0.0", | ||
"lint-staged": "^15.0.2", | ||
"nitropack": "^2.9.0", | ||
"npm-run-all2": "^6.1.2", | ||
"jsdom": "^24.1.0", | ||
"lint-staged": "^15.2.7", | ||
"nitropack": "^2.9.6", | ||
"npm-run-all2": "^6.2.0", | ||
"nuxt": "^3.10.3", | ||
"ofetch": "^1.3.3", | ||
"ofetch": "^1.3.4", | ||
"playwright": "^1.38.1", | ||
"prettier": "^3.0.3", | ||
"ts-essentials": "^9.4.0", | ||
"typescript": "^5.4.2", | ||
"typescript-eslint": "^7.0.1", | ||
"prettier": "^3.3.2", | ||
"ts-essentials": "^9.4.2", | ||
"typescript": "^5.5.2", | ||
"typescript-eslint": "^7.14.0", | ||
"unbuild": "^2.0.0", | ||
"undici": "^6.0.1", | ||
"undici": "^6.19.2", | ||
"unhead": "^1.8.8", | ||
"vitest": "^1.4.0", | ||
"vue": "^3.4.21" | ||
"vitest": "^1.6.0", | ||
"vue": "^3.4.30" | ||
}, | ||
@@ -148,0 +151,0 @@ "lint-staged": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
231644
50
5549
37
Updated@vue/compiler-sfc@^3.4.30
Updateddebug@^4.3.5
Updatedknitwork@^1.1.0
Updatedmagic-string@^0.30.10
Updatedmlly@^1.7.1
Updatedsucrase@^3.35.0
Updatedunplugin@^1.10.1