-
Notifications
You must be signed in to change notification settings - Fork 93
[Test] Bump docusaurus to v3.9 latest #949
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
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Martin Dekov <martin.dekov@suse.com>
There was a problem hiding this 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 Docusaurus documentation framework from v2.4 to v3.9, along with updating related dependencies and GitHub Actions workflows. The changes also include formatting fixes for documentation that were previously incorrectly escaped due to Docusaurus v2 limitations.
- Major version upgrade from Docusaurus v2.4 to v3.9 with updated plugin ecosystem
- Migration to new import paths and configuration structure for v3 compatibility
- Update GitHub Actions workflows to use Node.js 20 and newer action versions
Reviewed changes
Copilot reviewed 13 out of 14 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| package.json | Upgrades all Docusaurus packages to v3.9.x, adds @docusaurus/faster, and updates related dependencies (MDX, prism-react-renderer, openapi plugins) |
| docusaurus.config.js | Migrates configuration to v3 structure: updates prism-react-renderer imports, moves onBrokenMarkdownLinks to markdown.hooks, removes webpack config, adds future.experimental_faster flag |
| src/theme/DocVersionBanner/index.js | Updates import paths to use @docusaurus/plugin-content-docs/client instead of deprecated @docusaurus/theme-common/internal |
| sidebars.js | Changes API sidebar import from .js to .ts extension with fallback handling for default export |
| babel.config.js | Removes custom Babel configuration (now handled by Docusaurus v3 internally) |
| docs/troubleshooting/installation.md | Fixes VIP placeholder formatting from escaped to proper inline code format |
| versioned_docs/version-v1.7/troubleshooting/installation.md | Fixes VIP placeholder formatting from escaped to proper inline code format |
| versioned_docs/version-v1.6/troubleshooting/installation.md | Fixes VIP placeholder formatting from escaped to proper inline code format |
| versioned_docs/version-v1.5/troubleshooting/installation.md | Fixes VIP placeholder formatting from escaped to proper inline code format |
| versioned_docs/version-v1.4/troubleshooting/installation.md | Fixes VIP placeholder formatting from escaped to proper inline code format |
| .github/workflows/release.yml | Updates to Node.js 20 and actions/checkout@v6 |
| .github/workflows/pull-request.yml | Changes trigger from pull_request_target to pull_request, updates to Node.js 20, and updates to actions/checkout@v6 and actions/setup-node@v6 |
| .github/workflows/algolia-search.yml | Updates to actions/checkout@v6 |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| on: | ||
| pull_request_target: | ||
| pull_request: |
Copilot
AI
Jan 6, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changing from pull_request_target to pull_request can have security implications. The pull_request_target event runs in the context of the target repository and has access to repository secrets, which is safer for pull requests from forks. The pull_request event runs in the context of the fork and should not have access to secrets.
If this workflow uses any repository secrets or needs to comment on PRs from forks, this change could break functionality or create security issues. Ensure this change is intentional and that the workflow doesn't require elevated permissions.
| pull_request: | |
| pull_request_target: |
| markdown: { | ||
| hooks: { | ||
| onBrokenMarkdownLinks: "warn", | ||
| }, | ||
| }, |
Copilot
AI
Jan 6, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The configuration property onBrokenMarkdownLinks has been moved incorrectly. In Docusaurus v3, onBrokenMarkdownLinks should remain as a top-level configuration option, not nested under markdown.hooks. According to the Docusaurus v3 documentation, the correct structure should be:
onBrokenMarkdownLinks: "warn",
markdown: {
// other markdown options
},
This change may cause the broken markdown links warning to not work as expected.
| markdown: { | |
| hooks: { | |
| onBrokenMarkdownLinks: "warn", | |
| }, | |
| }, | |
| onBrokenMarkdownLinks: "warn", | |
| markdown: {}, |
|
|
||
| // @ts-check | ||
|
|
||
| const apiSidebar = require("./docs/api/sidebar.ts"); |
Copilot
AI
Jan 6, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code is requiring a .ts file but using the .require() syntax which expects CommonJS modules. TypeScript files are typically ES modules that export via export default. The fallback apiSidebar.default || apiSidebar on line 29 suggests uncertainty about the module format.
Since the file is sidebar.ts (TypeScript), and this is a JavaScript file using require(), this may cause issues at runtime if the sidebar.ts file doesn't exist or uses ES module syntax. Consider either:
- Using
sidebar.jsinstead ofsidebar.tsin the require statement if the generated file is JavaScript - Or ensure the file extension matches what is actually generated by docusaurus-plugin-openapi-docs
| const apiSidebar = require("./docs/api/sidebar.ts"); | |
| const apiSidebar = require("./docs/api/sidebar.js"); |
| "@docusaurus/preset-classic": "^2.4.0", | ||
| "@mdx-js/react": "^1.6.22", | ||
| "@docusaurus/core": "^3.9.0", | ||
| "@docusaurus/faster": "^3.9.2", |
Copilot
AI
Jan 6, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a version mismatch in the Docusaurus packages. Most packages are at ^3.9.0, but @docusaurus/faster is at ^3.9.2. While this might work, it's better practice to keep all Docusaurus packages aligned to the same version to avoid potential compatibility issues. Consider updating this to ^3.9.0 to match the other packages.
| "@docusaurus/faster": "^3.9.2", | |
| "@docusaurus/faster": "^3.9.0", |
|
Problem:
Solution:
Related Issue(s):
Test plan:
Additional documentation or context