diff --git a/packager/react-packager/src/ModuleGraph/types.flow.js b/packager/react-packager/src/ModuleGraph/types.flow.js index a6aef04c1bf0d1..fabb48f241225b 100644 --- a/packager/react-packager/src/ModuleGraph/types.flow.js +++ b/packager/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/packager/react-packager/src/node-haste/DependencyGraph/ResolutionRequest.js b/packager/react-packager/src/node-haste/DependencyGraph/ResolutionRequest.js index 52a892935c54e1..ec4b67df7ff4a5 100644 --- a/packager/react-packager/src/node-haste/DependencyGraph/ResolutionRequest.js +++ b/packager/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,