-
Notifications
You must be signed in to change notification settings - Fork 7
AF-3102 AF-2797 AF-1943 Update codemod to match final transition boilerplate #6
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
Merged
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
f43077f
Update codemod to match final transition boilerplate.
evanweible-wf 8496660
Remove broken imports.
evanweible-wf 1b27b05
Properly type the static `meta` fields.
evanweible-wf 7a4d9ae
add meta getter and fix parts not working
corwinsheahan-wf d584e0d
fix some bugs and formatting
corwinsheahan-wf 17d19ca
small tweaks
evanweible-wf e2a7474
Update (Props|State)Mixin meta suggestor.
evanweible-wf eeb3dba
Update after testing in WSD
evanweible-wf d160b5d
Address more edge cases, add tests for all suggestors.
evanweible-wf 3fc38b0
More edge cases!
evanweible-wf 29e2024
overReact.g.dart --> over_react.g.dart, use actual AF ticket
evanweible-wf 9b16be3
Remove dart tests in favor of python tests.
evanweible-wf 414bdfc
Setup CI and bundle distributable executable.
evanweible-wf 44b42b1
Address review comments:
evanweible-wf b2c6f8c
DRY up tests
evanweible-wf 6feb972
Better handling of private props/state classes naming.
evanweible-wf File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
.git/ | ||
build/ | ||
dist/ | ||
over_react_codemod.egg-info/ |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
/build/ | ||
/dist/ | ||
/over_react_codemod.egg-info/ | ||
/over_react_migrate_to_dart1_and_dart2.spec |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Copyright 2018 Workiva Inc. All rights reserved. |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
install: | ||
pip install -r requirements_dev.txt | ||
|
||
test: | ||
nosetests tests | ||
|
||
dist: | ||
pyinstaller --onefile bin/over_react_migrate_to_dart1_and_dart2.py | ||
# pyinstaller --onefile bin/over_react_migrate_to_dart2.py | ||
|
||
.PHONY: install test dist |
Empty file.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
from sys import exit | ||
|
||
import codemod | ||
|
||
from over_react_codemod.suggestors.component_default_props import component_default_props_suggestor | ||
from over_react_codemod.suggestors.dollar_props import dollar_props_suggestor | ||
from over_react_codemod.suggestors.factories import factories_suggestor | ||
from over_react_codemod.suggestors.generated_parts import collect_libraries_suggestor | ||
from over_react_codemod.suggestors.generated_parts import generated_parts_suggestor | ||
from over_react_codemod.suggestors.props_and_state_classes import props_and_state_classes_accompanying_public_class_suggestor | ||
from over_react_codemod.suggestors.props_and_state_classes import props_and_state_classes_rename_suggestor | ||
from over_react_codemod.suggestors.props_and_state_mixins import props_and_state_mixins_meta_suggestor | ||
from over_react_codemod.suggestors.with_props_or_state_mixins import with_props_and_state_mixins_suggestor | ||
from over_react_codemod.util import is_dart_file | ||
|
||
suggestors = [ | ||
factories_suggestor, | ||
dollar_props_suggestor, | ||
component_default_props_suggestor, | ||
props_and_state_classes_accompanying_public_class_suggestor, | ||
props_and_state_classes_rename_suggestor, | ||
props_and_state_mixins_meta_suggestor, | ||
with_props_and_state_mixins_suggestor, | ||
collect_libraries_suggestor, | ||
generated_parts_suggestor, | ||
] | ||
|
||
|
||
def main(check=False): | ||
num_changes_needed = 0 | ||
|
||
global suggestors | ||
for suggestor in suggestors: | ||
query = codemod.Query(suggestor, path_filter=is_dart_file) | ||
|
||
if check: | ||
num_changes_needed += len(query.generate_patches()) | ||
else: | ||
codemod.run_interactive(query) | ||
|
||
if check and num_changes_needed > 0: | ||
print('Failed: %d changes needed.' % num_changes_needed) | ||
exit(1) | ||
|
||
if __name__ == '__main__': | ||
main() |
Empty file.
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.
:nice: