Skip to content
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

sync docusaurus plugin versions #9608

Merged
merged 3 commits into from
Sep 25, 2023

Conversation

chris48s
Copy link
Member

@chris48s chris48s commented Sep 24, 2023

Yesterday I merged #9600

When I was working on shields today, I realised that docusaurus was outputting

[ERROR] Invalid docusaurus-plugin-content-docs version 2.4.1.
All official @docusaurus/* packages should have the exact same version as @docusaurus/core (2.4.3).
Maybe you want to check, or regenerate your yarn.lock or package-lock.json file?
[ERROR] Invalid docusaurus-plugin-content-blog version 2.4.1.
All official @docusaurus/* packages should have the exact same version as @docusaurus/core (2.4.3).
Maybe you want to check, or regenerate your yarn.lock or package-lock.json file?
[ERROR] Invalid docusaurus-plugin-content-pages version 2.4.1.
All official @docusaurus/* packages should have the exact same version as @docusaurus/core (2.4.3).
Maybe you want to check, or regenerate your yarn.lock or package-lock.json file?
[ERROR] Invalid docusaurus-plugin-sitemap version 2.4.1.
All official @docusaurus/* packages should have the exact same version as @docusaurus/core (2.4.3).
Maybe you want to check, or regenerate your yarn.lock or package-lock.json file?
[ERROR] Invalid docusaurus-theme-classic version 2.4.1.
All official @docusaurus/* packages should have the exact same version as @docusaurus/core (2.4.3).
Maybe you want to check, or regenerate your yarn.lock or package-lock.json file?

This didn't cause anything to fail in CI - it just logged the errors to the console, which is why I didn't notice it.

The place where this is checked is https://github.com/facebook/docusaurus/blob/v2.4.3/packages/docusaurus/src/server/siteMetadata.ts#L75-L92

There doesn't appear to be any command or switch that can make this a hard error but I would really like this mismatch to cause a CI fail so I don't forget this next time. I am going to raise an issue about this upstream, but in the meantime I have cobbled together a crude bash script we can use. It is not very efficient because we have to build the whole frontend, but it is better than a kick in the teeth.
If you follow the commit history, you can see the build fails on the commit where I've added the check and then passes on the commit where I have fixed it.

FWIW, this particular mismatch (2.4.1 / 2.4.3) doesn't appear to actually be causing any issues, but I'd like to get this one reviewed/merged sooner rather than later.

add CI check that fails if
docusaurus plugins are out of sync with core
@chris48s chris48s added developer-experience Dev tooling, test framework, and CI dependencies Related to dependency updates labels Sep 24, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Sep 24, 2023

Messages
📖 ✨ Thanks for your contribution to Shields, @chris48s!

Generated by 🚫 dangerJS against 9855e1c

@chris48s chris48s marked this pull request as ready for review September 24, 2023 16:03
@chris48s chris48s changed the title WIP sync docusaurus plugin versions sync docusaurus plugin versions Sep 24, 2023
@chris48s
Copy link
Member Author

chris48s commented Sep 24, 2023

raised facebook/docusaurus#9342 - we'll see if that goes anywhere..

@calebcartwright
Copy link
Member

Thanks for finding, explaining, and fixing. It's the type of thing that would've had me in a helpless 🤷 had I seen myself

@chris48s chris48s added this pull request to the merge queue Sep 25, 2023
Merged via the queue into badges:master with commit afc2f90 Sep 25, 2023
24 checks passed
@chris48s chris48s deleted the fix-docusaurus-versions branch September 25, 2023 13:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Related to dependency updates developer-experience Dev tooling, test framework, and CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants