react-native/Libraries/Utilities
James Ide 2b80cdf1bb Fix HMR syntax error messages (`message` instead of `description`)
Summary:
The code to display HMR errors on the client was reading the `description` field from Metro payloads. Metro does not include `description` in the body of its error payloads -- only in its `body.errors[]` items. This commit changes RN's HMR code to show `body.message` (set consistently with https://github.com/facebook/metro/pull/124) instead of the non-existent `body.description`.

Open a test RN app, enable HMR, and then introduce a syntax error in an app source file. See that the redbox provides information about the syntax error instead of just saying "TransformError undefined".

- https://github.com/facebook/metro/pull/124

[GENERAL][ENHANCEMENT][HMR] - Fix display of syntax error messages when HMR is enabled
Closes https://github.com/facebook/react-native/pull/17619

Differential Revision: D6726516

Pulled By: mjesun

fbshipit-source-id: b1d1008d6f1aa8f88ff8a2aa1374724a305c773b
2018-01-16 03:42:44 -08:00
..
__mocks__ Add mock for BackHandler 2017-04-11 12:25:38 -07:00
__tests__ Adding @email tags to most of the tests 2017-11-02 06:25:03 -07:00
differ Adding @email tags to most of the tests 2017-11-02 06:25:03 -07:00
BackAndroid.js Move BackAndroid -> BackHandler, add Apple TV support for back nav 2017-03-06 21:51:40 -08:00
BackHandler.android.js Docs: Improve BackHandler documentation (addEventListener and removeEventListener) 2017-11-07 10:53:59 -08:00
BackHandler.ios.js Remove usage of the ... operator in BackHandler 2017-10-20 18:02:14 -07:00
DebugEnvironment.js gets Relay/Classic/Compat building 2017-07-24 21:39:00 -07:00
DeviceInfo.js require `fbjs/lib/invariant`, not `invariant` 2017-03-21 05:37:03 -07:00
Dimensions.js Run eslint --fix 2017-10-09 17:46:44 -07:00
HMRClient.js Fix HMR syntax error messages (`message` instead of `description`) 2018-01-16 03:42:44 -08:00
HMRLoadingView.android.js Show a Toast for HMR 2016-02-27 15:58:35 -08:00
HMRLoadingView.ios.js Show a Toast for HMR 2016-02-27 15:58:35 -08:00
HeapCapture.js upload JSC heap capture to bundle server 2016-08-02 08:13:57 -07:00
MatrixMath.js Fix license headers 2017-03-08 00:52:17 -08:00
PerformanceLogger.js @allow-large-files Flow v0.54.0 2017-09-06 03:33:43 -07:00
PixelRatio.js Run eslint --fix 2017-10-09 17:46:44 -07:00
Platform.android.js Merge AndroidConstants and IOSConstants into PlatformConstants 2017-02-22 15:01:11 -08:00
Platform.ios.js Merge AndroidConstants and IOSConstants into PlatformConstants 2017-02-22 15:01:11 -08:00
PlatformOS.android.js Fork Platform with a modified API 2017-12-08 14:17:19 -08:00
PlatformOS.ios.js Fork Platform with a modified API 2017-12-08 14:17:19 -08:00
RCTLog.js Run eslint --fix 2017-10-09 17:46:44 -07:00
SceneTracker.js Add option to track when we're showing blankness during fast scrolling 2017-04-07 01:00:39 -07:00
asyncRequire.js metro-buck: check validity of segments 2017-12-14 09:49:37 -08:00
binaryToBase64.js @allow-large-files Flow v0.54.0 2017-09-06 03:33:43 -07:00
buildStyleInterpolator.js Avoid eval in buildStyleInterpolator 2017-10-02 17:05:34 -07:00
clamp.js fix params order in comments clamp.js 2017-09-29 00:01:10 -07:00
createStrictShapeTypeChecker.js Run eslint --fix 2017-10-09 17:46:44 -07:00
deepFreezeAndThrowOnMutationInDev.js Android: fix JSC crash in dev 2017-01-11 08:58:30 -08:00
defineLazyObjectProperty.js Break infinite loop that happens only in debug environments 2017-01-17 16:58:46 -08:00
deprecatedPropType.js Patch up for future React Sync 2017-02-08 14:50:43 -08:00
dismissKeyboard.js Fix license headers 2017-03-08 00:52:17 -08:00
groupByEveryN.js
infoLog.js Fixing eslint-comments warnings 2018-01-08 17:04:29 -08:00
logError.js Fix react-native function call arity errors 2017-05-18 16:55:55 -07:00
mapWithSeparator.js Optimize and flowify mapWithSeparator 2016-05-26 12:28:55 -07:00
mergeFast.js Fix typo 2015-08-06 20:22:24 -08:00
mergeIntoFast.js Bugfix - Typos 2015-12-15 09:09:32 -08:00
stringifySafe.js
truncate.js Auto-fix lint errors 2016-08-09 06:43:46 -07:00
utf8.js Add support for missing XHR response types 2016-04-11 05:54:28 -07:00