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: update lifecycle logic to handle - after prefix #188

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Larry1123
Copy link

I don't think that this should affect any. I am working on a plugin for yarn 2 to add lifecycle handing.
As they say in their docs using just pre and post can have odd side effects. The plugin I am creating will use pre- and post- as the prefix. I use this package and wanted to keep using it without patching it per project to make use of it.

From yarn docs.
In particular, we intentionally don't support arbitrary pre and post hooks for user-defined scripts (such as prestart). This behavior, inherited from npm, caused scripts to be implicit rather than explicit, obfuscating the execution flow. It also led to surprising executions with yarn serve also running yarn preserve.

@Larry1123 Larry1123 changed the title update lifecycle logic to handle - after prefix feat: update lifecycle logic to handle - after prefix May 21, 2020
@Larry1123
Copy link
Author

I am unsure why eslint is failing it is not failing locally when I run it.

@fisker
Copy link
Collaborator

fisker commented May 22, 2020

Any docs suggest pre- instead of pre ?

@Larry1123
Copy link
Author

No I have not. I had looked over a lot of names that come up and I felt that even if it was used most uses causes like pre-commit would likely be fine with being sorted near and around other commands like it anyway.
I was looking for a way to add a new way to do lifecycle hooks that would not match other known ones, but a naming format that would still work even if someone was not needing it.
The main reason I went with using - was that it would avoid issues with words inadvertently matching.

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.

2 participants