mirror of https://github.com/status-im/metro.git
Fix DependencyGraph-test log-spew
Reviewed By: mjesun Differential Revision: D5803016 fbshipit-source-id: fc94590331fb77796cb5d2bbc96f963b7b5f8c7c
This commit is contained in:
parent
86a943bbcd
commit
92fa17f70e
|
@ -77,14 +77,14 @@ class Resolver {
|
|||
}
|
||||
|
||||
static async load(opts: Options): Promise<Resolver> {
|
||||
const depGraphOpts = {
|
||||
const depGraph = await DependencyGraph.load({
|
||||
assetDependencies: [opts.assetRegistryPath],
|
||||
assetExts: opts.assetExts,
|
||||
extraNodeModules: opts.extraNodeModules,
|
||||
forceNodeFilesystemAPI: false,
|
||||
getTransformCacheKey: opts.getTransformCacheKey,
|
||||
globalTransformCache: opts.globalTransformCache,
|
||||
ignoreFilePath: opts.blacklistRE || / ^/ /* matches nothing */,
|
||||
ignorePattern: opts.blacklistRE || / ^/ /* matches nothing */,
|
||||
maxWorkers: opts.maxWorkers,
|
||||
moduleOptions: {
|
||||
hasteImpl: opts.hasteImpl,
|
||||
|
@ -101,8 +101,7 @@ class Resolver {
|
|||
transformCode: opts.transformCode,
|
||||
useWatchman: true,
|
||||
watch: opts.watch,
|
||||
};
|
||||
const depGraph = await DependencyGraph.load(depGraphOpts);
|
||||
});
|
||||
return new Resolver(opts, depGraph);
|
||||
}
|
||||
|
||||
|
|
|
@ -51,7 +51,7 @@ type Options = {|
|
|||
+forceNodeFilesystemAPI: boolean,
|
||||
+getTransformCacheKey: GetTransformCacheKey,
|
||||
+globalTransformCache: ?GlobalTransformCache,
|
||||
+ignoreFilePath: RegExp,
|
||||
+ignorePattern: RegExp,
|
||||
+maxWorkers: number,
|
||||
+moduleOptions: ModuleOptions,
|
||||
+platforms: Set<string>,
|
||||
|
@ -108,7 +108,7 @@ class DependencyGraph extends EventEmitter {
|
|||
return new JestHasteMap({
|
||||
extensions: opts.sourceExts.concat(opts.assetExts),
|
||||
forceNodeFilesystemAPI: opts.forceNodeFilesystemAPI,
|
||||
ignorePattern: opts.ignoreFilePath,
|
||||
ignorePattern: opts.ignorePattern,
|
||||
maxWorkers: opts.maxWorkers,
|
||||
mocksPattern: '',
|
||||
name: 'metro-bundler-' + JEST_HASTE_MAP_CACHE_BREAKER,
|
||||
|
|
|
@ -102,7 +102,8 @@ describe('DependencyGraph', function() {
|
|||
providesModuleNodeModules: ['haste-fbjs', 'react-haste', 'react-native'],
|
||||
platforms: new Set(['ios', 'android']),
|
||||
useWatchman: false,
|
||||
ignoreFilePath: () => false,
|
||||
// This pattern is not expected to match anything.
|
||||
ignorePattern: /🚇/,
|
||||
maxWorkers: 1,
|
||||
moduleOptions: {transformCache: require('TransformCaching').mocked()},
|
||||
resetCache: true,
|
||||
|
|
Loading…
Reference in New Issue