Skip to content

Commit

Permalink
Upgrade Docusaurus to v3 to fix sec vulnerabilities
Browse files Browse the repository at this point in the history
Summary:
This CL upgrades Docusaurus version from 2 to 3.

# What changes?

This CL multiple packages as outlined in the [Docusaurs v2 to v3 migration guide](https://docusaurus.io/docs/migration/v3) and as seen working [with other known configs](https://www.internalfb.com/code/fbsource/[5278a8b5dec7c99a8917b2677732026305af9b65]/fbcode/antlir/antlir2/docs/package.json).

# Why?

Following the [staticdocs documentation](https://www.internalfb.com/intern/staticdocs/staticdocs/docs/setup/3-creating-a-site/) gives us Docusaurus v2, which comes with known security vulnerabilities.

Reviewed By: AndreasBackx

Differential Revision: D52785096

fbshipit-source-id: 75365c3a52352f430ca990a9796092771e38d38c
  • Loading branch information
ukautz authored and facebook-github-bot committed Jan 16, 2024
1 parent 3776984 commit 33416b9
Show file tree
Hide file tree
Showing 3 changed files with 4,047 additions and 5,282 deletions.
4 changes: 2 additions & 2 deletions website/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
* LICENSE file in the root directory of this source tree.
*/

const lightCodeTheme = require('prism-react-renderer/themes/github');
const darkCodeTheme = require('prism-react-renderer/themes/dracula');
const lightCodeTheme = require('prism-react-renderer').themes.github;
const darkCodeTheme = require('prism-react-renderer').themes.dracula;

const {customFields} = require('./constants');

Expand Down
18 changes: 9 additions & 9 deletions website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@
"write-heading-ids": "docusaurus write-heading-ids"
},
"dependencies": {
"@docusaurus/core": "^2",
"@docusaurus/preset-classic": "^2",
"@mdx-js/react": "^1.6.21",
"clsx": "^1.1.1",
"@docusaurus/core": "^3.1.0",
"@docusaurus/preset-classic": "^3.1.0",
"@mdx-js/react": "^3.0.0",
"clsx": "^2.0.0",
"docusaurus-plugin-internaldocs-fb": "1.16.2",
"prism-react-renderer": "^1.3.3",
"react": "^17.0.2",
"react-dom": "^17.0.2"
"prism-react-renderer": "^2.1.0",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
"browserslist": {
"production": [
Expand All @@ -37,11 +37,11 @@
]
},
"engines": {
"node": ">=16",
"node": ">=18.0",
"npm": "use yarn instead",
"yarn": "^1.5"
},
"devDependencies": {
"yarn-audit-fix": "^9.3.10"
"yarn-audit-fix": "^10.0.7"
}
}
Loading

0 comments on commit 33416b9

Please sign in to comment.