Skip to content

chore(deps): migrate to Docusaurus 3.10.1#2045

Merged
yury-s merged 2 commits into
mainfrom
docusaurus-3.10.1
Jun 3, 2026
Merged

chore(deps): migrate to Docusaurus 3.10.1#2045
yury-s merged 2 commits into
mainfrom
docusaurus-3.10.1

Conversation

@yury-s
Copy link
Copy Markdown
Member

@yury-s yury-s commented Jun 3, 2026

Summary

  • Bump all @docusaurus/* packages from 3.8.1 to 3.10.1.
  • Make the generated docs natively MDX v2 compatible instead of relying on the markdown.mdx1Compat shims (which future.v4 disables by default).

Background

3.10.1 surfaces a build break because future.v4: true now disables the MDX1 compatibility shims that 3.8.1 enabled by default: explicit heading ids ### Heading {#id} get parsed as JS expressions → Could not parse expression with acorn.

Rather than re-enable the shim via config, the generator now emits the heading id in the MDX comment form {/* #id */}, which is valid MDX as-is and which Docusaurus extracts into the same anchor ids (no links change). No post-processing/escaping step is needed.

Existing committed .mdx (api docs, versioned_docs, and the hand-written community page) were migrated to the new form with a one-time codemod. The future.experimental_faster flag was also renamed to future.faster (renamed in 3.10).

The only other MDX incompatibility was a stray HTML comment in the webview2 guide; it was removed upstream (microsoft/playwright#41122) and dropped from the stable snapshots here, so no HTML-comment handling is needed.

Test plan

  • npm run build (nodejs/python/java/dotnet) all succeed with no mdx1Compat config.
  • Anchor ids unchanged (verified id=screencast-hide-actions in built HTML); no {#...} leak into rendered text.
  • tsc passes.

yury-s added 2 commits June 3, 2026 12:04
Bump all @docusaurus/* packages from 3.8.1 to 3.10.1 and rename the
renamed-in-3.10 future flag experimental_faster -> faster.
Docusaurus 3.10 with future.v4 disables the mdx1Compat shims, so the classic
`{#id}` heading-id syntax is parsed as a (failing) MDX expression. Emit the
ids as MDX comments `{/* #id */}` instead, which is valid MDX as-is and which
Docusaurus extracts into identical anchor ids (no links change).

- generator.js emits `{/* #id */}`; no post-processing/escaping needed.
- Codemod existing committed .mdx (api docs + community page) to the new form.
- Drop the stray HTML comment from the stable webview2 snapshots (already
  removed upstream in microsoft/playwright), so no HTML-comment handling is
  needed either.
@yury-s yury-s force-pushed the docusaurus-3.10.1 branch from d0bed11 to 4925b76 Compare June 3, 2026 19:04
@yury-s yury-s merged commit 6598108 into main Jun 3, 2026
3 checks passed
@yury-s yury-s deleted the docusaurus-3.10.1 branch June 3, 2026 21:48
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