Refactor: Rename codegenModuleName to hasteModuleName

Summary:
In our Codegen generators, we were using `codegenModuleName` to refer to the name of the spec file. Calling this `hasteModuleName` makes it more clear what this name refers to (i.e: the name of the spec file). This diff performs that rename.

Changelog: [Internal]

Reviewed By: fkgozali

Differential Revision: D24386282

fbshipit-source-id: fe2beda9a0abf63a5cf88fa0664f83416c9f1aa2
This commit is contained in:
Ramanpreet Nara
2020-10-19 21:56:26 -07:00
committed by Facebook GitHub Bot
parent c642afd97d
commit fc94054915
13 changed files with 126 additions and 140 deletions
@@ -278,17 +278,17 @@ module.exports = {
const packageName = 'com.facebook.fbreact.specs.beta';
const nativeModules = getModules(schema);
Object.keys(nativeModules).forEach(codegenModuleName => {
Object.keys(nativeModules).forEach(hasteModuleName => {
const {
aliases,
excludedPlatforms,
spec: {properties},
} = nativeModules[codegenModuleName];
} = nativeModules[hasteModuleName];
if (excludedPlatforms != null && excludedPlatforms.includes('android')) {
return;
}
const resolveAlias = createAliasResolver(aliases);
const className = `${codegenModuleName}Spec`;
const className = `${hasteModuleName}Spec`;
const imports: Set<string> = new Set([
// Always required.