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

fix: allow plugins to have scope #578

Merged
merged 3 commits into from
Aug 30, 2022
Merged

fix: allow plugins to have scope #578

merged 3 commits into from
Aug 30, 2022

Conversation

dubisdev
Copy link
Contributor

About the regex:

  • If base (the folder to treat as a plugin) matches node_modules or a scope (@) named folder, returns, as they must not be loaded as plugins. --> Ignore node_modules as the folder that should load is /node_modules/plugin-folder or /@scope/plugin-name

  • Dir (the parent folder of the plugin folder) must be node_modules or a scope named folder (to ignore scanned folders inside a plugin) --> Ignore /plugin-folder/subfolder as the plugin must be required from the root folder of the plugin

fix #468

@dubisdev

This comment was marked as outdated.

@dubisdev
Copy link
Contributor Author

This PR is ready now!

In future iterations it would be nice to refactor readdir, readfile... to their async methods to avoid performance issues.

@ogustavo-pereira ogustavo-pereira merged commit ff02506 into cerebroapp:master Aug 30, 2022
@dubisdev dubisdev deleted the fix-468 branch August 31, 2022 12:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Plugins cannot be installed when published under an npm-scope
2 participants