typedoc2md / typedoc-plugin-markdown

A plugin for TypeDoc that enables TypeScript API documentation to be generated in Markdown.
https://typedoc-plugin-markdown.org
MIT License
714 stars 176 forks source link

docusaurus-plugin-typedoc: Plugins not loading in docusaurus after updating typedoc to 0.24 #416

Closed CoderIllusionist closed 1 year ago

CoderIllusionist commented 1 year ago

When updating typedoc to 0.24.x and docusaurus-plugin-typedoc to 0.19.0 plugins aren't loading anymore

docusaurus.config.js:

  plugins: [
    [
      'docusaurus-plugin-typedoc',
      {
        entryPoints: ['../lib/index.ts'],
        tsconfig: '../lib/tsconfig.json',
        out: 'api',
        plugin: ['typedoc-plugin-replace-text'],
      },
    ],
  ],

Before the update I could see in the cli: Loaded plugin typedoc-plugin-replace-text

When updating I get the following

[error] Tried to set an option (replaceText) that was not declared. You may have meant:
        readme
        pretty
        readmeTitle
        emit
        name
        sort
        help

(worked flawlesly) old package.json

{
    "docusaurus-plugin-typedoc": "0.18.0"
    "typedoc": "0.23.28",
    "typedoc-plugin-markdown": "3.14.0",
    "typedoc-plugin-replace-text": "2.1.0",
}

(see error above) new package.json

{
    "docusaurus-plugin-typedoc": "0.19.0"
    "typedoc": "0.24.4",
    "typedoc-plugin-markdown": "3.15.1",
    "typedoc-plugin-replace-text": "2.2.0",
}

in typedoc.json

{
  "replaceText": {
    "inCodeCommentText": true,
    "inCodeCommentTags": true,
    "inIncludedFiles": true,
    "replacements": [
        // replacements here
    ]
  }
}

Any thoughts?

tgreyuk commented 1 year ago

Sorry - there was an API change in TypeDoc 0.24 that wasn't implemented.

Should be fixed in docusaurus-plugin-typedoc@0.19.1

CoderIllusionist commented 1 year ago

Thanks! Fixed!