-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[Bug] Prestart scripts no longer run #995
Comments
This comment has been minimized.
This comment has been minimized.
2 similar comments
This comment has been minimized.
This comment has been minimized.
This issue reproduces on master:
|
We should add a note to https://yarnpkg.com/advanced/lifecycle-scripts about this - the gist is that The reason for this is that they make the code execution implicit rather than explicit (so just looking at the script entry isn't enough to know what's getting executed), and that they cause awkward executions in other circumstances (for example, a script named Note that this is purely about user scripts - we still support some |
This should also be specified in the migration guide, as it is an incredibly large difference from how things used to work, and will break many user scripts. |
Now documented as of #1002 |
yarn berry doesn't support those scripts on purpose see yarnpkg/berry#995
yarn berry doesn't support those scripts on purpose see yarnpkg/berry#995
yarn berry doesn't support those scripts on purpose see yarnpkg/berry#995
Describe the bug
In both npm and yarn legacy, when running a script named
xxx
, if a script namedprexxx
exists it would be run beforehand. Likewise, a script namedpostxxx
would be run afterwards.In yarn berry, this is no longer the case;
prestart
,poststart
no longer work for custom script names.To Reproduce
Screenshots
npm and yarn 1 work correctly:
yarn berry works incorrectly:
Sherlock repro
The text was updated successfully, but these errors were encountered: