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
[Upgrade Tool] Chores / Quality of Life Improvements #19053
Merged
Merged
Changes from 7 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
1a0e5e6
chore: rephrase requirement sentence's sentiment
Convly 3985636
feat: add a --yes option for the upgrade CLI
Convly b1db985
enhancement: make properties readonly to avoid mutations
Convly 157485b
chore: adding better logs to the upgrade CLI
Convly f59036e
chore: remove unused import
Convly c56802a
Merge branch 'features/upgrade-tool' of github.com:strapi/strapi into…
Convly a17f4e8
fix: make major requirements required
Convly f646f9c
chore: revert sentiment update on GIT_CLEAN requirement
Convly 1f39b5b
fix: make promisify working by mocking the entire file-system
Convly dedf0de
fix: yarn.lock update
Convly File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We use "force" everywhere else, like data-transfer. The only reason I would switch to "yes" is if we consider force="yes to all", yes="yes to things that are non-destructive" (and thus have both available here)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For me, it doesn't mean the same thing. Force means "go for it even if we have weird stuff on the way" whereas "yes" means... answering "yes" to all prompts where you can answer "yes". I don't know if that makes sense though
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Although for now, I agree it is similar, since the only things we're answering to are optional requirements
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, it would technically be 'yes' in this case and then we would introduce 'force' if we encountered something like "run this codemod even if it's unpredictable based on your code" but my worry is that we already use force for data-transfer and now we'd have two different wordings that don't really make that distinction clear.
@marcoautiero your thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree, it was my worry too. But I believe that in the long run having well-documented atomic options/flags, is more helpful than trying to accommodate everything under a big one-do-it-all
Also,
yes
is quite a well-known flag since it's already used quite a lot by package managers & other CLI. So I don't think people would be lostThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We use force to ignore prompts with experimental commands in the strapi CLI by the way. I originally wrote
yes
but Ben highlighted that we useforce
in DTS.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, we do use force in the DTS, but again, I feel like it's not aiming at doing the same thing 😕
I don't really see why both couldn't live together
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't have a problem with yes, but imo if you are ignoring prompts with
yes
i think you need to change the CLI too because that is doing the same thing as here, otherwise it's just an inconsistency.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we have potentially destructive effects here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not in the current prompts