From 82b5a5a92caf1990b65ad25b8184688f765cda4e Mon Sep 17 00:00:00 2001 From: Benjamin Canac Date: Thu, 3 Sep 2020 11:12:59 +0200 Subject: [PATCH 01/23] docs: bump theme docs badge version --- docs/content/en/themes/docs.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/content/en/themes/docs.md b/docs/content/en/themes/docs.md index d96580dd9..a14fef4d0 100644 --- a/docs/content/en/themes/docs.md +++ b/docs/content/en/themes/docs.md @@ -6,7 +6,7 @@ description: 'Create your documentation with @nuxt/content docs theme in seconds category: Themes position: 8 version: 1.1 -badge: 'v0.5.5' +badge: 'v0.5.6' --- From f5391f43998e868d4ca73ec7717ec145fb1b0ac1 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 3 Sep 2020 11:15:29 +0200 Subject: [PATCH 02/23] chore(deps): update dependency @nuxt/content-theme-docs to ^0.5.6 (#452) Co-authored-by: Renovate Bot --- packages/create-nuxt-content-docs/template/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/create-nuxt-content-docs/template/package.json b/packages/create-nuxt-content-docs/template/package.json index 61efd28b8..bef01f06b 100644 --- a/packages/create-nuxt-content-docs/template/package.json +++ b/packages/create-nuxt-content-docs/template/package.json @@ -9,7 +9,7 @@ "generate": "nuxt generate" }, "dependencies": { - "@nuxt/content-theme-docs": "^0.5.5", + "@nuxt/content-theme-docs": "^0.5.6", "nuxt": "^2.14.4" } } \ No newline at end of file From 36769de75b73f5826674c564424cd77f26824fb7 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 3 Sep 2020 19:18:54 +0200 Subject: [PATCH 03/23] chore(deps): update devdependency @babel/core to ^7.11.6 (#454) Co-authored-by: Renovate Bot --- package.json | 2 +- yarn.lock | 35 +++++++++++++++++++++++++++++++++-- 2 files changed, 34 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 669243a7e..567167b2b 100755 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "test:packages:create-nuxt-content-docs": "jest packages/create-nuxt-content-docs" }, "devDependencies": { - "@babel/core": "^7.11.5", + "@babel/core": "^7.11.6", "@babel/preset-env": "^7.11.5", "@nuxtjs/eslint-config": "^3.1.0", "@nuxtjs/module-test-utils": "^1.6.3", diff --git a/yarn.lock b/yarn.lock index bdc0af1f4..366a7050c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -18,7 +18,7 @@ invariant "^2.2.4" semver "^5.5.0" -"@babel/core@^7.1.0", "@babel/core@^7.11.4", "@babel/core@^7.11.5", "@babel/core@^7.7.4", "@babel/core@^7.7.5": +"@babel/core@^7.1.0", "@babel/core@^7.11.4", "@babel/core@^7.7.4", "@babel/core@^7.7.5": version "7.11.5" resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.11.5.tgz#6ad96e2f71899ea3f9b651f0a911e85205d1ff6d" integrity sha512-fsEANVOcZHzrsV6dMVWqpSeXClq3lNbYrfFGme6DE25FQWe7pyeYpXyx9guqUnpy466JLzZ8z4uwSr2iv60V5Q== @@ -40,6 +40,28 @@ semver "^5.4.1" source-map "^0.6.1" +"@babel/core@^7.11.6": + version "7.11.6" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.11.6.tgz#3a9455dc7387ff1bac45770650bc13ba04a15651" + integrity sha512-Wpcv03AGnmkgm6uS6k8iwhIwTrcP0m17TL1n1sy7qD0qelDu4XNeW0dN0mHfa+Gei211yDaLoEe/VlbXQzM4Bg== + dependencies: + "@babel/code-frame" "^7.10.4" + "@babel/generator" "^7.11.6" + "@babel/helper-module-transforms" "^7.11.0" + "@babel/helpers" "^7.10.4" + "@babel/parser" "^7.11.5" + "@babel/template" "^7.10.4" + "@babel/traverse" "^7.11.5" + "@babel/types" "^7.11.5" + convert-source-map "^1.7.0" + debug "^4.1.0" + gensync "^1.0.0-beta.1" + json5 "^2.1.2" + lodash "^4.17.19" + resolve "^1.3.2" + semver "^5.4.1" + source-map "^0.5.0" + "@babel/generator@^7.11.5": version "7.11.5" resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.11.5.tgz#a5582773425a468e4ba269d9a1f701fbca6a7a82" @@ -49,6 +71,15 @@ jsesc "^2.5.1" source-map "^0.6.1" +"@babel/generator@^7.11.6": + version "7.11.6" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.11.6.tgz#b868900f81b163b4d464ea24545c61cbac4dc620" + integrity sha512-DWtQ1PV3r+cLbySoHrwn9RWEgKMBLLma4OBQloPRyDYvc5msJM9kvTLo1YnlJd1P/ZuKbdli3ijr5q3FvAF3uA== + dependencies: + "@babel/types" "^7.11.5" + jsesc "^2.5.1" + source-map "^0.5.0" + "@babel/helper-annotate-as-pure@^7.10.4": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.10.4.tgz#5bf0d495a3f757ac3bda48b5bf3b3ba309c72ba3" @@ -13303,7 +13334,7 @@ source-map@0.5.6: resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.6.tgz#75ce38f52bf0733c5a7f0c118d81334a2bb5f412" integrity sha1-dc449SvwczxafwwRjYEzSiu19BI= -source-map@^0.5.6: +source-map@^0.5.0, source-map@^0.5.6: version "0.5.7" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" integrity sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w= From b9d6e3ea4d20207cbdac2fcf88512ecd29750c38 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 7 Sep 2020 13:56:55 +0200 Subject: [PATCH 04/23] chore(deps): update devdependency husky to ^4.3.0 (#459) Co-authored-by: Renovate Bot --- package.json | 2 +- yarn.lock | 26 +++++++++++++------------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/package.json b/package.json index 567167b2b..617c7ebb7 100755 --- a/package.json +++ b/package.json @@ -33,7 +33,7 @@ "babel-jest": "^26.3.0", "codecov": "^3.7.2", "eslint": "^7.8.1", - "husky": "^4.2.5", + "husky": "^4.3.0", "jest": "^26.4.2", "lerna": "^3.22.1", "nuxt": "^2.14.4", diff --git a/yarn.lock b/yarn.lock index 366a7050c..afd577aee 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5089,16 +5089,16 @@ cosmiconfig@^5.0.0, cosmiconfig@^5.1.0: js-yaml "^3.13.1" parse-json "^4.0.0" -cosmiconfig@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-6.0.0.tgz#da4fee853c52f6b1e6935f41c1a2fc50bd4a9982" - integrity sha512-xb3ZL6+L8b9JLLCx3ZdoZy4+2ECphCMo2PwqgP1tlfVq6M6YReyzBJtvWWtbDSpNr9hn96pkCiZqUcFEc+54Qg== +cosmiconfig@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-7.0.0.tgz#ef9b44d773959cae63ddecd122de23853b60f8d3" + integrity sha512-pondGvTuVYDk++upghXJabWzL6Kxu6f26ljFw64Swq9v6sQPUL3EUlVDV56diOjpCayKihL6hVe8exIACU4XcA== dependencies: "@types/parse-json" "^4.0.0" - import-fresh "^3.1.0" + import-fresh "^3.2.1" parse-json "^5.0.0" path-type "^4.0.0" - yaml "^1.7.2" + yaml "^1.10.0" crc@^3.8.0: version "3.8.0" @@ -7859,15 +7859,15 @@ humanize-ms@^1.2.1: dependencies: ms "^2.0.0" -husky@^4.2.5: - version "4.2.5" - resolved "https://registry.yarnpkg.com/husky/-/husky-4.2.5.tgz#2b4f7622673a71579f901d9885ed448394b5fa36" - integrity sha512-SYZ95AjKcX7goYVZtVZF2i6XiZcHknw50iXvY7b0MiGoj5RwdgRQNEHdb+gPDPCXKlzwrybjFjkL6FOj8uRhZQ== +husky@^4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/husky/-/husky-4.3.0.tgz#0b2ec1d66424e9219d359e26a51c58ec5278f0de" + integrity sha512-tTMeLCLqSBqnflBZnlVDhpaIMucSGaYyX6855jM4AguGeWCeSzNdb1mfyWduTZ3pe3SJVvVWGL0jO1iKZVPfTA== dependencies: chalk "^4.0.0" ci-info "^2.0.0" compare-versions "^3.6.0" - cosmiconfig "^6.0.0" + cosmiconfig "^7.0.0" find-versions "^3.2.0" opencollective-postinstall "^2.0.2" pkg-dir "^4.2.0" @@ -7938,7 +7938,7 @@ import-fresh@^2.0.0: caller-path "^2.0.0" resolve-from "^3.0.0" -import-fresh@^3.0.0, import-fresh@^3.1.0, import-fresh@^3.2.1: +import-fresh@^3.0.0, import-fresh@^3.2.1: version "3.2.1" resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.2.1.tgz#633ff618506e793af5ac91bf48b72677e15cbe66" integrity sha512-6e1q1cnWP2RXD9/keSkxHScg508CdXqXWgWBaETNhyuBFz+kUZlKboh+ISK+bU++DmbHimVBrOz/zzPe0sZ3sQ== @@ -15400,7 +15400,7 @@ yallist@^4.0.0: resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== -yaml@^1.7.2: +yaml@^1.10.0: version "1.10.0" resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.10.0.tgz#3b593add944876077d4d683fee01081bd9fff31e" integrity sha512-yr2icI4glYaNG+KWONODapy2/jDdMSDnrONSjblABjD9B4Z5LgiircSt8m8sRZFNi08kG9Sm0uSHtEmP3zaEGg== From 75771be001c0dd6a34797875c66e8bd137187902 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 8 Sep 2020 10:32:51 +0200 Subject: [PATCH 05/23] chore(deps): update dependency nuxt-i18n to ^6.14.1 (#460) Co-authored-by: Renovate Bot --- packages/theme-docs/package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/theme-docs/package.json b/packages/theme-docs/package.json index baa6636ff..304b07a2a 100644 --- a/packages/theme-docs/package.json +++ b/packages/theme-docs/package.json @@ -19,7 +19,7 @@ "defu": "^3.1.0", "lodash.groupby": "^4.6.0", "marked": "^1.1.1", - "nuxt-i18n": "^6.13.12", + "nuxt-i18n": "^6.14.1", "prism-themes": "^1.4.0", "vue-scrollactive": "^0.9.3" }, diff --git a/yarn.lock b/yarn.lock index afd577aee..83a2f336e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10473,10 +10473,10 @@ nuxt-ackee@^2.0.0: ackee-tracker "^4.0.0" defu "^3.1.0" -nuxt-i18n@^6.13.12: - version "6.13.12" - resolved "https://registry.yarnpkg.com/nuxt-i18n/-/nuxt-i18n-6.13.12.tgz#590e1b69f5dbfd2b7d777a8cc0231f23e0f438f5" - integrity sha512-lpk59Fs8+heoXSJ/7VAHmSLXvyegaPmlYe+wSeI7g4VHVHL7YHIHypUPu/pQfEe0h1f5GY0R/w1Y8AEEPaXiVw== +nuxt-i18n@^6.14.1: + version "6.14.1" + resolved "https://registry.yarnpkg.com/nuxt-i18n/-/nuxt-i18n-6.14.1.tgz#14ff17dd92b29375a9109f832d2e30b2825a38bc" + integrity sha512-9u0jEQuvzlJkoFELhSp9lg+l97HcCgOoG79eQ9DdMeIf6vKCSiRvFiN+wcKnQbmVr70JmLglVMqcN9YcSMD0hA== dependencies: "@babel/parser" "^7.5.5" "@babel/traverse" "^7.5.5" From f7ac58de9b743cb58fe9b7a7ab81795c4dbf3e3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Kr=C3=BCger?= <2pi_r2@gmx.de> Date: Tue, 8 Sep 2020 17:33:37 +0200 Subject: [PATCH 06/23] feat: add content:file:beforeParse hook (#453) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * add hooks * Update index.js * lint files * remove content:file:parsedAfter & rename * remove one hook & rename other hook * chore: rename to file.data * chore: use file instead * Update advanced.md * docs: update example * docs: cleanup * docs: typo Co-authored-by: Sébastien Chopin --- docs/content/en/advanced.md | 33 ++++++++++++++++++++++++++++---- packages/content/lib/database.js | 25 +++++++++++++++--------- packages/content/lib/index.js | 3 +++ 3 files changed, 48 insertions(+), 13 deletions(-) diff --git a/docs/content/en/advanced.md b/docs/content/en/advanced.md index b222c8b27..73a50f99c 100644 --- a/docs/content/en/advanced.md +++ b/docs/content/en/advanced.md @@ -42,7 +42,7 @@ When using Nuxt <= 2.12, you might need to specify the dynamic routes with [gene **Example** -```js +```js{}[nuxt.config.js] export default { modules: [, '@nuxt/content' @@ -68,6 +68,31 @@ Recommended to use Nuxt 2.14+ with `nuxt generate` because it's awesome! The module adds some hooks you can use: +### `content:file:beforeParse` + +Allows you to modify the contents of a file before it is handled by the parsers. + +Arguments: +- `data` + - Type: `Object` + - Properties: + - path: `String` + - extension: `String` (ex: `.md`) + - data: `String` + +**Example** + +Changing all appearances of `react` to `vue` in all Markdown files: + +```js{}[nuxt.config.js] +hooks: { + 'content:file:beforeParse': (file) => { + if (file.extension !== '.md') return + file.data = file.data.replace(/react/g, 'vue') + } +} +``` + ### `content:file:beforeInsert` Allows you to add data to a document before it is stored. @@ -84,7 +109,7 @@ When building a blog, you can use `file:beforeInsert` to add `readingTime` to a > `text` is the body content of a markdown file before it is transformed to JSON AST, you can use at this point but it is not returned by the API. -```js +```js{}[nuxt.config.js] export default { modules: [, '@nuxt/content' @@ -105,7 +130,7 @@ export default { You might want to parse markdown inside a `.json` file. You can access the parsers from the `database` object: -```js +```js{}[nuxt.config.js] export default { modules: [, '@nuxt/content' @@ -132,7 +157,7 @@ When you are in development mode, the module will automatically call `nuxtServer In case you want to listen to the event to do something more, you can listen on `content:update` event on client-side using `$nuxt.$on('content:update')`: -```js{}[plugins/update.client.js +```js{}[plugins/update.client.js] export default function ({ store }) { // Only in development if (process.dev) { diff --git a/packages/content/lib/database.js b/packages/content/lib/database.js index 5666ca110..ed2165a8f 100644 --- a/packages/content/lib/database.js +++ b/packages/content/lib/database.js @@ -166,24 +166,31 @@ class Database extends Hookable { if (!EXTENSIONS.includes(extension) && !this.extendParserExtensions.includes(extension)) { return } - const file = await fs.readFile(path, 'utf-8') + const stats = await fs.stat(path) + const file = { + path, + extension, + data: await fs.readFile(path, 'utf-8') + } + + await this.callHook('file:beforeParse', file) // Get parser depending on extension const parser = ({ - '.json': file => JSON.parse(file), - '.json5': file => JSON5.parse(file), - '.md': file => this.markdown.toJSON(file), - '.csv': file => this.csv.toJSON(file), - '.yaml': file => this.yaml.toJSON(file), - '.yml': file => this.yaml.toJSON(file), - '.xml': file => this.xml.toJSON(file), + '.json': data => JSON.parse(data), + '.json5': data => JSON5.parse(data), + '.md': data => this.markdown.toJSON(data), + '.csv': data => this.csv.toJSON(data), + '.yaml': data => this.yaml.toJSON(data), + '.yml': data => this.yaml.toJSON(data), + '.xml': data => this.xml.toJSON(data), ...this.extendParser })[extension] // Collect data from file let data = {} try { - data = await parser(file) + data = await parser(file.data) } catch (err) { logger.warn(`Could not parse ${path.replace(this.cwd, '.')}:`, err.message) return null diff --git a/packages/content/lib/index.js b/packages/content/lib/index.js index 898740282..13e3013f8 100644 --- a/packages/content/lib/index.js +++ b/packages/content/lib/index.js @@ -93,6 +93,9 @@ module.exports = async function (moduleOptions) { database.hook('file:beforeInsert', item => this.nuxt.callHook('content:file:beforeInsert', item, database) ) + database.hook('file:beforeParse', file => + this.nuxt.callHook('content:file:beforeParse', file) + ) database.hook('file:updated', event => ws.broadcast(event)) // Initialize database from file system From 711913c4772a9aad442f093eb4ddc822771e873f Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 8 Sep 2020 19:40:12 +0200 Subject: [PATCH 07/23] chore(deps): update dependency nuxt-i18n to ^6.14.2 (#461) Co-authored-by: Renovate Bot --- packages/theme-docs/package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/theme-docs/package.json b/packages/theme-docs/package.json index 304b07a2a..9413febdb 100644 --- a/packages/theme-docs/package.json +++ b/packages/theme-docs/package.json @@ -19,7 +19,7 @@ "defu": "^3.1.0", "lodash.groupby": "^4.6.0", "marked": "^1.1.1", - "nuxt-i18n": "^6.14.1", + "nuxt-i18n": "^6.14.2", "prism-themes": "^1.4.0", "vue-scrollactive": "^0.9.3" }, diff --git a/yarn.lock b/yarn.lock index 83a2f336e..62f05f95b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10473,10 +10473,10 @@ nuxt-ackee@^2.0.0: ackee-tracker "^4.0.0" defu "^3.1.0" -nuxt-i18n@^6.14.1: - version "6.14.1" - resolved "https://registry.yarnpkg.com/nuxt-i18n/-/nuxt-i18n-6.14.1.tgz#14ff17dd92b29375a9109f832d2e30b2825a38bc" - integrity sha512-9u0jEQuvzlJkoFELhSp9lg+l97HcCgOoG79eQ9DdMeIf6vKCSiRvFiN+wcKnQbmVr70JmLglVMqcN9YcSMD0hA== +nuxt-i18n@^6.14.2: + version "6.14.2" + resolved "https://registry.yarnpkg.com/nuxt-i18n/-/nuxt-i18n-6.14.2.tgz#646656b16d66899bf65723215f4a734f570d093c" + integrity sha512-3xsoJGT+DVGIyYqoeEsuVOGUK0zK8Gsi8MM1G/NXaNWFfI+98vDYlJTccrYWUIjWVvdq9JxniMBm/qNHkE73GA== dependencies: "@babel/parser" "^7.5.5" "@babel/traverse" "^7.5.5" From 955e8504f8510f550c8b8e73315dd9288ba49757 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 11 Sep 2020 12:00:57 +0200 Subject: [PATCH 08/23] chore(deps): update all non-major dependencies (#464) Co-authored-by: Renovate Bot --- docs/package.json | 2 +- package.json | 2 +- packages/content/package.json | 2 +- .../template/package.json | 2 +- packages/theme-docs/package.json | 8 +- yarn.lock | 262 +++++++++--------- 6 files changed, 145 insertions(+), 133 deletions(-) diff --git a/docs/package.json b/docs/package.json index e581a808d..35c00c633 100644 --- a/docs/package.json +++ b/docs/package.json @@ -12,7 +12,7 @@ }, "dependencies": { "@nuxt/content-theme-docs": "^0.5.6", - "nuxt": "^2.14.4", + "nuxt": "^2.14.5", "nuxt-ackee": "^2.0.0", "vue-multiselect": "^2.1.6" } diff --git a/package.json b/package.json index 617c7ebb7..59778c0c7 100755 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ "husky": "^4.3.0", "jest": "^26.4.2", "lerna": "^3.22.1", - "nuxt": "^2.14.4", + "nuxt": "^2.14.5", "puppeteer": "^5.2.1", "tib": "^0.7.4" } diff --git a/packages/content/package.json b/packages/content/package.json index bae71506a..490f67430 100644 --- a/packages/content/package.json +++ b/packages/content/package.json @@ -14,7 +14,7 @@ "dependencies": { "@lokidb/full-text-search": "^2.1.0", "@lokidb/loki": "^2.1.0", - "@nuxt/types": "^2.14.4", + "@nuxt/types": "^2.14.5", "@types/js-yaml": "^3.12.5", "@types/xml2js": "^0.4.5", "change-case": "^4.1.1", diff --git a/packages/create-nuxt-content-docs/template/package.json b/packages/create-nuxt-content-docs/template/package.json index bef01f06b..71ab91eda 100644 --- a/packages/create-nuxt-content-docs/template/package.json +++ b/packages/create-nuxt-content-docs/template/package.json @@ -10,6 +10,6 @@ }, "dependencies": { "@nuxt/content-theme-docs": "^0.5.6", - "nuxt": "^2.14.4" + "nuxt": "^2.14.5" } } \ No newline at end of file diff --git a/packages/theme-docs/package.json b/packages/theme-docs/package.json index 9413febdb..7bdc0b1fb 100644 --- a/packages/theme-docs/package.json +++ b/packages/theme-docs/package.json @@ -9,9 +9,9 @@ "main": "src/", "dependencies": { "@nuxt/content": "^1.8.1", - "@nuxt/types": "^2.14.4", + "@nuxt/types": "^2.14.5", "@nuxtjs/color-mode": "^1.0.3", - "@nuxtjs/google-fonts": "^1.0.0", + "@nuxtjs/google-fonts": "^1.0.2", "@nuxtjs/pwa": "^3.0.2", "@nuxtjs/tailwindcss": "^3.0.2", "@tailwindcss/typography": "^0.2.0", @@ -19,12 +19,12 @@ "defu": "^3.1.0", "lodash.groupby": "^4.6.0", "marked": "^1.1.1", - "nuxt-i18n": "^6.14.2", + "nuxt-i18n": "^6.15.0", "prism-themes": "^1.4.0", "vue-scrollactive": "^0.9.3" }, "devDependencies": { - "nuxt": "^2.14.4" + "nuxt": "^2.14.5" }, "types": "./src/index.d.ts" } diff --git a/yarn.lock b/yarn.lock index 62f05f95b..4cb9529b0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -18,7 +18,7 @@ invariant "^2.2.4" semver "^5.5.0" -"@babel/core@^7.1.0", "@babel/core@^7.11.4", "@babel/core@^7.7.4", "@babel/core@^7.7.5": +"@babel/core@^7.1.0", "@babel/core@^7.7.4", "@babel/core@^7.7.5": version "7.11.5" resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.11.5.tgz#6ad96e2f71899ea3f9b651f0a911e85205d1ff6d" integrity sha512-fsEANVOcZHzrsV6dMVWqpSeXClq3lNbYrfFGme6DE25FQWe7pyeYpXyx9guqUnpy466JLzZ8z4uwSr2iv60V5Q== @@ -718,7 +718,7 @@ dependencies: "@babel/helper-plugin-utils" "^7.10.4" -"@babel/plugin-transform-runtime@^7.11.0": +"@babel/plugin-transform-runtime@^7.11.5": version "7.11.5" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.11.5.tgz#f108bc8e0cf33c37da031c097d1df470b3a293fc" integrity sha512-9aIoee+EhjySZ6vY5hnLjigHzunBlscx9ANKutkeWTJTx6m5Rbq6Ic01tLvO54lSusR+BxV7u4UDdCmXv5aagg== @@ -781,7 +781,7 @@ "@babel/helper-create-regexp-features-plugin" "^7.10.4" "@babel/helper-plugin-utils" "^7.10.4" -"@babel/preset-env@^7.11.0", "@babel/preset-env@^7.11.5": +"@babel/preset-env@^7.11.5": version "7.11.5" resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.11.5.tgz#18cb4b9379e3e92ffea92c07471a99a2914e4272" integrity sha512-kXqmW1jVcnB2cdueV+fyBM8estd5mlNfaQi6lwLgRwCby4edpavgbFhiBNjmWA3JpB/yZGSISa7Srf+TwxDQoA== @@ -1955,30 +1955,30 @@ "@nodelib/fs.scandir" "2.1.3" fastq "^1.6.0" -"@nuxt/babel-preset-app@2.14.4": - version "2.14.4" - resolved "https://registry.yarnpkg.com/@nuxt/babel-preset-app/-/babel-preset-app-2.14.4.tgz#0e53031d39efe51c750cfb83c18150c86e414488" - integrity sha512-biQwzYGX4j/S6RKs1AZlIWFSeMTjTnnHJUnSSzYwqQLMraBdGcFbMlAzYdAa14gwCRAF3Dxu9WzTV/7h12iV/g== +"@nuxt/babel-preset-app@2.14.5": + version "2.14.5" + resolved "https://registry.yarnpkg.com/@nuxt/babel-preset-app/-/babel-preset-app-2.14.5.tgz#458946a2850cb93343cbcd25a8f83bc4d20e61c9" + integrity sha512-mrBvqkzhI5D8mAeLR6p100vqPDfgndSMflB/0zTWjsIE5SCpEk57fE90ZUPMAyktawhceZTsHQOPGqOm+xDOJw== dependencies: - "@babel/core" "^7.11.4" + "@babel/core" "^7.11.6" "@babel/helper-compilation-targets" "^7.10.4" "@babel/plugin-proposal-class-properties" "^7.10.4" "@babel/plugin-proposal-decorators" "^7.10.5" - "@babel/plugin-transform-runtime" "^7.11.0" - "@babel/preset-env" "^7.11.0" + "@babel/plugin-transform-runtime" "^7.11.5" + "@babel/preset-env" "^7.11.5" "@babel/runtime" "^7.11.2" "@vue/babel-preset-jsx" "^1.1.2" core-js "^2.6.5" -"@nuxt/builder@2.14.4": - version "2.14.4" - resolved "https://registry.yarnpkg.com/@nuxt/builder/-/builder-2.14.4.tgz#34f11201facebc6981eef161bb401fc19b8cc4b5" - integrity sha512-87ecIi+YpTua8d0BqU1ZQUFNLskiR1x/79baTHxPosqH7qnltQor6LpivKlZOBv9yjEPoh4HVB2DGVBFm4wV2w== +"@nuxt/builder@2.14.5": + version "2.14.5" + resolved "https://registry.yarnpkg.com/@nuxt/builder/-/builder-2.14.5.tgz#5a06785d704fd8eab81bfa1c0ab698ea876ac01b" + integrity sha512-Df3X01dOcSpPLogM+FDuInsuLmax0UGQXnR4815Y0LRMd0gdtztGyFwgKo5Q1BaP1dfsWYdaDj89fM08Eu9LlQ== dependencies: "@nuxt/devalue" "^1.2.4" - "@nuxt/utils" "2.14.4" - "@nuxt/vue-app" "2.14.4" - "@nuxt/webpack" "2.14.4" + "@nuxt/utils" "2.14.5" + "@nuxt/vue-app" "2.14.5" + "@nuxt/webpack" "2.14.5" chalk "^3.0.0" chokidar "^3.4.2" consola "^2.15.0" @@ -1989,17 +1989,17 @@ lodash "^4.17.20" pify "^4.0.1" semver "^7.3.2" - serialize-javascript "^4.0.0" + serialize-javascript "^5.0.0" upath "^1.2.0" -"@nuxt/cli@2.14.4": - version "2.14.4" - resolved "https://registry.yarnpkg.com/@nuxt/cli/-/cli-2.14.4.tgz#99a09d0b544e89d9bc32e040de87d1165e295220" - integrity sha512-p2EOFCRtOC9b9tm15k5E+P68fx1gEAZQdKW2nItIv+Q4P2VTFwcKXoZOR9PzriJ3+Q5Kw5tNeaYXCsb51ZG5vg== +"@nuxt/cli@2.14.5": + version "2.14.5" + resolved "https://registry.yarnpkg.com/@nuxt/cli/-/cli-2.14.5.tgz#6027e5c8c8d41d083a6fe1071e8efab908f415ea" + integrity sha512-r+2iv6ihmKEkysr4ejgeTr3ZXwK/B5n1HGDKiwQgcvkNMTgpklrVSnV7r+lZfrGKFEZRw4+IO41FZ+pkMcB4gQ== dependencies: - "@nuxt/config" "2.14.4" + "@nuxt/config" "2.14.5" "@nuxt/static" "^1.0.0" - "@nuxt/utils" "2.14.4" + "@nuxt/utils" "2.14.5" boxen "^4.2.0" chalk "^3.0.0" compression "^1.7.4" @@ -2014,8 +2014,8 @@ globby "^11.0.1" hable "^3.0.0" minimist "^1.2.5" - opener "1.5.1" - pretty-bytes "^5.3.0" + opener "1.5.2" + pretty-bytes "^5.4.1" serve-static "^1.14.1" std-env "^2.2.1" upath "^1.2.0" @@ -2033,12 +2033,12 @@ lodash "^4.17.19" semver "^7.3.2" -"@nuxt/config@2.14.4": - version "2.14.4" - resolved "https://registry.yarnpkg.com/@nuxt/config/-/config-2.14.4.tgz#1533c5a9d4071fb23f5436c17090803d34298eea" - integrity sha512-wHsyvQan2MCBnp55DUrYZtReNL8935pSQdc6RQxD3hOmU5hGV8B+sBILkPnSc2uGt7VG9bHVfcx1gTlxU/awMQ== +"@nuxt/config@2.14.5": + version "2.14.5" + resolved "https://registry.yarnpkg.com/@nuxt/config/-/config-2.14.5.tgz#26119edcaf49d6093f373076883ca2aed15711b3" + integrity sha512-O9AppTdBKCMZmLF6+GXIqCufDdIWbS7hdHSaaF3yd9o/Mj7J0XJoooQgPQyrIU9NFcF9QXjk4kcSEkWgFxPx8A== dependencies: - "@nuxt/utils" "2.14.4" + "@nuxt/utils" "2.14.5" consola "^2.15.0" create-require "^1.0.2" defu "^2.0.4" @@ -2049,16 +2049,16 @@ rc9 "^1.0.0" std-env "^2.2.1" -"@nuxt/core@2.14.4": - version "2.14.4" - resolved "https://registry.yarnpkg.com/@nuxt/core/-/core-2.14.4.tgz#404f033c688648f02e14264e84700510baa97e23" - integrity sha512-PIBEN6fAZk7L3+OamydqPoregrip+XZmhG/LDYWThjtAbVZDasSwJ9/T8jD7J75qAxyM6q5Wd+uWOZ3D4X5giQ== +"@nuxt/core@2.14.5": + version "2.14.5" + resolved "https://registry.yarnpkg.com/@nuxt/core/-/core-2.14.5.tgz#03c71198a25999864153819e5772cd42f4346bb4" + integrity sha512-dAUN281OxZWJeZ1ioZUyf/BKf/4ON7JB12k/ItfLr4o59RktDGLfzeYuVgOCa7H/omoD9pp0I9wOQ252R8afVA== dependencies: - "@nuxt/config" "2.14.4" + "@nuxt/config" "2.14.5" "@nuxt/devalue" "^1.2.4" - "@nuxt/server" "2.14.4" - "@nuxt/utils" "2.14.4" - "@nuxt/vue-renderer" "2.14.4" + "@nuxt/server" "2.14.5" + "@nuxt/utils" "2.14.5" + "@nuxt/vue-renderer" "2.14.5" consola "^2.15.0" debug "^4.1.1" esm "^3.2.25" @@ -2084,12 +2084,12 @@ error-stack-parser "^2.0.0" string-width "^2.0.0" -"@nuxt/generator@2.14.4": - version "2.14.4" - resolved "https://registry.yarnpkg.com/@nuxt/generator/-/generator-2.14.4.tgz#9cc91947a05ff87627b85ec67a90fa095015b166" - integrity sha512-CfFvvzlQNpkFmPO6MCVy1Up+Ha3/scoWwIl9hHcN7WvlHVzlyK/5AOJTKW3xgeWcCFA+se5iTgK2K/5w/cWFGQ== +"@nuxt/generator@2.14.5": + version "2.14.5" + resolved "https://registry.yarnpkg.com/@nuxt/generator/-/generator-2.14.5.tgz#1212f0383b5dbb7f2cdf6e8bca08dd99b9d7ac1b" + integrity sha512-vktzRVmECfO+3WMg4CMYtWkaUgQVEmTL+0LupQBWwpzhz/08pVL6UPRhg3MYS1mn/UlIShNBsaDvzUnX0BSzwg== dependencies: - "@nuxt/utils" "2.14.4" + "@nuxt/utils" "2.14.5" chalk "^3.0.0" consola "^2.15.0" fs-extra "^8.1.0" @@ -2116,14 +2116,14 @@ consola "^2.10.1" node-fetch "^2.6.0" -"@nuxt/server@2.14.4": - version "2.14.4" - resolved "https://registry.yarnpkg.com/@nuxt/server/-/server-2.14.4.tgz#91bfe80084be04029cec6f258bee3d5c17936cf3" - integrity sha512-HRTZBgJWLgphaSnyhUTr9W9SxVaf0a/j9MuXVniuLlVI7aHqCKvWkYCj2pnPzhTKdf3qVRDkIQuI6g8TOZDHVQ== +"@nuxt/server@2.14.5": + version "2.14.5" + resolved "https://registry.yarnpkg.com/@nuxt/server/-/server-2.14.5.tgz#2e81868fb006fef951ccdb6da8e61df9efc9f230" + integrity sha512-cA0PsaaocZ323B7eAgApxCRHSR1oayOLEEL75DDv0Dm2FPevesz1cgk9N9E01fYD499XnKzfRj6cbIg/S1QTIg== dependencies: - "@nuxt/config" "2.14.4" - "@nuxt/utils" "2.14.4" - "@nuxt/vue-renderer" "2.14.4" + "@nuxt/config" "2.14.5" + "@nuxt/utils" "2.14.5" + "@nuxt/vue-renderer" "2.14.5" "@nuxtjs/youch" "^4.2.3" chalk "^3.0.0" compression "^1.7.4" @@ -2174,10 +2174,10 @@ rc9 "^1.0.0" std-env "^2.2.1" -"@nuxt/types@^2.14.4": - version "2.14.4" - resolved "https://registry.yarnpkg.com/@nuxt/types/-/types-2.14.4.tgz#1c000849fdc3124f8544b251a811cc4094c1d085" - integrity sha512-hqqVY9rXBqYrkCStzZmoIWi7keJudOYZ1nBhbHs1pXN/AYwyJUAfYoPG4UE81kEG5CqIQrMXj47+xvOjbZuGbQ== +"@nuxt/types@^2.14.5": + version "2.14.5" + resolved "https://registry.yarnpkg.com/@nuxt/types/-/types-2.14.5.tgz#426236eda1790f15c123110421c6d222c3d02c8f" + integrity sha512-1gOiwv6K4eNJbrYb68jtmZup/0gw6dGeu6fhUykyCcJS3emt+tzf6V0Lvg7WblJ/1xkzQfnNfbrbCm1CJpRAHg== dependencies: "@types/autoprefixer" "^9.7.2" "@types/babel__core" "^7.1.9" @@ -2187,37 +2187,37 @@ "@types/file-loader" "^4.2.0" "@types/html-minifier" "^4.0.0" "@types/less" "^3.0.1" - "@types/node" "^12.12.54" + "@types/node" "^12.12.56" "@types/node-sass" "^4.11.1" "@types/optimize-css-assets-webpack-plugin" "^5.0.1" "@types/pug" "^2.0.4" "@types/serve-static" "^1.13.5" "@types/terser-webpack-plugin" "^2.2.0" - "@types/webpack" "^4.41.21" + "@types/webpack" "^4.41.22" "@types/webpack-bundle-analyzer" "^3.8.0" "@types/webpack-dev-middleware" "^3.7.2" "@types/webpack-hot-middleware" "^2.25.3" -"@nuxt/utils@2.14.4": - version "2.14.4" - resolved "https://registry.yarnpkg.com/@nuxt/utils/-/utils-2.14.4.tgz#b046978a30b80ef9ff166476a13b09727546ee79" - integrity sha512-NSKZ1idNoHswYUSC7sz9pfZ6pWU+3n7emBrkiw7hCaULWSYwv+TqkkNPtTWt/6Uwdc+8Y8C/SnKF1wNhtBxdBA== +"@nuxt/utils@2.14.5": + version "2.14.5" + resolved "https://registry.yarnpkg.com/@nuxt/utils/-/utils-2.14.5.tgz#b67e76c81cf0e19330a11ffc75289d1b862fb8c2" + integrity sha512-PwAX8zdUS1AbSukEtOL5J5FV5hL0F3Y4lg1mwj4bdTu6me3B4TM2xsKpOk0pzylDeL9SvS6KSuh/NUcnx2IsJQ== dependencies: consola "^2.15.0" fs-extra "^8.1.0" hash-sum "^2.0.0" proper-lockfile "^4.1.1" semver "^7.3.2" - serialize-javascript "^4.0.0" + serialize-javascript "^5.0.0" signal-exit "^3.0.3" ua-parser-js "^0.7.21" -"@nuxt/vue-app@2.14.4": - version "2.14.4" - resolved "https://registry.yarnpkg.com/@nuxt/vue-app/-/vue-app-2.14.4.tgz#053a4d5c4f113f519e9a102067131ff2da8a073c" - integrity sha512-67jxuW69j/Gtf4q7FH8i4q1glTujU/WqjjdyE97ClFWT6wMU3VivxrH4q4B8MC61WiVn5SAG04xnc2vAh7znaw== +"@nuxt/vue-app@2.14.5": + version "2.14.5" + resolved "https://registry.yarnpkg.com/@nuxt/vue-app/-/vue-app-2.14.5.tgz#4f0e2edbe55a4a24c164081c9085044e513bdce3" + integrity sha512-EJyG2FjVUwJHBpPDRkVzNjnr+4o8mi1SKfy+IMB8SFMAvdsv/NBVyJXsBGQBR8oqFcBZ+V94O7Iv17Y6nOTuvQ== dependencies: - node-fetch "^2.6.0" + node-fetch "^2.6.1" unfetch "^4.1.0" vue "^2.6.12" vue-client-only "^2.0.0" @@ -2227,13 +2227,13 @@ vue-template-compiler "^2.6.12" vuex "^3.5.1" -"@nuxt/vue-renderer@2.14.4": - version "2.14.4" - resolved "https://registry.yarnpkg.com/@nuxt/vue-renderer/-/vue-renderer-2.14.4.tgz#1b60d72049484a4a413c5bb9ccaebafbf93b03bb" - integrity sha512-bYCj0RVpNcpXLw0XbyuGoCJcfCoNbAAHzTvmY5r1hbeGyvZ8IDd34/PeFoPwLX/KwqdZCIZdVFlF3z/JBlJ/zw== +"@nuxt/vue-renderer@2.14.5": + version "2.14.5" + resolved "https://registry.yarnpkg.com/@nuxt/vue-renderer/-/vue-renderer-2.14.5.tgz#fa7504479caa28fcd96d001024ef927826bda781" + integrity sha512-AlsiukZysYwl6ZaiprHfZ0yFEUfrTyjVTHc8V05f9RVg5PCZCCYfgsaIEG1T5GBEuEj1g1cLT+NS+UH4DuAhkg== dependencies: "@nuxt/devalue" "^1.2.4" - "@nuxt/utils" "2.14.4" + "@nuxt/utils" "2.14.5" consola "^2.15.0" fs-extra "^8.1.0" lru-cache "^5.1.1" @@ -2241,18 +2241,18 @@ vue-meta "^2.4.0" vue-server-renderer "^2.6.12" -"@nuxt/webpack@2.14.4": - version "2.14.4" - resolved "https://registry.yarnpkg.com/@nuxt/webpack/-/webpack-2.14.4.tgz#e089dfabf5c229869cfbea3f403dfd5596f61d4a" - integrity sha512-91qcNMWfX0nWp+5bprvmUjDdvlXtv7VjbBYXkHZZ+1Het5d90VAwqSLVKHpBCWqf0QG0ZNmz0hkCnJbduxk7Kw== +"@nuxt/webpack@2.14.5": + version "2.14.5" + resolved "https://registry.yarnpkg.com/@nuxt/webpack/-/webpack-2.14.5.tgz#8f1496e7455b4ebde185be063cb32cd44cf33ddd" + integrity sha512-Zd4ZqvrMYyD38cYCYm3P4LKczkcfgnWWbKxGawOqrZP9xCuWDSQhI81l5lNVT+ECwXuVuyVZwnumb+ux9HHy3Q== dependencies: - "@babel/core" "^7.11.4" - "@nuxt/babel-preset-app" "2.14.4" + "@babel/core" "^7.11.6" + "@nuxt/babel-preset-app" "2.14.5" "@nuxt/friendly-errors-webpack-plugin" "^2.5.0" - "@nuxt/utils" "2.14.4" + "@nuxt/utils" "2.14.5" babel-loader "^8.1.0" cache-loader "^4.1.0" - caniuse-lite "^1.0.30001118" + caniuse-lite "^1.0.30001125" chalk "^3.0.0" consola "^2.15.0" create-require "^1.0.2" @@ -2264,9 +2264,9 @@ glob "^7.1.6" hard-source-webpack-plugin "^0.13.1" hash-sum "^2.0.0" - html-webpack-plugin "^4.3.0" + html-webpack-plugin "^4.4.1" memory-fs "^0.4.1" - optimize-css-assets-webpack-plugin "^5.0.3" + optimize-css-assets-webpack-plugin "^5.0.4" pify "^4.0.1" postcss "^7.0.32" postcss-import "^12.0.1" @@ -2311,13 +2311,13 @@ eslint-plugin-unicorn "^21.0.0" eslint-plugin-vue "^6.2.2" -"@nuxtjs/google-fonts@^1.0.0": - version "1.0.0" - resolved "https://registry.yarnpkg.com/@nuxtjs/google-fonts/-/google-fonts-1.0.0.tgz#fca4c72627be846b617b91653a2ad73f326eefbb" - integrity sha512-QRaD6wsprWJISFdIj3/3ER9L3EePXZ5Y1CnCuAsJQ0m9tvRKudSrP4ok+h6EYKCqKmEWYMerb57vfEwFJZRDPA== +"@nuxtjs/google-fonts@^1.0.2": + version "1.0.2" + resolved "https://registry.yarnpkg.com/@nuxtjs/google-fonts/-/google-fonts-1.0.2.tgz#37cd53cc0e8cff61310a3c34c9b9f432953c99c9" + integrity sha512-ecyyFAwLyb3U9m9FS/bmP8BYBXqJpPg3xv322dn1xaxDyFoW25LJutRtHeORlgloYrjyHJLc0kSpi75yYpXOBg== dependencies: - consola "^2.14.0" - google-fonts-helper "^1.0.1" + consola "^2.15.0" + google-fonts-helper "^1.0.4" "@nuxtjs/module-test-utils@^1.6.3": version "1.6.3" @@ -2756,10 +2756,10 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-14.6.3.tgz#cc4f979548ca4d8e7b90bc0180052ab99ee64224" integrity sha512-pC/hkcREG6YfDfui1FBmj8e20jFU5Exjw4NYDm8kEdrW+mOh0T1Zve8DWKnS7ZIZvgncrctcNCXF4Q2I+loyww== -"@types/node@^12.12.54": - version "12.12.55" - resolved "https://registry.yarnpkg.com/@types/node/-/node-12.12.55.tgz#0aa266441cb9e1fd3e415a8f619cb7d776667cdd" - integrity sha512-Vd6xQUVvPCTm7Nx1N7XHcpX6t047ltm7TgcsOr4gFHjeYgwZevo+V7I1lfzHnj5BT5frztZ42+RTG4MwYw63dw== +"@types/node@^12.12.56": + version "12.12.56" + resolved "https://registry.yarnpkg.com/@types/node/-/node-12.12.56.tgz#83591a89723d8ec3eaf722137e1784a7351edb6c" + integrity sha512-8OdIupOIZtmObR13fvGyTvpcuzKmMugkATeVcfNwCjGtHxhjEKmOvLqXwR8U9VOtNnZ4EXaSfNiLVsPinaCXkQ== "@types/normalize-package-data@^2.4.0": version "2.4.0" @@ -2892,7 +2892,7 @@ "@types/source-list-map" "*" source-map "^0.7.3" -"@types/webpack@*", "@types/webpack@^4.41.21", "@types/webpack@^4.41.8": +"@types/webpack@*", "@types/webpack@^4.41.22", "@types/webpack@^4.41.8": version "4.41.22" resolved "https://registry.yarnpkg.com/@types/webpack/-/webpack-4.41.22.tgz#ff9758a17c6bd499e459b91e78539848c32d0731" integrity sha512-JQDJK6pj8OMV9gWOnN1dcLCyU9Hzs6lux0wBO4lr1+gyEhIBR9U3FMrz12t2GPkg110XAxEAw2WHF6g7nZIbRQ== @@ -4326,11 +4326,16 @@ caniuse-api@^3.0.0: lodash.memoize "^4.1.2" lodash.uniq "^4.5.0" -caniuse-lite@^1.0.0, caniuse-lite@^1.0.30000981, caniuse-lite@^1.0.30001109, caniuse-lite@^1.0.30001111, caniuse-lite@^1.0.30001118: +caniuse-lite@^1.0.0, caniuse-lite@^1.0.30000981, caniuse-lite@^1.0.30001109, caniuse-lite@^1.0.30001111: version "1.0.30001123" resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001123.tgz#7b981d81382ab2c8fd062f3e6439215e8c503c22" integrity sha512-03dJDoa4YC4332jq0rqwiM+Hw6tA5RJtrnZKvOQy7ASoIUv8CinkcmGhYpCvCjedvkBQrrKnkcELxrUSW/XwNQ== +caniuse-lite@^1.0.30001125: + version "1.0.30001125" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001125.tgz#2a1a51ee045a0a2207474b086f628c34725e997b" + integrity sha512-9f+r7BW8Qli917mU3j0fUaTweT3f3vnX/Lcs+1C73V+RADmFme+Ih0Br8vONQi3X0lseOe6ZHfsZLCA8MSjxUA== + capital-case@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/capital-case/-/capital-case-1.0.3.tgz#339bd77e8fab6cf75111d4fca509b3edf7c117c8" @@ -7303,19 +7308,19 @@ good-listener@^1.2.2: dependencies: delegate "^3.1.2" -google-fonts-helper@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/google-fonts-helper/-/google-fonts-helper-1.0.1.tgz#17a6728586ae2ee2dae8ba2243eae021cae5d3b0" - integrity sha512-fwgV4Z694NjP3W3NLkXsJMqmyzL1OsEXFlDjm/keb0E5hLTTMnGNnLb470r8QizIX3aeTzYpztagAGN8vx6RgA== +google-fonts-helper@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/google-fonts-helper/-/google-fonts-helper-1.0.4.tgz#c64dbb49428cab14517804b15f7bb06491d6ec69" + integrity sha512-SSjbWUqygILiMjjubdhEME93BccRvzjtSOzfs6eBHhdYYn7jXVj1uRkL7ouuleDd/opbV2L2jhTDIN96oi2mWQ== dependencies: deepmerge "^4.2.2" fs-extra "^9.0.1" - got "^11.5.1" + got "^11.6.1" -got@^11.5.1: - version "11.6.0" - resolved "https://registry.yarnpkg.com/got/-/got-11.6.0.tgz#4978c78f3cbc3a45ee95381f8bb6efd1db1f4638" - integrity sha512-ErhWb4IUjQzJ3vGs3+RR12NWlBDDkRciFpAkQ1LPUxi6OnwhGj07gQxjPsyIk69s7qMihwKrKquV6VQq7JNYLA== +got@^11.6.1: + version "11.6.1" + resolved "https://registry.yarnpkg.com/got/-/got-11.6.1.tgz#a307122fc136c446f676f7b939d89dbc6ed6b909" + integrity sha512-6izGvOsrd/4CsIdQMgweFOTCtS4sAwJTuCzIuVoTbCDzt3+wa3eGIHhSIMgEF6gfCDenslGlMUmAdPap5DkirQ== dependencies: "@sindresorhus/is" "^3.1.1" "@szmarczak/http-timer" "^4.0.5" @@ -7733,7 +7738,7 @@ html-void-elements@^1.0.0: resolved "https://registry.yarnpkg.com/html-void-elements/-/html-void-elements-1.0.5.tgz#ce9159494e86d95e45795b166c2021c2cfca4483" integrity sha512-uE/TxKuyNIcx44cIWnjr/rfIATDH7ZaOMmstu0CwhFG1Dunhlp4OC6/NMbhiwoq5BpW0ubi303qnEk/PZj614w== -html-webpack-plugin@^4.3.0: +html-webpack-plugin@^4.4.1: version "4.4.1" resolved "https://registry.yarnpkg.com/html-webpack-plugin/-/html-webpack-plugin-4.4.1.tgz#61ab85aa1a84ba181443345ebaead51abbb84149" integrity sha512-nEtdEIsIGXdXGG7MjTTZlmhqhpHU9pJFc1OYxcP36c5/ZKP6b0BJMww2QTvJGQYA9aMxUnjDujpZdYcVOXiBCQ== @@ -10194,6 +10199,11 @@ node-fetch@^2.2.0, node-fetch@^2.3.0, node-fetch@^2.5.0, node-fetch@^2.6.0: resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.0.tgz#e633456386d4aa55863f676a7ab0daa8fdecb0fd" integrity sha512-8dG4H5ujfvFiqDmVu9fQ5bOHUC15JMjMY/Zumv26oOvvVJjM67KF8koCWIabKQ1GJIa9r2mMZscBq/TbdOcmNA== +node-fetch@^2.6.1: + version "2.6.1" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.1.tgz#045bd323631f76ed2e2b55573394416b639a0052" + integrity sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw== + node-gyp@^5.0.2: version "5.1.1" resolved "https://registry.yarnpkg.com/node-gyp/-/node-gyp-5.1.1.tgz#eb915f7b631c937d282e33aed44cb7a025f62a3e" @@ -10473,10 +10483,10 @@ nuxt-ackee@^2.0.0: ackee-tracker "^4.0.0" defu "^3.1.0" -nuxt-i18n@^6.14.2: - version "6.14.2" - resolved "https://registry.yarnpkg.com/nuxt-i18n/-/nuxt-i18n-6.14.2.tgz#646656b16d66899bf65723215f4a734f570d093c" - integrity sha512-3xsoJGT+DVGIyYqoeEsuVOGUK0zK8Gsi8MM1G/NXaNWFfI+98vDYlJTccrYWUIjWVvdq9JxniMBm/qNHkE73GA== +nuxt-i18n@^6.15.0: + version "6.15.0" + resolved "https://registry.yarnpkg.com/nuxt-i18n/-/nuxt-i18n-6.15.0.tgz#acbb4335246f331446a30ff7de523e8d28e8a957" + integrity sha512-25ysCR5Lfp6dc4Ug79jb/4Spa8wXldB/diTqllaW2LZvSBNnp5Ts2KX96NeAKyOfwdpKag4aKuHck219FeN6kQ== dependencies: "@babel/parser" "^7.5.5" "@babel/traverse" "^7.5.5" @@ -10488,21 +10498,21 @@ nuxt-i18n@^6.14.2: js-cookie "^2.2.1" vue-i18n "^8.18.1" -nuxt@^2.14.4: - version "2.14.4" - resolved "https://registry.yarnpkg.com/nuxt/-/nuxt-2.14.4.tgz#c12ee6060aa7660cdeed4ef9efdcefc4472077d9" - integrity sha512-s6+VePRUBjOU2huJaevE3M19qOblXm9n7BtSxeWEFbDPomOOtdQqUVKbFJrtjgGPETpDrZ6FUKI94/0rkPwNcg== +nuxt@^2.14.5: + version "2.14.5" + resolved "https://registry.yarnpkg.com/nuxt/-/nuxt-2.14.5.tgz#d4da8ed7dd03cf199cf3981637377ab1fe682187" + integrity sha512-VAOlQNfDdxxCdrkOAWO5ErkvhMAZHdRJVMWH+gwjIWT+yh9uAXoFxm/WZcxCnJ6jEoUgvOZ6/DFKC01T96+0pg== dependencies: - "@nuxt/builder" "2.14.4" - "@nuxt/cli" "2.14.4" + "@nuxt/builder" "2.14.5" + "@nuxt/cli" "2.14.5" "@nuxt/components" "^1.1.0" - "@nuxt/core" "2.14.4" - "@nuxt/generator" "2.14.4" + "@nuxt/core" "2.14.5" + "@nuxt/generator" "2.14.5" "@nuxt/loading-screen" "^2.0.2" "@nuxt/opencollective" "^0.3.0" "@nuxt/static" "^1.0.0" "@nuxt/telemetry" "^1.2.3" - "@nuxt/webpack" "2.14.4" + "@nuxt/webpack" "2.14.5" nwsapi@^2.2.0: version "2.2.0" @@ -10636,17 +10646,12 @@ opencollective-postinstall@^2.0.2: resolved "https://registry.yarnpkg.com/opencollective-postinstall/-/opencollective-postinstall-2.0.3.tgz#7a0fff978f6dbfa4d006238fbac98ed4198c3259" integrity sha512-8AV/sCtuzUeTo8gQK5qDZzARrulB3egtLzFgteqB2tcT4Mw7B8Kt7JcDHmltjz6FOAHsvTevk70gZEbhM4ZS9Q== -opener@1.5.1: - version "1.5.1" - resolved "https://registry.yarnpkg.com/opener/-/opener-1.5.1.tgz#6d2f0e77f1a0af0032aca716c2c1fbb8e7e8abed" - integrity sha512-goYSy5c2UXE4Ra1xixabeVh1guIX/ZV/YokJksb6q2lubWu6UbvPQ20p542/sFIll1nl8JnCyK9oBaOcCWXwvA== - -opener@^1.5.1: +opener@1.5.2, opener@^1.5.1: version "1.5.2" resolved "https://registry.yarnpkg.com/opener/-/opener-1.5.2.tgz#5d37e1f35077b9dcac4301372271afdeb2a13598" integrity sha512-ur5UIdyw5Y7yEj9wLzhqXiy6GZ3Mwx0yGI+5sMn2r0N0v3cKJvUmFH5yPP+WXh9e0xfyzyJX95D8l088DNFj7A== -optimize-css-assets-webpack-plugin@^5.0.3: +optimize-css-assets-webpack-plugin@^5.0.4: version "5.0.4" resolved "https://registry.yarnpkg.com/optimize-css-assets-webpack-plugin/-/optimize-css-assets-webpack-plugin-5.0.4.tgz#85883c6528aaa02e30bbad9908c92926bb52dc90" integrity sha512-wqd6FdI2a5/FdoiCNNkEvLeA//lHHfG24Ln2Xm2qqdIk4aOlsR18jwpyOihqQ8849W3qu2DX8fOYxpvTMj+93A== @@ -11922,7 +11927,7 @@ prettier@^1.18.2: resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.19.1.tgz#f7d7f5ff8a9cd872a7be4ca142095956a60797cb" integrity sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew== -pretty-bytes@^5.3.0: +pretty-bytes@^5.4.1: version "5.4.1" resolved "https://registry.yarnpkg.com/pretty-bytes/-/pretty-bytes-5.4.1.tgz#cd89f79bbcef21e3d21eb0da68ffe93f803e884b" integrity sha512-s1Iam6Gwz3JI5Hweaz4GoCD1WUNUIyzePFy5+Js2hjwGVt2Z79wNN+ZKOZ2vB6C+Xs6njyB84Z1IthQg8d9LxA== @@ -13090,6 +13095,13 @@ serialize-javascript@^4.0.0: dependencies: randombytes "^2.1.0" +serialize-javascript@^5.0.0: + version "5.0.1" + resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-5.0.1.tgz#7886ec848049a462467a97d3d918ebb2aaf934f4" + integrity sha512-SaaNal9imEO737H2c05Og0/8LUXG7EnsZyMa8MzkmuHoELfT6txuj0cMqRj6zfPKnmQ1yasR4PCJc8x+M4JSPA== + dependencies: + randombytes "^2.1.0" + serve-placeholder@^1.2.2: version "1.2.2" resolved "https://registry.yarnpkg.com/serve-placeholder/-/serve-placeholder-1.2.2.tgz#034960945b5950f873b2be4e4ea3a4653b9e33e5" From a72d92e324a104f8763a67bd7953976358da7b5e Mon Sep 17 00:00:00 2001 From: Benjamin Canac Date: Fri, 11 Sep 2020 17:54:26 +0200 Subject: [PATCH 09/23] docs: remove fetch from since nuxt 2.12 (#469) --- docs/content/en/fetching.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/content/en/fetching.md b/docs/content/en/fetching.md index f8efae784..8b05ca9c1 100644 --- a/docs/content/en/fetching.md +++ b/docs/content/en/fetching.md @@ -5,7 +5,7 @@ position: 4 category: Getting started --- -This module globally injects `$content` instance, meaning that you can access it anywhere using `this.$content`. For plugins, asyncData, fetch, nuxtServerInit and Middleware, you can access it from `context.$content`. +This module globally injects `$content` instance, meaning that you can access it anywhere using `this.$content`. For plugins, asyncData, nuxtServerInit and Middleware, you can access it from `context.$content`. ## Methods From e4bae6cf779e38e8238766d038d4febe2386b602 Mon Sep 17 00:00:00 2001 From: Benjamin Canac Date: Mon, 14 Sep 2020 10:53:36 +0200 Subject: [PATCH 10/23] feat(theme-docs): add `defaultDir` options (#468) * feat(theme-docs): add defaultDir option * docs: display defaultDir option --- docs/content/en/themes/docs.md | 2 ++ packages/theme-docs/src/components/app/AppGithubLink.vue | 9 ++++++++- packages/theme-docs/src/store/index.js | 3 ++- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/docs/content/en/themes/docs.md b/docs/content/en/themes/docs.md index a14fef4d0..9365340de 100644 --- a/docs/content/en/themes/docs.md +++ b/docs/content/en/themes/docs.md @@ -364,6 +364,8 @@ You can create a `content/settings.json` file to configure the theme. - The Twitter username `@username` you want to link. Example: `@nuxt_js` - `defaultBranch` (`String`) v0.2.0+ - The default branch for the GitHub repository of your project, used in the `Edit this page on GitHub link` on each page (defaults to `main` if it cannot be detected). +- `defaultDir` (`String`) v0.6.0+ + - The default dir of your project, used in the `Edit this page on GitHub link` on each page (defaults to `docs`). - `layout` (`String`) v0.4.0+ - The layout of your documentation (defaults to `default`). Can be changed to `single` to have a one-page doc. diff --git a/packages/theme-docs/src/components/app/AppGithubLink.vue b/packages/theme-docs/src/components/app/AppGithubLink.vue index 88bd4d731..17179b338 100644 --- a/packages/theme-docs/src/components/app/AppGithubLink.vue +++ b/packages/theme-docs/src/components/app/AppGithubLink.vue @@ -32,7 +32,14 @@ export default { return } - return `https://github.com/${this.settings.github}/edit/${this.settings.defaultBranch}/docs/content${this.document.path}${this.document.extension}` + return [ + 'https://github.com', + this.settings.github, + 'edit', + this.settings.defaultBranch, + this.settings.defaultDir, + `content${this.document.path}${this.document.extension}` + ].filter(path => !!path).join('/') } } } diff --git a/packages/theme-docs/src/store/index.js b/packages/theme-docs/src/store/index.js index 83bd3ff5a..916473457 100644 --- a/packages/theme-docs/src/store/index.js +++ b/packages/theme-docs/src/store/index.js @@ -6,6 +6,7 @@ export const state = () => ({ releases: [], settings: { title: 'Nuxt Content Docs', + defaultDir: 'docs', defaultBranch: '', filled: false } @@ -35,7 +36,7 @@ export const mutations = { state.settings.defaultBranch = branch }, SET_SETTINGS (state, settings) { - state.settings = Object.assign({}, settings, { filled: true }) + state.settings = Object.assign({}, state.settings, settings, { filled: true }) } } From 6a43bd2e89222953a6886654752d0d001e72efea Mon Sep 17 00:00:00 2001 From: Dennis Spierenburg Date: Mon, 14 Sep 2020 10:54:36 +0200 Subject: [PATCH 11/23] feat: Added more types following #443 and #421 (#444) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Export interface and change name of interface * Added more types for PR 442 * Types * Removed index * lint * Created specific type for query builder * lint issues * Extend interface instead of property * Created typsecript support * Remove folders that arent there * Changed query builder interface to class * Removed semicoln in index * Dep to Devdep * changed import orders * Resolved review on class interface and options of constructors according to documentation * Omit types from JSDOC comments in a TS File * Database options * Added querybuilderoptions to database file * Proposal on fetch function * Fix on fetch generic * Fix merge conflicts * Set back editorconfig and eslint * Add module declaration for parsers * Create export of all parsers at once * Setback of vscode styling * Setback of esint config to original * fix some types * Update packages/content/types/parsers/base.d.ts * Yarn conflicts Co-authored-by: Sebastian Krüger <2pi_r2@gmx.de> --- example/{nuxt.config.js => nuxt.config.ts} | 20 +- example/pages/index.vue | 3 +- example/tsconfig.json | 35 +++ package.json | 5 +- packages/content/types/content.d.ts | 26 +++ packages/content/types/database.d.ts | 104 +++++++++ packages/content/types/index.d.ts | 108 ++++----- packages/content/types/parsers/base.d.ts | 5 + packages/content/types/parsers/csv/index.d.ts | 11 + packages/content/types/parsers/index.d.ts | 6 + .../content/types/parsers/markdown/index.d.ts | 35 +++ packages/content/types/parsers/xml/index.d.ts | 11 + .../content/types/parsers/yaml/index.d.ts | 11 + packages/content/types/query-builder.d.ts | 82 +++++++ packages/content/types/vuex.d.ts | 7 - yarn.lock | 205 +++++++++++++++++- 16 files changed, 594 insertions(+), 80 deletions(-) rename example/{nuxt.config.js => nuxt.config.ts} (62%) create mode 100644 example/tsconfig.json create mode 100644 packages/content/types/content.d.ts create mode 100644 packages/content/types/database.d.ts create mode 100644 packages/content/types/parsers/base.d.ts create mode 100644 packages/content/types/parsers/csv/index.d.ts create mode 100644 packages/content/types/parsers/index.d.ts create mode 100644 packages/content/types/parsers/markdown/index.d.ts create mode 100644 packages/content/types/parsers/xml/index.d.ts create mode 100644 packages/content/types/parsers/yaml/index.d.ts create mode 100644 packages/content/types/query-builder.d.ts delete mode 100644 packages/content/types/vuex.d.ts diff --git a/example/nuxt.config.js b/example/nuxt.config.ts similarity index 62% rename from example/nuxt.config.js rename to example/nuxt.config.ts index c8366411c..264bc35f7 100644 --- a/example/nuxt.config.js +++ b/example/nuxt.config.ts @@ -1,23 +1,23 @@ -export default { - modules: [ - '@nuxt/content' - ], +import type { NuxtConfig } from "@nuxt/types"; + +const config: NuxtConfig = { + modules: ['@nuxt/content'], components: true, hooks: { 'content:file:beforeInsert': async (document, database) => { if (document.extension === '.json' && document.body) { - const data = await database.markdown.toJSON(document.body) + const data = await database.markdown.toJSON(document.body); - Object.assign(document, data) + Object.assign(document, data); } } }, content: { - nestedProperties: [ - 'categories.slug' - ], + nestedProperties: ['categories.slug'], extendParser: { '.custom': file => ({ body: file.split('\n').map(line => line.trim()) }) } } -} +}; + +export default config; diff --git a/example/pages/index.vue b/example/pages/index.vue index a8d6ad482..ce13394e9 100644 --- a/example/pages/index.vue +++ b/example/pages/index.vue @@ -25,8 +25,7 @@ - diff --git a/packages/content/test/fixture/content/highlighter.md b/packages/content/test/fixture/content/highlighter.md new file mode 100644 index 000000000..37f1c6e0f --- /dev/null +++ b/packages/content/test/fixture/content/highlighter.md @@ -0,0 +1,14 @@ +--- +title: Highlighter +--- + +``` +console.log('Highlighter') +``` + +```ts{1}[index.ts] +// @errors: 2322 +function sum(a: number, b: number): string { + return true +} +``` diff --git a/packages/content/test/fixture/pages/_slug.vue b/packages/content/test/fixture/pages/_slug.vue index 14dfae0dd..7bddd16e5 100644 --- a/packages/content/test/fixture/pages/_slug.vue +++ b/packages/content/test/fixture/pages/_slug.vue @@ -6,11 +6,18 @@