Skip to content

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