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: bump docusaurus to 5.6.2 #1621

Merged
merged 1 commit into from
Dec 12, 2024
Merged

chore: bump docusaurus to 5.6.2 #1621

merged 1 commit into from
Dec 12, 2024

Conversation

mxschmitt
Copy link
Member

Looks like "@docusaurus/tsconfig": "3.6.2" introduced a regression for us in facebook/docusaurus@5344bc1 where we had to add it manually back. Without that it ended up in:

src/pages/versions.tsx:22:7 - error TS2322: Type '{ children: Element; title: string; description: string; }' is not assignable to type 'IntrinsicAttributes & Props'.
  Property 'title' does not exist on type 'IntrinsicAttributes & Props'.

22       title="Versions"
         ~~~~~

cc @slorber

Copy link
Contributor

Azure Static Web Apps: Your stage site is ready! Visit it here: https://delightful-forest-0a29f6210-1621.centralus.azurestaticapps.net

1 similar comment
Copy link
Contributor

Azure Static Web Apps: Your stage site is ready! Visit it here: https://delightful-forest-0a29f6210-1621.centralus.azurestaticapps.net

@mxschmitt mxschmitt merged commit 70007c3 into main Dec 12, 2024
6 checks passed
@mxschmitt mxschmitt deleted the bump/dependencies2 branch December 12, 2024 01:48
Comment on lines +9 to +13
"types": [
"node",
"@docusaurus/module-type-aliases",
"@docusaurus/theme-classic"
],
Copy link

@slorber slorber Dec 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You probably don't need to restore this

If you import the preset types in your config file (making your TS config more typesafe), then the required ambient types gets registered as well.

See also: facebook/docusaurus#10733 (comment)

Docusaurus registers a default layout component:

declare module '@theme/Layout' {
  import type {ReactNode} from 'react';

  export interface Props {
    readonly children?: ReactNode;
  }
  export default function Layout(props: Props): ReactNode;
}

It's supposed to be overridden by the classic theme:

declare module '@theme/Layout' {
  import type {ReactNode} from 'react';

  export interface Props {
    readonly children?: ReactNode;
    readonly noFooter?: boolean;
    readonly wrapperClassName?: string;

    // Not really layout-related, but kept for convenience/retro-compatibility
    readonly title?: string;
    readonly description?: string;
  }

  export default function Layout(props: Props): ReactNode;
}

Here we can see that your site doesn't load the types for the theme, so the title prop does not exist.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants