Skip to content
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

FED-2094 Add suggestor that replaces useRef with useRefInit #273

Merged
merged 6 commits into from
Mar 6, 2024

Conversation

aaronlademann-wf
Copy link
Contributor

@aaronlademann-wf aaronlademann-wf commented Feb 29, 2024

Motivation

Changes

Release Notes

Review

See CONTRIBUTING.md for more details on review types (+1 / QA +1 / +10) and code review process.

Please review:

QA Checklist

  • Tests were updated and provide good coverage of the changeset and other affected code
  • Manual testing was performed if needed
    • Steps from PR author:
      • Run the following commands on any of the repos in this SG query locally
      dart pub global activate https://github.com/Workiva/over_react_codemod.git --source=git --git-ref=batch/fedx/FED-2094_useRefInit_migration
      dart pub global run over_react_codemod:use_ref_init_migration --yes-to-all
      
      and verify that the useRef usages that pass an initial value have been changed to useRefInit

Merge Checklist

While we perform many automated checks before auto-merging, some manual checks are needed:

  • A Frontend Frameworks Design member has reviewed these changes
  • There are no unaddressed comments - this check can be automated if reviewers use the "Request Changes" feature
  • For release PRs - Version metadata in Rosie comment is correct

@aaronlademann-wf aaronlademann-wf force-pushed the batch/fedx/FED-2094_useRefInit_migration branch 2 times, most recently from 6ff4783 to 0bb8dee Compare February 29, 2024 20:11
@aviary-wf
Copy link

Security Insights

No security relevant content was detected by automated scans.

Action Items

  • Review PR for security impact; comment "security review required" if needed or unsure
  • Verify aviary.yaml coverage of security relevant code

Questions or Comments? Reach out on Slack: #support-infosec.

@aaronlademann-wf aaronlademann-wf force-pushed the batch/fedx/FED-2094_useRefInit_migration branch from 0bb8dee to 1da0b77 Compare February 29, 2024 20:14
@aaronlademann-wf aaronlademann-wf force-pushed the batch/fedx/FED-2094_useRefInit_migration branch from 1da0b77 to 61272bf Compare February 29, 2024 20:16
@aaronlademann-wf aaronlademann-wf marked this pull request as ready for review February 29, 2024 22:25
@sydneyjodon-wk sydneyjodon-wk self-assigned this Mar 6, 2024
we will be moving this into an aggregate executable in a separate PR
sydneyjodon-wk
sydneyjodon-wk previously approved these changes Mar 6, 2024
Copy link
Contributor

@sydneyjodon-wk sydneyjodon-wk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 just some questions

bin/use_ref_init_migration.dart Outdated Show resolved Hide resolved
lib/src/executables/use_ref_init_migration.dart Outdated Show resolved Hide resolved
sydneyjodon-wk
sydneyjodon-wk previously approved these changes Mar 6, 2024
Copy link
Contributor

@sydneyjodon-wk sydneyjodon-wk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 - thank you! Qaing now :loading:


@override
Future<void> generatePatches() async {
_result = await context.getResolvedUnit();
Copy link
Contributor

@sydneyjodon-wk sydneyjodon-wk Mar 6, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was waiting forever for this to run on DPC and brought it up to Greg and he realized - does this need to be running on resolved AST? It doesn't seem like anything is checking for the package source so it would probably run a lot faster to do this not resolved

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So do I just remove the generatePatches override altogether then? Seems like its an empty method in the base class?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nvm... I figured it out

Copy link
Contributor

@sydneyjodon-wk sydneyjodon-wk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+10 ran great on wdesk_sdk and dpc!

@Workiva/release-management-p

Copy link

@rmconsole-wf rmconsole-wf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 from RM

@rmconsole3-wf rmconsole3-wf merged commit f7bccf0 into master Mar 6, 2024
8 checks passed
@rmconsole3-wf rmconsole3-wf deleted the batch/fedx/FED-2094_useRefInit_migration branch March 6, 2024 20:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants