-
Notifications
You must be signed in to change notification settings - Fork 93
Bump docusaurus to v3.9 latest #945
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
3e2b6f6 to
d2e81b3
Compare
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 Docusaurus from v2.4.0 to v3.9.0 and updates related dependencies to maintain compatibility with the major version bump.
Key Changes:
- Docusaurus core and plugins upgraded from v2.4.0 to v3.9.0
- Supporting packages updated: @mdx-js/react (v1.6.22 → v3.0.0), prism-react-renderer (v1.3.1 → v2.4.0), and OpenAPI documentation plugins (v2.1.2 → v4.5.1)
- Updated theme imports in docusaurus.config.js to use the new prism-react-renderer v2 API structure
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| package.json | Updates all Docusaurus dependencies from v2.4.0 to v3.9.0, along with related plugin and renderer upgrades |
| docusaurus.config.js | Refactors prism-react-renderer theme imports to use the new v2 API structure with destructured themes |
| sidebars.js | Attempts to change sidebar import from .js to .ts and adds ES module compatibility handling |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
5b1d290 to
90b9773
Compare
5d099ae to
0016c13
Compare
5133196 to
1fe4fcc
Compare
Bumping docosaurus to v3.9 along with adding the following: * Replace webpack optimizations with experimental_faster package which works with 3.9 while the webpack is breaking the builds * Replace latest setup node action with new node version 20 required by docusaurus builds * Fix broken escape characters, backslashes `\` break the build and are replaced with single quotes * Fix broken imports * Fix broken configuration and paths Signed-off-by: Martin Dekov <martin.dekov@suse.com>
martindekov
left a comment
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.
PR Tests Fail because the pipeline is using the target branch where nodejs is still 18, while docosaurus 3. requires nodejs at least 20 which is introduced in this PR
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.
Hi,
@olblak asked me to review this PR.
I took a fresh copy of the repo and followed the steps as described in README.md. All worked well and yarn start showed me a generated website that looks as expected.
Tested on node 20.19.6 (latest available 20) and Docusaurus 3.9.2.
The README.md still refers to Docusaurus 2, so that could be included in this PR too.
The README.md also refers to the step for generating PDF docs yarn gen-pdf-docs. I don't know if this is in current use. It trundles through docs located at the testing localhost but eventually fails when trying to use the API docs at http://localhost:3000/v1.7/api/list-namespaced-persistent-volume-claim.
[08.01.2026 12:51.56.175] [LOG] Retrieving html from http://localhost:3000/v1.7/api/list-namespaced-persistent-volume-claim
[08.01.2026 12:51.58.690] [DEBUG] Found 12 elements
[08.01.2026 12:51.58.696] [DEBUG] Clicking summary: Path Parameters
[08.01.2026 12:51.59.534] [DEBUG] Clicking summary: Query Parameters
[08.01.2026 12:52.00.370] [DEBUG] Clicking summary: Schema
[08.01.2026 12:52.01.199] [DEBUG] Clicking summary: metadata object
[08.01.2026 12:52.02.026] [DEBUG] Clicking summary: Schema
[08.01.2026 12:52.02.047] [ERROR] Error: Node is either not clickable or not an Element
at CdpElementHandle.clickablePoint (/home/jhk/projects/suse/community/harvester/harvester-community-docs/node_modules/puppeteer-core/lib/cjs/puppeteer/api/ElementHandle.js:673:23)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async CdpElementHandle.<anonymous> (/home/jhk/projects/suse/community/harvester/harvester-community-docs/node_modules/puppeteer-core/lib/cjs/puppeteer/api/ElementHandle.js:250:32)
at async CdpElementHandle.click (/home/jhk/projects/suse/community/harvester/harvester-community-docs/node_modules/puppeteer-core/lib/cjs/puppeteer/api/ElementHandle.js:703:30)
at async CdpElementHandle.<anonymous> (/home/jhk/projects/suse/community/harvester/harvester-community-docs/node_modules/puppeteer-core/lib/cjs/puppeteer/api/ElementHandle.js:253:36)
at async openDetails (/home/jhk/projects/suse/community/harvester/harvester-community-docs/node_modules/docs-to-pdf/lib/utils.js:212:13)
at async generatePDF (/home/jhk/projects/suse/community/harvester/harvester-community-docs/node_modules/docs-to-pdf/lib/utils.js:82:21)
error Command failed with exit code 1.
Also, I think the GH actions might need updating to use node 20.
Thanks.
|
Thanks for going through this @jhkrug:
It's interesting why it fails on localhost, this is accessible when built by pipeline - https://695d36cc2dd041bc91b0f6b1--harvester-preview.netlify.app/v1.7/api/list-namespaced-persistent-volume-claim/ but I will double check on localhost as well. All good catches really appreciate the input! |
|
ok so this fails on main as well 🤔 will add the owners in the loop @jillian-maroket @akashraj4261 @dariavladykina do you folks have any idea why |
It was |
|
Yes, sorry @jhkrug I copied the wrong key, the output is from |
Updating README file by pointing that we use Docosaurus 3 as opposed to 2 and point to the exact major.minor version to the docs. Remove suggestion for generating PDF docs as no one is using it and it does not work in main. So explaining the usage is redundant in that case. Signed-off-by: Martin Dekov <martin.dekov@suse.com>
|
So @jhkrug for your original review:
Fixed to point docosaurus 3 and references to 3.9 release introduced in this PR ✔️
We don't use this and we never did and it fails on main that's the reason no one said anything so removed the explanation altogether from the README ✔️
Actually did update to node 20 in this PR in folder - .github/workflows but since pipeline is using config from main it fails with node version 18 as main still has not adopted this change which bumps it so pipeline cannot use it, I fixed this in testing PR where pipeline is using node version 20. |
jhkrug
left a comment
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.
lgtm. I can only comment, not approve.
|
Thanks for the input and review @jhkrug appreciate it! |
|
Thank you very much @jhkrug for your help |
Bumping docosaurus to v3.9 along with adding the following:
which works with 3.9 while the webpack is breaking the builds
by docusaurus builds
\break the buildand are replaced with single quotes
Problem:
Docusaurus currently is older 2.4 version almost 2 years old now: harvester/harvester#9791
Solution:
Bump version to latest 3.9 - https://docusaurus.io/blog/releases/3.9
Related Issue(s):
harvester/harvester#9791
Test plan:
Pipeline test: #949
Site URL running on 3.9: https://695d36cc2dd041bc91b0f6b1--harvester-preview.netlify.app/
Start with clear up
yarn install
yarn gen-api-docs
yarn start (this takes ~40 minutes)
Additional documentation or context
Docusaurus 3.9 Doc - https://docusaurus.io/blog/releases/3.9
Faster feature replacing webpack: