From c486c707de2cab561a506cf516fc2a547734ffe0 Mon Sep 17 00:00:00 2001 From: David Aurelio Date: Fri, 16 Dec 2016 11:11:38 -0800 Subject: [PATCH] Add `deps` param to `js_library` Reviewed By: cpojer Differential Revision: D4334383 fbshipit-source-id: 96f0d6ba5ed8ddab25087edd6381a6e6449ff63a --- react-packager/src/ModuleGraph/types.flow.js | 4 +++- .../src/node-haste/DependencyGraph/ResolutionRequest.js | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/react-packager/src/ModuleGraph/types.flow.js b/react-packager/src/ModuleGraph/types.flow.js index a6aef04c..fabb48f2 100644 --- a/react-packager/src/ModuleGraph/types.flow.js +++ b/react-packager/src/ModuleGraph/types.flow.js @@ -120,6 +120,8 @@ export type TransformResult = {| map: ?Object, |}; +export type TransformResults = {[string]: TransformResult}; + export type TransformVariants = {[key: string]: Object}; export type TransformedFile = { @@ -127,6 +129,6 @@ export type TransformedFile = { file: string, hasteID: ?string, package?: PackageData, - transformed: {[variant: string]: TransformResult}, + transformed: TransformResults, type: FileTypes, }; diff --git a/react-packager/src/node-haste/DependencyGraph/ResolutionRequest.js b/react-packager/src/node-haste/DependencyGraph/ResolutionRequest.js index 52a89293..ec4b67df 100644 --- a/react-packager/src/node-haste/DependencyGraph/ResolutionRequest.js +++ b/react-packager/src/node-haste/DependencyGraph/ResolutionRequest.js @@ -480,9 +480,13 @@ function resolutionHash(modulePath, depName) { class UnableToResolveError extends Error { type: string; + from: string; + to: string; constructor(fromModule, toModule, message) { super(); + this.from = fromModule.path; + this.to = toModule; this.message = util.format( 'Unable to resolve module %s from %s: %s', toModule,