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

feat(core): change to execute all plugins before throwing on failed #275

Merged
merged 8 commits into from
Nov 22, 2023

Conversation

MishaSeredenkoPushBased
Copy link
Contributor

Changed executePlugins() logic to run all plugins, even if one or more plugins have failed. Then console.error the failed plugin errors, and throw.
Closes #159

matejchalk
matejchalk previously approved these changes Nov 16, 2023
Copy link
Collaborator

@BioPhoton BioPhoton left a comment

Choose a reason for hiding this comment

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

We could use already existing helper logic.

packages/core/src/lib/implementation/execute-plugin.ts Outdated Show resolved Hide resolved
Copy link
Collaborator

@BioPhoton BioPhoton left a comment

Choose a reason for hiding this comment

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

left comments mostly nit picking

Copy link
Collaborator

@BioPhoton BioPhoton left a comment

Choose a reason for hiding this comment

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

Hi! I guess we have a bit of a confusion here with generic vs specific functions and how to reuse generic logic.

Please have a look at my comments

packages/utils/src/lib/log-results.ts Outdated Show resolved Hide resolved
packages/utils/src/lib/log-results.ts Outdated Show resolved Hide resolved
packages/utils/src/lib/log-results.ts Outdated Show resolved Hide resolved
packages/utils/src/lib/log-results.ts Outdated Show resolved Hide resolved
packages/utils/src/lib/log-results.ts Outdated Show resolved Hide resolved
packages/utils/src/lib/log-results.ts Outdated Show resolved Hide resolved
packages/core/src/lib/implementation/execute-plugin.ts Outdated Show resolved Hide resolved
@MishaSeredenkoPushBased
Copy link
Contributor Author

The comments are fixed, as well as the code was improved for better readability and support.
@BioPhoton @matejchalk your comments were very useful and helpful, thanks!

packages/utils/package.json Outdated Show resolved Hide resolved
packages/utils/src/lib/log-results.unit.spec.ts Outdated Show resolved Hide resolved
@MishaSeredenkoPushBased MishaSeredenkoPushBased merged commit 32a6ef5 into main Nov 22, 2023
14 checks passed
@MishaSeredenkoPushBased MishaSeredenkoPushBased deleted the exec-all-plugins-before-throw branch November 22, 2023 15:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
➕ enhancement new feature or request 💡 good first issue good for newcomers 🤓 UX UX improvement for CLI users
Projects
None yet
Development

Successfully merging this pull request may close these issues.

plugin execution should be a graceful exit and run all registered plugins before throwing
5 participants