From eb1ddfdcd99ef9ae096e501b582abe2e178b5063 Mon Sep 17 00:00:00 2001 From: Rafael Oleza Date: Sat, 18 Nov 2017 16:53:44 -0800 Subject: [PATCH] Fix initializing packager logging Reviewed By: cpojer Differential Revision: D6359527 fbshipit-source-id: 0741955ca0efd6d5735637407e1bc140f04c3bbf --- .../metro-bundler/src/node-haste/DependencyGraph.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/packages/metro-bundler/src/node-haste/DependencyGraph.js b/packages/metro-bundler/src/node-haste/DependencyGraph.js index 1a6dde0b..3d3360bc 100644 --- a/packages/metro-bundler/src/node-haste/DependencyGraph.js +++ b/packages/metro-bundler/src/node-haste/DependencyGraph.js @@ -122,15 +122,17 @@ class DependencyGraph extends EventEmitter { } static async load(opts: Options): Promise { + const initializingMetroLogEntry = log( + createActionStartEntry('Initializing Metro'), + ); + opts.reporter.update({type: 'dep_graph_loading'}); const haste = DependencyGraph._createHaste(opts); const {hasteFS, moduleMap} = await haste.build(); - log( - createActionEndEntry( - log(createActionStartEntry('Initializing Metro Bundler')), - ), - ); + + log(createActionEndEntry(initializingMetroLogEntry)); opts.reporter.update({type: 'dep_graph_loaded'}); + return new DependencyGraph({ haste, initialHasteFS: hasteFS,