Skip to content

Provide a way to let plugins use a compatible version of Joi #4456

@weareoutman

Description

@weareoutman

🚀 Feature

Provide a way to let plugins (such as my plugin) be compatible across Docusaurus versions, which both use Joi to do validation of options.

Have you read the Contributing Guidelines on issues?

yes

Motivation

Currently Joi disallows mixing different versions of joi schema, however, we cannot make sure Docusaurus and plugins use the same version of Joi if they specifies their own dependencies. Like this issue happened after a new Docusaurus version released.

Users can do a dedupe to fix this problem, but it's pretty annoying since Docusaurus releases frequently.

Another workaround maybe specifying Joi as a peer dependency in plugins, but I think it cannot always work, because Docusaurus and plugins are peers, but their own dependencies are not.

Pitch

(Please explain why this feature should be implemented and how it would be used.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureThis is not a bug or issue with Docusausus, per se. It is a feature request for the future.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions