FED-3248 Update non-defaulted state mixin fields to be optional#298
Merged
Conversation
Security InsightsNo security relevant content was detected by automated scans. Action Items
Questions or Comments? Reach out on Slack: #support-infosec. |
sydneyjodon-wk
commented
Oct 15, 2024
|
|
||
| import 'package:args/args.dart'; | ||
| import 'package:codemod/codemod.dart'; | ||
| import 'package:over_react_codemod/src/dart3_suggestors/null_safety_prep/class_component_required_default_props.dart'; |
Contributor
Author
There was a problem hiding this comment.
I went ahead and removed this since it will be moved in #297
sydneyjodon-wk
commented
Oct 15, 2024
8 tasks
aaronlademann-wf
previously approved these changes
Oct 16, 2024
aaronlademann-wf
previously approved these changes
Oct 16, 2024
greglittlefield-wf
left a comment
Contributor
There was a problem hiding this comment.
One question and a #nit
| ); | ||
| }); | ||
|
|
||
| test('patches initialized state in legacy classes', () async { |
Contributor
There was a problem hiding this comment.
#nit "initialized" isn't relevant here (copy-paste from other tests?)
Suggested change
| test('patches initialized state in legacy classes', () async { | |
| test('patches state fields in legacy classes', () async { |
greglittlefield-wf
previously approved these changes
Oct 16, 2024
6b88cb1
# Conflicts: # lib/src/executables/null_safety_migrator_companion.dart
10 tasks
aaronlademann-wf
approved these changes
Oct 23, 2024
greglittlefield-wf
approved these changes
Oct 23, 2024
greglittlefield-wf
left a comment
Contributor
There was a problem hiding this comment.
+10
@Workiva/release-management-p
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.
Motivation
When working on a different codemod, we noticed that
ClassComponentRequiredInitialStateMigratormigrates defaulted state mixin fields, but there's no codemod to migrate the rest of state mixin fields - we should add one to set all other fields to optional.Changes
StateMixinSuggestorto make all state mixin fields optional and run it afterClassComponentRequiredInitialStateMigratorRelease Notes
Review
See CONTRIBUTING.md for more details on review types (+1 / QA +1 / +10) and code review process.
Please review:
QA Checklist
dart pub global activate --source path .dart pub global run over_react_codemod:null_safety_migrator_companionMerge Checklist
While we perform many automated checks before auto-merging, some manual checks are needed: