Open MikeMcC399 opened 3 weeks ago
GitHub Actions has a similar issue and https://github.com/cypress-io/github-action/blob/master/.github/workflows/check-dist.yml is used to check for unresolved changes.
That would be something like the following, added into the CI workflow at some point after yarn install
has run:
if [ "$(git diff --ignore-space-at-eol | wc -l)" -gt "0" ]; then
echo yarn.lock mismatch
git diff
exit 1
fi
Yah, seems reasonable to have something in place since this keeps happening.
@jennifer-shehane
Yah, seems reasonable to have something in place since this keeps happening.
What would you like?
The
develop
branch should be protected against merging commits with unsynchronized yarn.lock files.Running
yarn
on any commit in thedevelop
branch, or destined for this branch, should not produce any differences inyarn.lock
.Why is this needed?
If commits with unsynchronized
yarn.lock
files are merged into thedevelop
branch then follow-on PRs are forced into cleaning up the mismatch of their predecessor(s) leading to a confusing change history.Other
Examples of PRs merged with unsynchronized
yarn.lock
files:Renovate
See
Examples caused by Renovate:
Manual error
Caused by manual change to a dependency in a
package.json
file without runningyarn
: