-
Notifications
You must be signed in to change notification settings - Fork 7
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
CPLAT-9205 Codemod for New Boilerplate #72
Conversation
Security InsightsNo security relevant content was detected by automated scans. Action Items
Questions or Comments? Reach out on Slack: #support-infosec. |
…' of github.com:Workiva/over_react_codemod into CPLAT-9205-new-boilerplate-codemod
CPLAT-9677 Improve class migration short-circuit logic + consumer communication
class _$AbstractBreadcrumbPathProps extends AbstractGraphFormProps | ||
with | ||
BreadcrumbPathPropsMixin, | ||
// ignore: mixin_of_non_class, undefined_clas |
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.
If the ignore comment is at the end of a line, it'll get applied to this line, and not the subsequent line.
So, in this case, $UnconvertedMixin
would still have an analysis error.
We need this comment to be on its own line:
// ignore: mixin_of_non_class, undefined_clas | |
with ${publicPropsClassName}Mixin, ConvertedMixin, UnconvertedMixin, | |
// ignore: mixin_of_non_class, undefined_class | |
\$UnconvertedMixin; |
Doesn't matter where the comment goes so long as it has one space of between it and the start of the line; dartfmt will handle it:
@Props()
class FooProps = UiProps with
FooPropsMixinn,
ConvertedMixin,
UnconvertedMixin,
// ignore: mixin_of_non_class, undefined_class
$UnconvertedMixin;
Formatted
@Props()
class FooProps = UiProps
with
FooPropsMixinn,
ConvertedMixin,
UnconvertedMixin,
// ignore: mixin_of_non_class, undefined_class
$UnconvertedMixin;
…sume-SemverHelper # Conflicts: # lib/src/boilerplate_suggestors/advanced_props_and_state_class_migrator.dart # lib/src/boilerplate_suggestors/boilerplate_utilities.dart # lib/src/boilerplate_suggestors/simple_props_and_state_class_migrator.dart
CPLAT-9576 Consume SemverHelper
…d__final-cleanup Final cleanup for new boilerplate codemod
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.
+1 / QA +1
All changes were reviewed and tested in the individual PRs that merged into this integration branch (listed in the PR description).
Holistically tested via #80 as it was the last PR to go into integration.
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.
+1
@Workiva/release-management-p |
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.
+1 from RM
Motivation
New over_react component boilerplate is coming soon, and our consumers deserve an easy way to make use of it!
Changes
@Props()
/@State()
classes(CPLAT-9406 Create Simple Props / State Boilerplate Migrator #73)
@Props()
/@State()
classes with advanced inheritance(CPLAT-9407 Add Advanced Props Migrator #76, Use utility class to contain map of converted classNames #79, CPLAT-9565 Address edge cases for boilerplate codemods #81, CPLAT-9677 Improve class migration short-circuit logic + consumer communication #82)
@PropsMixin()
/@StateMixin()
classes(CPLAT-9411 Add standalone PropsMixin / StateMixin migrator #77)
(CPLAT-9409 Remove props/state “companion” classes as part of the boilerplate update #75)
(CPLAT-9308 Codemod Utility to tell if Something is Public API #74, CPLAT-9576 Consume SemverHelper #80, Final cleanup for new boilerplate codemod #83)
@Props
,@State()
,@PropsMixin()
,@StateMixin()
,@Factory()
and@Component2()
annotations that are not required by the new boilerplate(CPLAT-9412 Add annotation remover #78)
Release Notes
Add codemod to assist over_react consumers in their migration to the new boilerplate changes.
Review
See CONTRIBUTING.md for more details on review types (+1 / QA +1 / +10) and code review process.
Please review:
QA Checklist
pub global run over_react_codemod:boilerplate_upgrade
Merge Checklist
While we perform many automated checks before auto-merging, some manual checks are needed: