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

nuxt-i18n

Package Overview
Dependencies
Maintainers
1
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 2.2.0 to 2.2.1

10

CHANGELOG.md

@@ -5,2 +5,12 @@ # Change Log

<a name="2.2.1"></a>
## [2.2.1](https://github.com/paulgv/nuxt-i18n/compare/v2.2.0...v2.2.1) (2018-02-10)
### Bug Fixes
* Cleaner URLs for index ([72938f3](https://github.com/paulgv/nuxt-i18n/commit/72938f3))
<a name="2.2.0"></a>

@@ -7,0 +17,0 @@ # [2.2.0](https://github.com/paulgv/nuxt-i18n/compare/v2.1.1...v2.2.0) (2018-02-10)

4

lib/routes.js

@@ -25,3 +25,2 @@ const { has } = require('lodash')

const localizedRoutes = []
// Extract routes that should not be localized

@@ -65,2 +64,5 @@ baseRoutes.forEach(route => {

}
if (cleanChunkName === 'index' && path !== '/' && path.match(/\/$/) !== null) {
path = path.replace(/\/$/, '')
}
}

@@ -67,0 +69,0 @@ const route = { path, component }

@@ -20,3 +20,3 @@ import middleware from './middleware'

locales.forEach(l => {
const regexp = new RegExp('^/' + l.code + '/')
const regexp = new RegExp('^/' + l.code + '(/.+)?')
if (route.path.match(regexp)) {

@@ -23,0 +23,0 @@ locale = l.code

@@ -20,8 +20,2 @@ import './i18n.routing.middleware';

let { href } = resolved
// Handle homepage exception
if (route.name === 'index' && !href.match(/^\/\#.+/)) {
href = route.hash
? href.replace('#', '/#')
: href + '/'
}
// Cleanup href

@@ -28,0 +22,0 @@ href = (href.match(/^\/\/+$/)) ? '/' : href

{
"name": "nuxt-i18n",
"version": "2.2.0",
"version": "2.2.1",
"description": "i18n for Nuxt",

@@ -5,0 +5,0 @@ "license": "MIT",

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