nuxt-i18n
Advanced tools
@@ -5,2 +5,13 @@ # Change Log | ||
## [5.12.4](https://github.com/nuxt-community/nuxt-i18n/compare/v5.12.3...v5.12.4) (2019-06-02) | ||
### Bug Fixes | ||
* **deps:** update dependency cookie to ^0.4.0 ([4223f6a](https://github.com/nuxt-community/nuxt-i18n/commit/4223f6a)) | ||
* add types for nuxtI18nSeo ([5811bbe](https://github.com/nuxt-community/nuxt-i18n/commit/5811bbe)) | ||
* Unexpected token when using dynamic imports ([#320](https://github.com/nuxt-community/nuxt-i18n/issues/320)) ([7dd1dbc](https://github.com/nuxt-community/nuxt-i18n/commit/7dd1dbc)), closes [#134](https://github.com/nuxt-community/nuxt-i18n/issues/134) [#301](https://github.com/nuxt-community/nuxt-i18n/issues/301) | ||
## [5.12.3](https://github.com/nuxt-community/nuxt-i18n/compare/v5.12.2...v5.12.3) (2019-05-13) | ||
@@ -7,0 +18,0 @@ |
{ | ||
"name": "nuxt-i18n", | ||
"version": "5.12.3", | ||
"version": "5.12.4", | ||
"description": "i18n for Nuxt", | ||
@@ -47,4 +47,5 @@ "license": "MIT", | ||
"acorn": "^6.1.1", | ||
"acorn-dynamic-import": "^4.0.0", | ||
"acorn-walk": "^6.1.1", | ||
"cookie": "^0.3.1", | ||
"cookie": "^0.4.0", | ||
"js-cookie": "^2.2.0", | ||
@@ -55,9 +56,9 @@ "vue-i18n": "^8.11.2", | ||
"devDependencies": { | ||
"@babel/runtime": "7.4.4", | ||
"codecov": "3.4.0", | ||
"@babel/runtime": "7.4.5", | ||
"codecov": "3.5.0", | ||
"eslint": "5.16.0", | ||
"eslint-config-standard": "12.0.0", | ||
"eslint-plugin-import": "2.17.2", | ||
"eslint-plugin-jest": "22.5.1", | ||
"eslint-plugin-node": "9.0.1", | ||
"eslint-plugin-import": "2.17.3", | ||
"eslint-plugin-jest": "22.6.4", | ||
"eslint-plugin-node": "9.1.0", | ||
"eslint-plugin-promise": "4.1.1", | ||
@@ -67,8 +68,8 @@ "eslint-plugin-standard": "4.0.0", | ||
"jest": "24.8.0", | ||
"jsdom": "15.1.0", | ||
"nuxt": "2.6.3", | ||
"jsdom": "15.1.1", | ||
"nuxt": "2.7.1", | ||
"standard-version": "6.0.1", | ||
"typescript": "3.4.5", | ||
"typescript": "3.5.1", | ||
"vuepress": "0.14.11" | ||
} | ||
} |
@@ -5,3 +5,5 @@ const { readFileSync } = require('fs') | ||
const acorn = require('acorn') | ||
const walker = require('acorn-walk') | ||
const dynamicImport = require('acorn-dynamic-import') | ||
const inject = require('acorn-dynamic-import/lib/walk') | ||
const walker = inject.default(require('acorn-walk')) | ||
// Must not be an explicit dependency to avoid version mismatch issue. | ||
@@ -19,3 +21,3 @@ // See https://github.com/nuxt-community/nuxt-i18n/issues/297 | ||
const script = Component.script.content | ||
const parsed = acorn.parse(script, { | ||
const parsed = acorn.Parser.extend(dynamicImport.default).parse(script, { | ||
ecmaVersion: 10, | ||
@@ -31,5 +33,5 @@ sourceType: 'module' | ||
} | ||
}) | ||
}, walker.base) | ||
return componentOptions | ||
} |
@@ -83,2 +83,19 @@ import Vue from "vue"; | ||
declare module "vue/types/vue" { | ||
interface NuxtI18nSeo { | ||
htmlAttrs?: { | ||
lang?: string | ||
} | ||
link?: { | ||
hid: string, | ||
rel: string, | ||
href: string, | ||
hreflang: string | ||
}[] | ||
meta?: { | ||
hid: string, | ||
name: string, | ||
property: string, | ||
content: string | ||
}[] | ||
} | ||
interface Vue { | ||
@@ -88,2 +105,3 @@ localePath(route: RawLocation, locale?: string): string; | ||
getRouteBaseName(route: RawLocation): string; | ||
$nuxtI18nSeo(): NuxtI18nSeo; | ||
// PHPStorm without this indicates that "$i18n" was not found. | ||
@@ -90,0 +108,0 @@ readonly $i18n: VueI18n & IVueI18n; |
59437
2.03%1003
2.03%8
14.29%