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

Make sure to run yarn install after creating a changeset version #259

Merged
merged 1 commit into from
May 9, 2024

Conversation

cowboyd
Copy link
Member

@cowboyd cowboyd commented May 9, 2024

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 original changeset 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

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, but this might have something to do with yarn 4
handling stuff differently.

This overrides the `version` script in the changeset action to first
invoke the original `changeset version` command, and then to run an
yarn install. That way, the new lock file will be generated as part of
the release commit.
@cowboyd cowboyd requested a review from a team May 9, 2024 18:23
Copy link

changeset-bot bot commented May 9, 2024

⚠️ No Changeset found

Latest commit: 2dc4f01

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

netlify bot commented May 9, 2024

Deploy Preview for interactors canceled.

Name Link
🔨 Latest commit 2dc4f01
🔍 Latest deploy log https://app.netlify.com/sites/interactors/deploys/663d149c47caee0008245107

@cowboyd cowboyd merged commit a046ccd into main May 9, 2024
6 checks passed
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