Skip to content

Commit b03cefe

Browse files
committed
Rename variables for clarity
1 parent 8bc9101 commit b03cefe

File tree

1 file changed

+9
-9
lines changed
  • packages/react-native/scripts/codegen/generate-artifacts-executor

1 file changed

+9
-9
lines changed

packages/react-native/scripts/codegen/generate-artifacts-executor/utils.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -97,20 +97,20 @@ function cleanupEmptyFilesAndFolders(filepath /*: string */) {
9797
}
9898
}
9999

100-
function readGeneratedReactNativeConfig(
100+
function readGeneratedAutolinkingOutput(
101101
baseOutputPath /*: string */,
102102
) /*: $FlowFixMe */ {
103103
// NOTE: Generated by scripts/cocoapods/autolinking.rb in list_native_modules (called by use_native_modules)
104-
const rnConfigGeneratedPath = path.resolve(
104+
const autolinkingGeneratedPath = path.resolve(
105105
baseOutputPath,
106106
'build/generated/autolinking/autolinking.json',
107107
);
108-
if (fs.existsSync(rnConfigGeneratedPath)) {
108+
if (fs.existsSync(autolinkingGeneratedPath)) {
109109
/* $FlowFixMe */
110-
return require(rnConfigGeneratedPath);
110+
return require(autolinkingGeneratedPath);
111111
} else {
112112
console.warn(
113-
`Could not find generated React Native config output at: ${rnConfigGeneratedPath}`,
113+
`Could not find generated autolinking output at: ${autolinkingGeneratedPath}`,
114114
);
115115
return null;
116116
}
@@ -120,10 +120,10 @@ function readReactNativeConfig(
120120
projectRoot /*: string */,
121121
baseOutputPath /*: string */,
122122
) /*: $FlowFixMe */ {
123-
const rnGeneratedConfig = readGeneratedReactNativeConfig(baseOutputPath);
123+
const autolinkingOutput = readGeneratedAutolinkingOutput(baseOutputPath);
124124
const rnConfigFilePath = path.resolve(projectRoot, 'react-native.config.js');
125-
if (rnGeneratedConfig) {
126-
return rnGeneratedConfig;
125+
if (autolinkingOutput) {
126+
return autolinkingOutput;
127127
} else if (fs.existsSync(rnConfigFilePath)) {
128128
/* $FlowFixMe */
129129
return require(rnConfigFilePath);
@@ -149,7 +149,7 @@ function findCodegenEnabledLibraries(
149149
const libraries = [...projectLibraries];
150150
// If we ran autolinking, we shouldn't try to run our own "autolinking-like"
151151
// library discovery
152-
if (!readGeneratedReactNativeConfig(baseOutputPath)) {
152+
if (!readGeneratedAutolinkingOutput(baseOutputPath)) {
153153
libraries.push(...findExternalLibraries(pkgJson, projectRoot));
154154
}
155155
libraries.push(

0 commit comments

Comments
 (0)