Skip to content

Conversation

@Karibash
Copy link
Contributor

Summary

I updated the versions of TypeDoc and typedoc-plugin-markdown.
There were several changes to the default settings, but I’ve made adjustments so that the output is rendered as similarly as possible to the previous version.

Related Issue

close #2479

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

Copilot AI review requested due to automatic review settings November 20, 2025 01:43
@netlify
Copy link

netlify bot commented Nov 20, 2025

Deploy Preview for rspress-v2 ready!

Name Link
🔨 Latest commit b030158
🔍 Latest deploy log https://app.netlify.com/projects/rspress-v2/deploys/691e723277bbca0008be884e
😎 Deploy Preview https://deploy-preview-2790--rspress-v2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR upgrades the TypeDoc plugin to use TypeDoc v0.28.14 and typedoc-plugin-markdown v4.9.0, migrating from the previous v0.24.8 and v3.17.1 versions respectively. The upgrade necessitates API changes to align with TypeDoc's new architecture, while maintaining similar output rendering.

  • Updated TypeDoc and typedoc-plugin-markdown to their latest major versions
  • Migrated to new TypeDoc v0.28 API including Application.bootstrapWithPlugins() and app.outputs.writeOutput()
  • Adjusted configuration options to match new defaults and maintain output consistency

Reviewed Changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
pnpm-lock.yaml Updated dependency versions and added new transitive dependencies required by TypeDoc v0.28
packages/plugin-typedoc/package.json Bumped typedoc to 0.28.14 and typedoc-plugin-markdown to 4.9.0
packages/plugin-typedoc/src/index.ts Migrated to new TypeDoc v0.28 API with bootstrapWithPlugins and outputs.writeOutput methods, added new configuration options
packages/plugin-typedoc/src/patch.ts Removed README.md to index.md rename (now handled by entryFileName config)
packages/plugin-typedoc/src/utils.ts Removed unused transformModuleName function
e2e/fixtures/plugin-typedoc/index.test.ts Updated test expectations to match new TypeDoc output format (function names now include parentheses, module naming changed from underscores to hyphens)
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I removed this because it was not being used.

Comment on lines -73 to -76
await fs.rename(
path.join(absoluteApiDir, 'README.md'),
path.join(absoluteApiDir, 'index.md'),
);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I updated it to use the entryFileName option instead.

app.options.addReader(new TSConfigReader());
load(app);
app.bootstrap({
const app = await Application.bootstrapWithPlugins({
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Since the constructor of the Application class has been made private, initialization is now done using the bootstrapWithPlugins method instead.

const app = await Application.bootstrapWithPlugins({
name: config.title,
entryPoints,
theme: 'markdown',
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The theme option is no longer needed; instead, it is now specified via the writeOutput method.

async config(config) {
const app = new Application();
docRoot = config.root;
app.options.addReader(new TSConfigReader());
Copy link
Contributor Author

Choose a reason for hiding this comment

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

TSConfigReader is now included by default when using the bootstrapWithPlugins method.

entryPoints,
theme: 'markdown',
disableSources: true,
router: 'kind',
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Since the default output directory structure has changed, I added an option so that it can generate the same structure as before.

Comment on lines -42 to -43
hideMembersSymbol: true,
allReflectionsHaveOwnDocument: true,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

These options have been removed and are no longer available.

Comment on lines -50 to +51
await app.generateDocs(project, absoluteApiDir);
const absoluteApiDir = path.join(config.root!, outDir);
await app.outputs.writeOutput(
{ name: 'markdown', path: absoluteApiDir },
project,
);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Since the generateDocs method was changed to output HTML files, I updated the code to use the writeOutput method instead.

@Karibash
Copy link
Contributor Author

I don’t have a Windows machine, so I can’t figure out why it’s failing on Windows in the end-to-end tests 😢
https://github.com/web-infra-dev/rspress/actions/runs/19522482867/job/55888575917?pr=2790

@SoonIter
Copy link
Member

SoonIter commented Nov 20, 2025

I don’t have a Windows machine, so I can’t figure out why it’s failing on Windows in the end-to-end tests 😢 web-infra-dev/rspress/actions/runs/19522482867/job/55888575917?pr=2790

I currently do not have a Windows machine too. I will do some troubleshooting when I have a Windows machine today or tomorrow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Update "typedoc" to the latest version

2 participants