Skip to content

Commit 819eab5

Browse files
committed
remove unused autolinking code change
1 parent 8cfb48d commit 819eab5

File tree

3 files changed

+3
-57
lines changed

3 files changed

+3
-57
lines changed

packages/expo-modules-autolinking/build/autolinking/findModules.js

Lines changed: 1 addition & 27 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/expo-modules-autolinking/build/autolinking/findModules.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/expo-modules-autolinking/src/autolinking/findModules.ts

Lines changed: 1 addition & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ import {
88
mergeResolutionResults,
99
} from '../dependencies';
1010
import { PackageRevision, SearchResults, SupportedPlatform } from '../types';
11-
import path from 'path';
12-
import fs from 'fs';
1311

1412
export async function resolveExpoModule(
1513
resolution: DependencyResolution,
@@ -20,7 +18,6 @@ export async function resolveExpoModule(
2018
return null;
2119
}
2220
const expoModuleConfig = await discoverExpoModuleConfigAsync(resolution.path);
23-
2421
if (expoModuleConfig && expoModuleConfig.supportsPlatform(platform)) {
2522
return {
2623
name: resolution.name,
@@ -44,30 +41,6 @@ interface FindModulesParams {
4441
autolinkingOptions: AutolinkingOptions & { platform: SupportedPlatform };
4542
}
4643

47-
async function localModulesSearchPaths(appRoot: string): Promise<string[]> {
48-
const modulesPath = path.resolve(appRoot, 'ios/localModules');
49-
if (!fs.existsSync(modulesPath)) {
50-
return [];
51-
}
52-
const res: string[] = [];
53-
54-
const recursivelyScanDirectories = async (dirPath: string) => {
55-
res.push(dirPath);
56-
const dir = fs.opendirSync(dirPath);
57-
for await (const dirent of dir) {
58-
if (!dirent.isDirectory()) {
59-
continue;
60-
}
61-
const childPath = path.resolve(modulesPath, dirent.name);
62-
await recursivelyScanDirectories(childPath);
63-
}
64-
};
65-
66-
await recursivelyScanDirectories(modulesPath);
67-
68-
return res;
69-
}
70-
7144
/** Searches for modules to link based on given config. */
7245
export async function findModulesAsync({
7346
appRoot,
@@ -76,11 +49,10 @@ export async function findModulesAsync({
7649
const excludeNames = new Set(autolinkingOptions.exclude);
7750

7851
// custom native modules should be resolved first so that they can override other modules
79-
const originalSearchPaths = autolinkingOptions.nativeModulesDir
52+
const searchPaths = autolinkingOptions.nativeModulesDir
8053
? [autolinkingOptions.nativeModulesDir, ...autolinkingOptions.searchPaths]
8154
: autolinkingOptions.searchPaths;
8255

83-
const searchPaths = [...(await localModulesSearchPaths(appRoot)), ...originalSearchPaths];
8456
return filterMapResolutionResult(
8557
mergeResolutionResults(
8658
await Promise.all([

0 commit comments

Comments
 (0)