Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: upgrade to docusaurus 3.5.2 #7996

Merged
merged 1 commit into from
Sep 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions packages/docusaurus-theme/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"directory": "packages/docusaurus-theme"
},
"devDependencies": {
"@docusaurus/types": "^3.4.0",
"@docusaurus/types": "^3.5.2",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"@types/react-is": "^18",
Expand All @@ -28,10 +28,11 @@
}
},
"dependencies": {
"@docusaurus/core": "^3.4.0",
"@docusaurus/module-type-aliases": "^3.4.0",
"@docusaurus/theme-common": "^3.4.0",
"@docusaurus/utils-validation": "^3.4.0",
"@docusaurus/core": "^3.5.2",
"@docusaurus/module-type-aliases": "^3.5.2",
"@docusaurus/plugin-content-docs": "^3.5.2",
"@docusaurus/theme-common": "^3.5.2",
"@docusaurus/utils-validation": "^3.5.2",
"@elastic/datemath": "^5.0.3",
"@elastic/eui": "94.5.0",
"@elastic/eui-docgen": "workspace:^",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@ import React, { type ReactNode } from 'react';
import clsx from 'clsx';
import { css } from '@emotion/react';
import { ThemeClassNames } from '@docusaurus/theme-common';
import {
useSidebarBreadcrumbs,
useHomePageRoute,
} from '@docusaurus/theme-common/internal';
import { useSidebarBreadcrumbs } from '@docusaurus/plugin-content-docs/client';
import { useHomePageRoute } from '@docusaurus/theme-common/internal';
import Link from '@docusaurus/Link';
import { translate } from '@docusaurus/Translate';
import { EuiIcon, useEuiMemoizedStyles, UseEuiTheme } from '@elastic/eui';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import { ReactNode } from 'react';
import clsx from 'clsx';
import { css } from '@emotion/react';
import { ThemeClassNames } from '@docusaurus/theme-common';
import { useDoc } from '@docusaurus/theme-common/internal';
import { useDoc } from '@docusaurus/plugin-content-docs/client';
import MDXContent from '@theme-original/MDXContent';
import {
EuiHorizontalRule,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import clsx from 'clsx';
import { ThemeClassNames } from '@docusaurus/theme-common';
import { useDoc } from '@docusaurus/theme-common/internal';
import { useDoc } from '@docusaurus/plugin-content-docs/client';
import TagsListInline from '@theme-original/TagsListInline';

import EditMetaRow from '@theme-original/EditMetaRow';
Expand Down
11 changes: 5 additions & 6 deletions packages/docusaurus-theme/src/theme/DocItem/Layout/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import React from 'react';
import { EuiHorizontalRule } from '@elastic/eui';
import { css } from '@emotion/react';
import { useWindowSize } from '@docusaurus/theme-common';
import { useDoc } from '@docusaurus/theme-common/internal';
import { useDoc } from '@docusaurus/plugin-content-docs/client';
import DocItemPaginator from '@theme-original/DocItem/Paginator';
import Unlisted from '@theme-original/Unlisted';
import ContentVisibility from '@theme-original/ContentVisibility';
import DocVersionBanner from '@theme-original/DocVersionBanner';
import DocVersionBadge from '@theme-original/DocVersionBadge';
import * as Props from '@theme-original/DocItem/Layout';
Expand Down Expand Up @@ -67,13 +67,12 @@ function useDocTOC() {

export default function DocItemLayout({ children }: typeof Props): JSX.Element {
const docTOC = useDocTOC();
const {
metadata: { unlisted },
} = useDoc();
const { metadata } = useDoc();

return (
<div className="row" css={styles.docItemRow}>
<div className="col" css={styles.docItemCol}>
{unlisted && <Unlisted />}
<ContentVisibility metadata={metadata} />
<DocVersionBanner />
<div css={styles.docItemContainer}>
<article>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import {PageMetadata} from '@docusaurus/theme-common';
import {useDoc} from '@docusaurus/theme-common/internal';
import { useDoc } from '@docusaurus/plugin-content-docs/client';

export default function DocItemMetadata(): JSX.Element {
const {metadata, frontMatter, assets} = useDoc();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { useDoc } from '@docusaurus/theme-common/internal';
import { useDoc } from '@docusaurus/plugin-content-docs/client';
import DocPaginator from '@theme-original/DocPaginator';

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import { ThemeClassNames } from '@docusaurus/theme-common';
import { useDoc } from '@docusaurus/theme-common/internal';
import { useDoc } from '@docusaurus/plugin-content-docs/client';

import TOC from '@theme-original/TOC';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import { css } from '@emotion/react';
import { ThemeClassNames } from '@docusaurus/theme-common';
import { useDoc } from '@docusaurus/theme-common/internal';
import { useDoc } from '@docusaurus/plugin-content-docs/client';

import TOCCollapsible from '@theme-original/TOCCollapsible';

Expand Down
2 changes: 1 addition & 1 deletion packages/docusaurus-theme/src/theme/DocItem/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import { HtmlClassNameProvider } from '@docusaurus/theme-common';
import { DocProvider } from '@docusaurus/theme-common/internal';
import { DocProvider } from '@docusaurus/plugin-content-docs/client';
import type { Props } from '@theme/DocItem';

import DocItemMetadata from './Metadata';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import clsx from 'clsx';
import { css } from '@emotion/react';
import { useDocsSidebar } from '@docusaurus/theme-common/internal';
import { useDocsSidebar } from '@docusaurus/plugin-content-docs/client';
import type { Props } from '@theme-original/DocRoot/Layout/Main';

// converted from css modules to Emotion
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
prefersReducedMotion,
ThemeClassNames,
} from '@docusaurus/theme-common';
import { useDocsSidebar } from '@docusaurus/theme-common/internal';
import { useDocsSidebar } from '@docusaurus/plugin-content-docs/client';
import { useLocation } from '@docusaurus/router';
import DocSidebar from '@theme-original/DocSidebar';
import type { Props } from '@theme-original/DocRoot/Layout/Sidebar';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { useEffect, useState } from 'react';
import { css } from '@emotion/react';
import { useDocsSidebar } from '@docusaurus/theme-common/internal';
import { useDocsSidebar } from '@docusaurus/plugin-content-docs/client';
import useIsBrowser from '@docusaurus/useIsBrowser';
import BackToTopButton from '@theme-original/BackToTopButton';
import type { Props } from '@theme-original/DocRoot/Layout';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ import {
Collapsible,
useCollapsible,
} from '@docusaurus/theme-common';
import { isSamePath } from '@docusaurus/theme-common/internal';
import {
isActiveSidebarItem,
findFirstSidebarItemLink,
useDocSidebarItemsExpandedState,
isSamePath,
} from '@docusaurus/theme-common/internal';
} from '@docusaurus/plugin-content-docs/client';
import Link from '@docusaurus/Link';
import { translate } from '@docusaurus/Translate';
import useIsBrowser from '@docusaurus/useIsBrowser';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react';
import clsx from 'clsx';
import { css } from '@emotion/react';
import { ThemeClassNames } from '@docusaurus/theme-common';
import { isActiveSidebarItem } from '@docusaurus/theme-common/internal';
import { isActiveSidebarItem } from '@docusaurus/plugin-content-docs/client';
import Link from '@docusaurus/Link';
import isInternalUrl from '@docusaurus/isInternalUrl';
import IconExternalLink from '@theme-original/Icon/ExternalLink';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { memo } from 'react';
import {
DocSidebarItemsExpandedStateProvider,
useVisibleSidebarItems,
} from '@docusaurus/theme-common/internal';
} from '@docusaurus/plugin-content-docs/client';
import type { Props } from '@theme-original/DocSidebarItems';
import DocSidebarItem from '../DocSidebarItem';

Expand Down
10 changes: 5 additions & 5 deletions packages/website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
"typecheck": "tsc"
},
"dependencies": {
"@docusaurus/core": "3.4.0",
"@docusaurus/preset-classic": "3.4.0",
"@docusaurus/core": "^3.5.2",
"@docusaurus/preset-classic": "^3.5.2",
"@elastic/datemath": "^5.0.3",
"@elastic/eui": "94.5.0",
"@elastic/eui-docgen": "workspace:^",
Expand All @@ -35,9 +35,9 @@
},
"devDependencies": {
"@babel/preset-react": "^7.24.7",
"@docusaurus/module-type-aliases": "3.4.0",
"@docusaurus/tsconfig": "3.4.0",
"@docusaurus/types": "3.4.0",
"@docusaurus/module-type-aliases": "^3.5.2",
"@docusaurus/tsconfig": "^3.5.2",
"@docusaurus/types": "^3.5.2",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"cross-env": "^7.0.3",
Expand Down
Loading
Loading