react-native icon indicating copy to clipboard operation
react-native copied to clipboard

[codegen]: implement checkIfInvalidModule in parsers

Open tarunrajput opened this issue 2 years ago • 6 comments

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

tarunrajput avatar Nov 08 '22 16:11 tarunrajput

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: ea1d72921d1abd1e753a7f63380232f1f38fabea Branch: main

analysis-bot avatar Nov 08 '22 16:11 analysis-bot

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

facebook-github-bot avatar Nov 08 '22 16:11 facebook-github-bot

xd

Fredy720 avatar Nov 08 '22 17:11 Fredy720

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

Base commit: ea1d72921d1abd1e753a7f63380232f1f38fabea Branch: main

analysis-bot avatar Nov 08 '22 17:11 analysis-bot

PR build artifact for 5109c81d62692d7cee127715f3d387d5845e5a60 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 avatar Nov 08 '22 17:11 pull-bot

PR build artifact for 5109c81d62692d7cee127715f3d387d5845e5a60 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 avatar Nov 08 '22 17:11 pull-bot