-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
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
Strict check for plugin version mismatch #9342
Comments
Thanks for reporting I think instead we should throw by default in Docusaurus v3. |
@slorber May I work on this issue? |
If we get a PR before monday yes |
@slorber Ok, I can do that. |
@slorber @chris48s if i get it correctly you want to add some function named docusaurus check/build in checkDocusaurusPackagesVersion and if the versions mismatch it should run(This function throws an exception or otherwise exits with a non-zero exit code if the plugin versions are mis-matched with core.) Its currently logging the error. |
@slorber So can I start working on it? Or should I get assigned first? @shubhankar-mern I believe what they want to do it throw an error if there is a version mismatch, as opposed to just logging the error. |
Have you read the Contributing Guidelines on issues?
Description
In https://github.com/facebook/docusaurus/blob/v2.4.3/packages/docusaurus/src/server/siteMetadata.ts#L75-L92 there is a check which logs an error if @Docusaurus plugins are out of sync with @docusaurus/core
This logs a message, but it is not a hard error.
I would like the ability to run something like
docusaurus check
ordocusaurus build --strict
which throws an exception or otherwise exits with a non-zero exit code if the plugin versions are mis-matched with core.
Has this been requested on Canny?
No response
Motivation
This would be useful as a CI check to help users correctly upgrade docusaurus packages using automated tools like dependabot.
API design
I've suggested
docusaurus check
ordocusaurus build --strict
but open to other ideas..
--strict-plugins
?Have you tried building it?
I have not tried building this as a plugin. At the moment, my proposed workaround for this on a repo where we are using docusaurus is https://github.com/badges/shields/pull/9608/files but parsing the output like this will be brittle.
Maybe this could be a plugin, but it feels like something that conceptually lives in core. The comment in https://github.com/facebook/docusaurus/blob/v2.4.3/packages/docusaurus/src/server/siteMetadata.ts#L75-L92 suggests this would be reasonable.
Self-service
The text was updated successfully, but these errors were encountered: