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

Extract plugin handling in a PluginRegistry class independent of the Application #703

Merged
merged 11 commits into from
May 25, 2024

Conversation

fcollonval
Copy link
Member

@fcollonval fcollonval commented May 19, 2024

Fixes #697
Fixes #586

Refactor the plugins handling outside of the Application class to be able to instantiate and use it independently.
Add a allowed/blocked list feature to the new class.

The new PluginRegistry class is defined in coreutils to avoid bringing the widgets package in the stack dependency of the plugin system consumer. That implies adding the algorithm package as dependency to coreutils.

@fcollonval fcollonval added the enhancement New feature or request label May 19, 2024
@fcollonval fcollonval marked this pull request as ready for review May 19, 2024 08:17
@fcollonval fcollonval requested a review from jtpio May 20, 2024 08:28
@fcollonval
Copy link
Member Author

cc @Zsailer

Copy link
Contributor

@brichet brichet left a comment

Choose a reason for hiding this comment

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

Thanks @fcollonval, LGTM, at least everything work in a dev installation.

I just have a few comments.

packages/coreutils/src/plugins.ts Outdated Show resolved Hide resolved
Copy link
Contributor

Choose a reason for hiding this comment

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

Out of curiosity, why do we need this ?
Should it be defined in other packages using console ?

Copy link
Member Author

Choose a reason for hiding this comment

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

This package is compatible for browser and nodejs environment.

The automatic way to make TypeScript happy is to mention in the tsconfig that the target is DOM. However node js does not implement all the DOM API. But it does implement the console. So this pleases TypeScript but prevent future change to reference for example window or document (not available in node js).

Co-authored-by: Nicolas Brichet <32258950+brichet@users.noreply.github.com>
@fcollonval
Copy link
Member Author

Thanks for the review @brichet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
2 participants