Граф коммитов

11 Коммитов

Автор SHA1 Сообщение Дата
Tim Yung 494c47360f RN: Sort Imports via ESLint
Summary:
Applies the autofix from the newly introduced `lint/sort-imports` ESLint rule.

Changelog:
[Internal]

Reviewed By: cortinico, skinsshark

Differential Revision: D39907798

fbshipit-source-id: 17f5f11b08a5b4bb66286816b78eb26e07e829b8
2022-09-30 14:28:48 -07:00
Andres Suarez 8bd3edec88 Update copyright headers from Facebook to Meta
Reviewed By: aaronabramov

Differential Revision: D33367752

fbshipit-source-id: 4ce94d184485e5ee0a62cf67ad2d3ba16e285c8f
2021-12-30 15:11:21 -08:00
Daniel Sainati 74d5d03dbd pre-suppress Flow errors in xplat ahead of 153 release
Summary:
This pre-suppresses the 153 error diff ahead of its release, since it is large.

Changelog: [Internal]

Reviewed By: mroch

Differential Revision: D28754374

fbshipit-source-id: 1806f53bc7d804644d434583a2dcd6da63d00328
2021-06-01 09:01:26 -07:00
Tim Yung ede74e5936 RN: Cleanup `ExtendedError` Type
Summary:
Cleans up the `ExtendedError` internal type and moves it into a separate module instead of burying it in `parseErrorStack.js`.

Also, this resolves some unnecessary Flow type suppressions.

Changelog:
[Internal]

Reviewed By: GijsWeterings

Differential Revision: D28470299

fbshipit-source-id: 04093243f06f67f41567270ef9778f01c7549b05
2021-05-19 12:30:41 -07:00
Tim Yung ebc89bfb78 RN: Cleanup `ReactFiberErrorDialog`
Summary:
Minor cleanup of `ReactFiberErrorDialog` with no behavior changes.

Changelog:
[Internal]

Reviewed By: GijsWeterings

Differential Revision: D28423265

fbshipit-source-id: 796777ca2c26d6d7cfae956299786151c74e937f
2021-05-17 01:04:32 -07:00
Sebastian Markbage e3b7520174 Remove unused fields from error dialog
Summary:
Removed in https://github.com/facebook/react/pull/18487

Changelog: [React Core] Logging changes

Reviewed By: gaearon

Differential Revision: D20853086

fbshipit-source-id: 4b0002f21269f415769a2ac8305ba5750245f7d1
2020-04-03 19:58:32 -07:00
Eli White e362470305 Convert easy files to flow strict-local
Summary:
This diff was generated by this script used by WWW
https://our.intern.facebook.com/intern/diffusion/WWW/browse/master/scripts/flow/upgrade_to_flow_strict_local.sh?lines=0

Changelog:
[Internal] Upgrade flow to flow strict-local

Reviewed By: zackargyle, rickhanlonii

Differential Revision: D18833630

fbshipit-source-id: e64d4e9a49a0db5e6bf70a0c489567862b578d7f
2019-12-05 16:06:46 -08:00
George Zahariev 8553e1acc4 Exact-by-default codemod for react-native-github
Summary:
We are rolling out exact-by-default syntax to xplat/js.

I had to manually move around some comments to preserve proper placement.

Changelog: [Internal]

Reviewed By: jbrown215

Differential Revision: D18633611

fbshipit-source-id: 48f7468dcc55b1d00985419d035a61c6820b3abe
2019-11-21 09:42:57 -08:00
Rick Hanlon 75deeb32fe LogBox - Errors thrown in render are fatals
Summary:
The React team wants exceptions thrown during render to pop over the screen as fatals.

Changelog: [Internal]

Reviewed By: motiz88

Differential Revision: D18439258

fbshipit-source-id: dded7b9d93271c1a4eff682be521c7567dfe7d7e
2019-11-13 11:33:37 -08:00
Moti Zilberman 2dadb9e2b0 Move React error message formatting into ExceptionsManager
Summary:
# Context

In https://github.com/facebook/react/pull/16141 we imported `ReactFiberErrorDialog` unchanged from React. That implementation was not idempotent: if passed the same error instance multiple times, it would amend its `message` property every time, eventually leading to bloat and low-signal logs.

The message bloat problem is most evident when rendering multiple `lazy()` components that expose the same Error reference to React (e.g. due to some cache that vends the same rejected Promise multiple times).

More broadly, there's a need for structured, machine-readable logging to replace stringly-typed interfaces in both the production and development use cases.

# This diff

* We leave the user-supplied `message` field intact and instead do all the formatting inside `ExceptionsManager`. To avoid needless complexity, this **doesn't** always have the exact same output as the old code (but it does come close). See tests for the specifics.
* The only mutation we do on React-captured error instances is setting the `componentStack` expando property. This replaces any previously-captured component stack rather than adding to it, and so doesn't create bloat.
* We also report the exception fields `componentStack`, unformatted `message` (as `originalMessage`) and `name` directly to `NativeExceptionsManager` for future use.

Reviewed By: cpojer

Differential Revision: D16331228

fbshipit-source-id: 7b0539c2c83c7dd4e56db8508afcf367931ac71d
2019-07-31 02:34:15 -07:00
Moti Zilberman a9cab21010 Add ReactFiberErrorDialog from React + tests (#25671)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/25671

Moves the RN-specific `ReactFiberErrorDialog` implementation from React to RN for easier iteration. Also adds new unit tests.

This current change is additive, so we're compatible with the current React renderer which still uses `ExceptionsManager` and not the file added here. After the corresponding React update we can remove `ExceptionsManager` from the RN private interface entirely.

Reviewed By: cpojer

Differential Revision: D16278938

fbshipit-source-id: 0c2c0c3e65e524e079730ae3b0cc23e0c0bdc5fd
2019-07-16 03:21:07 -07:00