New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

nuxt-i18n

Package Overview
Dependencies
Maintainers
3
Versions
167
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nuxt-i18n - npm Package Compare versions

Comparing version 6.25.0 to 6.26.0

8

package.json
{
"name": "nuxt-i18n",
"version": "6.25.0",
"version": "6.26.0",
"description": "i18n for Nuxt",

@@ -107,3 +107,3 @@ "license": "MIT",

"@nuxt/types": "2.15.4",
"@nuxtjs/composition-api": "0.23.0",
"@nuxtjs/composition-api": "0.23.2",
"@nuxtjs/eslint-config-typescript": "6.0.0",

@@ -126,3 +126,3 @@ "@nuxtjs/module-test-utils": "1.6.3",

"codecov": "3.8.1",
"core-js": "3.10.1",
"core-js": "3.10.2",
"eslint": "7.24.0",

@@ -132,3 +132,3 @@ "express": "4.17.1",

"jest": "26.6.3",
"jest-dev-server": "4.4.0",
"jest-dev-server": "5.0.0",
"jsdom": "16.5.3",

@@ -135,0 +135,0 @@ "messageformat": "2.3.0",

@@ -24,9 +24,2 @@ import Vue from 'vue'

const detectBrowserLanguage = /** @type {Required<import('../../types').DetectBrowserLanguageOptions>} */(options.detectBrowserLanguage)
const { alwaysRedirect, onlyOnNoPrefix, onlyOnRoot, fallbackLocale } = detectBrowserLanguage
const getLocaleFromRoute = createLocaleFromRouteGetter(options.localeCodes, {
routesNameSeparator: options.routesNameSeparator,
defaultLocaleRouteNameSuffix: options.defaultLocaleRouteNameSuffix
})
/** @type {import('@nuxt/types').Plugin} */

@@ -40,3 +33,6 @@ export default async (context) => {

if (process.server && options.lazy) {
const { lazy } = options
const injectInNuxtState = lazy && (lazy === true || lazy.skipNuxtState !== true)
if (process.server && injectInNuxtState) {
const devalue = (await import('devalue')).default

@@ -63,3 +59,13 @@ context.beforeNuxtRender(({ nuxtState }) => {

const { useCookie, cookieKey, cookieDomain, cookieSecure, cookieCrossOrigin } = detectBrowserLanguage
const {
alwaysRedirect,
fallbackLocale,
onlyOnNoPrefix,
onlyOnRoot,
useCookie,
cookieKey,
cookieDomain,
cookieSecure,
cookieCrossOrigin
} = /** @type {Required<import('../../types').DetectBrowserLanguageOptions>} */(options.detectBrowserLanguage)

@@ -149,2 +155,7 @@ /**

const getLocaleFromRoute = createLocaleFromRouteGetter(options.localeCodes, {
routesNameSeparator: options.routesNameSeparator,
defaultLocaleRouteNameSuffix: options.defaultLocaleRouteNameSuffix
})
/**

@@ -151,0 +162,0 @@ * Gets the redirect path for locale.

@@ -44,2 +44,6 @@ import VueI18n, { Locale, I18nOptions, IVueI18n } from 'vue-i18n'

export interface LazyOptions {
skipNuxtState?: boolean
}
// Options that are also exposed on the VueI18n instance.

@@ -60,3 +64,3 @@ export interface BaseOptions {

langDir?: string | null
lazy?: boolean
lazy?: boolean | LazyOptions
pages?: {

@@ -63,0 +67,0 @@ [key: string]: false | {

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc