-
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
Description
Have you read the Contributing Guidelines on issues?
- I have 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 checkordocusaurus 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 checkordocusaurus 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
- I'd be willing to contribute this feature to Docusaurus myself.