Skip to content

Update docusaurus to stop using prismjs#3037

Merged
jesszzzz merged 2 commits intomainfrom
update_prismjs
Mar 14, 2025
Merged

Update docusaurus to stop using prismjs#3037
jesszzzz merged 2 commits intomainfrom
update_prismjs

Conversation

@jesszzzz
Copy link
Contributor

@jesszzzz jesszzzz commented Mar 6, 2025

Motivation

Prismjs is found to have a security issue (https://github.com/facebookresearch/hydra/security/dependabot/102).
It's being pulled in by the version of docusaurus we were using. This upgrades docusaurus to a newer version that doesn't use prismjs.

Along with this, we needed to

  • Update the docusaurus config to add the apikey field to algolia (not entirely sure it'll work but we'll know better once this lands) and move the google analytics field
  • Only include the FBOnly sidebar key when it has elements
  • Remove the version prefix from versioned sidebars

Also did some stuff to make the tests pass

  • Added types for setuptools so mypy stopped complaining
  • Updated the github actions/cache version since the previous one has been killed

Have you read the Contributing Guidelines on pull requests?

Yes

Test Plan

yarn; yarn build; yarn start
Opened the dev website and checked it looked right, pages loaded etc
CI/CD

Related Issues and PRs

(Is this PR part of a group of changes? Link the other relevant PRs and Issues here. Use https://help.github.com/en/articles/closing-issues-using-keywords for help on GitHub syntax)

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Mar 6, 2025
@jesszzzz jesszzzz marked this pull request as draft March 7, 2025 15:56
@jesszzzz jesszzzz force-pushed the update_prismjs branch 2 times, most recently from 2d0f563 to 9bf47e8 Compare March 7, 2025 21:32
@jesszzzz jesszzzz marked this pull request as ready for review March 14, 2025 14:15
Copy link

@tonykao8080 tonykao8080 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good

@jesszzzz jesszzzz merged commit 24643ea into main Mar 14, 2025
41 checks passed
@jesszzzz jesszzzz deleted the update_prismjs branch March 14, 2025 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants