nuxt-i18n
Advanced tools
Comparing version 6.24.0 to 6.25.0
{ | ||
"name": "nuxt-i18n", | ||
"version": "6.24.0", | ||
"version": "6.25.0", | ||
"description": "i18n for Nuxt", | ||
@@ -90,7 +90,7 @@ "license": "MIT", | ||
"dependencies": { | ||
"@babel/parser": "^7.5.5", | ||
"@babel/traverse": "^7.5.5", | ||
"@intlify/vue-i18n-extensions": "^1.0.1", | ||
"@intlify/vue-i18n-loader": "^1.0.0", | ||
"cookie": "^0.4.0", | ||
"@babel/parser": "^7.13.15", | ||
"@babel/traverse": "^7.13.15", | ||
"@intlify/vue-i18n-extensions": "^1.0.2", | ||
"@intlify/vue-i18n-loader": "^1.1.0", | ||
"cookie": "^0.4.1", | ||
"devalue": "^2.0.1", | ||
@@ -100,11 +100,11 @@ "js-cookie": "^2.2.1", | ||
"lodash.merge": "^4.6.2", | ||
"ufo": "^0.6.7", | ||
"vue-i18n": "^8.23.0" | ||
"ufo": "^0.6.11", | ||
"vue-i18n": "^8.24.3" | ||
}, | ||
"devDependencies": { | ||
"@babel/core": "7.13.13", | ||
"@babel/preset-env": "7.13.12", | ||
"@babel/core": "7.13.15", | ||
"@babel/preset-env": "7.13.15", | ||
"@babel/runtime": "7.13.10", | ||
"@nuxt/types": "2.15.3", | ||
"@nuxtjs/composition-api": "0.22.4", | ||
"@nuxt/types": "2.15.4", | ||
"@nuxtjs/composition-api": "0.23.0", | ||
"@nuxtjs/eslint-config-typescript": "6.0.0", | ||
@@ -119,3 +119,3 @@ "@nuxtjs/module-test-utils": "1.6.3", | ||
"@types/js-cookie": "2.2.6", | ||
"@types/jsdom": "16.2.9", | ||
"@types/jsdom": "16.2.10", | ||
"@types/lodash.merge": "4.6.6", | ||
@@ -128,4 +128,4 @@ "@types/request-promise-native": "1.0.17", | ||
"codecov": "3.8.1", | ||
"core-js": "3.9.1", | ||
"eslint": "7.23.0", | ||
"core-js": "3.10.1", | ||
"eslint": "7.24.0", | ||
"express": "4.17.1", | ||
@@ -135,10 +135,10 @@ "husky": "4.3.8", | ||
"jest-dev-server": "4.4.0", | ||
"jsdom": "16.5.1", | ||
"jsdom": "16.5.3", | ||
"messageformat": "2.3.0", | ||
"nuxt": "2.15.3", | ||
"nuxt": "2.15.4", | ||
"playwright-chromium": "1.10.0", | ||
"release-it": "14.5.0", | ||
"release-it": "14.6.1", | ||
"serve-static": "1.14.1", | ||
"typescript": "4.2.3" | ||
"typescript": "4.2.4" | ||
} | ||
} |
@@ -0,5 +1,6 @@ | ||
import VueI18n, { Locale, I18nOptions, IVueI18n } from 'vue-i18n' | ||
import { Context as NuxtContext } from '@nuxt/types' | ||
import './vue' | ||
import { Locale, I18nOptions } from 'vue-i18n' | ||
import { Context as NuxtContext } from '@nuxt/types' | ||
// Deprecated | ||
export { NuxtVueI18n } from './nuxt-i18n' | ||
@@ -74,1 +75,15 @@ | ||
} | ||
export interface IVueI18nNuxt extends Required<BaseOptions> { | ||
finalizePendingLocaleChange(): Promise<void> | ||
getBrowserLocale(): string | undefined | ||
getLocaleCookie(): string | undefined | ||
loadedLanguages: string[] | undefined | ||
localeCodes: readonly Locale[] | ||
localeProperties: LocaleObject | ||
setLocale(locale: string): Promise<void> | ||
setLocaleCookie(locale: string): void | ||
waitForPendingLocaleChange(): Promise<void> | ||
} | ||
export type NuxtI18nInstance = VueI18n & IVueI18n |
import 'vue' | ||
import 'vuex' | ||
import 'vue-i18n' | ||
import '@nuxt/types' | ||
import { Location, RawLocation, Route } from 'vue-router' | ||
import VueI18n, { IVueI18n } from 'vue-i18n' | ||
import { MetaInfo } from 'vue-meta' | ||
import { BaseOptions, LocaleObject, Options } from '.' | ||
import { Options, NuxtI18nInstance, IVueI18nNuxt } from '.' | ||
@@ -32,18 +32,2 @@ interface NuxtI18nComponentOptions { | ||
declare module 'vue-i18n' { | ||
// the VueI18n class expands here: https://goo.gl/Xtp9EG | ||
// it is necessary for the $i18n property in Vue interface: "readonly $i18n: VueI18n & IVueI18n" | ||
interface IVueI18n extends Required<BaseOptions> { | ||
finalizePendingLocaleChange(): Promise<void> | ||
getBrowserLocale(): string | undefined | ||
getLocaleCookie(): string | undefined | ||
loadedLanguages: string[] | undefined | ||
localeCodes: readonly Locale[] | ||
localeProperties: LocaleObject | ||
setLocale(locale: string): Promise<void> | ||
setLocaleCookie(locale: string): void | ||
waitForPendingLocaleChange(): Promise<void> | ||
} | ||
} | ||
interface NuxtI18nApi { | ||
@@ -57,2 +41,6 @@ getRouteBaseName(route?: Route): string | undefined | ||
declare module 'vue-i18n' { | ||
interface IVueI18n extends IVueI18nNuxt {} | ||
} | ||
declare module 'vue/types/vue' { | ||
@@ -75,7 +63,7 @@ interface Vue extends NuxtI18nApi { | ||
interface Context extends NuxtI18nApi { | ||
i18n: VueI18n & IVueI18n | ||
i18n: NuxtI18nInstance | ||
} | ||
interface NuxtAppOptions extends NuxtI18nApi { | ||
i18n: VueI18n & IVueI18n | ||
i18n: NuxtI18nInstance | ||
} | ||
@@ -90,4 +78,4 @@ | ||
interface Store<S> extends NuxtI18nApi { | ||
$i18n: VueI18n & IVueI18n | ||
$i18n: NuxtI18nInstance | ||
} | ||
} |
Sorry, the diff of this file is too big to display
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
158193
2067
Updated@babel/parser@^7.13.15
Updated@babel/traverse@^7.13.15
Updatedcookie@^0.4.1
Updatedufo@^0.6.11
Updatedvue-i18n@^8.24.3