Make sure to run yarn install after creating a changeset version #259
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
Our tests assume a frozen lockfile and will fail without it. https://github.com/thefrontside/interactors/actions/runs/9021636078/job/24789386061?pr=253
However, when we bump the package versions as part of the changset versioning, this necessarily means that the yarn lock will be different than before and want to be generated anew. This causes the tests to fail on the release PR always.
I'm not exactly sure why this started failing now, but this might have something to do with yarn 4 handling stuff differently than in yarn 1, but it does make sense as a matter of principal.
Approach
This overrides the
version
script in the changeset action to first invoke the originalchangeset version
command, and then to run an yarn install. That way, the new lock file will be generated as part of the release commit.Learning
https://github.com/changesets/action?tab=readme-ov-file#with-version-script