Skip to content

Upgrade to Docusaurus 3.10.0#314

Open
octogonz wants to merge 8 commits intomicrosoft:mainfrom
octogonz:main
Open

Upgrade to Docusaurus 3.10.0#314
octogonz wants to merge 8 commits intomicrosoft:mainfrom
octogonz:main

Conversation

@octogonz
Copy link
Copy Markdown
Collaborator

As part of this upgrade:

  • Remove the old deploy-fork workflow, since it's not being used and the remark-canonical-link-plugin is no longer working
    --> in the future, if we want to host PR builds of docsites, we should simply inject noindex in the HTML rather than getting involved with canonical URL generation

  • @iclanton's accessibility fixes were removed because the patches don't easily translate to the latest Docusaurus

    "globalPatchedDependencies": {
      "typesense-docsearch-react@0.2.3": "patches/typesense-docsearch-react@0.2.3.patch",
      "@docusaurus/theme-classic@2.3.1": "patches/@docusaurus__theme-classic@2.3.1.patch",
      "docusaurus-theme-search-typesense@0.9.0": "patches/docusaurus-theme-search-typesense@0.9.0.patch",
      "react-loadable-ssr-addon-v5-slorber": "patches/react-loadable-ssr-addon-v5-slorber.patch"
    },

    --> we may need to reapply these fixes if they are still present in Docusaurus 3

  • the api.rushstack.io project is temporarily removed from rush.json; I want to rethink the way this project's inputs are generated rather than merely patching the current approach to support the latest MDX

- Fix unist-util-visit import (v5 changed to named export) in:
  - rehype-headerless-table-plugin
  - remark-cross-site-link-plugin
- Fix React 19 JSX namespace imports in theme-rushstack-suite-nav
- Remove unnecessary 'node' type from theme-rushstack-suite-nav tsconfig
  (resolves TextDecoder/TextEncoder conflict with DOM types)
- Migrate api-documenter-docusaurus-plugin to ESLint 9 flat config format
- Fix prism-react-renderer theme imports (changed to named exports)
- Remove explicit webpack dependency from website packages
- Add pnpm override to pin webpack to 5.98.0 for Docusaurus compatibility
- Remove `<!---->` escapes that were never needed:
  - The remark-cross-site-link-plugin only transforms URLs starting with '@',
  not link text, so '@rushstack' in link text never needed escaping
- Disable api.rushstack.io in rush.json due to MDX incompatibility:
  - The API docs contain TypeScript type syntax in curly braces that MDX 3.x
    tries to parse as JavaScript expressions
  - Will be fixed by implementing a direct API -> MDX pipeline instead of
    the current API -> .md -> MDX approach
- Migrate onBrokenMarkdownLinks to markdown.hooks.onBrokenMarkdownLinks
  (deprecated in Docusaurus, will be removed in v4)
- Fix broken anchor #heft-task-plugins → #task-plugins in blog post
- Fix broken anchor in Chinese translation blog posts
- Fix Chinese migration guide linking to English anchor
- heft.rushstack.io: Fix property-inheritance-directives anchor
- rushjs.io: Fix 4 broken anchors linking to English instead of Chinese:
  - subspace-members-subspace -> 子空间成员subspace
  - building-changed-projects-only-unsafe -> 只构建发生变化的项目不安全
  - selectors -> 选择器格式
  - install-runjs-for-other-commands -> install-runjs-来执行其他命令
The deploy-fork workflow was not being used and the remark-canonical-link-plugin
was causing visual regressions in Docusaurus 3.x. The plugin injected <head>
tags directly into MDX content, which worked in Docusaurus 2.x (MDX1) due to
automatic hoisting, but in Docusaurus 3.x (MDX2) the tags render as plain text.

Changes:
- Removed plugins/remark-canonical-link-plugin directory
- Removed tools/deploy-fork directory
- Removed deploy-fork command from rush command-line.json
- Removed remark-canonical-link-plugin from rush.json and all website configs
- Simplified tools/site-config to remove fork/target logic
- Updated README.md to remove deploy-fork documentation
- Added search-insights dependency to satisfy peer dependency
@octogonz octogonz marked this pull request as ready for review April 16, 2026 03:20

markdown: {
hooks: {
onBrokenMarkdownLinks: 'warn'
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Throwing for api-extractor.com but not here?

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.

2 participants