Skip to content

chore: Add getKeyName function to codegen Parser class#35202

Closed
gabrieldonadel wants to merge 3 commits into
facebook:mainfrom
gabrieldonadel:chore/add-getKeyName-to-parser-class
Closed

chore: Add getKeyName function to codegen Parser class#35202
gabrieldonadel wants to merge 3 commits into
facebook:mainfrom
gabrieldonadel:chore/add-getKeyName-to-parser-class

Conversation

@gabrieldonadel
Copy link
Copy Markdown
Collaborator

Summary

This PR adds a getKeyName function to the codegen Parser class and implements it in the Flow and TypeScript parsers as requested on #34872.

Changelog

[Internal] [Added] - Add getKeyName function to codegen Parser class

Test Plan

Run yarn jest react-native-codegen and ensure CI is green

image

@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 Nov 4, 2022
@react-native-bot react-native-bot added the Type: Enhancement A new feature or enhancement of an existing feature. label Nov 4, 2022
@analysis-bot
Copy link
Copy Markdown

analysis-bot commented Nov 4, 2022

Platform Engine Arch Size (bytes) Diff
android hermes arm64-v8a 7,070,038 +0
android hermes armeabi-v7a 6,442,174 +0
android hermes x86 7,485,033 +0
android hermes x86_64 7,344,612 +0
android jsc arm64-v8a 8,934,550 +0
android jsc armeabi-v7a 7,668,661 +0
android jsc x86 8,994,599 +0
android jsc x86_64 9,473,532 +0

Base commit: 5744b21
Branch: main

@analysis-bot
Copy link
Copy Markdown

analysis-bot commented Nov 4, 2022

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

Base commit: bbb3a61
Branch: main

@pull-bot
Copy link
Copy Markdown

pull-bot commented Nov 4, 2022

PR build artifact for b8c9470 is ready.
To use, download tarball from "Artifacts" tab in this CircleCI job then run yarn add <path to tarball> in your React Native project.

@facebook-github-bot
Copy link
Copy Markdown
Contributor

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

Copy link
Copy Markdown
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.

Amazing work, thank you for doing this! 👏

What do you think about adding a unit test for the TypeScript parser and for the Flow parser?

Now that we have some small nice functions in the Parsers, it would be nice to test them!

@gabrieldonadel gabrieldonadel force-pushed the chore/add-getKeyName-to-parser-class branch from b8c9470 to a9d875f Compare November 8, 2022 01:44
@gabrieldonadel
Copy link
Copy Markdown
Collaborator Author

gabrieldonadel commented Nov 8, 2022

What do you think about adding a unit test for the TypeScript parser and for the Flow parser?

Sure @cipolleschi, that sounds like a great idea, I've just pushed a commit adding some unit tests for both Parsers.

@pull-bot
Copy link
Copy Markdown

pull-bot commented Nov 8, 2022

PR build artifact for a9d875fa39d128daa9573e48e5f0848ede0a89d6 is ready.
To use, download tarball from "Artifacts" tab in this CircleCI job then run yarn add <path to tarball> in your React Native project.

@gabrieldonadel gabrieldonadel force-pushed the chore/add-getKeyName-to-parser-class branch from a9d875f to a85d874 Compare November 8, 2022 21:40
@pull-bot
Copy link
Copy Markdown

pull-bot commented Nov 8, 2022

PR build artifact for a85d874873b6f54d785ea4f26636b997ff2f3320 is ready.
To use, download tarball from "Artifacts" tab in this CircleCI job then run yarn add <path to tarball> in your React Native project.

@pull-bot
Copy link
Copy Markdown

pull-bot commented Nov 8, 2022

PR build artifact for 518ef9ad244eed7671fd28f65e37a774fe9e911a is ready.
To use, download tarball from "Artifacts" tab in this CircleCI job then run yarn add <path to tarball> in your React Native project.

@gabrieldonadel gabrieldonadel force-pushed the chore/add-getKeyName-to-parser-class branch 2 times, most recently from 03fd22c to 858fc41 Compare November 9, 2022 17:53
@gabrieldonadel gabrieldonadel force-pushed the chore/add-getKeyName-to-parser-class branch from 858fc41 to 68f987d Compare November 9, 2022 18:02
@pull-bot
Copy link
Copy Markdown

pull-bot commented Nov 9, 2022

PR build artifact for 68f987d is ready.
To use, download tarball from "Artifacts" tab in this CircleCI job then run yarn add <path to tarball> in your React Native project.

@gabrieldonadel
Copy link
Copy Markdown
Collaborator Author

Hi @cipolleschi everything should've been updated now, do you mind taking another look?

@facebook-github-bot
Copy link
Copy Markdown
Contributor

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

@gabrieldonadel gabrieldonadel deleted the chore/add-getKeyName-to-parser-class branch November 10, 2022 17:08
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. Type: Enhancement A new feature or enhancement of an existing feature.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants