1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-25 00:07:47 +01:00

chore: update docusaurus/openapi integration to stable version (#2414)

## What

This PR updates the version of the docusaurus-openapi plugin we depend
on for openapi docs generation from canary version 0.0.0-514 to stable
release 1.4.4.

Also removes the manual file cleanup that was created as a workaround to
solve the issues we were having.

## Why

When we set the canary version before the weekend it was because it
contained a fix of some of the issues we were having with our docs.

That issue (and the one about file cleanup) have now been released in
v1.4.4, so we can upgrade to a stable version and remove now-redundant
cleanup code.
This commit is contained in:
Thomas Heartman 2022-11-14 08:52:46 +01:00 committed by GitHub
parent d04b41fce4
commit 29da625195
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 37 deletions

View File

@ -28,29 +28,3 @@ const options = {
};
replace(options);
// remove unused tag files: https://github.com/Unleash/unleash/pull/2402
const fs = require('fs');
const unleashOpenApiDirectory = './docs/reference/api/unleash';
const unleashApiSidebar = require(`${unleashOpenApiDirectory}/sidebar.js`);
const tagsInSidebar = new Set(
unleashApiSidebar
.map((item) => item.link?.id)
.filter(Boolean)
.map((link) => link.substring(link.lastIndexOf('/') + 1)),
);
const tagsInFiles = fs
.readdirSync(unleashOpenApiDirectory)
.filter((file) => file.endsWith('.tag.mdx'))
.map((file) => file.substring(0, file.indexOf('.')));
const unusedTags = tagsInFiles.filter((tag) => !tagsInSidebar.has(tag));
for (const tag of unusedTags) {
const file = `${unleashOpenApiDirectory}/${tag}.tag.mdx`;
fs.rmSync(file);
console.info('Deleted unused OpenAPI tag file:', file);
}

View File

@ -29,8 +29,8 @@
"@svgr/webpack": "6.5.1",
"browserslist": "^4.16.5",
"clsx": "1.2.1",
"docusaurus-plugin-openapi-docs": "0.0.0-514",
"docusaurus-theme-openapi-docs": "0.0.0-514",
"docusaurus-plugin-openapi-docs": "1.4.4",
"docusaurus-theme-openapi-docs": "1.4.4",
"file-loader": "6.2.0",
"immer": "^9.0.6",
"react": "18.2.0",

View File

@ -6140,10 +6140,10 @@ doctrine@^3.0.0:
dependencies:
esutils "^2.0.2"
docusaurus-plugin-openapi-docs@0.0.0-514:
version "0.0.0-514"
resolved "https://registry.yarnpkg.com/docusaurus-plugin-openapi-docs/-/docusaurus-plugin-openapi-docs-0.0.0-514.tgz#2ea5a87bd1cd6829f74d8090479c25efa04872ec"
integrity sha512-HPGBMbcv7ibCHM+9l5aWp5VfW4UXAeMC3LtGqFYXqgvpzGPkDv1c+3DZXLEmEWotEWeHkzjP0b71GQq9L0YBnQ==
docusaurus-plugin-openapi-docs@1.4.4, docusaurus-plugin-openapi-docs@^1.4.4:
version "1.4.4"
resolved "https://registry.yarnpkg.com/docusaurus-plugin-openapi-docs/-/docusaurus-plugin-openapi-docs-1.4.4.tgz#eca4069649cc34c1c5ba96ebc8453674a4a978db"
integrity sha512-/qDuT9vVS0A1XUuXqYJyGpksZPvF15A8NtqAfLRXgC9HMJPhUyv84PqMK9WeqjzpIR4M3DdYEQRdqBTm+zaw3w==
dependencies:
"@apidevtools/json-schema-ref-parser" "^9.0.9"
"@docusaurus/mdx-loader" "^2.0.1"
@ -6168,10 +6168,10 @@ docusaurus-plugin-openapi-docs@0.0.0-514:
webpack "^5.61.0"
xml-formatter "^2.6.1"
docusaurus-theme-openapi-docs@0.0.0-514:
version "0.0.0-514"
resolved "https://registry.yarnpkg.com/docusaurus-theme-openapi-docs/-/docusaurus-theme-openapi-docs-0.0.0-514.tgz#b359bf02353837f8553e5a2fe1eee1d09f39bb41"
integrity sha512-lM4GTYVZ99qmbw7llT8PWOZ7UHAJOfH3QwHqrPeWZOTlYBXaCl5C77vYWy71INCNaSICUHx7FdKgeenktglUpw==
docusaurus-theme-openapi-docs@1.4.4:
version "1.4.4"
resolved "https://registry.yarnpkg.com/docusaurus-theme-openapi-docs/-/docusaurus-theme-openapi-docs-1.4.4.tgz#caf793e0e379fbd4d32187e0909c7b347305a6f5"
integrity sha512-/sg1M0VhBzp0sCKGp8JuqX8ZjxbVFITkqLNfUPNAhhUvgQ8dzw88tAlGUVfcALmR9dVNM+Vw1Qsq1OXIAPVBow==
dependencies:
"@docusaurus/theme-common" "^2.0.1"
"@mdx-js/react" "^1.6.21"
@ -6181,7 +6181,7 @@ docusaurus-theme-openapi-docs@0.0.0-514:
buffer "^6.0.3"
clsx "^1.1.1"
crypto-js "^4.1.1"
docusaurus-plugin-openapi-docs "0.0.0-514"
docusaurus-plugin-openapi-docs "^1.4.4"
file-saver "^2.0.5"
immer "^9.0.7"
lodash "^4.17.20"