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.
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
[pickers] Rename
AdapterDateFns
intoAdapterDateFnsV2
andAdapterDateFnsV3
intoAdapterDateFns
#16082[pickers] Rename
AdapterDateFns
intoAdapterDateFnsV2
andAdapterDateFnsV3
intoAdapterDateFns
#16082Changes from 14 commits
36f8592
1d693fe
867dda6
c9be1ae
1b70941
fe8aaf8
62aa9ef
db36615
3bde897
1ab1c3b
338a48d
beee232
6c2cb89
c15e5fa
edc760c
cff5d96
46d35e3
8c9a97c
5ad48b7
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
Check warning on line 258 in packages/x-codemod/README.md
GitHub Actions / runner / vale
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.
WDYT, should we include it in the safe preset if it is NOT idempotent?
Running it repeatedly will change the imports back and forth. 🙈
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.
Oh crap, that's a good question.
Could it be work adding a small comment at the end of the line that we can check to make it idempotent? 😬
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 imagine how we could do it cleanly (without adding some marker comment)... 🤷
It's the nature of the rename, that we are essentially swapping the adapter names, with the exception that
AdapterV3
becomesAdapter
and then after a subsequent run would becomeAdapterV2
at which point the codemod would no longer rename it back toAdapter
, but it's still: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.
Me neither
The only solution I see is to transform:
into
And check for the existence of the comment before transforming.
Which is far from great 😬
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, exactly... 🙈
Let's go the slightly risky route and wait for user feedback if this seems problematic. 🤔