-
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
Use utility class to contain map of converted classNames #79
Use utility class to contain map of converted classNames #79
Conversation
7a55923
to
73bbc35
Compare
Security InsightsNo security relevant content was detected by automated scans. Action Items
Questions or Comments? Reach out on Slack: #support-infosec. |
73bbc35
to
4a8bda5
Compare
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.
Looks awesome! Wrapping it in a class makes a lot of sense
+1
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
|
||
tearDown(() { | ||
propsAndStateClassNamesConvertedToNewBoilerplate = {}; | ||
converter.setConvertedClassNames({}); |
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.
#nit Instead of sharing this converter and having to worry about cleaning up after it, it'd be nice to have a fresh instance each time.
Motivation
We want to change the global variable being used to keep track of props / state classes that have been converted to the new boilerplate by sibling migrators to a variable within an object that can be passed around by utilities / migrators that need it.
In doing so, we'll
Changes
ClassToMixinConverter
class, which contains aconvertedClassNames
getter to access the private_convertedClassNames
field.main()
ofboilerplate_upgrade.dart
, and pass the instance around to the migrators that make use of it as constructor arguments.FYA @sydneyjodon-wk @joebingham-wk @greglittlefield-wf