Skip to content

[codegen]: implement checkIfInvalidModule in parsers#35261

Closed
tarunrajput wants to merge 1 commit into
facebook:mainfrom
tarunrajput:implement-checkIfInvalidModule-in-parser
Closed

[codegen]: implement checkIfInvalidModule in parsers#35261
tarunrajput wants to merge 1 commit into
facebook:mainfrom
tarunrajput:implement-checkIfInvalidModule-in-parser

Conversation

@tarunrajput
Copy link
Copy Markdown
Contributor

Summary

Part of the Codegen umbrella Issue #34872

Create a checkIfInvalidModule function in the parser.js file and document it. Implement this logic in the FlowParser.js and this logic in the TypeScriptParser.js. Refactor the throwIfIncorrectModuleRegistryCallTypeParameterParserError function to accept a Parser instead of a ParserType and use the newly created function instead of the if (language) logic.

Changelog

[Internal] [Added] - Add checkIfInvalidModule in the Parser interface and implement it in both parsers. Refactor throwIfIncorrectModuleRegistryCallTypeParameterParserError to use this new function.

Test Plan

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

Platform Engine Arch Size (bytes) Diff
android hermes arm64-v8a 7,069,290 +0
android hermes armeabi-v7a 6,441,440 +0
android hermes x86 7,484,363 +0
android hermes x86_64 7,343,848 +0
android jsc arm64-v8a 8,934,239 +0
android jsc armeabi-v7a 7,668,376 +0
android jsc x86 8,994,382 +0
android jsc x86_64 9,473,215 +0

Base commit: ea1d729
Branch: main

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.

Thank you so much for taking care of this!

@facebook-github-bot
Copy link
Copy Markdown
Contributor

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

@Fredy720
Copy link
Copy Markdown

Fredy720 commented Nov 8, 2022

xd

@analysis-bot
Copy link
Copy Markdown

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

Base commit: ea1d729
Branch: main

@pull-bot
Copy link
Copy Markdown

pull-bot commented Nov 8, 2022

PR build artifact for 5109c81 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 5109c81 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.

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.

7 participants