Skip to content

Commit bc5941d

Browse files
committed
chore(config): rename mergeConfigHooked to mergeConfigWithCwd
1 parent 03fd87b commit bc5941d

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

packages/metro-config/src/loadConfig.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -154,9 +154,9 @@ function mergeConfig<T: $ReadOnly<InputConfigT>>(
154154
});
155155
}
156156

157-
// mergeConfig is public, we should try to keep its API stable
158-
// This trick is necessary to pass proper cwd to `populateSync`
159-
const mergeConfigHooked = <T: $ReadOnly<InputConfigT>>(
157+
// `mergeConfig` is public, so we should try to keep its API stable
158+
// This trick is necessary to pass the proper cwd to the internal `populateSync` call
159+
const mergeConfigWithCwd = <T: $ReadOnly<InputConfigT>>(
160160
cwd: string,
161161
base: T,
162162
extra: ConfigT | InputConfigT,
@@ -186,7 +186,7 @@ async function loadMetroConfigFromDisk(
186186
const rootPath = dirname(filepath);
187187

188188
const defaults = await getDefaultConfig(rootPath);
189-
const defaultConfig: ConfigT = mergeConfigHooked(
189+
const defaultConfig: ConfigT = mergeConfigWithCwd(
190190
rootPath,
191191
defaults,
192192
defaultConfigOverrides,
@@ -197,10 +197,10 @@ async function loadMetroConfigFromDisk(
197197
// to the function.
198198

199199
const resultedConfig = await configModule(defaultConfig);
200-
return mergeConfigHooked(rootPath, defaultConfig, resultedConfig);
200+
return mergeConfigWithCwd(rootPath, defaultConfig, resultedConfig);
201201
}
202202

203-
return mergeConfigHooked(rootPath, defaultConfig, configModule);
203+
return mergeConfigWithCwd(rootPath, defaultConfig, configModule);
204204
}
205205

206206
function overrideConfigWithArguments(

0 commit comments

Comments
 (0)