RFC: Do not modify config files if version is outdated#1604
Draft
RFC: Do not modify config files if version is outdated#1604
Conversation
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?
🦋 Changeset detectedLatest 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 |
tadhglewis
reviewed
Jul 2, 2024
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(); | ||
| }); |
Contributor
There was a problem hiding this comment.
Can we throw up a big warning telling the user to pnpm install as having out of date local packages can cause other issues...
Contributor
|
Thx for the QoL fix! It's definitely not ideal if skuba formats in CI but gets overwritten by the dev again |
Contributor
|
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? |
Contributor
|
Scenario
Repeat |
AaronMoat
approved these changes
Jul 2, 2024
Contributor
|
I actually think it could warrant a log 🤷 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
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?