From 0a80d9ed50bae673cbe278a0af888453b2a11b0f Mon Sep 17 00:00:00 2001 From: Arda TANRIKULU Date: Tue, 8 Jun 2021 18:53:23 +0300 Subject: [PATCH] [deploy_website] follow typedoc's compatible typescript versiobn --- .github/workflows/website.yml | 4 +++- renovate.json | 3 ++- scripts/install-typedocs-typescript-version.js | 16 ++++++++++++++++ website/docs/cache/localforage.md | 2 +- website/docs/cache/redis.md | 6 +++--- website/sidebars.js | 4 ++-- 6 files changed, 27 insertions(+), 8 deletions(-) create mode 100644 scripts/install-typedocs-typescript-version.js diff --git a/.github/workflows/website.yml b/.github/workflows/website.yml index 127304f745df8..f3ac002049327 100644 --- a/.github/workflows/website.yml +++ b/.github/workflows/website.yml @@ -39,8 +39,10 @@ jobs: restore-keys: | ${{ runner.os }}-16-node-modules-${{ hashFiles('yarn.lock') }} ${{ runner.os }}-16-node-modules- + - name: Align TypeScript version with typedoc + run: node scripts/install-typedocs-typescript-version.js - name: Install Dependencies using Yarn - run: yarn install && git checkout yarn.lock + run: yarn install && git checkout yarn.lock && git checkout package.json - name: Deploy 🚀 run: yarn deploy:website env: diff --git a/renovate.json b/renovate.json index d67df3ed48be7..4b7120be2f260 100644 --- a/renovate.json +++ b/renovate.json @@ -6,5 +6,6 @@ "major": { "automerge": false }, - "labels": ["dependencies"] + "labels": ["dependencies"], + "ignoreDeps": ["typedoc-plugin-markdown"] } diff --git a/scripts/install-typedocs-typescript-version.js b/scripts/install-typedocs-typescript-version.js new file mode 100644 index 0000000000000..5246e012eca46 --- /dev/null +++ b/scripts/install-typedocs-typescript-version.js @@ -0,0 +1,16 @@ +const { writeFileSync } = require('fs'); +const { resolve } = require('path'); +const { argv, cwd } = require('process'); + +const typeDocsVersion = require('typedoc/package.json'); +const pkgPath = resolve(cwd(), './package.json'); + +const pkg = require(pkgPath); + +const version = argv[2]; + +pkg.resolutions = pkg.resolutions || {}; + +pkg.resolutions.typescript = typeDocsVersion.peerDependencies.typescript; + +writeFileSync(pkgPath, JSON.stringify(pkg, null, 2), 'utf8'); diff --git a/website/docs/cache/localforage.md b/website/docs/cache/localforage.md index b3b7e7c854ce7..396d25fa5fdf8 100644 --- a/website/docs/cache/localforage.md +++ b/website/docs/cache/localforage.md @@ -24,4 +24,4 @@ cache: ## Config API Reference -{@import ../generated-markdown/Localforage.generated.md} +{@import ../generated-markdown/LocalforageConfig.generated.md} diff --git a/website/docs/cache/redis.md b/website/docs/cache/redis.md index 8f50ae5b2ce2d..e25112ed8f4be 100644 --- a/website/docs/cache/redis.md +++ b/website/docs/cache/redis.md @@ -1,7 +1,7 @@ --- -id: cache-file -title: File Cache -sidebar_label: File +id: cache-redis +title: Redis Cache +sidebar_label: Redis --- This caching strategy will use your Redis instance as the storage. diff --git a/website/sidebars.js b/website/sidebars.js index df67c071c5923..6d64544ff3755 100644 --- a/website/sidebars.js +++ b/website/sidebars.js @@ -37,9 +37,9 @@ module.exports = { ], Cache: [ 'cache/inmemory-lru', - 'cache/file', + 'cache/cache-file', 'cache/localforage', - 'cache/redis' + 'cache/cache-redis' ], Recipes: [ 'recipes/typescript',