-
Notifications
You must be signed in to change notification settings - Fork 7
chore(): upgrade Docusaurus to 3.8 #587
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
Conversation
- add override to non-vulnerable webpack-dev-server >=5.2.1 to mitigate CVE-2025-30360 - upgrade react proactively
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
ElvenSpellmaker
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
cloudratha
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.
I see docusaurus fails to build on Node 22, works fine after downgrading to 20. Might be one to watch to support LTS. Otherwise I ran the project and all seems ok to me
We should 100% be on LTS tbh... |
Less worrying as its a static site, but yeah we might need to wait for Docusaurus to support it |
- updated `package.json` to include `engines` section - added `.nvmrc` with current node version
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
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 core dependencies to Docusaurus v3.8.1 (and React to v19), enforces a secure webpack-dev-server version, and updates the project’s Node/CI environments to v20/Ubuntu 24.04.
- Bump Docusaurus, React, and related packages; add an
overridesblock for webpack-dev-server - Update Dockerfile, CI pipeline, and
.nvmrcto require Node v20 - Adjust remarkImages import for compatibility
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| package.json | Upgraded dependencies, added overrides for webpack-dev-server, and bumped engines |
| docusaurus.config.js | Fallback to remarkImages.default for plugin import compatibility |
| build-deploy-github-pages.yml | Parameterized vmImage, upgraded to Ubuntu 24.04 and Node 20.x |
| Dockerfile | Switched build and runtime images from Node 16 to Node 20 |
| .nvmrc | Set Node version to v20.19.2 |
Comments suppressed due to low confidence (2)
package.json:28
- The
@docusaurus/plugin-google-gtagversion remains at 3.5.2 while other Docusaurus packages have been bumped to 3.8.1. Align this plugin to^3.8.1to maintain compatibility across Docusaurus modules.
"@docusaurus/plugin-google-gtag": "^3.5.2",
build-deploy-github-pages.yml:26
- [nitpick] The variable
version_specis ambiguous. Consider renaming it to something more descriptive likenode_versionto clarify its purpose in the pipeline.
- name: version_spec
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
| }, | ||
| "overrides": { | ||
| "webpack-dev-server": ">=5.2.1" | ||
| "webpack-dev-server": "5.2.1" |
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.
I wonder if the ^5.2.1 is better as it'll then upgrade but won't go to 6?
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.
Yes, CoPilot caught this here: #587 (review)
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.
Yeah and it suggested either 5.2.1 or ^5.2.1 and I was suggesting the latter 🙂

📲 What
Upgrades Docusaurus and several transitive dependencies to address a known vulnerability in webpack-dev-server while keeping the project up-to-date.
.nvmrcto require Node v20🤔 Why
As part of our responsibilities under ISO27001, we are required to manage and mitigate risks associated with software vulnerabilities. By enforcing a secure version of webpack-dev-server, we reduce the risk of known vulnerabilities being exploited in our development environment. This proactive approach to dependency management demonstrates our commitment to maintaining the confidentiality, integrity, and availability of our information assets, as required by ISO27001 controls on software development and vulnerability management.
🛠 How
Upgrades executed as per Docusaurus Upgrade process, except for
webpack-dev-serverwhich was upgrade by adding:To
package.json👀 Evidence
Build:
"broken" anchors are links to components on page with delegated rendering.
Additionally have:
/buildfolder pre-and post to validate the the changes are as expected🕵️ How to test
npm run startand test manually.✅ Acceptance criteria Checklist