(opts: Options)
| 66 | } |
| 67 | |
| 68 | static async load(opts: Options): Promise<Resolver> { |
| 69 | const depGraphOpts = Object.assign(Object.create(opts), { |
| 70 | assetDependencies: ['react-native/Libraries/Image/AssetRegistry'], |
| 71 | forceNodeFilesystemAPI: false, |
| 72 | ignoreFilePath(filepath) { |
| 73 | return filepath.indexOf('__tests__') !== -1 || |
| 74 | (opts.blacklistRE != null && opts.blacklistRE.test(filepath)); |
| 75 | }, |
| 76 | moduleOptions: { |
| 77 | hasteImpl: opts.hasteImpl, |
| 78 | resetCache: opts.resetCache, |
| 79 | }, |
| 80 | preferNativePlatform: true, |
| 81 | roots: opts.projectRoots, |
| 82 | useWatchman: true, |
| 83 | }); |
| 84 | const depGraph = await DependencyGraph.load(depGraphOpts); |
| 85 | return new Resolver(opts, depGraph); |
| 86 | } |
| 87 | |
| 88 | getShallowDependencies( |
| 89 | entryFile: string, |
no test coverage detected