Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

nuxt-i18n

Package Overview
Dependencies
Maintainers
2
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.16.0 to 6.17.0

13

CHANGELOG.md

@@ -0,1 +1,14 @@

## [6.17.0](https://github.com/nuxt-community/i18n-module/compare/v6.16.0...v6.17.0) (2021-01-05)
### Features
* **fallbackLocale:** support vue-i18n decision map fallback ([#992](https://github.com/nuxt-community/i18n-module/issues/992)) ([b4c6cfd](https://github.com/nuxt-community/i18n-module/commit/b4c6cfd9968562c35c6e6a1b0e6805efb6945d47))
### Bug Fixes
* use local klona dependency from the plugin ([#1008](https://github.com/nuxt-community/i18n-module/issues/1008)) ([42c3cd5](https://github.com/nuxt-community/i18n-module/commit/42c3cd5595e4fcc06866c373a1a430e6f1b337c6)), closes [#1004](https://github.com/nuxt-community/i18n-module/issues/1004)
* **deps:** update dependency is-https to v3 ([#997](https://github.com/nuxt-community/i18n-module/issues/997)) ([cd377b4](https://github.com/nuxt-community/i18n-module/commit/cd377b49441465de3283e68b253e984077d24ac3))
## [6.16.0](https://github.com/nuxt-community/i18n-module/compare/v6.15.4...v6.16.0) (2020-12-09)

@@ -2,0 +15,0 @@

24

package.json
{
"name": "nuxt-i18n",
"version": "6.16.0",
"version": "6.17.0",
"description": "i18n for Nuxt",

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

"cookie": "^0.4.0",
"is-https": "^2.0.0",
"is-https": "^3.0.0",
"js-cookie": "^2.2.1",

@@ -96,12 +96,12 @@ "klona": "^2.0.4",

"devDependencies": {
"@babel/core": "7.12.9",
"@babel/preset-env": "7.12.7",
"@babel/core": "7.12.10",
"@babel/preset-env": "7.12.11",
"@babel/runtime": "7.12.5",
"@nuxt/types": "2.14.10",
"@nuxt/types": "2.14.12",
"@nuxtjs/eslint-config-typescript": "5.0.0",
"@nuxtjs/module-test-utils": "1.6.3",
"@release-it/conventional-changelog": "2.0.0",
"@types/argparse": "2.0.4",
"@types/argparse": "2.0.5",
"@types/finalhandler": "1.1.0",
"@types/jest": "26.0.18",
"@types/jest": "26.0.19",
"@types/jest-dev-server": "4.2.0",

@@ -115,4 +115,4 @@ "@types/jsdom": "16.2.5",

"codecov": "3.8.1",
"core-js": "3.8.1",
"eslint": "7.15.0",
"core-js": "3.8.2",
"eslint": "7.17.0",
"finalhandler": "1.1.2",

@@ -123,8 +123,8 @@ "jest": "26.6.3",

"messageformat": "2.3.0",
"nuxt": "2.14.10",
"playwright-chromium": "1.6.2",
"nuxt": "2.14.12",
"playwright-chromium": "1.7.1",
"release-it": "14.2.2",
"serve-static": "1.14.1",
"typescript": "4.1.2"
"typescript": "4.1.3"
}
}

@@ -72,2 +72,3 @@ import { resolve, join } from 'path'

this.options.alias['~i18n-klona'] = require.resolve('klona/full')
this.options.router.middleware.push('nuxti18n')

@@ -74,0 +75,0 @@ this.options.render.bundleRenderer.directives = this.options.render.bundleRenderer.directives || {}

import Vue from 'vue'
import VueI18n from 'vue-i18n'
import { klona } from 'klona/full'
import { nuxtI18nSeo } from './seo-head'

@@ -39,2 +38,3 @@ import {

} from './utils-common'
import { klona } from '~i18n-klona'

@@ -94,6 +94,20 @@ Vue.use(VueI18n)

const { loadLanguageAsync } = require('./utils')
const i18nFallbackLocale = app.i18n.fallbackLocale
// Load fallback locale.
if (app.i18n.fallbackLocale && newLocale !== app.i18n.fallbackLocale) {
await loadLanguageAsync(context, app.i18n.fallbackLocale)
// Load fallback locale(s).
if (i18nFallbackLocale) {
let localesToLoadPromises = []
if (Array.isArray(i18nFallbackLocale)) {
localesToLoadPromises = i18nFallbackLocale.map(fbLocale => loadLanguageAsync(context, fbLocale))
} else if (typeof i18nFallbackLocale === 'object') {
if (i18nFallbackLocale[newLocale]) {
localesToLoadPromises = localesToLoadPromises.concat(i18nFallbackLocale[newLocale].map(fbLocale => loadLanguageAsync(context, fbLocale)))
}
if (i18nFallbackLocale.default) {
localesToLoadPromises = localesToLoadPromises.concat(i18nFallbackLocale.default.map(fbLocale => loadLanguageAsync(context, fbLocale)))
}
} else if (newLocale !== i18nFallbackLocale) {
localesToLoadPromises.push(loadLanguageAsync(context, i18nFallbackLocale))
}
await Promise.all(localesToLoadPromises)
}

@@ -100,0 +114,0 @@

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