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

RFC: Do not modify config files if version is outdated #1604

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

72636c
Copy link
Member

@72636c 72636c commented Jul 2, 2024

I noticed some recent commits where config file changes were going back and forth. However, after writing this I'm not sure that it is actually worth it, given e.g. a Prettier change between versions would similarly cause such churn if local dependencies are outdated. Thoughts?

I noticed some recent commits where config file changes were going back
and forth. However, after writing this I'm not sure that it is actually
worth it, given e.g. a Prettier change between versions would similarly
cause such churn if local dependencies are outdated. Thoughts?
@72636c 72636c requested a review from a team as a code owner July 2, 2024 03:48
Copy link

changeset-bot bot commented Jul 2, 2024

🦋 Changeset detected

Latest commit: 40fb67d

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

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

Comment on lines +291 to +310
it('should report ok if local skuba version is out of date, and output nothing', async () => {
getDestinationManifest.mockResolvedValue({
packageJson: {
skuba: {
version: '2147483647.0.0',
},
},
} as any);

setupDestinationFiles({});

await expect(refreshConfigFiles('format', log)).resolves.toEqual({
ok: true,
fixable: false,
});

expect(stdout()).toBe('');

expect(writeFile).not.toHaveBeenCalled();
});
Copy link
Member

@tadhglewis tadhglewis Jul 2, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we throw up a big warning telling the user to pnpm install as having out of date local packages can cause other issues...

@tadhglewis
Copy link
Member

Thx for the QoL fix! It's definitely not ideal if skuba formats in CI but gets overwritten by the dev again

@AaronMoat
Copy link
Contributor

AaronMoat commented Jul 2, 2024

Wonder if global skuba should delegate to local skuba if it can find it 🤔

Edit: or is this a problem of not having installed deps?

@tadhglewis
Copy link
Member

tadhglewis commented Jul 2, 2024

@AaronMoat

Scenario

  1. Dev pulls master and does pnpm format
  2. Dev pushes
  3. Skuba formats due to dev format using out of date skuba
  4. Dev pulls and then re-pushes their bad format

Repeat

@AaronMoat
Copy link
Contributor

I actually think it could warrant a log 🤷

@72636c 72636c marked this pull request as draft November 4, 2024 23:22
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.

3 participants