Skip to content

Commit

Permalink
- Updated All Plugins package.json to use docusaurus 3.2.0
Browse files Browse the repository at this point in the history
- Updated `toNav` function to handle menus that now build with the role of `button` instead of `link`
- `addLeadingSlash` and `addTrailingSlash` are now being imported from `@docusaurus/utils-common`
- Omit `showLastUpdateAuthor` and `showLastUpdateTime` from PluginOptions
  • Loading branch information
Devon-White committed Apr 1, 2024
1 parent a2ef7c9 commit 009cca9
Show file tree
Hide file tree
Showing 10 changed files with 245 additions and 375 deletions.
18 changes: 13 additions & 5 deletions cypress/integration/test.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,19 @@ function navTo(links: RegExp[], heading: RegExp) {
return false;
});

for (let link of links) {
cy.get("nav.menu")
.findByRole("link", { name: link })
.click({ force: true }); // sometimes the sidebar items get covered by the navbar in CI.
}
links.forEach((linkRegex) => {
cy.get("nav.menu").then(($menu) => {
const navElement = $menu
.find("a")
.toArray()
.find((el) => linkRegex.test(el.innerText));
if (navElement) {
cy.wrap(navElement).click({ force: true });
} else {
cy.log(`No link or button found matching regex: ${linkRegex}`);
}
});
});

cy.findByRole("heading", { name: heading, level: 1 }).should("exist");
}
4 changes: 2 additions & 2 deletions demo/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "demo",
"version": "0.7.3",
"version": "0.7.4",
"private": true,
"scripts": {
"docusaurus": "docusaurus",
Expand All @@ -14,7 +14,7 @@
"write-heading-ids": "docusaurus write-heading-ids"
},
"dependencies": {
"@docusaurus/core": "^3.0.0",
"@docusaurus/core": "^3.2.0",
"@svgr/webpack": "^5.5.0",
"clsx": "^1.2.1",
"docusaurus-preset-openapi": "^0.7.3",
Expand Down
4 changes: 2 additions & 2 deletions packages/create-docusaurus-openapi/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "create-docusaurus-openapi",
"version": "0.7.3",
"version": "0.7.4",
"description": "Create Docusaurus apps easily.",
"repository": {
"type": "git",
Expand All @@ -23,7 +23,7 @@
},
"license": "MIT",
"dependencies": {
"@docusaurus/logger": "^3.0.0",
"@docusaurus/logger": "^3.2.0",
"commander": "^5.1.0",
"fs-extra": "^11.0.0",
"lodash": "^4.17.20",
Expand Down
15 changes: 8 additions & 7 deletions packages/docusaurus-plugin-openapi/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "docusaurus-plugin-openapi",
"description": "OpenAPI plugin for Docusaurus.",
"version": "0.7.3",
"version": "0.7.4",
"license": "MIT",
"publishConfig": {
"access": "public"
Expand All @@ -21,8 +21,8 @@
"watch": "tsc --watch"
},
"devDependencies": {
"@docusaurus/module-type-aliases": "^3.0.0",
"@docusaurus/types": "^3.0.0",
"@docusaurus/module-type-aliases": "^3.2.0",
"@docusaurus/types": "^3.2.0",
"@types/axios": "^0.14.0",
"@types/js-yaml": "^4.0.5",
"@types/json-schema": "^7.0.9",
Expand All @@ -31,10 +31,11 @@
"utility-types": "^3.10.0"
},
"dependencies": {
"@docusaurus/mdx-loader": "^3.0.0",
"@docusaurus/plugin-content-docs": "^3.0.0",
"@docusaurus/utils": "^3.0.0",
"@docusaurus/utils-validation": "^3.0.0",
"@docusaurus/mdx-loader": "^3.2.0",
"@docusaurus/plugin-content-docs": "^3.2.0",
"@docusaurus/utils": "^3.2.0",
"@docusaurus/utils-validation": "^3.2.0",
"@docusaurus/utils-common": "^3.2.0",
"axios": "^0.26.1",
"chalk": "^4.1.2",
"clsx": "^1.2.1",
Expand Down
4 changes: 4 additions & 0 deletions packages/docusaurus-plugin-openapi/src/docs/docs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ async function doProcessDocMetadata({
| "editLocalizedFiles"
| "numberPrefixParser"
| "breadcrumbs"
| "showLastUpdateTime"
| "showLastUpdateAuthor"
>;
env: DocEnv;
}): Promise<DocMetadataBase> {
Expand Down Expand Up @@ -181,6 +183,8 @@ export function processDocMetadata(args: {
| "editLocalizedFiles"
| "numberPrefixParser"
| "breadcrumbs"
| "showLastUpdateTime"
| "showLastUpdateAuthor"
>;
env: DocEnv;
}): Promise<DocMetadataBase> {
Expand Down
8 changes: 2 additions & 6 deletions packages/docusaurus-plugin-openapi/src/docs/slug.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,8 @@ import type {
NumberPrefixParser,
DocMetadataBase,
} from "@docusaurus/plugin-content-docs";
import {
addLeadingSlash,
addTrailingSlash,
isValidPathname,
resolvePathname,
} from "@docusaurus/utils";
import { isValidPathname, resolvePathname } from "@docusaurus/utils";
import { addLeadingSlash, addTrailingSlash } from "@docusaurus/utils-common";

import { isCategoryIndex, toCategoryIndexMatcherParam } from "./docs";
import {
Expand Down
4 changes: 2 additions & 2 deletions packages/docusaurus-plugin-proxy/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "docusaurus-plugin-proxy",
"description": "A dev server proxy for Docusaurus.",
"version": "0.7.3",
"version": "0.7.4",
"license": "MIT",
"publishConfig": {
"access": "public"
Expand All @@ -21,7 +21,7 @@
"watch": "tsc --watch"
},
"devDependencies": {
"@docusaurus/types": "^3.0.0",
"@docusaurus/types": "^3.2.0",
"@types/webpack-dev-server": "^4.7.2"
},
"engines": {
Expand Down
12 changes: 6 additions & 6 deletions packages/docusaurus-preset-openapi/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "docusaurus-preset-openapi",
"description": "OpenAPI preset for Docusaurus.",
"version": "0.7.3",
"version": "0.7.4",
"license": "MIT",
"keywords": [
"openapi",
Expand All @@ -28,13 +28,13 @@
"watch": "tsc --watch"
},
"devDependencies": {
"@docusaurus/types": "^3.0.0"
"@docusaurus/types": "^3.2.0"
},
"dependencies": {
"@docusaurus/preset-classic": "^3.0.0",
"docusaurus-plugin-openapi": "^0.7.3",
"docusaurus-plugin-proxy": "^0.7.3",
"docusaurus-theme-openapi": "^0.7.3"
"@docusaurus/preset-classic": "^3.2.0",
"docusaurus-plugin-openapi": "^0.7.4",
"docusaurus-plugin-proxy": "^0.7.4",
"docusaurus-theme-openapi": "^0.7.4"
},
"peerDependencies": {
"react": "^18.0.0",
Expand Down
8 changes: 4 additions & 4 deletions packages/docusaurus-theme-openapi/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "docusaurus-theme-openapi",
"description": "OpenAPI theme for Docusaurus.",
"version": "0.7.3",
"version": "0.7.4",
"license": "MIT",
"publishConfig": {
"access": "public"
Expand All @@ -24,8 +24,8 @@
"format:lib-next": "prettier --config ../../.prettierrc.json --write \"lib-next/**/*.{js,ts,jsx,tsc}\""
},
"devDependencies": {
"@docusaurus/module-type-aliases": "^3.0.0",
"@docusaurus/types": "^3.0.0",
"@docusaurus/module-type-aliases": "^3.2.0",
"@docusaurus/types": "^3.2.0",
"@types/concurrently": "^6.3.0",
"@types/crypto-js": "^4.1.0",
"@types/lodash": "^4.14.176",
Expand All @@ -35,7 +35,7 @@
"concurrently": "^5.2.0"
},
"dependencies": {
"@docusaurus/theme-common": "^3.0.0",
"@docusaurus/theme-common": "^3.2.0",
"@mdx-js/react": "^3.0.0",
"@monaco-editor/react": "^4.3.1",
"@reduxjs/toolkit": "^1.7.1",
Expand Down
Loading

0 comments on commit 009cca9

Please sign in to comment.