Skip to content

Conversation

@AntoineDoubovetzky
Copy link

Summary

This PR is a task from #34872:

Extract the visit function in a shared function in the parsers/utils.js folder. Use the new function in the Flow and TypeScript parsers.

Changelog

[Internal] [Changed] - Extract the visit function in a shared function in the parsers/utils.js

Test Plan

I tested using jest, flow and eslint commands.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Oct 11, 2022
return [errors, guard];
}

// TODO(T108222691): Use flow-types for @babel/parser
Copy link
Author

Choose a reason for hiding this comment

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

There was a different TODO comment in Flow and Typescript folders, I pasted one of them

});
});

describe('visit', () => {
Copy link
Author

Choose a reason for hiding this comment

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

I tried to test each branch, jest gives me 100% coverage but please tell me if you see a way to improve these tests.

Copy link
Contributor

Choose a reason for hiding this comment

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

They looks good to me!

@analysis-bot
Copy link

analysis-bot commented Oct 11, 2022

Platform Engine Arch Size (bytes) Diff
android hermes arm64-v8a 7,777,423 +0
android hermes armeabi-v7a 7,178,430 +0
android hermes x86 8,090,430 +0
android hermes x86_64 8,062,120 +0
android jsc arm64-v8a 9,636,881 +0
android jsc armeabi-v7a 8,401,168 +0
android jsc x86 9,586,058 +0
android jsc x86_64 10,179,226 +0

Base commit: 5d8a712
Branch: main

@analysis-bot
Copy link

analysis-bot commented Oct 11, 2022

Platform Engine Arch Size (bytes) Diff
ios - universal n/a --

Base commit: 5d8a712
Branch: main

Copy link
Contributor

@cipolleschi cipolleschi left a comment

Choose a reason for hiding this comment

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

Thank you so much for the effort! It is amazing that we are also testing all this code! 🤩

});
});

describe('visit', () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

They looks good to me!

@facebook-github-bot
Copy link
Contributor

@cipolleschi has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@AntoineDoubovetzky AntoineDoubovetzky force-pushed the refactor/extract-visit-function branch from f57219c to 95ec098 Compare October 14, 2022 16:52
@AntoineDoubovetzky
Copy link
Author

I rebased the branch because of conflicts

@AntoineDoubovetzky
Copy link
Author

@cipolleschi Do you need me to update something on this PR or is everything ok ?

@cipolleschi
Copy link
Contributor

Thank you! No, nothing else from your side. I'll try to land this between today and tomorrow! 👍

@facebook-github-bot
Copy link
Contributor

@cipolleschi has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@react-native-bot
Copy link
Collaborator

This pull request was successfully merged by @AntoineDoubovetzky in 3c8d678.

When will my fix make it into a release? | Upcoming Releases

@react-native-bot react-native-bot added the Merged This PR has been merged. label Oct 17, 2022
OlimpiaZurek pushed a commit to OlimpiaZurek/react-native that referenced this pull request May 22, 2023
Summary:
This PR is a task from facebook#34872:
> Extract the visit function in a shared function in the parsers/utils.js folder. Use the new function in the Flow and TypeScript parsers.

## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->

[Internal] [Changed] - Extract the visit function in a shared function in the parsers/utils.js

Pull Request resolved: facebook#34946

Test Plan: I tested using jest, flow and eslint commands.

Reviewed By: NickGerleman

Differential Revision: D40276462

Pulled By: cipolleschi

fbshipit-source-id: 299cc2a3aa65a9757b217192a13838d037c497a1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. hacktoberfest-accepted Merged This PR has been merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants